How are HoG features represented graphically?

匿名 (未验证) 提交于 2019-12-03 02:05:01

问题:

I'm implementing the Histogram of Oriented Gradient features from "Histograms of oriented gradients for human detection" and I'd like to visualise the result. All papers on these features use a standard visualisation, but I can't find any description of how these are generated. I'd be grateful for an explanation or helpful link.

回答1:

The visualizations you see in papers can be interpreted as follows:

The descriptor is made up of M*N cells covering the image window in a grid. Each cell is represented by a histogram of edge orientations, where the number of discretized edge orientations is a parameter (usually 9). The cell histogram is visualized by a 'star' showing the strength of the edge orientations in the histogram: the stronger a specific orientation, the longer it is relative to the others.

Note that there are various normalization schemes: local schemes, in which the cell in normalized with respect to neighboring cells only (as in the original paper by Dalal-Triggs), or global schemes, in which the orientation length is normalized by all the cells. Also note that some authors use multiple local normalizations per cell (e.g. the one I am referring to below), but visualization only shows one (or an average of them).

The Matlab code for the seminal work by Felzenszwalb et al. visualizes the cells by painting them over an image, where the strength is visualized by the intensity of the edge instead of the length. You can find it in the package they give here (DPM). Look for a function named HOGpicture.m

The example below shows a model of a bike (from Felzenszwalb et al.) with HoG consisting of 7*11 cells, each with 8 orientations



回答2:

A blog called Jurgenwiki has some sample code (called get_hogdescriptor_visu()) for visualizing HOG Descriptors in OpenCV. In the past, I copy/pasted the Jurgenwiki code into a C++ file, passed my HOG features into get_hogdescriptor_visu(), and the visualization looked pretty good. Here's an example:

One caveat of the Jurgenwiki code is that it expects you to use the default HOGDescriptor() parameters (e.g. 16x16 blocks, 8x8 cells, 9 orientation bins). However, if you're using custom parameters in your HOGDescriptor, you can tweak the Jurgenwiki code to match your HOG parameters.

This StackOverflow post is pretty useful too.



回答3:

There is a recent paper (HOGles) published in iccv 2013 on visualizing HOG features which may be quite helpful, the code is available here http://web.mit.edu/vondrick/ihog/#code



回答4:

scikit-image also provides HOG visualization: http://scikit-image.org/docs/dev/auto_examples/plot_hog.html



回答5:

Here I want ask one question that two sequence frames of a person walking and we extrct HOG of each image and then take difference of both HOG's. I want to know what information we get in the final (Difference) HOG visualization.

Thank you



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!