pose_calib icon indicating copy to clipboard operation
pose_calib copied to clipboard

Unable to calibrate fisheye camera

Open zwn opened this issue 5 years ago • 4 comments

I am not able to get past the position when the pattern should be over the whole screen. I can perfectly align the middle of the picture (9 squares) but the rest is off due to the optics. Does this tool support fisheye cameras?

zwn avatar Jul 18 '19 16:07 zwn

try varying the distance to camera. The tool does not consider distortion for the first two images, so what you see is not what you get. The capture is triggered by comparing the overlap (projecting a virtual non-distorted image).

paroj avatar Jul 18 '19 20:07 paroj

You are using cv2.calibrateCamera at https://github.com/paroj/pose_calib/blob/master/utils.py#L268) but that assumes perspective projection (plus distortion). For fish eye we need cv2.fisheye.calibrate that assumes fish eye projection (plus distortion).

zwn avatar Jul 29 '19 12:07 zwn

while you will get bad results in border regions (approximating 180°), you should still be able to calibrate a fisheye lens. Also note that due to some implementation issues even the cv2.fisheye.calibrate gives suboptimal results: https://github.com/opencv/opencv/pull/6801

paroj avatar Aug 07 '19 09:08 paroj

I'm unable to get past this screen with my 170 degree fisheye camera. image

viggy96 avatar May 20 '23 04:05 viggy96