794 views

Uploaded by pi194043

A document describing the computation of haar like features that are used in cascade object detection

save

- Adaptive Skin Color Detector
- A linear channel filter
- Fast 2D Separable Symmetric/Anti-Symmmetric Convolution
- Control Limited Adaptive Histogram Equalization for Image Enhancement
- Normalized convolution for image interpolation
- Continuous-State Graphical Models for Object Localization, Pose Estimation and Tracking
- Polynomial Approximation of 1D signal
- polynomial approximation of a 2D signal
- Modified Canny Edge Detection
- A simple color balance algorithm
- Image enhancement using Fusion
- PREDICTING PVT PROPERTIES USING ARTIFICIAL NEURAL NETWORKS
- Homework 5
- ar_fisher_2001
- Marina Vishmidt - The Cultural Logic of Criticality
- ch 7 finance
- quality control
- q123edrft g dgdgd
- Article-Dust Control Measures in the Construction Industry
- MetaMan Modeling
- stats_ch4.pdf
- ch8-16 y 8-17 (1)
- OpenVision Library Gaussian Mixture Model Implementation
- ARM Neon Optimization for image interleaving and deinterleaving
- Dense optical flow expansion based on polynomial basis approximation
- Continuous Emission Hidden Markov Model for sequence classification
- Implementation of discrete hidden markov model for sequence classification in C++ using Eigen
- Markov chain implementation in C++ using Eigen
- Modified Canny Edge Detection
- Polynomial Approximation of 2D image patch -Part 2
- Gaussian Multivariate Distribution -Part 1
- Multi Class Logistic Regression Training and Testing
- Compiling Native C/C++ library for Android
- C++ virtual functions and abstract class
- C++ static members and function
- Uniform Local Binary Pattern and Spatial Histogram Computation
- Tan and Triggs Illumination normalization
- Mean Shift Algorithm
- Local Binary Pattern
- C++ Inheritance
- C++ Const,Volatile Type Qualifiers
- Polynomial Approximation of 1D signal
- polynomial approximation of a 2D signal
- Integral Image for Computation of Mean And Variance
- Random Ferns for Patch Description
- Embedded Systems Programming with ARM on Linux - Blinking LED
- FACIAL FEATURE DETECTION USING HAAR CLASSIFIERS
- Aeroplane Gesture
- Face Recognition for Biometric Door Unlocking System
- Grabeex openCV

You are on page 1of 8

Pi19404

July 8, 2013

Contents

Contents

Computing Rectangular Haar Features for Cascade Detection Training

0.1 Introduction . . . . . . . . . . . . 0.2 Haar Like Features . . . . . . . 0.3 Integral Image Representation 0.4 Implementation Details . . . . . 0.5 Code . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

3 3 5 6 7 7

2 | 8

0.1 Introduction

In the article we will look at Haar feature extraction which is used for cascade object detection. And provide a generic method of feature extraction .

Haar like Features are simple rectangular features which are based on Haar Wavelets. The set of rectangular features used for visual recognition task are not acutally haar wavelet but bear some resemblence to Haar wavelet basis function. The Haar features are evaluated at all possible translation and dydactic scales. Thus a very large number of features are extracted from images. Consider the following Haar features. Figure 1a resembles a first

order derivative along the x direction.All possible translation and dydactic scales need to be considered

3 | 8

Computing Rectangular Haar Features for Cascade Detection Training The number translations along y direction at successive scales are (24,23,. . . ,3,2,1) ,which is total of 300. The number of translations along the x direction at successive scales are (23,21,19,. . . ,5,3,1),which is total of 144 The total number of features are 43200. Figure 1b resembles first order derivative along the y direction. The calculate of features is same as Haar feature 1 and total number of features are 43200. Figure 1c resembles second order derivative along the x direction. Considering all the possible translation and scales . The number translations along y direction at successive scales are (24,23,. . . ,3,2,1) ,which is total of 300. The number of translations along the x direction at successive scales are (22,19,16,. . . ,7,4,1),which is total of 92 The total number of features are 27600.

Figure 1d resembles second order derivative along the y direction. The calculate of features is same as Haar feature 3 and total number of features are 27600. Figure 1e resembles second order partial derivative along the x y direction or derivative along the diagonal . Considering all the possible translation and scales . The number translations along y direction at successive scales are (23,21,. . . ,5,3,1) ,which is total of 144.

4 | 8

Computing Rectangular Haar Features for Cascade Detection Training The number of translations along the x direction at successive scales are (23,21,. . . ,5,3,1),which is total of 144. The total number of features are 20736. These are the 5 basic haar features proposed in the original paper of Viola and Jones. The total number of features for a simple 25x25 image comes out to be 162336. Most of these features are redundant and only a small set of features are required to represent the object of interest.

Thus Viola and Jones uses a total of about 162336 rectangular features. Integral image representation is used for fast computation of sum/difference of rectangular areas.We will not be looking at integral image representation but rather use it as a blackbox which takes as input the co-ordinates of rectangular are outputs the mean or weighted mean value of pixels that fall in rectangular area. It can be noticed that haar features can be computed as sum and different of mean pixels intesities in rectangular areas. Let us assume that we have the integral image representation of image in Figure 1f. Sum of pixels in the rectangulare area is simply given by where

I (C ) + I (A) I (B ) I (D)

Let us

consider the first Haar Features 1a. This haar feature is made up

5 | 8

Computing Rectangular Haar Features for Cascade Detection Training of 2 rectangular areas. The pixels in black area are weighted by -1 while pixels in the white area are weighted by 1.The aim is to compute the sum over all the pixels of Haar features. This can be done by computing the sum using integral image over the black and white rectangular area them simply weighing the results by +1 or -1 and adding it to get the complete sum. The basic steps are :-

