Hog Feature Description operator

Source: Internet
Author: User
Tags square root


1) original literature of hog characteristics

"Histograms of oriented gradients for Human Detection"

"Finding people in Images and Videos" (PhD thesis) (more detailed)


2) network reference for Hog feature operators

Http://www.cnblogs.com/tornadomeet/archive/2012/08/15/2640754.html

http://blog.csdn.net/carson2005/article/details/7841443#

http://blog.csdn.net/abcjennifer/article/details/7365651

http://blog.csdn.net/zouxy09/article/details/7929348#




Hog characteristic description operator--principle, idea, step

-----------------------------------------------------------------------------------

1. Definition of hog feature descriptors

HOG descriptor:locally normalised histogram of gradient orientation in dense overlapping grids, that is, local normalized gradient direction histogram.


2. Basic ideas of hog characteristics

Histogram of oriented Gradient descriptors provide a dense overlapping description of image regions, that is, the statistical image of the local area of the gradient direction information to serve as the local The characterization of the image area.

Hog is somewhat similar to the SIFT feature descriptor, the difference:
1) Hog does not select the main direction, there is no rotational gradient direction histogram, and therefore does not have rotational invariance (large direction change), its rotate invariance is through the use of different rotational direction of training samples to achieve;
2) The hog itself does not have scale invariance, and its scale invariance is achieved by changing the size of the detection image;

3) Hog is obtained in the image block sampled by dense, which implies the spatial relationship between the block and the detection window in the computed hog eigenvector, while the sift eigenvector is extracted from the feature points of independent and discrete distributions (except dense sift).


3. Assumptions and starting points for hog characteristics

The hypothesis is this local object appearance and shape can often be characterised rather well by the distribution of Loc Al intensity gradient or edge directions, even without precise knowledge of the corresponding gradient or edge positions. That is, in the image, the local appearance and shape of the object can be well characterized and described by its local gradient or edge information.


3. Extraction and calculation steps of hog feature description vectors


The flowchart for Hog feature extraction is shown in the following figure:



1) Global Image Normalization

Objective: To reduce the effect of illumination

Method: Gamma Compression
A) for each color channel, calculate the square root, or
b) For each color channel, please log


2) Calculate image gradient

Objective: To describe the texture information of object edge, contour and shape in image by gradient information.

Method: Calculate the gradient for each color channel separately. Gradient operator: Horizontal edge operator: [-1, 0, 1]; vertical edge operator: [-1, 0, 1]t.

Finally, a gradient vector with the maximum modulus of norm in three channels is selected as the gradient vector of the pixel.


3) Statistical Office image Gradient information

Objective: to quantify (or encode) the image gradient information of the Department of Statistics, and to get the feature description vector of the local image region. The characteristic description of the calculation vector can not only describe the content of the local image, but also can be invariant to the small change of pose or appearance in the image area.

Method: Gradient direction histogram is obtained

A) The image window is divided into multiple regions "cell";

b) Calculate a 1-d weighted gradient direction histogram for each "cell";

Where the histogram contains 9 bins, divided into intervals: 0°-180° or 0°-360°.

The weighted use of the three linear interpolation method, the current pixel gradient direction, the pixel in the cell x-coordinate and the y-coordinate of the three values as the interpolation weight, and is used to insert the value of the pixel gradient amplitude.

The advantage of using three linear interpolation is that it avoids abrupt changes in the gradient direction histogram at the bin boundary where the cell boundary and gradient direction are quantified.


4) Normalization

Objective: After normalized the histogram of each block, it is able to have better invariance of illumination, shadow, edge contrast, etc.

Method:

1) combine multiple adjacent cells into a block, then calculate the gradient direction histogram vector;

2) using L2-norm with hysteresis threshold method for normalization, the histogram vector will be the maximum value of the bin value is limited to less than 0.2, and then re-normalized once;

Note: The block is "shared", that is, a cell will be "shared" by more than one block. In addition, each "cell" is normalized as "block" independent, meaning that each cell in its own block will be normalized once to get a vector.


5) generating Feature description vectors

The hog descriptors of all "blocks" is combined to form the final feature vector, which describes the image content of the Detect window.



4. Hog describes the advantages of operators:


1) Orientation histogram

Ability to effectively describe the local shape characteristics of an image area

2) using "cell" method to quantify the gradient direction, so that the feature description operator has some (a small amount of) translation or rotation invariance

By changing the bin number of the histogram and the size of the "cell", the accuracy and retention characteristics of the local area feature information of the captured image can be controlled.
3) with light invariance
Gamma normalisation and local contrast normalisation (local contrast normalization) contribute another key component:illumination invariance.
4) Overlapping blocks
The use of overlapping of blocks provides alternative normalisations so, the classifier can choose the most relevant O Ne.


5. Several factors that affect the performance of hog:
Finescale gradients, fine orientation binning, relatively coarse spatial binning, and high-quality local contrast Normalis ation in overlapping descriptor blocks is all important for good performance.



6. Explanation
1) Why use orientation histogram.
Capture local Shape information
2) Why use "cell".
Achieve a small amount of spatial invariance
3) Why use "overlapping blocks".
Among the many local contrast normalisation methods, the best results are obtained by using overlapping blocks.




7. Hog Code

The OPENCV contains the extraction and description class cv::hogdescriptor of the Hog feature. This class allows you to extract the hog characteristics of the specified image area.




Related content: www.icvpr.com

--------------------------------------------------------
< reprint Please specify: HTTP://BLOG.CSDN.NET/ICVPR >



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.