Hog features (excerpt from graduation thesis)

Source: Internet
Author: User


Spectators, if you find errors (there should be some), look feel free. Because there are limitations, so not particularly detailed specific

Previously written content:

Source analysis of pedestrian detection in OPENCV hog (i.)

HOG (histograms of oriented gradients) is a feature of Dalal in 2005 for pedestrian detection, which is able to roughly describe pedestrian contours [12]. Hog feature is the most commonly used feature in pedestrian detection field at present. For the detection of other non-pedestrian targets, the hog features have also achieved prominent effects, which can be said to be the target detection neighborhood, the single feature of the best performance features [26]. In addition, the Hog feature is also applied to the attitude estimation [62], face recognition [63], expression recognition [64], scene classification, etc. [65] and so on.

Figure 2.8 HOG extraction process of features

Hog extraction Process 2.8, each section is described in detail below.

(1) Gamma correction

The image preprocessing is improved by using gamma transform, and the contrast degree of the dark area is enhanced [64]. The experimental results of Dalal show that the error detection rate can be reduced under the condition of FFPW when Gamma transform is used.

(2) Calculate gradient

To represent the color value in one channel of an image, the horizontal direction gradient is recorded as a vertical gradient, and the formula is as follows:

The gradient amplitude and gradient direction are calculated as follows:

In the actual calculation, using the template and the image convolution to obtain and, for the multi-channel image, select the gradient amplitude of the largest channel gradient as the gradient of the pixel point.



Figure 2.9 gradient interpolation and weighting within a block


(3) Statistical gradient direction

This step is the core of the Hog feature calculation, which divides the image into a cell (cell), which consists of a block, and the gradient interpolation within the block is shown in weighted mode 2.9. The pixels within the block vote for the cells within the block. Each cell counts a histogram of the gradient direction. There is no symbolic distinction in the gradient direction, and the gradient direction is divided into 9 intervals (Bin) within the range. The gradient direction of each pixel is linear interpolation, which is the two-interval voting in the direction of the gradient. In addition, the cells around the pixel are bilinear interpolation voting, specifically, the pixels in F, G, J, K need to interpolate cell 0-cell 3 A total of 4 cells, and A, D, P, M points within the cell only need to interpolate, the rest of the region needs to interpolate 2 cells. The weight of the pixel point on one of the gradient directions of a cell, the gradient direction of the point in the gradient direction and the cell interpolation, and then after the Gaussian weighted value. As shown in 2.9, the Gaussian weighting causes the pixel weights closer to the center of the block to be larger, and the smaller the lower.

(4) Normalization

In order to overcome the uneven illumination and the contrast between foreground and background, it is necessary to use local normalization. The Hog feature first l2-norm the 36-dimensional vector of each block, i.e., then uses truncation, that is, the final re-l2-norm normalization. Because the blocks overlap with the blocks around them, each cell contributes to the blocks around it, but the normalized block is not the same. This may result in information redundancy, but it can significantly improve the accuracy of the algorithm.

(5) Vectorization

Finally, the features within the detection window are formed into a one-dimensional vector. Dalal sets a step size of 8 pixels, so there are 1-2 overlapping cells between adjacent blocks, and each cell contributes to the 4 blocks around it. For the detection window, the final component of the dimension is a feature vector.

Hog features (excerpt from graduation thesis)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.