-
Notifications
You must be signed in to change notification settings - Fork 33
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
TypeError: 'NoneType' object is not subscriptable #4
Comments
At ocrlearnKnn.py:58, try other parameter such as 0, 2 or 3, etc. That is the parameter for camera index. Typically, parameter 0 would work for a computer with one camera. cap = cv2.VideoCapture(0) |
Thank you very much error Traceback (most recent call last) error: OpenCV(3.4.1) /opt/conda/conda-bld/opencv-suite_1527005509093/work/modules/videoio/src/cap_mjpeg_encoder.cpp:468: error: (-215) imgWidth == frameWidth && imgHeight == frameHeight && channels == 3 in function write I tried to move those '#'s before the defining of 'width' and 'height' but no effect... |
Yeah, the width and height are fixed, so it might not work. You can try my version https://github.com/vinc96/digitsOCR, which automatically fetch the width and height information and works on my Windows and Mac. If you have a chance to try it, please tell me if it works. |
!!!That worked smoothly ! I would very much appreciate receiving your help ! |
TypeError: 'NoneType' object is not subscriptable
TypeError Traceback (most recent call last)
~/Desktop/.../ocrlearnKnn.py in ()
65 while True:
66 ret, frame = cap.read()
---> 67 frame = frame[:,:426]
68 rois, edges = findRoi(frame, 50)
69 digits = []
TypeError: 'NoneType' object is not subscriptable
run with jupyter notebook 5.50 in anaconda
python 3.6.5
cv 3.4.1
Macbook Air
The text was updated successfully, but these errors were encountered: