Tell us about yourself!
ok so now i am having trouble with 01_face_dataset.py my issue is that when i run the script it only add one image to the dataset folder instead of 30. My code is identical to the code you provided, so I am unsure why this is happening. Any ideas?
nevermind it was a simple indentation mistake. Im used to java and C# that use bracket to enclose there for loops
I fixed issue by typing sudo modprobe bcm2835-v4l2 Also make sure your cascade xml file is in the same directory as your facedetection script and in your code that faceCascade = cv2.CascadeClassifier('Cascades/haarcascade_frontalface_default.xml')for the part in air quotes just right click your xml file and select copy path then paste the path between the quotes
it looks like Akshayc42 just named the script second.py instead of faceDetection.py I am having the same error message as him. I named my script faceDetection.py same as you.
figured out the issue: i did not have the camera enabled when i ran through adrians tutorial and the drivers did not install correctly. i used the command sudo modprob bcm2835-v4l2
I tried some debugging by adding some lines to the script.after cap = cv2.VideoCapture(0)i added if cap.isOpened() == False:print("vidCapture Failed"and after the lineret, frame = cap.read()i added if ret == False:print("Frame is Empty")after running the script i get the debug printing vifCapture FailedFrame is Emptythen the same error message stated above.i had read in the docs that sometimes the cap does not open therefore you should try opening with the command:cap.open() however this does not help and also there is still hte issue with the frame.
Hi, thank you for your response. I commented the lines you recommended. I now receive a different error message:OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/pi/opencv-3.3.0/modules/highgui/src/window.cpp, line 325Traceback(most recent call last):File "simpleCamTest.py", line 13, in <module>cv2.imshow('frame',frame)cv2.error: /home/pi/opencv-3.3.0/modules/highgui/src/window.cpp:325: error: (-215) size.width>0 && size.height>0 in function imshowany ideas?
Hi I followed Adrians tutorial including the testing . Then i followed your tutorial including testing . However when i try to run simpleCamTest.py i get an error message saying OpenCV Error: Assertion failed (scn ==3 || scn == 4) in cvtColor, file /home.pi.opencv-3.3.0/modules/imgproc/src/color.cpp, line 10638Traceback(most recent call last):File "simpleCamTest.py", line 11, in <module>gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)cv2.error: /home/pi/open-3.3.0/modules/imgproc/src/color.cpp:10638: error : (-215) scn == 3 || scn ==4 in function cvtColorDo you have any ideas as to what I the problem could be? Any help would be greatly appreciated.
Google Assistant on Pi for Home Automation and Entertainment
Large Motors Class
Starting a Handmade Business
Get Set Up
Mold Making & Casting Class
3D Scanning Class
Design Sketching Class
Preparing a Schematic
Laying Out the Board
PCB Concepts and Materials
Circuit Board Design Class
Tools and Supplies
Raspberry Pi Class
Science of Baking
I am very interested in this however the application I want it for requires flesh color. Any ideas for recreating this but not black?
Would I be able to go from flesh colored to red and or purple when heat is applied? Can you choose which color is the base color and which color is the color that appears when heated?
8 Impressive Raspberry Pi Laptops