File Exchange

## Histogram of Oriented Gradients (HOG) code using Matlab

version 1.2.0.0 (5.09 KB) by Sanyam Garg

### Sanyam Garg (view profile)

Matlab code computes the HOG feature vector for any given image.

Updated 19 May 2014

Histogram of Oriented Gradients can be used for object detection in an image. Particularly, they were used for pedestrian detection as explained in the paper "Pedestrian Detection using Histogram of Oriented Gradients" By Dalal and Triggs. The Matlab code computes HOG in the detailed manner as explained in the paper. The descriptor can then be used for training a classifier and for detecting object/non-object regions.
For more visit my blog: sanyamgarg.blogspot.com

Han Zhang

Irfan Iqbal

### Irfan Iqbal (view profile)

Can any one help me!!!

Temitope Lawal

### Temitope Lawal (view profile)

Please, can we combine Stationary Wavelet Transform with HOG for extracting features from an Image?

karim botros

simulated

### simulated (view profile)

Siti Zaharah Abd. Rahman

Reema M

### Reema M (view profile)

Hi, I am trying to understand the code. but, I just can't seem to understand how the formulas for L1-Norm and L2-norm in the code correspond to the formulas provided by Dalal and Triggs in their paper.

Prasanna A

### Prasanna A (view profile)

Ranjith Dinakaran

### Ranjith Dinakaran (view profile)

Hi tried using the code but it is giving me the following error,
Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware
that exceeding your available stack space can crash MATLAB and/or your computer.

Error in imjpgbaselineinfo>recover_valid_marker

can anyone please tell me how to sort this out error

Ming Yue

### Ming Yue (view profile)

Nice work, thanks!

Hidayat Khattak

yingying zhou

### yingying zhou (view profile)

I met the same problem, how to solve it？

Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit.
Be aware that exceeding your available stack space can crash MATLAB and/or your computer.
Error in ：
ismember>ismemberBuiltinTypes

Hafizullah ozgur

### Hafizullah ozgur (view profile)

When running this code it gives the below error. Can any body help me ?
Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.

Error in imjpgbaselineinfo>recover_valid_marker

s priyanka

farah

### farah (view profile)

how to visualise the hog descriptor.I tried doing it with HOGpicture(w,bs) but it is giving error

Sunny

Daniel Fernandez

### Daniel Fernandez (view profile)

For block normalization, are you using l1-norm?

Nantachai

for test

Sanyam Garg

### Sanyam Garg (view profile)

San Faten: resize all images to the size of 128x64 pixels. Then compute the hog descriptor.

Hisham Sager

### Hisham Sager (view profile)

What parameters' setup do you have for the program; e.g. cell size, block size, bin size, etc.

san faten

### san faten (view profile)

Hi,I'd like to use HOG with SVM. and the code returns vectors of different sizes for images of different sizes.
But, to train the features with SVM, the descriptors must have the same size.
is there any suggestion how can we use HOG with the SVM? thx in advance