ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS stereo camera calibration issues

asked 2023-03-22 10:46:11 -0500

Tim2000 gravatar image

I am currently trying to calibrate my stereo pinhole cameras. I am using the ros-noetic-camera-calibration package, a checkerboard with a 9x9 size (for 7x7 points), tried in different rooms with good lighting.

I have tried to calibrate the cameras 8 times now, all with bad outputs. I make sure every bar (x, y, size, skew) is at least green before clicking the calibrate button. The output vary between one camera being zoomed in where I can barely see 1/32 of the original image and is rotated with the other camera being just black. Sometimes the cameras become super warped where it isn’t even recognizable that it is a room.

Looking at the output parameters I can see some numbers being around 1 and some number going over 1000. It seems like some parameters are causing the bad calibration.

Is this behavior normal, should I just try more times or is there something I am doing wrong here?

I have tried a full day of calibration with no luck, any suggestions will be appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-03-23 07:47:35 -0500

dmonkoff gravatar image

Are you using checkerboard with orientation marker? One thing may be that each of your cameras detect the checkerboard in different orientations (this is especially true for square targets, since it is more symmetric), so it finds wrong point pairs. The simple thing you can try is to print rectangular calibration pattern and see if it works better.

edit flag offensive delete link more

Comments

When viewing the checkboard recognition, I can see the points and lines lining up with the other camera. I have also tried with a different 8x6 and 5x8 board, but the results are still useless regardless. I have found that the problem is either with the stereoCalibrate function or the rectification used with the camera_calibrate. The distortion coefficient and matrixes are correct since I tested these myself.

Tim2000 gravatar image Tim2000  ( 2023-03-23 07:52:22 -0500 )edit

Do you use undistorted images? If you use cheap cameras, the undistorted ROI can be quite small, and the checkerboard should be inside that undistorted ROI of both cameras. Sadly, I did not try camera calibration package myself, only directly in openCV, so I don't know whether ROS takes care of that

dmonkoff gravatar image dmonkoff  ( 2023-03-23 08:07:35 -0500 )edit

No, I do not use undistorted images. After the ROS camera calibration has finished, it gives you all the parameters together with a preview of what your new image will look like. I took only the camera matrix and distortion coefficients from it to test for myself if the undistortion is done correctly, which it is. The problem lays with the stereoCalibration and rectification.

Tim2000 gravatar image Tim2000  ( 2023-03-23 08:10:37 -0500 )edit

So did you check the image itself after single camera calibration? Again, distortions outside ROI can be quite bad, so you need to take images for stereo calib inside the ROI. Just an example how bad it can be https://imgur.com/a/wngA10J

dmonkoff gravatar image dmonkoff  ( 2023-03-23 08:33:41 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-03-22 10:46:11 -0500

Seen: 283 times

Last updated: Mar 23 '23