Академический Документы
Профессиональный Документы
Культура Документы
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
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.
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.
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