Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wide angle lenses calibration with Opencv

I'm using a wide-angle lens (178º Diagonal FOV ) and I'm trying to calibrate it properly using Opencv Calibration module. All the detection and calibration process are working fine, but the result is very poor.

I have tried many different configurations:

  • Different set of images
  • Different radial coefficient numbers: 2,3,4,5 even 6.(CV_CALIB_FIX_K1,...,CV_CALIB_FIX_K6 )
  • Fixing principal point and tangential disortion to 0 (CV_CALIB_FIX_ASPECT_RATIO, CV_CALIB_FIX_PRINCIPAL_POINT)
  • Using expected focal length as initial camera matrix. (CV_CALIB_USE_INTRINSIC_GUESS)

The best I can get is something like:Bad calibration

Any ideas about how could I get a good calibration? Do you think using two calibrattion patterns at the same time, or using a circles grid as calibration pattern would help?

I've seen in opencv 3.0 thin prism coeffs are added. I haven't tried it, but I don't think there will make a difference, right? Edit: Checked it... Nothing

like image 220
Josep Bosch Avatar asked Nov 21 '13 13:11

Josep Bosch


People also ask

What is camera calibration in OpenCV?

Camera Calibration is nothing but estimating the parameters of a camera, parameters about the camera are required to determine an accurate relationship between a 3D point in the real world and its corresponding 2D projection (pixel) in the image captured by that calibrated camera.

Which module of OpenCV includes 3D reconstruction and calibration?

OpenCV: Camera calibration and 3D reconstruction (calib3d module)

How many points are needed for camera calibration?

– Understand that in principle calibration is possible under very weak assumptions like 'zero skew'. The traditional way to calibrate the camera is to take images of a known calibration grid. Six points are needed to obtain 12 equations.


1 Answers

Are you making sure to use the CV_CALIB_RATIONAL_MODEL flag? That will tell OpenCV to use a model that supports wider angle lenses.

Here are my suggestions for a 150 deg lens. You might also consider trying April Cal which I have had decent luck with.

like image 189
abarry Avatar answered Sep 20 '22 08:09

abarry