且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何以图形方式表示HoG特征?

更新时间:2022-12-30 22:41:31

您在论文中看到的可视化效果可以解释如下:/ p>

描述符由覆盖网格中图像窗口的M * N个单元组成。每个单元由边缘取向的直方图表示,其中离散化边缘取向的数量是参数(通常为9)。通过显示直方图中边缘取向的强度的星可视化细胞直方图:特定方向越强,其相对于其他方向越长。



请注意,有多种归一化方案:局部方案,其中单元格相对于相邻单元格进行标准化(如Dalal-Triggs的原始论文)或全局方案,其中取向长度由所有单元标准化。还要注意,一些作者对每个单元格使用多个本地规范化(例如下面提到的那个),但可视化只显示一个(或其平均值)。



用于Felzenszwalb等人的开创性工作的Matlab代码通过将它们绘制在图像上来可视化细胞,其中强度通过边缘的强度而不是长度可视化。您可以在此处(DPM)的包中找到它。查找一个名为HOGpicture.m的函数



下面的例子显示了一个自行车模型(来自Felzenszwalb等人),HoG由7 * 11个单元组成, 8个方向




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.

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