4

I have been trying to understand the paper by viola n jones on face detection. I am not totally sure what this equation's parameters mean from section 3

h(x, f, p, theta) = 1 ; if pf(x) < p theta

What I understood was feature (f) is the value that is obtained by running any of those 5 basic features explained in the beginning of the paper over integral image of x.

What I can't understand properly is the threshold 'theta' and polarity 'p'. Does this pmean positive image and negative image and can have value of +1 or -1? And how do I calculate theta. This equation is vital to boosting section so I can't go further. Please help if I am making myself clear enough.

Sgt. Pepper
  • 177
  • 11

1 Answers1

2

You must understand that the weak classifier h uses a Haar-like feature f to classify an image subwindow x. The parameter p, if equal to -1, simply causes the inversion of the comparison sign of the condition if pf(x) < p theta.

The parameter theta is simply a threshold. Say, for instance, that p = +1. If f(x) < theta, then h(x, f, p, theta) = +1, i.e., the weak classifier considers x a face.

Ramiro
  • 698
  • 6
  • 21
  • Thank you. Does this `p` get inverted somewhere in code flow or is it user selectable ? Please don't mind if this seems a retarded question. And how do I get `theta`? – Sgt. Pepper Dec 02 '13 at 04:33
  • In the 'classical' approach to do this, both `p` and `theta` are set at the same time, for every Haar wavelet, in every Adaboost iteration. I posted some useful references in [this other question](http://stackoverflow.com/questions/20051796/threshold-values-for-viola-jones-object-detection). – Ramiro Dec 02 '13 at 14:50