문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top