tag:blogger.com,1999:blog-4146712575962827199.post3884919665554343236..comments2024-03-12T12:11:15.162+01:00Comments on Raspberry Pi experiments: Face detection with Raspberry PiMascalhttp://www.blogger.com/profile/15501943190321068629noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-4146712575962827199.post-56192952802808788532018-12-01T11:45:41.064+01:002018-12-01T11:45:41.064+01:00I also faced the same problem once, but I had foun...I also faced the same problem once, but I had found the solution to it.<br />You are supposed to write the full path of the haar casacade while declaration.<br /><br />For example if it was earlier as:<br /><br />import numpy as np<br />import cv2<br />stop_cascade = cv2.CascadeClassifier('AutoRCCar-master\computer\cascade_xml\stop_sign.xml')<br /><br />Instead it should be:<br /><br />import numpy as np<br />import cv2<br />stop_cascade = cv2.CascadeClassifier('C:\opencv\build\etc\AutoRCCar-master\computer\cascade_xml\stop_sign.xml')unknown_helperhttps://www.blogger.com/profile/16402295221866525035noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-55391623043780191692018-12-01T11:42:49.381+01:002018-12-01T11:42:49.381+01:00This comment has been removed by the author.unknown_helperhttps://www.blogger.com/profile/16402295221866525035noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-2941388928224552102018-04-18T07:43:01.138+02:002018-04-18T07:43:01.138+02:00You should probably search on the internet for som...You should probably search on the internet for some website with tutorials on linux systems, as these are really the basic concepts. <br />Anyway you should use the commands above using the shell, not the graphic environment. Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-22377778383483782272018-04-18T04:32:19.293+02:002018-04-18T04:32:19.293+02:00Hi I am a beginner Any idea where to initiate the ...Hi I am a beginner Any idea where to initiate the first comment?<br />sudo apt-python get installJohnnoreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-35717771893514086462018-03-26T20:01:52.684+02:002018-03-26T20:01:52.684+02:00Which database are you talking of? I’m not creatin...Which database are you talking of? I’m not creating any database in the code above...Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-63243071229086292222018-03-26T19:01:08.703+02:002018-03-26T19:01:08.703+02:00Nice project i want to duplicate it but not being ...Nice project i want to duplicate it but not being able to do the createthe data base... can u please share the codeAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-69544234206079910432018-03-18T04:49:38.226+01:002018-03-18T04:49:38.226+01:00I also got the same issue. But when i check, my fa...I also got the same issue. But when i check, my face was bottom of the view. So when i moved to top side, the face detected becomes 1.T.JAIGANESH VISWANATHANhttps://www.blogger.com/profile/03338723297252232470noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-26757873048767357162018-03-16T14:09:57.188+01:002018-03-16T14:09:57.188+01:00I am trying running the dataset saving code but th...I am trying running the dataset saving code but the frame is not opening.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-5662406825087836842018-01-25T15:54:43.719+01:002018-01-25T15:54:43.719+01:00Usually this error is raised when the image is alr...Usually this error is raised when the image is already grayscale or when height of the image is 0 (this means that the image wasn't read from file or from camera).<br /><br />Be sure that your script is really getting the image...Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-45518665408324446492018-01-25T15:27:02.954+01:002018-01-25T15:27:02.954+01:00Thanks for the turorial! i am getting an error lik...Thanks for the turorial! i am getting an error like this, any ideas?<br /><br /><br />OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/pi/opencv-3.4.0/modules/imgproc/src/color.cpp, line 11111<br />Traceback (most recent call last):<br /> File "face_detection.py", line 10, in <br /> gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)<br />cv2.error: /home/pi/opencv-3.4.0/modules/imgproc/src/color.cpp:11111: error: (-215) scn == 3 || scn == 4 in function cvtColor<br /><br />Anonymoushttps://www.blogger.com/profile/07899791233099847209noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-50398715136547762272017-11-22T07:40:21.579+01:002017-11-22T07:40:21.579+01:00If you wish to use an existing file you can check ...If you wish to use an existing file you can check this page: http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html#playing-video-from-file<br /><br />Just remember that depending on the vidoe format you could be unable to extract the frames.<br /><br />About face detection precision, this technique is not perfect and results heavily depend on light condition, frame quality and also face position. There are better algorithms, but they need a much more powerful computer than a RPi (and they still are not 100% error-free)...Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-9094968563169979922017-11-21T23:08:48.678+01:002017-11-21T23:08:48.678+01:00i am also used this code but connot perfect work i...i am also used this code but connot perfect work in video face detection.Noor khokharhttps://www.blogger.com/profile/01497155255456565959noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-53747698291582055612017-11-21T23:05:57.016+01:002017-11-21T23:05:57.016+01:00how to use video file in pi camera face detction?how to use video file in pi camera face detction?Noor khokharhttps://www.blogger.com/profile/01497155255456565959noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-57965322255922665532017-10-16T07:31:52.144+02:002017-10-16T07:31:52.144+02:00You can visit https://www.pyimagesearch.com/ as th...You can visit https://www.pyimagesearch.com/ as this guy has tons of info on using OpenVC on the RPi and also gives several optimization tips for increasing the speed.Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-21688373082181043762017-10-15T16:46:34.145+02:002017-10-15T16:46:34.145+02:00can you please help me in making this program real...can you please help me in making this program real-time ? please i will be very gratefulAnonymoushttps://www.blogger.com/profile/03043991783815657143noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-62932918228072753912017-04-07T10:49:20.056+02:002017-04-07T10:49:20.056+02:00Take a look at http://www.pyimagesearch.com/2015/0...Take a look at http://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-and-python/<br />There also is a sample code for video got from the PiCamera. In case you want to get the stream from a webcam you need to acquire the single frames with something like this:<br /><br />req = urllib.urlopen('http://127.0.0.1:8080/?action=snapshot')<br />arr = numpy.asarray(bytearray(req.read()), dtype=numpy.uint8)<br />image = cv2.imdecode(arr,-1)<br /><br />The first line gets the jpeg frame (the right syntax for the address depends on the streaming source; this is just an example), the second line transforms the image into a numpy array and the third line creates an OpenCV image that can be processed.<br />You need of course to import numpy and urllib libraries in the Python script.Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-79558184751417322172017-04-05T16:40:36.411+02:002017-04-05T16:40:36.411+02:00Pls can I get a sample using video stream? ThanksPls can I get a sample using video stream? ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-36246406396682401612017-01-19T15:21:24.272+01:002017-01-19T15:21:24.272+01:00no I didn't get any error, I install sudo apt...no I didn't get any error, I install sudo apt-get install python-picamera<br />it shows that previously installed. Abhijeet Golliwarhttps://www.blogger.com/profile/06232049064878962336noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-225165421252549432017-01-18T19:16:50.758+01:002017-01-18T19:16:50.758+01:00The module is separated from the system commands l...The module is separated from the system commands like raspistill. It seems that python-picamera has not been installed. Did you get any error while installing with apt-get?Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-87246888573785766472017-01-18T19:03:00.422+01:002017-01-18T19:03:00.422+01:00edited: raspistill -o image.jpg works for me...wai...edited: raspistill -o image.jpg works for me...waiting for your reply Abhijeet Golliwarhttps://www.blogger.com/profile/06232049064878962336noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-29676843880604691472017-01-18T19:00:01.415+01:002017-01-18T19:00:01.415+01:00no module named picamera, I checked I previously i...no module named picamera, I checked I previously installed picamera using sudo apt- get python picamera, and I have open cv version 2.7 installed. what should I do now?<br /><br />import error no module named picamera... <br /><br />please help me Abhijeet Golliwarhttps://www.blogger.com/profile/06232049064878962336noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-30974606398530508802016-12-26T18:24:13.550+01:002016-12-26T18:24:13.550+01:00If you do not need to discriminate between humans ...If you do not need to discriminate between humans and animals there are libraries for doing this. These libraries usually make a difference between two frames from a camera and if there are too many different pixels, than there is something moving in front of the camera. Try searching the internet for something like "detect movement with raspberry pi"...Mascalhttps://www.blogger.com/profile/15501943190321068629noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-10573687811571556432016-12-20T17:20:15.439+01:002016-12-20T17:20:15.439+01:00In my project, i use raspberry pi2 and do: Human d...In my project, i use raspberry pi2 and do: Human detection and alarm. So, how can i detect human with cameraPi?. May you help me? plz.Anonymoushttps://www.blogger.com/profile/01679775864333846035noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-69948712228061724842016-10-30T20:16:14.575+01:002016-10-30T20:16:14.575+01:00The above download command for OpenCV did not work...The above download command for OpenCV did not work for me. I modified it to <br />$ sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip<br />and it worked fine. ராமன் ராஜாhttps://www.blogger.com/profile/07226450364901253512noreply@blogger.comtag:blogger.com,1999:blog-4146712575962827199.post-77307926190484820982016-09-22T19:22:22.874+02:002016-09-22T19:22:22.874+02:00OpenCV Error: Assertion failed (!empty()) in detec...OpenCV Error: Assertion failed (!empty()) in detectMultiScale, file /home/pi/opencv-3.0.0/modules/objdetect/src/cascadedetect.cpp, line 1634<br />Traceback (most recent call last):<br /> File "face2.py", line 29, in <br /> faces = face_cascade.detectMultiScale(gray, 1.1, 5)<br />cv2.error: /home/pi/opencv-3.0.0/modules/objdetect/src/cascadedetect.cpp:1634: error: (-215) !empty() in function detectMultiScale<br /><br />getting this error please helpAnonymousnoreply@blogger.com