使用OpenCV进行人脸检测以获取非正面图像 [英] Face Detection with OpenCV for non frontal images

查看:98
本文介绍了使用OpenCV进行人脸检测以获取非正面图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用opencv来检测人脸.面部不是正面的,相机会从侧面捕获面部,因此只能看到一只眼睛和嘴巴的一部分.我尝试了具有多种配置的HaarDetectObjects,但没有获得收益.我更改了级联,并进行了测试: haarcascade_frontalface_default.xml,haarcascade_frontalface_alt.xml,haarcascade_profileface.xml具有非常差的结果.还有其他更好的级联吗?还有其他建议吗?

I am trying to use opencv to detect faces. Faces are not frontal, the camera captured the faces from side so only one eye and part of the mouth is viewed. I tried HaarDetectObjects with multiple configurations without getting benefit. I changed the cascade and I tested: haarcascade_frontalface_default.xml, haarcascade_frontalface_alt.xml,haarcascade_profileface.xml with very bad results. Are there any other better cascades? Are there other suggestions?

谢谢

推荐答案

现在,您在OpenCV中拥有由Vadim Pisarevsky创建的用于轮廓面的新LBP级联:

Now you have in OpenCV the new LBP cascade for profile faces, created by Vadim Pisarevsky:

https://github.com/Itseez/opencv/blob/master/data/lbpcascades/lbpcascade_profileface.xml

显然,它只能检测到正确的轮廓脸,因此要检测所有轮廓脸,必须在图像翻转后进行第二步.

Apparently, it only detects right profile faces, so to detect all profile faces one has to run a second step with the image flipped.

这篇关于使用OpenCV进行人脸检测以获取非正面图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