问题
I am trying to display my input image after applying LBP operator defined in FaceRecognizer class of opencv on it but it only displays pure black image. Does anyone know what I may be doing wrong with my input? I am displaying the image via imshow(). I have also tried to apply elbp() after normalizing my input image but still the same answer. I am using C++.
Input Image (greyscale):
dims = 92x112; depth = CV_8U (I am reading the image via imread())
LBP operator used:
elbp(InputArray _src, OutputArray _dst, int radius, int neighbors) - defined in FaceRecognizer::LBPH class in opencv.
The other doubt that I have is why the output matrix of function elbp() has lesser no. of rows and columns (strictly: new_rows=rows-2*radius ; new_cols=cols-2*radius). Given radius=1, LBP matrix is of 90x110 dims. Why is that so?
Thanks in advance.
EDIT This is how image looks like after applying elbp()
And this is how image looks like if I apply olbp(). This is strange.
来源:https://stackoverflow.com/questions/19184358/unable-to-display-image-after-applying-lbph-elbp-operator-in-opencv