learnopencv
learnopencv copied to clipboard
UnderstandingLensDistortion: error: (-215:Assertion failed) on cv2.calibrateCamera()
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'