如何检测人脸和微笑& Android 中的人脸匹配?
我想知道以下事情在 Android 上是否可行。
- 选择一张照片并检测面孔并显示矩形,并检测每张面孔的微笑并显示每张面孔的微笑百分比。
- 从照片库中选择一张照片并显示面孔。如果您单击面孔,它会搜索所有照片库并显示可能的同一个人的列表。
I want to know following things is possible on Android or not.
- Pick a photo and detects faces and show rectangle, and detect smile of each face and show smile percentage of each.
- Pick a photo from photo library and show faces. if you click faces, it search all photo library and show list of possible same person.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
让我们按顺序进行:
FaceDetector
中未集成此类功能。然而,这是人脸识别的问题,在这方面的研究已经做了很多工作。谷歌的研究应该向您指出与此相关的理论论文,但我不确定它们都会有一个实现。编辑:研究人员用于此类主题的主要图像处理库是OpenCV。您可以在此处找到它的 Java 包装器。
Let's take thing in order :
FaceDetector
. However, this is a matter of face recognition, and many work has been done in research on this subject. A Google research should point you to the theoric papers relative to that, but I'm not sure they will all have an implementation.EDIT : the main image processing library used by researchers for this kind of subjects is OpenCV. You can find a Java wrapper for it here.
扩展 Valentin Rocher 的答案:我认为您可以通过执行以下操作来实现它:
遍历FaceDetector.Face对象数组,可以使用以下API进行比较(即固定一张脸作为参考并与数组中的其他以查找相似性/接近性)
信心()
眼睛距离()
获取中点()
pose()
Extending Valentin Rocher's answer: I think in a limited way you can achieve it by doing following:
Iterate through the array of FaceDetector.Face objects, you can use following APIs and compare (i.e. fix one face as a reference and compare it with other in the array to find similarity/closeness)
confidence()
eyesDistance()
getMidPoint()
pose()
有一个谷歌示例用于检测微笑。请检查:
FaceTracker
它是 Android Vision API,需要 Android Play 服务 SDK 级别 26 或更高。
There is a google example for detecting smile. Please check:
FaceTracker
It is Android Vision API and requires Android Play Services SDK level 26 or greater.