Compute sum of pixels for all rectangles that make up Haar Feature Weight the results of integral sum computation of individual rectangles Add the results of all individual rectangles to get the final result.

The Rectangles Class is a basic unit. It is characterized by rectangle and weight . The Haar Feature class consists of vector of Rectangle Classes. To compute the Haar feature loop over the vector or Rectangle objects compute the integral sum,multiply by the rectangle weight,and calculate the cumulative sum over all the rectangles. The Harr Feature Set class consists of vector of objects of type Haar Features. Given a input image we compute the integral image representation of the image.For This we use the built-in OpenCV function. The compute method in Harr Feature Set class accepts as input a image and compute the harr rectangular features over the image. To minimize the effect of lighting conditions all the subwindows were variance normalized. Variance of a subwindow can be quikly computed using

2 N

m2 N

6 | 8

Computing Rectangular Haar Features for Cascade Detection Training where x is the pixel within the subwindow,m is the mean and is the standard deviation. Thus we need to compute the mean and squared sum over the sub window over the image. Like the sum ,squared sum also can be computed efficiently using integral image representation. To compute mean and squared sum we compute the sum of pixels over the subwindow for integral images and square integral image. The we add the results over all the sub rectangles in the Haar feature to compute the mean and square sum of pixels. Using these results we can compute the variance over the subwindows. The result of weighted sum of pixels is divided by the variance to perform variance normalization. The time take to compute all the haar features for a 25x25 image is 0.3 sec.

0.5 Code

The code for the testing and training utility can be found at https: //github.com/pi19404/m19404/tree/master/objdetect/HaarFeatures

7 | 8

Bibliography

Bibliography

[1] P. Viola and M. Jones. Rapid object detection using a boosted cascade of simple features. In: Computer Vision and Pattern Recognition, 2001. CVPR 2001.

Proceedings of the 2001 IEEE Computer Society Conference on.

doi: 10.1109/CVPR.2001.990517.

Vol. 1. 2001,

Jianxin Wu et al. Fast Asymmetric Learning for Cascade Face Detection. In:

IEEE Trans. Pattern Anal. Mach. Intell.

0162-8828.

url: http://dx.doi.org/10.

issn:

8 | 8

- Adaptive Skin Color DetectorUploaded bypi194043
- A linear channel filterUploaded bypi194043
- Fast 2D Separable Symmetric/Anti-Symmmetric ConvolutionUploaded bypi194043
- Control Limited Adaptive Histogram Equalization for Image EnhancementUploaded bypi194043
- Normalized convolution for image interpolationUploaded bypi194043
- Continuous-State Graphical Models for Object Localization, Pose Estimation and TrackingUploaded byJosé Alejandro Mesejo Chiong
- Polynomial Approximation of 1D signalUploaded bypi194043
- polynomial approximation of a 2D signalUploaded bypi194043
- Modified Canny Edge DetectionUploaded bypi194043
- A simple color balance algorithmUploaded bypi194043
- Image enhancement using FusionUploaded bypi194043
- PREDICTING PVT PROPERTIES USING ARTIFICIAL NEURAL NETWORKSUploaded byMohamed Mamdouh
- Homework 5Uploaded byPotatoes123
- ar_fisher_2001Uploaded bycesarfranca
- Marina Vishmidt - The Cultural Logic of CriticalityUploaded byAlice Pickett
- ch 7 financeUploaded bymrodr333
- quality controlUploaded bykamaleshaiah
- q123edrft g dgdgdUploaded byOctavian Albu
- Article-Dust Control Measures in the Construction IndustryUploaded byivanapeixoto
- MetaMan ModelingUploaded byPlaymaker Dhimas
- stats_ch4.pdfUploaded byBachir El Fil
- ch8-16 y 8-17 (1)Uploaded byMarie Angely

- OpenVision Library Gaussian Mixture Model ImplementationUploaded bypi194043
- ARM Neon Optimization for image interleaving and deinterleavingUploaded bypi194043
- Dense optical flow expansion based on polynomial basis approximationUploaded bypi194043
- Continuous Emission Hidden Markov Model for sequence classificationUploaded bypi194043
- Implementation of discrete hidden markov model for sequence classification in C++ using EigenUploaded bypi194043
- Markov chain implementation in C++ using EigenUploaded bypi194043
- Modified Canny Edge DetectionUploaded bypi194043
- Polynomial Approximation of 2D image patch -Part 2Uploaded bypi194043
- Gaussian Multivariate Distribution -Part 1Uploaded bypi194043
- Multi Class Logistic Regression Training and TestingUploaded bypi194043
- Compiling Native C/C++ library for AndroidUploaded bypi194043
- C++ virtual functions and abstract classUploaded bypi194043
- C++ static members and functionUploaded bypi194043
- Uniform Local Binary Pattern and Spatial Histogram ComputationUploaded bypi194043
- Tan and Triggs Illumination normalizationUploaded bypi194043
- Mean Shift AlgorithmUploaded bypi194043
- Local Binary PatternUploaded bypi194043
- C++ InheritanceUploaded bypi194043
- C++ Const,Volatile Type QualifiersUploaded bypi194043
- Polynomial Approximation of 1D signalUploaded bypi194043
- polynomial approximation of a 2D signalUploaded bypi194043
- Integral Image for Computation of Mean And VarianceUploaded bypi194043
- Random Ferns for Patch DescriptionUploaded bypi194043
- Embedded Systems Programming with ARM on Linux - Blinking LEDUploaded bypi194043