We are trying to calibrate a virtual Zed X One stereo setup using the OpenCV tool. When launching the tool with ./zed_stereo_calibration --h_edges 12 --v_edges 8 --square_size 32 --left_id 0 --right_id 1 --virtual, we get the response:
*** Stereo Camera Calibration Tool ***
The calibration process requires a checkerboard of known characteristics.
* Expected checkerboard features:
- Inner horizontal edges: 12
- Inner vertical edges: 8
- Square size: 32 mm
Change these parameters using the command line options if needed. Use the '-h' option for help.
* Lens distorsion model: Radial-Tangential
* Virtual Stereo Camera mode enabled.
Using camera IDs for left and right cameras: 0, 1
* Unique Virtual SN: 116170631 (Generated by the ZED SDK)
* ZED X One GS Virtual Stereo Camera detected.
* Camera Model: Virtual ZED-X
* Camera Serial Number: 116170631
* Camera Resolution: 1920 x 1200
* Using prior calibration: No
Segmentation fault (core dumped)
Another issue: in the OpenCV calibration tool, the Calibration Checker is instantiated before the argparsing. So parameters such as v_edges and h_edges are locked to the default, hardcoded values. Results in every sample being rejected if a custom checkerboard is used
I am having the exact same issues as well, while trying to calibrate a dual Zed X One stereo setup (using the OpenCV tool), on an AGX Orin 64G with Jetpack 6.2.1, SDK v5.2.1, and quad-driver v1.4.0. I have gotten the same error message (when launching with default checkerboard characteristics - 9x6, 25.4mm):
$ ./stereo_calibration/zed_stereo_calibration --virtual --left_id 0 --right_id 1
*** Stereo Camera Calibration Tool ***
The calibration process requires a checkerboard of known characteristics.
* Expected checkerboard features:
- Inner horizontal edges: 9
- Inner vertical edges: 6
- Square size: 25.4 mm
Change these parameters using the command line options if needed. Use the '-h' option for help.
* Lens distorsion model: Radial-Tangential
* Virtual Stereo Camera mode enabled.
Using camera IDs for left and right cameras: 0, 1
* Unique Virtual SN: 116285092 (Generated by the ZED SDK)
* ZED X One GS Virtual Stereo Camera detected.
* Camera Model: Virtual ZED-X
* Camera Serial Number: 116285092
* Camera Resolution: 1920 x 1200
* Using prior calibration: No
Pos 1
Segmentation fault (core dumped)
I added this into the following code (in the OpenCV calibration’s main.cpp) to determine where this segmentation fault occurs. The “Pos 1” character-output above shows that the fault occurs when trying to retrieve the left camera’s image:
I had already done this and knew the cameras were available, as ZED_Explorer, ZED_Studio, and ZED_Sensor_Viewer can successfully open both Zed X One cameras (the OpenCV Calibration and the Virtual Stereo Camera Sample can not open the cameras).
$ ZED_Explorer -a
## Cam 0 ##
Model : "ZED XOne GS"
S/N : 300785707
State : "AVAILABLE"
Path : /dev/i2c-13
ID : 0
Port : 1
Type : "GMSL"
********************
## Cam 1 ##
Model : "ZED XOne GS"
S/N : 308547270
State : "AVAILABLE"
Path : /dev/i2c-13
ID : 1
Port : 3
Type : "GMSL"
********************
Does it work if you use the serial numbers instead of the camera id to select them?
Have you pulled the latest version of the repository? We pushed a fix a few days ago.
OK. We are currently performing internal tests to try to replicate your problem because without replicating it, it’s not possible to understand why it’s happening and how to fix it.
That’s excellent. I just wanted to mention that I have also tested the calibration using a pair of Zed X One S cameras (that the ZED_Explorer -a oddly reports as ZED X One GS cameras), which also resulted in the same segmentation fault (as when using my original ZED X One GS pair).
To summarize, I am getting the segmentation fault with the ZED X One GS and S cameras.