Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

fisheye.cpp:424: error: (-215) (K.depth() ...can anyone know the solution?

Hi,

I tried a OpenCV Aruco board project in Python; https://github.com/LongerVision/OpenCV_Examples

And I got the error below;

"map1, map2 = cv2.fisheye.initUndistortRectifyMap(camera_matrix, dist_coeffs, r, new_camera_matrix, image_size, cv2.CV_16SC2) cv2.error: C:\projects\opencv-python\opencv\modules\calib3d\src\fisheye.cpp:424: error: (-215) (K.depth() == CV_32F || K.depth() == CV_64F) && (D.depth() == CV_32F || D.depth() == CV_64F) in function cv::fisheye::initUndistortRectifyMap"

And this was the problematic line; map1, map2 = cv2.fisheye.initUndistortRectifyMap(camera_matrix, dist_coeffs, r, new_camera_matrix, image_size, cv2.CV_16SC2)

Anyone know solutions to fix it?

Thank you very much!