gpt4 book ai didi

c++ - Viola-Jones 人脸检测方法是如何工作的?

转载 作者:IT老高 更新时间:2023-10-28 21:43:39 26 4
gpt4 key购买 nike

请用几句话向我解释一下 Viola-Jones 人脸检测方法的工作原理。

最佳答案

Viola-Jones 检测器是一个强大的二元分类器构建了几个弱探测器

Each weak detector is an extremely simple binary classifier

在学习阶段,级联的弱检测器被训练,以便使用 Adaboost 获得所需的命中率/未命中率(或精度/召回率)为了检测物体,原始图像被分割成几个矩形补丁,每个补丁都提交到级联

如果一个矩形图像 block 通过所有级联阶段,那么它被归类为“阳性”这个过程在不同的尺度上重复

enter image description here

Actually, at a low level, the basic component of an object detector is just something required to say if a certain sub-region of the original image contains an istance of the object of interest or not. That is what a binary classifier does.

基本的弱分类器基于一个非常简单的视觉特征(那些这种特征通常被称为“Haar-like features”)
enter image description here

类似 Haar 的特征由一个 本地类组成通过减去 a 的总和来计算的特征特征的子区域来自剩余的总和特征区域

enter image description here
这些特征的特点是计算简单,使用积分图像,计算效率很高。

Lienhart 引入了一组扩展的扭曲 Haar 特征(见图)

enter image description here
这些是扭曲了 45 度的标准 Haar 特征。 Lienhart 最初并没有使用扭曲的棋盘 Haar 特征 (x2y2),因为它们所代表的对角线元素可以简单地使用扭曲的来表示功能,但是很明显,也可以实现和使用此功能的扭曲版本。

这些扭曲的 Haar 特征也可以使用扭曲 45 度的积分图像快速有效地计算。唯一的实现问题是扭曲的特征必须四舍五入为整数值,以便它们与像素边界对齐。此过程类似于缩放 Haar-like 时使用的舍入较大或较小 window 的功能,但一个区别是 45 度 扭曲特征,用于高度和宽度的整数像素特征意味着像素的对角坐标将始终在同一对角像素集上

enter image description here
这意味着与垂直和水平标准相比,可用的不同尺寸 45 度扭曲特征的数量显着减少对齐的特征。

所以我们有类似的东西: enter image description here

关于公式,使用积分图像的 Haar 类特征的快速计算如下:

enter image description here

最后,here is a c++ implementation使用 ViolaJones.h通过伊万库萨利奇

查看完整的 c++ project go here

关于c++ - Viola-Jones 人脸检测方法是如何工作的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5808434/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com