Facial recognition would be possible, but it's incredibly difficult to code. To be honest I imagine PHP would be too slow for it. I'm actually working on something vaguely similar right now for Intelligent Thumbnails (
viewtopic.php?f=40&t=80676 ). I'm not trying to select faces, I'm trying to make something that will work out which part of the image is the most "interesting" and make a thumbnail from that. I doubt it'll ever really work as well as I want it to, but that's not going to stop me trying.
As for detecting whether an image is blurry.. that
should be pretty easy. Not sure what the maths behind it would be though.