Explanation of cascade.xml in a haar classifier
It would be best if someone could explain the numbers/values in the cascade.xml entirely. Example in:
<!-- stage 0 -->
<_>
<maxWeakCount>3</maxWeakCount>
<stageThreshold>-8.8384145498275757e-001</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 66 5.1593100652098656e-003</internalNodes>
<leafValues>
-8.0555558204650879e-001 8.0694979429244995e-001</leafValues></_>
<_>
<internalNodes>
0 -1 108 1.5044789761304855e-002</internalNodes>
<leafValues>
-6.2940740585327148e-001 7.5122624635696411e-001</leafValues></_>
<_>
<internalNodes>
0 -1 99 -4.7172707127174363e-005</internalNodes>
<leafValues>
5.5112153291702271e-001 -8.6111217737197876e-001</leafValues></_></weakClassifiers></_>
What are the meanings of these values
<internalNodes>
0 -1 99 -4.7172707127174363e-005</internalNodes>
Another question is, how does the program know which feature to use for a particular stage? As far as I know, features are in the form as below
<_>
<rects>
<_>
21 6 3 5 -1.</_>
<_>
22 6 1 5 3.</_></rects>
<tilted>0</tilted></_>
Whereby it's the coordinates of two rectangles, forming something like below:
=-= = Black colored rectangle
=-= - White colored rectangle
=-=
=-=
=-=
What are the values -1. and 3. mean? I know it's weights but how is it used to calculate the feature?
Summary
- What are the meaning of the values inside
<internalNodes>
? - How is the feature calculated? How are the weights in
<rects>
use? - Most importantly, which field denotes that which features are being used in a particular stage/node.
Thanks!
This thread is six years old. The answers above seem rather vague.
Is any documentation now available?
Thanks
The most recent write up I did on this (since this technique is terribly outdated) is in the OpenCV 3 Blueprints book, which can still be ordered through Packt Publishing.