Rank: 491809 based on 0 downloads (last 30 days) and 0 file submitted
photo

Chris McCormick

E-mail
Company/University
CogniMem Technologies, Inc.

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Chris McCormick
Updated File Comments Rating
04 May 2013 HOG descriptor for Matlab Image descriptor based on Histogram of Oriented Gradients for gray-level images Author: Oswaldo Ludwig

I noticed a bug in the histogram computation. Gradient vectors whose angle is equal to pi are being omitted from the histogram because you check for angle < angle_lim instead of angle <= angle_lim.

I also re-wrote the histogram computation to optimize it in a way similar to what was suggested in an earlier comment.

% Compute the bin index for every angle.
binIndeces = ceil((v_angles + pi) / binSize);

% For each bin
for (bin = 1:B)
% Get the magnitudes for all the pixels that belong in 'bin'.
magnitudes = v_magnit(binIndeces == bin);

% Add all of the magnitudes to 'bin'.
H2(bin) = H2(bin) + sum(magnitudes);
end

Contact us