Face detection
Erlend
Posts: 612
These days even quite low-priced cameras come with a face detection feature where the screen will show a live marker - ususally a red square frame - superimposed over the picture wherever there is a face. Lots of cameras can even track several faces simultaneously. What if I could get my hands on one of those chips that are responsible for this computing achievement. Somewhere in there are the x-y coordinates of the face in the picture. How nice it would be to hack into that, and to use these coordinates to orient the head or eyes of a robot? A robot that effectively looks into your face at all times?
Can it be done? Anyone researched this?
Erlend
Can it be done? Anyone researched this?
Erlend
Comments
Erlend
My first run at this would be as follows:
1) Get a Raspberry Pi and it's camera module.
2) Ask Google to find me some facial recognition software that I can build to run on the Pi. There is at least one program that will analyse an image and spit out face coordinates. Sadly I remember what it is called. Perhaps you can do something with OpenCV.
3) Hook the Pi up to a Propeller via the UART on the Pi GPIO pins. The Prop will driver servos for robot steering and other I/O.
4) Hook all these together with a program written in Python, or JavaScript or whatever you like.
2) Yes, there is something out there, probably the most likely candidate is OpenCV, or alternatively Android 4
3) Plain vanilla
4) With reference to previous language wars maybe I should be silent on this, but my preference would certainly be to slave the Raspberry and let Spin be the supreme ruler
- but I cannot get my mind off those tiny cheap chips inside cameras - maybe piggyback a red-square-x/y-detector onto one such a camera...
Erlend
Actually based on the link in post #2, they sometimes do.
C.W.
Erlend
I hesitate to mention RoboRealm because it's so bulky but it does recognition really well.
http://opencv.org/
oh you beat me to it. Anyway, this is what I have been meaning to do for ages. The guys in the robot club use this and can identify hands and faces. The demo they showed used an old anfroid phone, but it should work with anything, even usb web cam. I have a Pi + camera, but did not get to this project yet. If you go this route would like to play along.
This is on my todo list.
I hope Hano's method of capturing NTSC B&W images could be used to generate the image to manipulate.
I know I've shown this image a bunch of times on the forum, but I just think it's so cool to be able to capture a low res image like this with the Propeller.
I think Phil's PropCAM would probably make the process even easier.
I also think the Parallax Laser Range Finder (which has a small camera) and CMUcam4 are also possible ways of using a Propeller to capture an image to be used in a face finding algorithm.
I personally would like to leave PCs (and berry pies) out of a robot unless absolutely needed.
BTW, post #4 of my index has links to various Propeller machine vision threads.
It is a toolbox for image analysis very efficient . I used it with a Propeller on a robot platform.
Easy to track a colored object.
Jean Paul
Or don't even put the PC on the robot.
Robot *video <wireless> host PC <XBee> robot.
*IP camera or analog tx/rx (1.2ghz and 5.8ghz work very well) IP Cams use less battery, most are ~120ma@5vdc. Analog cameras have much higher sample rate.
You have to be close enough to your mini-PC because of wireless but your robot will have a ton of CPU to play with. Makes tracking, identifying and even navigation really easy.
https://www.youtube.com/watch?v=UZe48U0K89k
Xanadu: Where you ever able to determine the USB composite video device you used on your project?
Regards,
Steve
The one I have is no longer sold, and it was like $8 too. Most of the capture devices that cost $50 and up you're paying for garbage bundled software. The closest I can find to it (same manufacturer according to device manager) doesn't list the color format so it's a gamble. In fact I spent some time looking around and all of the good ones seem to be discontinued.
I think if you email RR support they have some kind of unofficial list. I'm pretty sure that is what I ended up doing originally, but there were also way more options to choose from. Don't get roped into spending $80 though, even if you have to find a place that takes returns and pay a restock fee you should be able to find something for under $20.
You can use any capture device that is DirectX compliant and in RGB24 or RGB555 color format. Of course the hardware will also need to be compatible with your OS.
Sweet video, and really nice bot! What's your average FPS into RR with that webcam/router setup? Also if you don't mind what is the power draw?
Edit: Just heard 15 FPS in your video, another 10-15 FPS and that thing will be screaming for navigation. If 15 FPS is working okay for you I'd consider the power consumption, you might end up with higher FPS and less mA which is worthwhile. Otherwise I'm not sure trading power for FPS is a good idea, I guess it depends on how much battery you have.
Thanks,
Steve
Just a thought.
Joe
It sounds like you could cut power consumption and increase the FPS by switching to analog video. There are probably a lot of benefits of having the wireless network on the robot though. In fact it's almost against my religion to remove a network device, I usually only add them hehe.
Here's a breakdown of my analog setup:
CCD 700 line board camera = 80ma
1.2gHz 700mw video transmitter = 300ma
I'm not familiar with your access point, but 700mw will hit the same range as the average access point with stock antennas.