# How to visualize the 32 dimension HOG from DPM?

Hello,

I'm relatively new to programming in OpenCV and to the image processing gig so please bear with me. I'm working on my master thesis and I'm trying to find a way to visualize the HOG that I get from the Feature::computeHOG32D function in the DPM opencv_contrib. I have two problems:

- There is an inconsistency regarding the function parameters and the output HOG
How do I interpret the values inside the 32 D descriptor? What angle is associated with what bin/position? What does the weighted vote mean? Is there some kind of range for it

Regarding my first problem, I read how the process should work, namely:

8*8 cell of pixels

- 9 bins representing angles from 0 to 180. These are filled with values representing light intensity.
- 4 cells are grouped into 1 block and concatenated into a final descriptor
- 9 bins * 4 cells = 36 dimension descriptor.

The parameters in the function are a bit different:

- Cell size is fed from the model. Usually stays the same. 8*8.
- numOrient is set to 18. So there are 18 orientations, aka 18 bins, right?
- I assume cells are still grouped together by 4.
- Each cell has a size of 32 instead of 9. Which doesn't make much sense to me. (Note: I think maybe some of them are contrast-insensitive features and some are contrast-sensitive but that still doesn't explain why the size is 32 and not 36.)

Regarding the second one, I'm thinking of drawing lines at certain angles and based on the weighted vote I'm going to increase the light intensity. The problems I'm thinking of are:

- I assume the position at a value is the value of a specific bin, an orientation, but I don't know which one.
- I also don't know if it's in radians or not.
- I don't know what the weighted vote value means. I need a range or a way to appreciate it.

I'm sorry If I made any mistake please inform me and I will correct it.

Thank you for your time!

AFAIK there is no built-in HOG visualization tool in OpenCV.

Once I built one, which was no more than drawing lines with the angles obtained in the bins and center on the corresponding cell. Shouldn't be too hard.

Did you build one for this particular function output? I built one myself in Matlab but the HOG was also made by me so, of course, I knew what the values in the data structure were. That's the problem here, I need to know how to interpret the values.