Hi all,
I am having issues calibrating my fisheye camera. This does not occur all the time (or with all cameras/images I have) but it still prevents me from calibrating my cameras. When calling the calibrate function, I get the following error:
line 91, in calibrate
err, K, dist, _, _ = cv2.fisheye.calibrate(objpoints,
cv2.error: OpenCV(4.5.5) /io/opencv/modules/calib3d/src/fisheye.cpp:1400: error: (-215:Assertion failed) fabs(norm_u1) > 0 in function 'InitExtrinsics'
I read somewhere that this could have to do with some corners being too close to the image borders but I don’t get why that should be the case. When using another camera model (not fisheye) I do not encounter any problems.
I get around this error if I remove the cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC flag but this is of course no solution.
Would be great if somebody can help me or explain to me what the error message actually means.
Thank you in advance!
if you still need to solve this, I would suggest digging into the opencv source at the given location (modules/calib3d/src/fisheye.cpp:1400
).
it’s checking some numerical properties there. you’d wanna follow this u1
thing upwards.
Hello, I am having the same issue although I remove cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC flag still has the same error on the pairwise calibration of 3 cameras. Is anyone here who can help?
Error: camera pair common frames RMS reprojection error 1 & 2 44 An error occurred during pairwise calibration: OpenCV(4.8.0) /io/opencv/modules/calib3d/src/fisheye.cpp:1439: error: (-215:Assertion failed) fabs(norm_u1) > 0 in function ‘InitExtrinsics’
I get this same error when I calibrate a very wide field of view camera (~180 degrees).
cv2.error: OpenCV(4.10.0) /io/opencv/modules/calib3d/src/fisheye.cpp:1453: error: (-215:Assertion failed) fabs(norm_u1) > 0 in function 'InitExtrinsics'
The funny thing is I do not get this error on Windows, only Ubuntu 22.04. I have identical python package versions and images.
numpy 1.26.4
opencv-python 4.10.0.82
pip 24.0
I thought maybe it was something to do with the order it loaded the images, but I used sorted() to get the same order and it still errored out on Linux and calibrated flawlessly on Windows.
Just thought I would share in case anyone had ideas.
This function simply doesn’t work, which is disappointing.