Basics of Face/Shape-Recognition

Posted By: Tempelbauer

Basics of Face/Shape-Recognition - 10/13/11 19:59

Hi

i research about analyzing images (for the study and for interest). you know, face-recognition (or haptic gesture-recognition) is meanwhile spread widely, thanks to wii and xbox/kinect

i want to dive into this amazing world. get to know basics, play around with it and (if i got good enough) implementing such a feature exemplary. for stored images or, and that would be much cooler, as a lite-c-libary (think about another way of auto-targeting, webcam-games, etc)

so i need material about it.
do you know books, papers and magazins about this topic? does someone have experience with it?
i want to start recognizing a shape, like circles (i have an image of a bacteria culture).
currently i play with filter-effects to prepare the image for a recognition (-> creating a black/white image only with the bactiera-circles). but i have no idea how to recognize the shape efficiently
Posted By: Slin

Re: Basics of Face/Shape-Recognition - 10/13/11 21:20

Christian did something about face recognition...
For general shape detection this might be interesting for you: http://en.wikipedia.org/wiki/Viola-Jones_object_detection_framework and maybe also check out this: http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html
Other than that, you may want to consider shaders or OpenCL for preprocessing and other parallelizable stuff, for much better performance. For getting a video stream, there is of course OpenCV (which also implements LOTS of algorithsms for working with the data), but I actually really like videoinput, which is just extremely easy to use.
Posted By: HeelX

Re: Basics of Face/Shape-Recognition - 10/13/11 21:50

Yes, indeed I have experience in that field. My B.Sc. thesis was about dynamic head pose recognition from statistical facial features.

@Tempelbauer: it is necessary to know what you actually want to do, because pattern recognition is not so easy as you might think. Seriously. Most people on the net which do something in that field and post vids on YouTube are only utilizing features of packages like OpenCV or re-implementing stuff that is known to computer vision research for years. So don't be to excited wink

Slin pointed out the Viola Jones Detector, which essentially utilizes Cascaded Haar Features (not from hair.. Haar was a researcher). Haar Features work only for greyscale images and are very fast and reliable, but training them is very expensive. I used the Haar Cascades provided with OpenCV to detect (not recognize, that is a difference!) faces in images in order to normalize an image to that portion of the camera image.

Face recognition is an approach in which you, given a face image (so, detection is already done!), try to identify the person of that image, or if no person you know is associated with the face image. I used the Gabor Wavelet Transformation (GWT) and a brand-new method of Elastic Bunch Graph Matching to do that. GWT needs to have the fourier-transformed image, so, you essentially have to implement a FFT for that, all in all is such an approach not realtime-enabled.

Rotated faces (along the camera axis) and posed faces (3 degrees of freedom, in arbitrary space) is a very special problem. Most solutions don't cover rotations beyond a certain degree. I trained a network of Gabor Jets for special facial features for about 12 pan angles and 8 tilt angles on a camera-space face-pose grid, tagged all training images by hand and then I process the image against the model - it works. But this is not realtime, since it is very CPU and data driven. But it's accuracy was suprisingly high, I got for the vertical axis (tilt), even more accurate results than other leading approaches; though, the horizontal results were not promising, due to some decisions I made for which facial features to take. The Kalman-Filter almost filtered false positives out, but if the head rotated around the forward axis (which I didn't targetted, though), I got bad results.

For realtime systems, there are a list of other approaches to recognize the face pose, or facial expression. Most of them, though, are very limited, since you try to recognize for example certain lines in the face and later, you try to recover from the relative shape alignment the face pose. After researching the literature, I found most systems pretty unreliable for high angular head rotation, like between -90°...0...+90° (pan and tilt).

Since motion video covers lots of noise and errors (especially during arbitrary lightning conditions), you get much trouble with the data you recover, so, in most cases you need a filter, like the Kalman-Filter, to smooth out the generated position, pose, etc. Kalman-Filters are pretty naive, though, but easy to implement, I found them pretty reliable for linear movements and -motions.

I could provide you my bachelor thesis, if you like. The literature list contains lots of nice papers and surveys which cover the state of the art. Though, there are lots of algorithms, how to do this stuff in realtime, but don't expect much accuracy if you have high hopes.
Posted By: HeelX

Re: Basics of Face/Shape-Recognition - 10/13/11 21:55

Quote:
i want to start recognizing a shape, like circles (i have an image of a bacteria culture).


For preparing the image, make it grayscale and try bit-extraction on the first two high-level bits. Then use a Sobel and/or Laplace filter to extract candidates for contours and use a 4-way or 8-way contour finding algorithm to skeletize the image.

Then, geometric shapes can be easily detected with the Hough-Transformation, that is faster than creating a filter kernel with a circle and convoluting the image. In the fourier domain, convolution is faster, but this is much more complicated.

I processed some images of cells and/or bacteria, a histogramm equalization is almost all the time very beneficial, because it brings some details, which are hidden in low-contrast areas, up front.
Posted By: HeelX

Re: Basics of Face/Shape-Recognition - 10/13/11 21:59

Quote:
haptic gesture-recognition


If you want to track a hand, you can do the following, if you have a color image: try to make a model of skin color. I used a Bayesian Histogram (one for skin color, one for non-skin color) to approximate the probability, if a pixel covers skin or not.

The you get a skin probability image, in which you can segment with a classic approach the areas: ideally, you get the area around the head and two areas for the arm/hand. Approximate which area the hands are and feed that position (and hand size) into a tracking algorithm, to predict the positions in the next frame, that helps you as a new cue to extract the hands in the next frame.
Posted By: Tempelbauer

Re: Basics of Face/Shape-Recognition - 10/14/11 08:23

thanks for your posts laugh

Quote:
because pattern recognition is not so easy as you might think. Seriously.

i dont think that this is easy. but i want to deal with it. in my study we have 2 courses which go in this direction, one of them this semester. so now i´m collecting information about it to have a base for my exercises

Quote:
I could provide you my bachelor thesis, if you like.

yes, this would be great laugh

Quote:

For preparing the image, make it grayscale and try bit-extraction on the first two high-level bits. Then use a Sobel and/or Laplace filter to extract candidates for contours and use a 4-way or 8-way contour finding algorithm to skeletize the image.

Then, geometric shapes can be easily detected with the Hough-Transformation, that is faster than creating a filter kernel with a circle and convoluting the image. In the fourier domain, convolution is faster, but this is much more complicated.

I processed some images of cells and/or bacteria, a histogramm equalization is almost all the time very beneficial, because it brings some details, which are hidden in low-contrast areas, up front.

i´ll do so. until now i´ve played around with some filters and adjustments (using ImageJ) to get a black/withe-image of the bacterias
Posted By: HeelX

Re: Basics of Face/Shape-Recognition - 10/15/11 11:43

Here you go: Dynamische Kopfposenerkennung anhand statistischer Gesichtsmerkmale (german, ~22 MB)
Posted By: Zapan@work

Re: Basics of Face/Shape-Recognition - 10/15/11 12:44

@HeelX:Super Teil!
Posted By: Tempelbauer

Re: Basics of Face/Shape-Recognition - 10/18/11 18:17

echt klasse, danke laugh
© 2024 lite-C Forums