# ZED X One Stereo Calibration Problem

**URL:** <https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882>\
**Category:** Software\
**Tags:** calibration\
**Created:** [August 24, 2024, 9:58am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882 "2024-08-24T09:58:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayp](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jayp/32/3302_2.png) [@jayp](https://community.stereolabs.com/u/jayp)\
**Post date:** [August 24, 2024, 9:58am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/1 "2024-08-24T09:58:19Z")

</div>

I am trying to set up a Zed X One stereo setup with the help of Zed Box Orin NX. I am using ([GitHub - stereolabs/zedx-one-capture: Camera control API for ZED X One GMSL2 cameras from Stereolabs](https://github.com/stereolabs/zedx-one-capture)) repository to calibrate the zed x ones. I am facing a bug in which the Z axis is not calibrated correctly. It always gets stuck on ~76-90% and won’t go above that regardless of taking several frames.

Can you please guide me to tackle this issue and debug?

 ![z-rotation](https://community.stereolabs.com/uploads/default/original/2X/5/5c8ec9a359d5b61280329b0fb71a28217bcefa06.png)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [August 26, 2024, 8:38am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/2 "2024-08-26T08:38:23Z")

</div>

Hi @jayp  
are you rolling the camera in both directions as shown in the video in the [README](https://github.com/stereolabs/zedx-one-capture/blob/main/stereo_calibration/README.md)?

---

<div class="post-metadata">

**Author:** ![jayp](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jayp/32/3302_2.png) [@jayp](https://community.stereolabs.com/u/jayp)\
**Post date:** [August 27, 2024, 5:25am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/3 "2024-08-27T05:25:14Z")

</div>

Hi @Myzhar

Rolling the chessboard clockwise (from my perspective) throws an error “!!! Do not rotate the checkerboard more than 45 deg around Z !!!”. So I have to rotate it counter-clockwise from 0 to 45 degrees.

---

<div class="post-metadata">

**Author:** ![jayp](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jayp/32/3302_2.png) [@jayp](https://community.stereolabs.com/u/jayp)\
**Post date:** [August 27, 2024, 8:18am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/4 "2024-08-27T08:18:38Z")

</div>

Hi @Myzhar

Built the application again and the Z-axis went to a 100 percent. I am sharing the results of Zed Depth Viewer, can you please tell me that the image distortion is expected or I have to re-calibrate the cameras?

Depth Viewer Results: [Zed Depth Viewer Results - Google Drive](https://drive.google.com/drive/folders/1ZYASjL1Ljo-pdhPI81TEL-IVa6EYt3ej?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [August 27, 2024, 10:05am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/5 "2024-08-27T10:05:52Z")

</div>

Hi @jayp  
that’s obviously the result of a bad calibration process.  
I recommend you repeat it.

---

<div class="post-metadata">

**Author:** ![jayp](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jayp/32/3302_2.png) [@jayp](https://community.stereolabs.com/u/jayp)\
**Post date:** [August 28, 2024, 7:46am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/6 "2024-08-28T07:46:01Z")

</div>

Hi @Myzhar

After calibrating it multiple times (with 9x6 chessboard), every time the calibration file was corrupted as the baseline was coming out to be negative. Just inverting the baseline with its positive value solved the issue. Now the images are not distorting and the point clouds are forming as expected.

Thanks for your valuable assistance.

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [August 28, 2024, 7:51am UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/7 "2024-08-28T07:51:56Z")

</div>

> [@jayp](#):
>
> After calibrating it multiple times (with 9x6 chessboard), every time the calibration file was corrupted as the baseline was coming out to be negative

This means that you inverted the left and right cameras in the Camera Streamer application or in the calibration application.

> [@jayp](#):
>
> Just inverting the baseline with its positive value solved the issue.

This is not a good practice because the calibration values of the two sensors are switched.

---

<div class="post-metadata">

**Author:** ![jayp](https://community.stereolabs.com/user_avatar/community.stereolabs.com/jayp/32/3302_2.png) [@jayp](https://community.stereolabs.com/u/jayp)\
**Post date:** [August 28, 2024, 12:01pm UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/8 "2024-08-28T12:01:44Z")

</div>

> [@Myzhar](#):
>
> This means that you inverted the left and right cameras in the Camera Streamer application or in the calibration application.

The left and right cameras are set accurately in the streamer application and I think it was showing correctly in the calibration application too. Should I try inverting the cameras in the streamer application itself?

> [@Myzhar](#):
>
> This is not a good practice because the calibration values of the two sensors are switched.

Got it. Will try recalibrating it and get accurate results.

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [August 28, 2024, 2:44pm UTC](https://community.stereolabs.com/t/zed-x-one-stereo-calibration-problem/6882/9 "2024-08-28T14:44:24Z")

</div>

> [@jayp](#):
>
> Should I try inverting the cameras in the streamer application itself?

Normally a simple cable switch fixes the issue.
