Hog is an ideal operator for describing edge and shape information, which can partially resist illumination change, but does not have rotational invariance and scale invariance.
The hog operator has better effect when detecting the target with distinct edges, such as combining with SVM to do pedestrian detection. Online for the hog operator Principle analysis of the article abound, I am also now learn to sell, to swim.
Hog the extraction step of the description child:
① Low Image brightness
The effect of low image brightness is not only to reduce the shadow and illumination effects, but also to dilute the secondary edge, so as to facilitate the extraction of the target contour.
Lower image brightness using gamma compression method, that is, each color channel to do the open square operation or log.
② to obtain the gradient vectors of each pixel point
The work of extracting gradient vectors everyone should be at your fingertips. The gradient operator ([ -1,0,1]) is used to do the horizontal and vertical convolution respectively, in the mathematical sense is to obtain the x,y direction of the image respectively, the deviation of the square and the square can get the a pity dorado gradient amplitude, The direction of the gradient is the arctan of two biased ratios. The hog operator calculates the gradient of three channels respectively, and selects the gradient vector which is the largest amplitude of the point.
Gradient amplitude and direction calculation formula:
③ Statistical cell
The image is segmented into a pixel unit (cell) of n*n size, the gradient direction is divided into 9 intervals (bin) (360/9=40), and then the gradient vector in the cell is histogram statistic in each bin, then the gradient direction distribution of the cell is obtained, which is a 9-dimensional eigenvector, Next, the adjacent 2*2 cell is composed of a block, and their eigenvector is concatenated to obtain a 36-D eigenvector, which is the hog eigenvector. Block in the entire map of the scan step is 1 cell, also the cell is shared between blocks, a cell is not the only one block.
Therefore, the hog eigenvector is the gradient eigenvector described by a block.