# Why does my stereo calibration fails for extrinsics?

Source: https://forum.modalai.com/topic/2129/why-does-my-stereo-calibration-fails-for-extrinsics
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2023-05-04 19:54:23 UTC by Darshit Desai
Replies: 5 · Views: 1143

## Darshit Desai · 2023-05-04 19:54:23 UTC

I am using the modal ai portal for calibration of onboard stereo cameras but it has failed to calibrate the extrinsics multiple times.

The board size is 6x9 with each square of 25 mm

```
Please open voxl-portal in a web browser to view the camera calibrator overlay stream
Calibrating Left Camera
Matrix
[508.80440670594, 0, 308.5135447003642;
 0, 505.8572996337453, 244.1641938401985;
 0, 0, 1]
Distortion
[-0.1811268882769062;
 0.07256140246308232;
 0.001569367963422894;
 -0.001895561795494848;
 0]
distortion_model: plumb_bob
Re-projection error reported by calibrateCamera: 0.228868
Calibration Succeded!
Calibrating Right Camera
Matrix
[499.3757621172282, 0, 325.48861203442;
 0, 497.8217173811094, 235.3877218749848;
 0, 0, 1]
Distortion
[-0.1815603484893367;
 0.06567294535447908;
 -0.001628603839397166;
 0.001644475509575583;
 0]
distortion_model: plumb_bob
Re-projection error reported by calibrateCamera: 0.219737
Calibration Succeded!
Calibrating Extrinsics
4 frames will be processed
R
[0.9998749556474266, -0.01520329924164708, 0.004351179291381281;
 0.01514403461767066, 0.9997962803983895, 0.01334375947938024;
 -0.004553162039243111, -0.01327619650779887, 0.9999015008098201]
T
[-0.08098804070286524;
 -0.000892545176548338;
 -0.003303076144588922]
Re-projection error reported by stereoCalibrate: 0.832656
Detected horizontal stereo pair
Distance between cameras: 0.0810
Extrinsics Calibration Failed
exceeded allowable max reprojection error:  0.5

Saved intrinsics to: /data/modalai/opencv_stereo_intrinsics.yml
Exiting Cleanly
```

## Reply by Chad Sweet (ModalAI staff) · 2023-05-04 20:31:08 UTC

Can you take a picture of your setup? 

Are the image sensors mounted rigidly on the same plane?

## Reply by Darshit Desai · 2023-05-05 17:37:06 UTC (in reply to Chad Sweet)

@Chad-Sweet I am not sure about the plane of the camera. I am attaching some photos for your reference

https://drive.google.com/drive/folders/1nJOy9G0-hZSNSN0kZyrtJ9HcxRaZa50X?usp=share_link

## Reply by afdrus · 2023-09-05 15:48:56 UTC (in reply to Darshit Desai)

@Chad-Sweet I am also facing the same issue, it is unclear from the documentation what is the procedure that should be followed to calibrate the extrinsics. Should the board be tilted? Should it be vertical or horizontal?

## Reply by Moderator (ModalAI staff) · 2023-09-05 19:01:33 UTC (in reply to afdrus)

@afdrus have you watched the video here found at this link? https://docs.modalai.com/calibrate-cameras/#stereo-calibration-process

The angle of the PCB is not related to stereo calibration. For stereo configuration, the sensors must be rigidly mounted and coplanar. Any movement or tilt between the sensors will not work

## Reply by afdrus · 2023-09-06 07:41:53 UTC (in reply to Moderator)

@Moderator thank you for the reply, by board I meant the checkboard used for the calibration not the PCB.

However, I watched the video, but it looks old because the current extrinsics procedure is asking me to move the checkboard in 4 poses whereas the video is showing only 2 poses. How much tilt should the checkboard have during the extrinsics calibration process in order to have a low calibration error?
