learnopencv icon indicating copy to clipboard operation
learnopencv copied to clipboard

UnderstandingLensDistortion: error: (-215:Assertion failed) on cv2.calibrateCamera()

Open TLKG opened this issue 3 years ago • 0 comments

After downloading the code, created a images folder placed the attached file into it, ran the python undistort.py, resulting the followings:

ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1],None,None) cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\calib3d\src\calibration.cpp:3694: error: (-215:Assertion failed) nimages > 0 in function 'cv::calibrateCameraRO'

4-original

TLKG avatar May 12 '21 21:05 TLKG