使用OpenCV进行哈尔脸检测时,是否可以测量置信度? [英] Is there a way to get a measurement of confidence level when using haar face detection using OpenCV?

查看:164
本文介绍了使用OpenCV进行哈尔脸检测时,是否可以测量置信度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个使用OpenCV HAAR级联人脸检测的人脸检测应用程序.该算法运行良好,但是偶尔会发现墙壁上的图案或不是面孔的东西.
我想对怀疑为人脸的对象进行其他检查,但我只想对那些不相信自己是人脸的对象进行检查.有没有办法通过HAAR级联人脸检测获得对人脸的置信度"?

I developed an application for face detection using OpenCVs HAAR cascade face detection. The algorithm works fine, however every once in a while It finds patterns on the wall or ather things that are not faces.
I want to run additional checks on object suspected as faces but I want to do it only on objects that I am not confidant that they are faces. Is there a way to get a "confidence" level for a face detected by the HAAR cascade face detection?

推荐答案

OpenCV通过CascadeClassifier类的函数"detectMultiScale"中的参数"weights"提供置信度,您需要将标志"outputRejectLevels"设置为true

OpenCV provides the confidence via the argument "weights" in function "detectMultiScale" from class CascadeClassifier, you need to put the flag "outputRejectLevels" to true

这篇关于使用OpenCV进行哈尔脸检测时,是否可以测量置信度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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