HOG Gradient Direction Histogram introduction (reprint)

Source: Internet
Author: User

First, the basic hog algorithm

Hog feature was first appeared in the SIFT algorithm, because of its very strong image feature description ability, gradually known and widely used, and its target detection performance is particularly prominent.

Hog Feature Extraction Process

Step one: traverse the image each pixel point, take the 8*8 pixel domain as the grid (block) region as the center;

Step two: Divide the grid (block) area evenly into 4 cell units of equal size (cell), each cell size is 4*4 pixels;

Step three: Calculate the gradient amplitude and gradient direction of each pixel in all cell units (cells), the gradient operator uses the central operator [1,0,-1];

where H (x, y) is the gradient size horizontally in each pixel, and V (x, y) is the vertical gradient size. O (x, y) is the gradient direction of the pixel (x, y), and M (x, y) is its gradient amplitude.

Step four: The gradient direction is limited to (0,180°), the average divided into 8 intervals, in a signed 8 direction. According to the Gaussian weighted range of the ellipse circle, the gradient amplitude of all pixels in the same gradient direction on the cell (cell) is weighted and accumulated, which makes up the 8-dimensional gradient direction histogram of the element.

Step five: Calculate the Cell cell (cell) 8-dimensional gradient direction histogram, a grid (block) region of 4 cells (cell) Gradient histogram link, to obtain a grid (block) region of the 4*8=32-dimensional gradient histogram feature. The histogram feature of all grid (block) regions is connected, and the hog feature is obtained by using l2-norm normalization. A size of 128*128 image, can be divided into 16*16=256 non-overlapping mesh area, the length of its hog eigenvector is 256*32=8192.

Second, spatial Multiscale hog Model hog operator is an effective shape descriptor, but it has an important problem, that is, the spatial arrangement information between local features is discarded.    Spatial Multiscale Hog model can well describe the shape and spatial layout of objects. (1) The 128*128 size of the original image is divided into a series of different scales of the grid (block) sub-region.    If the L layer is refined, the L layer has a 4^l sub-region image, and each sub-region size is 128/2^l * 128/2^L (l=0,1,....., L-1). (2) The gradient histogram of each grid (block) sub-region is computed by layer.    The orientation of the gradient direction is still set to (0,180°) and the quantization interval number is K. (3) using L2-norm normalized gradient direction histogram of each grid (block) sub-region, the spatial Multiscale Hog feature of the whole image is obtained by the straight string. Wakahara image is divided into L-layer, each layer has 4^l sub-area, gradient direction histogram has k interval, then the total length of the feature vector after the string is P:

HOG Gradient Direction Histogram introduction (reprint)

Related Article

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.