Histogram of oriented gradients (HoG) is a very important feature in the field of computer vision and image processing. It is widely used in object detection, face detection, facial expression detection and so on.
HoG was first proposed by Navneet Dalal and Bill Triggs on the 2005 CVPR. HoG's algorithm is very simple and very effective for the representation of objects. Simple and efficient, this is probably why it has been widely used by the CV community since it was proposed.
Here is a brief introduction to HoG's algorithm:The first is to calculate the gradient:
We can see that if K is fixed, then the length of the histogram will be fixed. If you use this histogram to count on the entire image, the final histogram is still K regardless of the size of the image. Obviously, this is not what we want to see, so it will inevitably lose a lot of information. So there is block representaTIon.
Block representaTIon, in simple terms, is to divide the image into blocks, divide the image into pieces, each piece can be counted with a histogram, and then each piece of histogram is connected to form a long histogram. Block representaTIon is also one of the most commonly used methods for local feature extraction.
Image partitioning is also done in two ways. One is overlap and the other is non-overlap, which means that there is overlap between blocks and blocks, or there is no overlap. When calculating HoG, you usually choose the block mode of overlap.
The function of HoG has been integrated in MATLAB, and the library function can be directly called to calculate HoG. The calling form of this function is as follows:
[f1, visualizaTIon]=extractHOGFeatures(I)
Where I is the input image, f1 is the computed HoG feature, is a high-dimensional histogram, visualization is an object variable that visualizes HoG.
There are many input variables for this function. In addition to the input image I, there are some other variables, and the default default values ​​are generally used.
These default variables are introduced one by one below:
Cellsize: [8,8], which is the smallest block for calculating HoG. Each 8×8 cell can get a histogram.
Blocksize: [2, 2], which is to say how many cells a block contains, [2 2] means that a block contains 2 × 2 cells.
BlockOverlap: This is the size of the overlap between blocks, expressed in terms of the number of cells. The default value is that half of the cells overlap.
NumBins: is the K mentioned above, the default is 9.
UseSignedOrientation: is the range of angles mentioned above, the default is the unsigned range of angles, ie 0∘−180∘
So, with the default value calculation, although the length of a cell's histogram is only 9, but a block has 4 cells, the length of a block's histogram becomes 36, for a 64×64 image. With the block mode of overlap, there will be 49 blocks, so the length of the final HoG is 36×64=1764. The larger the image size, the longer the HoG will grow. But in general, HoG is a simple and compact feature. Compared with Gabor, LBP, and SIFT, it is relatively economical and cost-effective.
Finally give an example:
Our vast selection of communications poles is designed and manufactured for durability, wear and corrosion resistance, and visual appeal. We begin with the highest-quality materials for our designs, and fabricate poles and supports that meet our client's specifications and exceed their expectations for telecom poles.
We are one of the leading manufacturers of CCTV Poles and fiber optic pole.
Yixing Futao Metal Structural Unit Co. Ltd. is com manded of Jiangsu Futao Group.
Communication Pole,Steel Communication Pole,Communication Tower,Telecom Pole,Fiber Optic Pole
YIXING FUTAO METAL STRUCTURAL UNIT CO.,LTD( YIXING HONGSHENGYUAN ELECTRIC POWER FACILITIES CO.,LTD.) , https://www.chinasteelpole.com