Ask Your Question

Revision history [back]

How does OpenCV train a detector using LBP features?

I understand that once you train a classifier in OpenCV it generates an XML file with the stages and features, etc. I have been able to understand the format of the classifier and the function of every component from this page. However, I am not sure how the lookup table (LUT as referenced in this link) is computed.

I understand that the <internalNodes> tag contains 8 integers that make up a 256-bit lookup table that determines whether a feature results in a positive or negative weight. But I have been combing through the code for a long time and have not been able to figure out the place or filename where the logic for computing this look up table is in the opencv code.

I have looked inside the files in the folder: modules/objdetect/src/ but I am not able to see where the logic for this is. I just need to understand how this lookup table corresponds to a histogram of lbp features that is how lbp features are evaluated.

How does OpenCV train a detector detect objects using LBP features?

I understand that once you train a classifier in OpenCV it generates an XML file with the stages and features, etc. I have been able to understand the format of the classifier and the function of every component from this page. However, I am not sure how the lookup table (LUT as referenced in this link) is computed. computed, how does this relate to an lbp histogram used for classification?

I understand that the <internalNodes> tag contains 8 integers that make up a 256-bit lookup table that determines whether a feature results in a positive or negative weight. But I have been combing through the code for a long time and have not been able to figure out the place or filename where the logic for computing this look up table is in the opencv code..

I am also not sure of exactly how it is scaling different sub-windows and evaluating features within it. How are the exact features and offsets evaluated within the context of different sub-windows and how does a candidate sub-window then get accepted?

I have looked inside the files in the folder: modules/objdetect/src/ but I am not able to see where the logic for this is. I just need to understand how this lookup table corresponds to a histogram of lbp features that is how lbp features are evaluated.any of this is as the code is very abstracted.