Ask Your Question

TanaseC's profile - activity

2017-10-29 11:05:30 -0600 received badge  Teacher (source)
2017-04-16 07:34:56 -0600 received badge  Necromancer (source)
2017-02-14 10:30:11 -0600 answered a question OpenCV SVM prediction probability

I know that in the latest version (version 3.2 as of now) you have an int flag param with your predict function. If you set it to 1 it will give you a probability. It should look something like:

   Mat output;
   Mat input = getVector();
   int flag = 1;
   svm->predict(input,output,flag); 
   cout << "Prediction result " << output << endl;
2016-12-28 00:24:09 -0600 received badge  Enthusiast
2016-12-20 20:11:23 -0600 commented question How to visualize the 32 dimension HOG from DPM?

Did you build one for this particular function output? I built one myself in Matlab but the HOG was also made by me so, of course, I knew what the values in the data structure were. That's the problem here, I need to know how to interpret the values.

2016-12-20 10:16:02 -0600 received badge  Editor (source)
2016-12-20 09:28:57 -0600 received badge  Student (source)
2016-12-20 09:28:20 -0600 asked a question How to visualize the 32 dimension HOG from DPM?

Hello,

I'm relatively new to programming in OpenCV and to the image processing gig so please bear with me. I'm working on my master thesis and I'm trying to find a way to visualize the HOG that I get from the Feature::computeHOG32D function in the DPM opencv_contrib. I have two problems:

  • There is an inconsistency regarding the function parameters and the output HOG
  • How do I interpret the values inside the 32 D descriptor? What angle is associated with what bin/position? What does the weighted vote mean? Is there some kind of range for it

    Regarding my first problem, I read how the process should work, namely:

  • 8*8 cell of pixels

  • 9 bins representing angles from 0 to 180. These are filled with values representing light intensity.
  • 4 cells are grouped into 1 block and concatenated into a final descriptor
  • 9 bins * 4 cells = 36 dimension descriptor.

The parameters in the function are a bit different:

  • Cell size is fed from the model. Usually stays the same. 8*8.
  • numOrient is set to 18. So there are 18 orientations, aka 18 bins, right?
  • I assume cells are still grouped together by 4.
  • Each cell has a size of 32 instead of 9. Which doesn't make much sense to me. (Note: I think maybe some of them are contrast-insensitive features and some are contrast-sensitive but that still doesn't explain why the size is 32 and not 36.)

Regarding the second one, I'm thinking of drawing lines at certain angles and based on the weighted vote I'm going to increase the light intensity. The problems I'm thinking of are:

  • I assume the position at a value is the value of a specific bin, an orientation, but I don't know which one.
  • I also don't know if it's in radians or not.
  • I don't know what the weighted vote value means. I need a range or a way to appreciate it.

I'm sorry If I made any mistake please inform me and I will correct it.

Thank you for your time!