Understanding HoG output

Brian Holt bdholt1 at gmail.com
Thu Feb 16 10:46:10 EST 2012


Hi Michael,

>
> I don't actually understand HoG that well, but this result, I believe, is expect. Assuming HoG does what the name suggests, you should expect the lines to align with the direction with the largest gradient. So, if the pole of the street light is a dark gray, and the background is white, then the lines should be perpendicular to the pole since this is the direction of the highest gradient.
>


Tony's answer is spot on here.  Perhaps you expect that the HoG image
should look like the gradient image? Instead, what the descriptor is
really aiming to capture is the direction (that's the 'oriented'
part), that the gradients go. So assuming an image where the left half
is black and the right half white, there would be a vertical of
horizontal (or as close as possible, depending on the number of bins)
lines in the HoG image.

> I would expect to see the pole of the street light to show dominant perpendicular lines, but they appear to be more horizontal than vertical.

This is what I was referring to when I talked about the number of
bins.  If you look carefully at the HoG image, you'll notice that
there are vertical lines in some places (like at the black billboard),
but there are no perfectly horizontal lines.  The closest
approximation to horizontal is maybe a 20deg line.  That's because
there are 9 bins.  If you tried this with 8 bins, you should see some
horizontal lines.

Hope it helps
Brian



More information about the scikit-image mailing list