I need to develop a script utilizing computer vision that will:
- Scan all frames of an Flash/HTML5 video for people's faces
- Identify the video frames that shows the faces looking directly at the camera
- Crop the face in a perfect square
- Copy the cropped face to a .PNG file
Any recommendations for a Python computer vision library that could help me develop this script?
OpenCV is probably the best option for your specific use case: http://opencv.willowgarage.com/wiki/
It has some support built in for standard face recognition algorithms, and it's pretty easy to get up and running with in Python. However, although it's a pretty deep library, I'm pretty sure you'll have to find something else to first grab the images from Flash and feed it to your utility. I'm not sure about cropping either, but for that kind of thing I'm sure the Python Imaging Library will work if OpenCV doesn't do it.
Hope this helps.
As jonesy said opencv is your best bet for facedetection "out of the box".
To use flash video as imput you'd need something that will allow you to read .flv (flash video) files that you can connect to opencv. I haven't tried this myself, but I think if you install opencv with ffmpeg support (if you're on linux) you should be able to read most any video with opencv including .flv (or any html5 video format).
For cropping this explains what you want. For saving the cropped image as png check the documentation of imwrite.