Ask Your Question
0

Viola jones Haar features

asked 2013-05-30 22:56:44 -0600

Ankit gravatar image

The three types of Haar like features are : Edge feature,line feature and four-rectangle.

1.) Why there are three type of haar features?

2.) What is the significance of each feature?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-05-31 03:41:35 -0600

I think you are mixing things up.

HAAR-like wavelets are always rectangular features, which take areas of pixels and subtract those values. The end result is then tresholded to make a decision for a specific feature. More information on which type of haar-like wavelets can be found here. OpenCV supports the use of the basic orientations, but it also supports use of the rotated haar-like wavelets.

The Viola & Jones framework supports the use of this features. Depending on how the rectangles are oriented, one could say they search for specific behaviour, namely gradient information. A strong gradient in vertical direction, will make that there is a large difference between two vertical boxes moving over it.

This is why these features are stated as features looking for edges/lines, which is basically the same. The four rectangleqs type of features go looking for more specific information and gradient structures, like corners and such.

Basically read the Viola&Jones paper for more information on them.

edit flag offensive delete link more

Comments

And to answer to why you need different features, you do not want to limit the algorithm to only vertical or horizontal features, but you want to combine horizontal, vertical and rotated features all together.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-31 03:44:25 -0600 )edit

How does the algorithm know which Haar-feature it has to choose? Does the algorithm do all the permutations of these features in a scanning window and based on that detect an object?

Ankit gravatar imageAnkit ( 2013-06-03 00:28:14 -0600 )edit

It applies the boosting algorithm. Again, your should read the paper, in order to get better insight. Basically what happens is during training phase, for each window all possible features are calculated. Next the boosting algorithm tries to define the most descriminate feature (best division of positive and negative data). Only those features are remembered in the final trained model, and need to be calculated at runtime. This is why training of cascade classifiers takes that long.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-06-03 01:54:35 -0600 )edit

Question Tools

Stats

Asked: 2013-05-30 22:56:44 -0600

Seen: 562 times

Last updated: May 31 '13