TemugeB / python_stereo_camera_calibrate

Stereo camera calibration with python and openCV
Apache License 2.0
132 stars 33 forks source link

Rmse value is 66 #6

Open AkhilaPerumalla123 opened 1 year ago

AkhilaPerumalla123 commented 1 year ago

Hi, I captured images using 2 webcams of the same specifications simultaneously. rmse value returned when each camera is calibrated is around 0.11. When they are setreocalibrated, the rmse value returned is around 66.

Is it a good rmse value? if not how to achieve good rmse value?

AkhilaPerumalla123 commented 1 year ago

Hi @TemugeB, Can you please help me with this?

TemugeB commented 1 year ago

Hi,

Sorry for the delay. An rmse of 66 is definitely very bad. Did you make sure the calibration settings file was updated correctly? Also, when doing stereo calibration step, it is very important that you keep your hand steady. Are the calibration patterns large enough in both camera views at the same time? If the calibration pattern is too small, you will run into problems.

AkhilaPerumalla123 commented 1 year ago

I captured steady images. But, for some of the images the the direction is horizontal and for some of the images the direction is vertical.

stereo-f-2 stereo-s-2 stereo-f-6 stereo-s-6

TemugeB commented 1 year ago

This is happening because your calibration pattern has equal number of rows and columns. I suggest you print out a calibration pattern that has different number of columns and rows. Or you can simply skip the frames where this is happening. The "O" in images refer to the origin of the calibration points. So the "O"s and the directions should match in both images.

Additionally, your camera is introducing too much radial distortion. To fix this, you need to call openCV's undistort function or find a camera that does not introduce radial distortion. Here is OpenCV's tutorial on how to undistort: link. It is quite simple to use.

AkhilaPerumalla123 commented 1 year ago

Hi @TemugeB,

By taking a calibration pattern with different numbers of rows and columns, I reduced it to 2.88.

Any suggestions to improve it further?

AkhilaPerumalla123 commented 1 year ago

Hi @TemugeB,

Can you mention the specifications of the camera you used to capture the pictures and videos?

It will be really helpful.