开发者

HOG for "detecting object" opencv

开发者 https://www.devze.com 2023-04-11 01:22 出处:网络
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 开发者_如何学Gohere but it\'s quite difficult to underst

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 开发者_如何学Gohere 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..


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.


At the end and simplifying a bit, all that you need to detect specific objects in image is:

  • Localize "points of interest" to extract the patches:

In order to get points of interest, you can use some algorithms like Harris corner detector, randomly or something simply like sliding windows.

  • From these points get patches:

You will have to take the decission of the patch size.

  • From these patches compute the feature descriptor. (like HOG).

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

  • Check your feature vector in the previously trained classifier

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.


There is a function extractHOGFeatures in the Computer Vision System Toolbox for MATLAB.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号