0

I am working on an object detection module using opencv , and I am using the "Edge Orientation Histogram" as the object descriptor.

after generating the histogram, I back project it onto the original image (after calculating the orientations in it to).

is that correct , because the back project output is showing a lot of white areas that are not the object that needs tracking.

the procedure goes like the following:

  1. generate EOH for the target object using Sobel operator and the phase function.
  2. calculate image edge orientations (no histogram) to project the histogram onto it.
  3. perform backprojection from the EOH onto the orientation image.

I need confirmation that my assumptions are correct.

and does it make any sense, if i backprojected the EOH onto the image itself (grayscaled) not the orientation one ?!

some images for more illustration:

  • the target is to track the panadole box .. the scene looks like the following: (Left)

  • the orientation image after thresholding is the following (for the target) (middle)

  • and the back projected image is the following: (right)

http://postimg.org/image/nzx7noav5/

thanks guys.

Islam Alaa
  • 41
  • 4
  • Edge Orientation Histogram is better known as Histogram of Oriented Gradients (HOG), in case you google for it. – Imanol Luengo Aug 30 '15 at 22:10
  • I think that EOH (Edge Orientation Histogram) and HOG (Histogram of Oriented Gradients) are different , I found a question in here telling the difference but don't have it at the moment. – Islam Alaa Aug 31 '15 at 05:41
  • Ops, thought it was the same thing (name suggests so...) – Imanol Luengo Aug 31 '15 at 12:25

1 Answers1

0

Well the back projection calculates the probability of a pixel whether it belongs to statistical model or not, look here OpenCV Back Projection. The reason you are encountering "White Areas" outside the target object can be because your object model is very generic. Can you provide some resultant images to further clarify your problem.

Community
  • 1
  • 1
  • added some photos to my post for more illustration. provided them in the link posted. Sorry, couldn't upload it here because of the reputation points. Thanks – Islam Alaa Aug 31 '15 at 09:54
  • Sorry cannot open the link due to network restrictions. One more suggestion, if it helps why dont you combine some color information, as well to make the model more specific to your object. Also how about changing the size of the window for Orientation calculation. Try implementing this for multiple image scales. – aditya bhardwaj Aug 31 '15 at 10:08
  • my original work is based on combining both (color and orientation) to make the model more specific. but I am kind of facing some issues regarding the implementation. so, wanted to make sure that each part is working fine alone before testing the integrated model. Thanks – Islam Alaa Aug 31 '15 at 10:57
  • the idea is to use a 3D histogram for the model (Hue, saturation, and edge orientation) and backproject them onto the image to get the target. the point i want to make sure of , is the image itself that i backproject the model histogram onto. i compute the orientation for the whole image, and use it a third channel in my input image to the backprojection, coupled with the hue and sat channels of the image. is that correct , or should i use another channel combination ?! – Islam Alaa Aug 31 '15 at 11:03
  • This aproch is more suted for object of uniform properties ( color/texture). Instead of back projection. Why don't you devide the image in regular regions and perform histogram matching for them. Doing this at different scale would do the trick. – aditya bhardwaj Aug 31 '15 at 13:05
  • Also, is your goal to deterct the object or to test the back projection for the same? If you just have to find the object then why don't you look in to object detection modules of OpenCV – aditya bhardwaj Aug 31 '15 at 13:07
  • mainly, i want to use the camshift function in order to perform tracking, scale and rotation in-variance property of the camshift is very important in this matter. – Islam Alaa Aug 31 '15 at 13:15
  • what about using texture with the color , such as LBP descriptor or so ? found some papers doing so. – Islam Alaa Aug 31 '15 at 13:23