Viola-Jones面部检测方法如何工作? [英] How does the Viola-Jones face detection method work?

查看:648
本文介绍了Viola-Jones面部检测方法如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请向我解释一下,Viola-Jones面部检测方法的工作原理。

解决方案

琼斯检测器是一种强大的二元分类器,构建了多个弱的
检测器

 code>每个弱检测器是一个非常简单的二元分类器

在学习阶段,的弱检测器被训练以使
使用Adaboost来获得期望的命中率/缺失率(或精度/回忆)。为了检测对象,原始图像被分割成几个矩形的
补丁,每个都提交到级联



如果矩形图像补丁通过所有级联阶段,则
它被归类为正
此过程在不同尺度重复




实际上,在低级别,对象检测器

基本组件需要说明如果
a某个子区域的原始
图像包含了感兴趣的
对象的汇出。这是
二进制分类器的作用。


基本的弱分类器基于一个非常简单的视觉特征
种功能通常被称为Haar类功能)



哈尔样特征包括一组本地
特征,通过减去a $ b



.stack.imgur.com / dIaGt.pngalt =enter image description here>

这些功能的特点是它们易于计算,并且使用积分图像,非常



Lienhart推出了一系列扭曲的Haar特征(见图片)。



img src =http://i.stack.imgur.com/r4K9G.pngalt =enter image description here>

这些是标准的Haar类功能,扭曲45度度。 Lienhart最初没有使用扭曲检查板Haar-like特征(x2y2),因为它们表示的对角元素可以使用扭曲的
特征来简单表示,然而显然该特征的扭曲版本也可以实施和使用。



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





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



所以我们有类似的:



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



最后,这里是一个c ++实现使用 ViolaJones.h by Ivan Kusalic



查看完整的c ++ 项目到这里


Please explain to me, in few words, how the Viola-Jones face detection method works.

解决方案

The Viola-Jones detector is a strong, binary classifier build of several weak detectors

Each weak detector is an extremely simple binary classifier

During the learning stage, a cascade of weak detectors is trained so as to gain the desired hit rate / miss rate (or precision / recall) using Adaboost To detect objects, the original image is partitioned in several rectangular patches, each of which is submitted to the cascade

If a rectangular image patch passes through all of the cascade stages, then it is classified as "positive" The process is repeated at different scales

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.

The basic, weak classifier is based on a very simple visual feature (those kind of features are often referred to as "Haar-like features")

Haar-like features consist of a class of local features that are calculated by subtracting the sum of a subregion of the feature from the sum of the remaining region of the feature.


These feature are characterised by the fact that they are easy to calculate and with the use of an integral image, very efficient to calculate.

Lienhart introduced an extended set of twisted Haar-like feature (see image)


These are the standard Haar-like feature that have been twisted by 45 degrees. Lienhart did not originally make use of the twisted checker board Haar-like feature (x2y2) since the diagonal elements that they represent can be simply represented using twisted features, however it is clear that a twisted version of this feature can also be implemented and used.

These twisted Haar-like features can also be fast and efficiently calculated using an integral image that has been twisted 45 degrees. The only implementation issue is that the twisted features must be rounded to integer values so that they are aligned with pixel boundaries. This process is similar to the rounding used when scaling a Haar-like feature for larger or smaller windows, however one difference is that for a 45 degrees twisted feature, the integer number of pixels used for the height and width of the feature mean that the diagonal coordinates of the pixel will be always on the same diagonal set of pixels


This means that the number of different sized 45 degrees twisted features available is significantly reduced as compared to the standard vertically and horizontally aligned features.

So we have something like:

About the formula, the Fast computation of Haar-like features using integral images looks like:

Finally, here is a c++ implementation which uses ViolaJones.h by Ivan Kusalic

to see the complete c++ project go here

这篇关于Viola-Jones面部检测方法如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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