Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HOG features visualisation with OpenCV, HOGDescriptor in C++

I use the HOGDescriptor of the OpenCV C++ Lib to compute the feature vectors of an images. I would like to visualize the features in the source image. Can anyone help me?

like image 860
ChHaupt Avatar asked Jun 02 '12 13:06

ChHaupt


1 Answers

I had exactly the same problem today. Computing a HOGDescriptor vector for a 64x128 image using OpenCV's HOGDescriptor::compute() function is easy, but there is no built-in functionality to visualize it.

Finally I managed to understand how the gradient orientation magnitudes are stored in the 3870 long HOG descriptor vector.

You can find my C++ code for visualizing the HOGDescriptor here:

http://www.juergenbrauer.org/old_wiki/doku.php?id=public:hog_descriptor_computation_and_visualization

Hope it helps!

Jürgen

like image 155
Jürgen Brauer Avatar answered Nov 02 '22 13:11

Jürgen Brauer