This article was automatically translated from the original Turkish version.
Computer vision detection and vision-based object detection have gained increasing attention in recent years. Numerous algorithm have been developed in this field, and these algorithms are particularly used for tasks such as object classification, object recognition, and movement analysis such as. The Histogram of Oriented Gradients (HOG) algorithm is a widely used and proven feature extraction method in this context.

Example of the HOG Algorithm (Source: Batuhan Daz)
The HOG algorithm is a feature extraction method that uses gradient orientation information to identify objects in an image. The algorithm primarily consists of the following steps:
1. Grayscale Conversion: Colored images are typically converted to grayscale. This reduces computational load and makes gradient calculations more efficient.
2. Gradient Computation: Edge detection operators such as the Sobel filter are used to calculate brightness differences in the horizontal (x) and vertical (y) directions. These differences help extract edge information from the image.
3. Cell-Based Histogram Creation: The image is divided into specific regions (cells), and the gradient orientations of pixels within each cell are determined. A histogram is constructed for each cell by accumulating the gradient orientations and magnitudes.
4. Block Normalization: In the HOG algorithm, blocks are formed by combining a fixed number of cells. Block normalization normalizes histogram values to reduce sensitivity to variations in lighting.
5. Feature Vector Construction: The resulting cell histograms are concatenated to form a feature vector. This vector can be used in machine learning algorithms or object recognition systems.
These steps generate strong and robust features for object classification or detection in images.
1. Gradient Computation: Gradient computation involves determining horizontal and vertical brightness differences using edge detection operators such as the Sobel filter. This step establishes the foundation for subsequent analysis by identifying edge information in the image.
2. Histogram Creation: The gradient orientation and magnitude of each pixel are calculated, and histograms are constructed within cells. Each cell’s histogram organizes pixel gradient orientations into bins.
3. Block Normalization: Histograms are grouped into specific regions (blocks) and normalized. This process reduces sensitivity to lighting and contrast variations, resulting in a more consistent feature vector.
4. Feature Vector Construction: In the final stage, the computed histogram values are flattened into a single vector, making them suitable for object detection and classification tasks. This vector can be used with machine learning algorithms for object detection and classification.
Output:

Output:

Output:

Dalal, Navneet, and Triggs, Bill. "Histograms of oriented gradients for human detection." In 2005 IEEE computer society conference on computer vision and pattern recognition (CVPR'05), Vol. 1, (2005, June): 886-893.
Mallick, S. "Histogram of Oriented Gradients explained using OpenCV" (2016). Accessed Adresi.
Soler, J. D., Beuther, H., Rugel, M., Wang, Y., Clark, P. C., Glover, S. C., et al. "Histogram of oriented gradients: a technique for the study of molecular cloud formation." Astronomy & Astrophysics, (2019): 622, A166.
Surasak, Thattapon, Takahiro, Ito, Cheng, Cheng-hsuan, Wang, Chi-en, and Sheng, Po-yo. "Histogram of oriented gradients for human detection in video." In 2018 5th International conference on business and industrial research (ICBIR), (2018, May): 172-176.
Tomasi, C. "Histograms of oriented gradients." Computer Vision Sampler, (2012): 1-6.
Tyagi, M. "Histogram of Oriented Gradients: An Overview" (2024). Accessed Adresi.
No Discussion Added Yet
Start discussion for "Histogram of Oriented Gradients (HOG)" article
Foundations of the HOG Algorithm
Working Principle of the HOG Algorithm
Steps for Computing the HOG Algorithm in Python
Advantages and Disadvantages of the HOG Algorithm
Advantages
Disadvantages
Applications of the HOG Algorithm