About HOG transform in opencv2.2

This post could also be titled: “Why I’ve decided not to use the HOGDescriptors from opencv”.  There are three main reasons why I chose not to use the provided HOG functionality in Opencv:

  1. What is in Opencv is not only a descriptor.  Of course the descriptors are implemented, but they are bundled up together with classifiers and detectors. Also bundled inside the HOG class hierarchy is a pedestrian detector.  Now, don’t get me wrong, I’m not against all that being in opencv.  They could have separated it, in such a way that one can use a HOGDescriptor class and not have to deal with design decisions based on the other non-descriptor elements of the class.
  2. My second reason is related to the work that brought on the HOG descriptors to begin with.  This is described in a paper by Navneet Dalala  and Bill Triggs[1]. Their work is centered in Histogram of Oriented Gradient feature descriptor.  How to calculate such a feature descriptor and how different tweaks to the descriptors parameters can affect a binary SVM classifier.  They included the classifier as a mere way of measuring the models worthiness.  What I’m trying to say is that HOG can live separately from classification method and detection method.  Note that even though they relate the HOG concept to pedestrian detection, it does not mean that it only works for that.  In Navneet’s PhD document he also works with motorcycles and cars.
  3. My third reason (and this was the one that tipped the glass): You need CUDA [2] to run the HOG stuff.  It’s all implemented in cu files.  I don’t have nvidia hardware and am not planning to get some.  I don’t need real-time object detection! In my situation I’m even willing to wait a couple of days.

Conclusion: I will have to use Navneet’s original code or code one myself (Which is not THAT hard[3])

[1] Histograms of Oriented Gradients for Human Detection
[2]http://www.nvidia.com/object/what_is_cuda_new.html
[3]http://smsoftdev-solutions.blogspot.com/2009/10/object-detection-using-opencv-ii.html
Advertisements

About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in opencv, PhD. Bookmark the permalink.

2 Responses to About HOG transform in opencv2.2

  1. paaji says:

    i dont have cuda but i still run hog .

    • joelgranados says:

      Hey Paaji.
      Thx for the comment. This is an old post and I don’t really remember what version of OpenCV I was using. Its great that you can run HOG transforms without CUDA. What version of OpenCV do you have? What function call are you using?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s