我想知道是否有任何代码或任何好的文档可用于实现 HOG 功能?我尝试阅读文档此处,但很难理解它需要SVM..
我需要的只是为对象实现HOG检测器....就像它所做的SIFT或SURF
Btw一样,我对这项工作。
谢谢..
I would like to know, if there is any code or any good documentation available for implementing HOG features? I tried to read the documentation here but it's quite difficult to understand and it needs SVM..
What I need is just to implement a HOG detector for objects.... Like what it does SIFT or SURF
Btw, I'm not interesting in this work.
Thank you..
发布评论
评论(3)
你可以看看
http://szproxy.blogspot.com/2010/12/testtest.html
他还在 source forge 上发布了 HOG 的“教程”:
http://sourceforge.net/projects/hogtrainingtuto/?_test=beta
我知道这是因为我和你有同样的问题。该教程虽然不是我所说的教程,它是一堆源代码,没有文档,但我认为它可以工作并且至少可以让您有所了解。
you can take a look at
http://szproxy.blogspot.com/2010/12/testtest.html
he also published "tutorial" for HOG on source forge here:
http://sourceforge.net/projects/hogtrainingtuto/?_test=beta
I know this since I'm having the same problem as you. The tutorial though isn't what i would call a tutorial, its a bunch of source codes, no documentation, but I assume that it works and can at least get you somewhere.
最后,稍微简化一下,检测图像中的特定对象所需要做的就是:
为了获得兴趣点,您可以随机使用一些算法,例如 Harris 角点检测器或者像滑动窗户之类的东西。
您必须决定补丁大小。
除了 HOG,您还可以使用其他特征描述符,例如 SIFT、SURF...
HOG的实现并不太难。您必须应用 Sobel X 和 Y 内核来计算提取的 patch 的梯度,之后您必须将 patch 划分为 NxM 个单元(例如 8x8),并计算梯度、角度和幅度的直方图。在下面的链接中您可以看到更详细的解释:
HOG 人体检测器教程
获得此向量后,使用之前训练过的分类器(如 SMV)检查它是否是所需的对象。例如,您可以使用 NeuralNetworks 来代替 SVM。
SVM 实现比较困难,但是可以使用一些库,例如 opencv。
At the end and simplifying a bit, all that you need to detect specific objects in image is:
In order to get points of interest, you can use some algorithms like Harris corner detector, randomly or something simply like sliding windows.
You will have to take the decission of the patch size.
Instead of HOG you can use another feature descriptor like SIFT, SURF...
HOG's implementation is not too hard. You have to calculate the gradients of the extracted patch doing applying Sobel X and Y kernels, after that you have to divide the patch in NxM cells, 8x8 for instance, and compute an histogram of gradients, angle and magnitude. In the following link you can see it more detailed explanation:
HOG Person Detector Tutorial
Once you got this vector, check if it is the desired object or not with a previously trained classifier like SMV. Instead SVM you could use NeuralNetworks for instance.
SVM implementation is more dificult, but there are some libraries like opencv that you can use.
MATLAB 计算机视觉系统工具箱中有一个函数 extractHOGFeatures 。
There is a function extractHOGFeatures in the Computer Vision System Toolbox for MATLAB.