I am trying to calibrate RaspiCam Fisheye lens camera with OpenCV. I am using Python example code and the cheesboard row and column numbers are also correct but somehow I can not get a successful result. I have tested with a lso much of photos below you can see them. My source code: https://github.com/jagracar/OpenCV-python-tests/blob/master/OpenCV-tutorials/cameraCalibration/cameraCalibration.py
my chess board rows and columns: rows = 9, cols = 6
but does not get a successful result
Starting with opencv 3, the
fisheye
module was introduced, which manages the calibration for fisheye type lenses quite well. (At least for those who are not familiar with the mathematics behind the calibration process.)And now that you have K and D, you can undistort:
this should work!
UPDATE
If you want to see the hidden parts of the image (for example the portion outside the yellow box in the above image), after the calibration, you need this:
Now, by varying the
balance
value you should decrease or increase the size of the final immage (compared to the image above, practically the yellow rectangle).From OpenCV API:
balance
: Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].First at all, as far as I can see your camera has fisheye optics, but it doesn't give all the surface of fisheye image (usually it is a circle inside black frame). The second. The code you are using is for usual camera or wide angle (90-110 degrees) It's not for fisheye (~ 180 degrees). Third. You can use source code URL link from HERE