Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'img_shape' referenced before assignment #6

Open
willeett opened this issue May 18, 2020 · 1 comment

Comments

@willeett
Copy link

Hi,

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?

Best regards

@mmt93
Copy link

mmt93 commented Dec 10, 2020

It's probably wrong images path.

Try cal = StereoCalibration('C:/Users/William/hello/images')

As a last resort, change lines 28 and 29 to your working path.

See ya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants