0% found this document useful (0 votes)
107 views7 pages

Lecture 6a Hog

This document summarizes the steps of the Histograms of Oriented Gradients (HOG) algorithm for human detection: 1. The image is divided into small spatial regions called "blocks", which are then further divided into rectangular "cells". Gradient magnitudes and orientations are computed within each cell. 2. Cell values are combined into a histogram of gradient directions or "orientation bins" for each block region. These histograms capture the distribution of intensity gradients or edge directions over the block. 3. The histograms from all blocks in an image are concatenated into a feature vector, which is then used as an input to a classifier like SVM for human detection. Tri-linear interpolation is used to distribute gradient votes

Uploaded by

vimalfu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views7 pages

Lecture 6a Hog

This document summarizes the steps of the Histograms of Oriented Gradients (HOG) algorithm for human detection: 1. The image is divided into small spatial regions called "blocks", which are then further divided into rectangular "cells". Gradient magnitudes and orientations are computed within each cell. 2. Cell values are combined into a histogram of gradient directions or "orientation bins" for each block region. These histograms capture the distribution of intensity gradients or edge directions over the block. 3. The histograms from all blocks in an image are concatenated into a feature vector, which is then used as an input to a classifier like SVM for human detection. Tri-linear interpolation is used to distribute gradient votes

Uploaded by

vimalfu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Histograms of Oriented Gradients for Human Detection

N. Dalal and B. Triggs


CVPR 2005
HOG Steps
HOG feature extraction
Compute centered horizontal and vertical gradients with no smoothing
Compute gradient orientation and magnitudes
For color image, pick the color channel with the highest gradient magnitude for each
pixel.

For a 64x128 image,


Divide the image into 16x16 blocks of 50% overlap.
7x15=105 blocks in total
Each block should consist of 2x2 cells with size 8x8.
Quantize the gradient orientation into 9 bins
The vote is the gradient magnitude
Interpolate votes bi-linearly between neighboring bin center.
The vote can also be weighted with Gaussian to downweight the pixels near the edges
of the block.
Concatenate histograms (Feature dimension: 105x4x9 = 3,780)
Computing Gradients
f ( x h) f ( x h )
Centered: f ' ( x) lim h0
2h

Filter masks in x and y directions


-1
Centered: -1 0 1 0
1

Gradient

Magnitude: s s x2 s y2

Orientation: s
arctan( y )
sx

3
Blocks, Cells
Block 2
Block 1
16x16 blocks of 50% overlap.
7x15=105 blocks in total

Each block should consist of 2x2


cells with size 8x8.

Cells
Tri-linear Interpolation
Each block consists of 2x2 cells with
size 8x8
Quantize the gradient orientation into 9 9 Bins

bins (0-180)

The vote is the gradient magnitude


Bin centers

Interpolate votes linearly between neighboring bin


centers.
Example: if =85 degrees.
Distance to the bin cente Bin 70 and Bin 90
are 15 and 5 degrees, respectively.
Hence, ratios are 5/20=1/4, 15/20=3/4.

The vote can also be weighted with Gaussian to


downweight the pixels near the edges of the block.
Final Feature Vector
Concatenate histograms
Make it a 1D matrix of length 3780.

Visualization

6
Results

Navneet Dalal and Bill Triggs Histograms of Oriented Gradients for


Human Detection CVPR05

You might also like