Question

using CvRect i am able to detect faces coordinate

detectFace(IplImage * pImg, CvHaarClassifierCascade * pCascade, CvMemStorage * pStorage)

But my problem is How to find out whitePixelValue when person smile ?

And what Smile offset is appropriate ? 150 value is accurate ?

Smile haarcascade wont work at all. Need to do something with logic only with white pixels

Please help!!!

Update: I think my bounty going to be waste.. didn't get expert response on this thread. I was looking for algorithm :(

Was it helpful?

Solution

As far as I understand you want to detect smile based on color difference between teeth and skin, right? Probably that makes sense since lips pixels intensity differs greatly from teeth pixels. If so I'd suggest two approaches.

First one is to calculate laplacian transform of face region. Coordinates with maximum values of Laplacian will correspond to largest difference between neighbour pixels intensities. I think smile contains the most contrast pixels. You should again choose the threshold, however in this case it's independent on light conditions of image.

The second idea is similar to the first one with the exception that you need to compare pixels with mean value of all face pixels. Here the pixels whose values are relatively too high with regard to mean are considered as teeth pixels. By the way, something like cvAdaptiveThreshold might help.

OTHER TIPS

Hey have you checked this project https://github.com/beetlebugorg/PictureMe
This is really a great project have a look into it. I think you will find what you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top