2017-06-24 03:03:40 -0600 | commented answer | what does this error message means? I tried to add your code into mine, and it giving me that Exception message. From what i read, the camera = PiCamera() camera.start_preview(alpha=200) sleep (10) camera.stop_preview()` I really dont know where it goes wrong |
2017-06-24 02:34:03 -0600 | received badge | ● Supporter (source) |
2017-06-24 02:22:44 -0600 | received badge | ● Scholar (source) |
2017-06-23 04:13:57 -0600 | received badge | ● Editor (source) |
2017-06-23 04:13:11 -0600 | asked a question | what does this error message means? hello. Im trying to make a face detection from live video feed using haar cascade by using this code: import cv2 import sys faceCascade = cv2.CascadeClassifier('/home/pi/opencv-3.1.0/data/haarcascades/haarcascade_frontalface_default.xml') video_capture = cv2.VideoCapture(0) while True: ret, frame = video_capture.read() video_capture.release() cv2.destroyAllWindows() but then I got this error message Traceback (most recent call last): File "/home/pi/pythonpy/videofacedet.py", line 17, in <module> gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) error: /home/pi/opencv-3.1.0/modules/imgproc/src/color.cpp:8000: error: (-215) scn == 3 || scn == 4 in function cvtColor what does that mean? and how can I fix this? I have tried to look for answer in the internet, but none works. Im new to python programming, so please be nice to me :) |