简体   繁体   English

HoG功能如何以图形方式表示?

[英]How are HoG features represented graphically?

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. 描述符由覆盖网格中的图像窗口的M * N个单元组成。 Each cell is represented by a histogram of edge orientations, where the number of discretized edge orientations is a parameter (usually 9). 每个单元由边缘方向的直方图表示,其中离散化的边缘方向的数量是参数(通常为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. 注意,存在各种归一化方案:局部方案,其中仅相对于相邻小区归一化的小区(如Dalal-Triggs的原始论文中)或全局方案,其中定向长度由所有小区归一化。 Also note that some authors use multiple local normalizations per cell (eg 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. Felzenszwalb等人开创性工作的Matlab代码。 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) . 您可以在这里给出的包中找到它(DPM) Look for a function named HOGpicture.m 寻找名为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 下面的例子显示了一辆自行车的模型(来自Felzenszwalb等人),其中HoG由7 * 11个单元组成,每个单元有8个方向

自行车的HoG模型,取自Felzenszwalb等人

A blog called Jurgenwiki has some sample code (called get_hogdescriptor_visu() ) for visualizing HOG Descriptors in OpenCV. 一个名为Jurgenwiki的博客有一些示例代码(称为get_hogdescriptor_visu() ),用于在OpenCV中可视化HOG描述符。 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. 过去,我将Jurgenwiki代码复制/粘贴到C ++文件中,将我的HOG功能传递给get_hogdescriptor_visu() ,可视化效果非常好。 Here's an example: 这是一个例子:

在此输入图像描述

One caveat of the Jurgenwiki code is that it expects you to use the default HOGDescriptor() parameters (eg 16x16 blocks, 8x8 cells, 9 orientation bins). Jurgenwiki代码的一个警告是它希望您使用默认的HOGDescriptor()参数(例如16x16块,8x8单元,9个方向箱)。 However, if you're using custom parameters in your HOGDescriptor , you can tweak the Jurgenwiki code to match your HOG parameters. 但是,如果您在HOGDescriptor使用自定义参数,则可以调整Jurgenwiki代码以匹配您的HOG参数。

This StackOverflow post is pretty useful too. 这个StackOverflow帖子也很有用。

最近在iccv 2013上发表了一篇关于可视化HOG功能的论文(HOGles),它可能非常有用,代码可以在这里获得http://web.mit.edu/vondrick/ihog/#code

scikit-image还提供HOG可视化: http//scikit-image.org/docs/dev/auto_examples/plot_hog.html

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. 在这里,我想问一个问题,一个人走路的两个序列帧,我们从每个图像的HOG中取出,然后取两个HOG的差异。 I want to know what information we get in the final (Difference) HOG visualization. 我想知道我们在最终(差异)HOG可视化中获得的信息。

Thank you 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM