-
Notifications
You must be signed in to change notification settings - Fork 354
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
issue running the file imgCrop = img[y:y+h, x:x+w] #1
Comments
I believe the issue lie in the function cv2.VideoCapture(1). Have you check your camera driver in Mac was installed properly or did you use the correct device? |
Hello pvqthang, I've been working with openCV library in other projects and cv2.videocapture() was working fine in all of them. |
Read the docs of the VideoCapture method of OpenCV. You will be able to solve the error. |
Try cv2.videocapture(0), the system will use your default camera on your pc and it should work |
@EvilPort2 As a matter of good coding practice you might want to catch exception for hardware dependencies. |
The bug has been fixed |
How did you fix the problem? I'm also having the same issue |
Hi,
I've been trying to run the python files on my mac but every time I face the same error.
File "create_gestures.py", line 64, in store_images
imgCrop = img[y:y+h, x:x+w]
File "fun_util.py", line 53, in recognize
imgCrop = img[y:y+h, x:x+w]
TypeError: 'NoneType' object is not subscriptable
File "recognize_gesture.py", line 96, in recognize
imgCrop = img[y:y+h, x:x+w]
TypeError: 'NoneType' object is not subscriptable
What do you think might be the issue
The text was updated successfully, but these errors were encountered: