Understanding HoG output

Tony Yu tsyu80 at gmail.com
Thu Feb 16 09:53:08 EST 2012


On Thu, Feb 16, 2012 at 6:32 AM, bricklemacho <bricklemacho at gmail.com>wrote:

>
>
> On Feb 10, 9:45 pm, Brian Holt <bdho... at gmail.com> wrote:
> <snip>
> > A line is drawn for each gradient bin with an intensity proportional to
> the
> > magnitude of that gradient.  So, the 'star' shape you see for each cell
> is
> > just the superimposition of all of these lines. You should expect to see
> > dominant lines perpendicular to lines in the image (parallel to the
> > gradient). Also remember that the default is to use 9 bins, so it may be
> > that the 45degree dominant line you see is the closest approximation to
> > horizontal.  You can test this out by trying 8 bins instead of 9.
>
> Okay, I am still having problems understanding visualisation of the
> HoG.  When I plot the visualisation it seem to make sense.  It is
> still not clear why I don't see vertical/perpendicular lines.   If you
> look at http://tinypic.com/r/dy0fud/5  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.  Similar stuff happens if
> I use buildings, the "edge" of the building, clearly visable in the
> gradient images, ends up as either tending towards the  45deg  (or
> 135deg).   The parameters used for the picture were: Orientations 9,
> Pixesl Per Cell16x16, Cells per Block 3x3.
>


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.


>
> I will trace the code to try to get a better understanding of the
> visualisation output, but  would appreciate if anyone has any advice
> or explanation of my misunderstanding of the visualisation.
>
> Also what is the best why to link to images in a post?
>
> Thanks,
>
> Michael.
> --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20120216/240587fb/attachment.html>


More information about the scikit-image mailing list