So I figured out the complete meaning of every parameter inside the XML model generated when doing haartraining. Basically it is
- a set of stages with nodes, with a node for each weak classifier of a stage, lets assume stumps, containing its associated feature index and the treshold applied to the retrieved feature value over all the training samples of that stage.
- a set of features where each feature is described by 2 rectangles, of which a weight is added as a fifth parameter. Then in the integral image the sum of the rectangle intensities is calculated, multiplied with the weight and then all summed. A sort of weighted sum.
Now I am trying to do the same for the LBP model and find an explanantion there. However even in the case of a stump we have other data present. Take this part for example:
<internalNodes>
0 -1 46 -67130709 -21569 -1426120013 -1275125205 -21585
-16385 587145899 -24005
</internalNodes>
<_>
<rect>0 0 3 5</rect>
</_>
Lets assume that the first and second parameter of the node are the same as with HAAR indicating the level of the stump, meaning that we have a 2 leaf decision tree here. 46 is then the index of the feature associated with it. Now that feature has a single rectangle as seen below.
My questions:
- Are the 8 values after the index some thresholds? I am assuming this due to the fact their are 8 and a LBP calculation is a comparison of 8 sums compared to the center value. If these are blocks instead of pixels and they are calculated on the integral image I would somewhat get it, but how to get positive and negative values then ... anyone an idea here?
- How should I interpret the rectangle as feature? It doesnt seem to be x y w h as with rectangles in HAAR.
All help apreciated!