Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out whitePixelValue when person smile?

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 :(

like image 757
Tariq Avatar asked May 05 '11 12:05

Tariq


1 Answers

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.

like image 157
Andrey Sboev Avatar answered Sep 19 '22 08:09

Andrey Sboev