# BlueROV + Zed Stereo Camera Calibration Tutorial

**URL:** <https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396>\
**Category:** Adventure Log\
**Created:** [October 28, 2024, 10:09pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396 "2024-10-28T22:09:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackmead515](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jackmead515](https://discuss.bluerobotics.com/u/jackmead515)\
**Post date:** [October 28, 2024, 10:09pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/1 "2024-10-28T22:09:35Z")

</div>

Recently had a fun time with @tony-white and a crew from the Sexton corporation in Kailua-Kona, Hawaii, assisting them with their cameras. The calibration they had wasn’t working, so I built some software to assist them in monitoring and recording the BlueROV while it was underwater and calibrating the camera. Really fun underwater computer vision project. I definitely think it’s the start of a larger set of projects I’ll work on in the future.

A full tutorial here: [stereographic\_depth\_estimation\_opencv](https://jackmead515.github.io/notebooks/stereographic_depth_estimation_opencv.html)

Would be happy to give more detail or answer questions. Tony invited me to join and post this in the forums. So this is my first post! Mahalo T.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/1/14db14a1d7313feebfe29fe7531c2a5ecafdf526.jpeg)

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [October 28, 2024, 10:26pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/2 "2024-10-28T22:26:10Z")

</div>

Thanks @jackmead515 !  
We’re currently evaluating the [ZedHead](https://shop.thesextonco.com/products/zed-head) for the BlueRobotics 3rd party product “Reef” - if this is something you’d be interested in, please share your application and any questions you may have!

---

<div class="post-metadata">

**Author:** ![amarburg](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@amarburg](https://discuss.bluerobotics.com/u/amarburg)\
**Post date:** [October 31, 2024, 3:55pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/3 "2024-10-31T15:55:57Z")

</div>

So good. Thanks for posting a great tutorial!

---

<div class="post-metadata">

**Author:** ![juanjepalomeke](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@juanjepalomeke](https://discuss.bluerobotics.com/u/juanjepalomeke)\
**Post date:** [November 4, 2024, 6:25am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/4 "2024-11-04T06:25:45Z")

</div>

I have always been aware of the direct application of stereoscopic cameras for underwater photogrammetry, although it can also be done with conventional 4k cameras. It would be interesting to know if it offers advantages for this purpose

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [November 4, 2024, 1:47pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/5 "2024-11-04T13:47:47Z")

</div>

Hi @juanjepalomeke -  
The primary advantages are twofold - a reduction in processing time when generating the 3D photogrammetry model, and that model being generated too-scale. When done with a single camera, the size of objects captured is unknown!

---

<div class="post-metadata">

**Author:** ![juanjepalomeke](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@juanjepalomeke](https://discuss.bluerobotics.com/u/juanjepalomeke)\
**Post date:** [November 4, 2024, 3:33pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/6 "2024-11-04T15:33:02Z")

</div>

For what you say, for me it is already more than enough for them to be interesting. Is it possible to use that code with any stereoscopic camera?

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [November 4, 2024, 10:11pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/7 "2024-11-04T22:11:21Z")

</div>

The code shown is generalized yes, but each camera may have a different calibration matrix and raw video format / resolution, as well as a different baseline camera separation.

---

<div class="post-metadata">

**Author:** ![jackmead515](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jackmead515](https://discuss.bluerobotics.com/u/jackmead515)\
**Post date:** [November 4, 2024, 10:31pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/8 "2024-11-04T22:31:00Z")

</div>

Yes to back Tony up, the intrinsic and extrinsic properties of each stereographic camera are highly unique. And given even slight adjustments to resolution, baseline, recording medium (air, fresh water, salt water, etc), will greatly adjust the quality factor.

In addition, the calibration images may have to be collected several times over as getting a quality set of images is an art-form rather than a very applied approach. This is due to the need for the estimation model to have a generalized set of points distributed over the image plane, at all different angles, and depths from the camera, the lighting conditions as they influence the template matching algorithm and how it approximates the the positions of the checkerboard image, and even the checkerboard geometry itself as that has to be configured correctly. (9x6 or 11x8 etc)

In a controlled environment this can be easy! But if you notice in the tutorial, some of the checkerboard points in the video are distorted due to medium noise and lighting conditions. There are various denoising and equalization filters that could be applied to minimize this, but they just introduce more tunable options.

Our checkerboard template we used comes with a high precision and the plane is very smooth. Any slight distortions or warping of the checkerboard plane (for instance say due to printing out a checkerboard pattern from a printer) will also affect the calibration accuracy.

---

<div class="post-metadata">

**Author:** ![juanjepalomeke](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@juanjepalomeke](https://discuss.bluerobotics.com/u/juanjepalomeke)\
**Post date:** [November 5, 2024, 5:33am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/9 "2024-11-05T05:33:31Z")

</div>

In this case I play with my old gopro3D for test it

Thanks

---

<div class="post-metadata">

**Author:** ![c.pick](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@c.pick](https://discuss.bluerobotics.com/u/c.pick)\
**Post date:** [January 23, 2025, 10:22pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/10 "2025-01-23T22:22:23Z")

</div>

When looking through your tutorial you mentioned that you used an embedded NVIDIA GPU, it can do real-time depth estimation and point-cloud generation… Which GPU did you use?

> **[NVIDIA RTX Embedded GPU Solutions](https://www.nvidia.com/en-us/design-visualization/resources/rtx-embedded/)**
>
> NVIDIA RTX embedded solutions are designed for incredible performance and power efficiency no matter your industry, application or deployment environment.

Assuming it was one of these?

Thanks!

---

<div class="post-metadata">

**Author:** ![jackmead515](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jackmead515](https://discuss.bluerobotics.com/u/jackmead515)\
**Post date:** [January 23, 2025, 11:57pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/11 "2025-01-23T23:57:10Z")

</div>

Thanks for reading! The Zed 2i Stereo Camera was connected to a NVIDIA ORIN NX 8GB that COULD be used to do stereo processing. OpenCV provides a `cuda` module with block matching that can be executed on an Nvidia and that could run natively on that device.

However, for this tutorial, I only ran this on CPU. With the resolution I was using (can’t remember now) I was getting around 15FPS on my AMD Ryzen 5 3600 6-Core Processor.

Freely avaliable source code I wrote here in C++ as well [GitHub - jackmead515/orthus: Stereo Camera Configuration and Streaming Platform](https://github.com/jackmead515/orthus/tree/main)

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [January 24, 2025, 6:20pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/12 "2025-01-24T18:20:18Z")

</div>

Hi @c.pick -  
Welcome to the forums!  
Just to clarify, the hardware used was indeed a Zed2i camera, but it was connected to a ORIN NX 8GB inside the [Zed Head](https://shop.thesextonco.com/products/zed-head)

---

<div class="post-metadata">

**Author:** ![ryan354](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ryan354/32/13476_2.png) [@ryan354](https://discuss.bluerobotics.com/u/ryan354)\
**Post date:** [March 4, 2025, 5:47am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/13 "2025-03-04T05:47:07Z")

</div>

Hi @tony-white  
I’m definitely interested in ZedHead. A potential application I’d like to explore is using ZED 2i camera for real-time 3D underwater mapping and photogrammetry

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [March 4, 2025, 6:26am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/14 "2025-03-04T06:26:20Z")

</div>

Hi @ryan354 -  
That should be possible! The camera can be used with a topside laptop that has an nvidia graphics card with the Zed API, and @jackmead515 developed this [code](https://github.com/jackmead515/orthus) that can be run on the ZedHead to provide a simple web page with live video stream and recording functionality. The onboard nvidia CPU is ready to run your code - maybe even real time SLAM ?

---

<div class="post-metadata">

**Author:** ![ryan354](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ryan354/32/13476_2.png) [@ryan354](https://discuss.bluerobotics.com/u/ryan354)\
**Post date:** [March 4, 2025, 7:33am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/15 "2025-03-04T07:33:54Z")

</div>

Yes, exactly! The ZED camera web page @jackmead515 could potentially be developed as a BlueOS extension, making it easier to integrate, right?

My goal is to turn the ZED camera into a [local video streaming](https://www.stereolabs.com/docs/video/streaming) system which requires hardware acceleration to handle real-time encoding and decoding efficiently. The onboard NVIDIA Jetson can take care of [encoding](https://www.stereolabs.com/en-kr/blog/h-264-h-265-video-encoding-support-matrix-for-nvidia-jetson), while a high-end NVIDIA GPU on the topside laptop can handle [decoding](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) and finally, with ZED API—depth sensing, positional tracking, and spatial mapping—plus the addition of high-power lumen lights, I think it could potentially achieve VSLAM, similar to what [Voyis](https://voyis.com/discovery-vision-system/) and [Uvision 3D Scanner](https://uvision.dk/underwater-3d-scanner/) offer. This could make surveying much more effective and precise.

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [March 4, 2025, 7:53am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/16 "2025-03-04T07:53:37Z")

</div>

Hi @ryan354 -  
That code is better suited to running on the hardware in the Zed - it is easy to embed the web page in Cockpit via the iframe, and have full screen stereo vision with record controls while driving the vehicle normally, or picture in picture.

I’d expect achievable results to be quite similar, yes! I haven’t been able to connect an nvidia GPU machine to the hardware, but would be happy to share recordings if they’re useful to you.

---

<div class="post-metadata">

**Author:** ![ryan354](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ryan354/32/13476_2.png) [@ryan354](https://discuss.bluerobotics.com/u/ryan354)\
**Post date:** [March 4, 2025, 8:07am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/17 "2025-03-04T08:07:40Z")

</div>

Understood!  
That would be very helpful. You can send the recordings to my email at [ryan@rovostech.com](mailto:ryan@rovostech.com)

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [March 7, 2025, 8:30pm UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/18 "2025-03-07T20:30:33Z")

</div>

Hi @ryan354 - and anyone else interested -

Sharing the recordings [here](https://drive.google.com/drive/folders/1Up6L8lnqj12wm8MssK_LvO4UtJCrFE6v?usp=sharing). Please share any results!

Associated with that footage is calibration data, although it doesn’t match the formatting that zed-head uses for their calibration files that come with the camera (and are intended for use in-air.)  
The stereo\_parameters.json is the tuning configuration for the cv2 block matching, points.parquet is the parquet file with all the points of each detected checkerboard, and calibration.pkl is the parquet pickle file with the stereo camera calibration: you can read with pandas.read\_pickle()

[zed\_calibration.zip](https://discuss.bluerobotics.com/uploads/short-url/yu1i1LPo60hxz1iTwPdPwlvF9n3.zip) (20.0 MB)

---

<div class="post-metadata">

**Author:** ![ryan354](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ryan354/32/13476_2.png) [@ryan354](https://discuss.bluerobotics.com/u/ryan354)\
**Post date:** [March 10, 2025, 4:52am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/19 "2025-03-10T04:52:55Z")

</div>

Thanks for sharing the recordings and calibration data!!

---

<div class="post-metadata">

**Author:** ![ryan354](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ryan354/32/13476_2.png) [@ryan354](https://discuss.bluerobotics.com/u/ryan354)\
**Post date:** [June 11, 2025, 2:00am UTC](https://discuss.bluerobotics.com/t/bluerov-zed-stereo-camera-calibration-tutorial/18396/20 "2025-06-11T02:00:30Z")

</div>

Hey @jackmead515 @tony-white  
I tried reaching out to Sexton as well to get a quote on the ZedHead system, but haven’t gotten a response yet. I sent them an email but still no reply — maybe they’re busy or handling inquiries selectively.

Do you happen to know a better way to get in touch with them? Maybe a direct contact or someone at the company who handles sales or support?
