Closed dakotabenjamin closed 7 years ago
I had this error.
root@test-08:/home/kg.ru/kornev/calibration# python opencv_calibrate.py /home/kg.ru/kornev/chessboard/*.jpg DEBUG:/home/kg.ru/kornev/chessboard/*.jpg img: [] OpenCV Error: Assertion failed (nimages > 0) in calibrateCamera, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/calib3d/src/calibration.cpp, line 3415 Traceback (most recent call last): File "opencv_calibrate.py", line 98, in <module> rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(obj_points, img_points, (w, h), None, None) cv2.error: /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/calib3d/src/calibration.cpp:3415: error: (-215) nimages > 0 in function calibrateCamera
After checking that directory and files do exist I've noticed that file names are in upper case. So now I have another error.
root@test-08:/home/kg.ru/kornev/calibration# python opencv_calibrate.py /home/kg.ru/kornev/chessboard/*.JPG DEBUG:/home/kg.ru/kornev/chessboard/DJI_0017.JPG Traceback (most recent call last): File "opencv_calibrate.py", line 53, in <module> os.mkdir(debug_dir) OSError: [Errno 17] File exists: '/home/kg.ru/kornev/chessboard/DJI_0017.JPG'
Yeah i am running into that error too.
Currently overhauling the argument parser. I think as a workaround you can specify --debug /home/kg.ru/kornev/chessboard/
Worked like a charm! Thank you, you made me smile again. )
With recent push you don't need to specify anymore.
Let me know if you this fixes for you.
Also look at the readme for usage instructions
Yep, it works now. Though I'm getting processing DJI_0023.JPG... chessboard not found
with @pierotofy's set of photos.
Launching parameters are:
python opencv_calibrate.py /home/kg.ru/kornev/chessboard/ 10 7
Oh, it's the problem with calibration chessboard size parameters. We have to use 9 and 6 instead of actual 10 and 7.
@dakotabenjamin You can close this issue now. The problem was solved.
@theincorrect please paste your command call and error below