Ask Your Question

Revision history [back]

LBP Operator in FaceRecognizer in OpenCV

I am working on LBP Histogram of some image matrices using OpenCV and C++ and I need to calculate LBP(1,8) and LBP(2,16) of theses matrices. Latest version of OpenCV has direct support for calculating LBP FaceRecognizer with default LBP(1,8) operator and I can calculate LBP(2,16) by setting values while instantiating the object.

My question is that which matrix stores the LBP codes of given input matrix? Going deep in the implementation, I came to know that predict(InputArray _src) function first calls elbp(src, _radius, _neighbors) and then spatial_histogram(/params/) to calculate the histogram. But which matrix in these functions stores LBP codes??

Basically, what do these 2 functions (elbp() and spatial_histogram()) actually calculate?

Thanks in advance.

click to hide/show revision 2
retagged

updated 2013-09-28 09:19:28 -0600

berak gravatar image

LBP Operator in FaceRecognizer in OpenCV

I am working on LBP Histogram of some image matrices using OpenCV and C++ and I need to calculate LBP(1,8) and LBP(2,16) of theses matrices. Latest version of OpenCV has direct support for calculating LBP FaceRecognizer with default LBP(1,8) operator and I can calculate LBP(2,16) by setting values while instantiating the object.

My question is that which matrix stores the LBP codes of given input matrix? Going deep in the implementation, I came to know that predict(InputArray _src) function first calls elbp(src, _radius, _neighbors) and then spatial_histogram(/params/) to calculate the histogram. But which matrix in these functions stores LBP codes??

Basically, what do these 2 functions (elbp() and spatial_histogram()) actually calculate?

Thanks in advance.