如何找出人微笑时的whitePixelValue?

发布于 2024-11-05 17:32:20 字数 357 浏览 0 评论 0原文

使用 CvRect 我能够检测面部坐标,

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

但我的问题是如何找出人微笑时的白色像素值?

那么微笑偏移量多少合适呢? 150的值准确吗?

微笑哈级联根本不起作用。需要仅对白色像素进行逻辑处理

请帮忙!!!

更新:我认为我的赏金将被浪费..没有得到专家的回应 在这个线程上。我一直在寻找 算法:(

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

無心 2024-11-12 17:32:20

据我了解,您想根据牙齿和皮肤之间的色差来检测微笑,对吗?这可能是有道理的,因为嘴唇像素强度与牙齿像素有很大不同。如果是这样,我建议采用两种方法。

第一个是计算面部区域的拉普拉斯变换。具有拉普拉斯最大值的坐标将对应于相邻像素强度之间的最大差异。我认为微笑包含最具对比度的像素。您应该再次选择阈值,但在这种情况下,它与图像的光照条件无关。

第二个想法与第一个想法类似,不同之处在于您需要将像素与所有面部像素的平均值进行比较。这里,其值相对于平均值相对过高的像素被视为牙齿像素。顺便说一句,像 cvAdaptiveThreshold 这样的东西可能会有所帮助。

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.

梦里°也失望 2024-11-12 17:32:20

嘿,你检查过这个项目吗https://github.com/beetlebugorg/PictureMe
这确实是一个伟大的项目,请研究一下。我想你会找到你需要的。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文