You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've similar issue too. The solution i've found is to manualy add left and right img in the LEFT and RIGHT folder and check if it's working. Some images produces an error, just try others images.
Hello! This happens because self.objpoints, imgpoints_l, imgpoints_r have different length. When func findChessboard doesn't find chessboard -> ret_l or ret_r isn't True.
The solve of problem — delete self.imgpoints_l.append(corners_l) and self.imgpoints_r.append(corners_r) from if and after for add
if ret_l is True and ret_r is True: self.imgpoints_l.append(corners_l) self.imgpoints_r.append(corners_r) self.objpoints.append(self.objp)
I am trying to run the code using Visual Studio Code in Anaconda. I am getting an error.
Traceback (most recent call last):
File "c:/Users/William/hello/_runscript.py", line 5, in
cal = StereoCalibration(r'C:\Users\William\hello\images')
File "c:\Users\William\hello\camera_calibration.py", line 25, in init
self.read_images(self.cal_path)
File "c:\Users\William\hello\camera_calibration.py", line 71, in read_images
self.objpoints, self.imgpoints_l, img_shape, None, None)
UnboundLocalError: local variable 'img_shape' referenced before assignment
Anyone know what might be the cause of this error?
When I run the code, I get the following error:
OpenCV Error: Assertion failed (nimages > 0 && nimages == (int)imagePoints1.total() && (!imgPtMat2 || nimages == (int)imagePoints2.total())) in collectCalibrationData, file /io/opencv/modules/calib3d/src/calibration.cpp, line 3083 Traceback (most recent call last): File "test.py", line 129, in <module> cal_data = StereoCalibration(args.filepath) File "test.py", line 25, in __init__ self.read_images(self.cal_path) File "test.py", line 71, in read_images self.objpoints, self.imgpoints_l, img_shape, None, None) cv2.error: /io/opencv/modules/calib3d/src/calibration.cpp:3083: error: (-215) nimages > 0 && nimages == (int)imagePoints1.total() && (!imgPtMat2 || nimages == (int)imagePoints2.total()) in function collectCalibrationData
Is there a solution?
The text was updated successfully, but these errors were encountered: