Unable to display image after applying LBPH (elbp()) operator in opencv

三世轮回 提交于 2019-12-11 18:37:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!