C++ implementation of the Local Binary Pattern texture descriptors. This class integrates with OpenCV and FFTW3 to bring a complete and fast implementation of the popular descriptors: LBP u2, ri, riu2 & hf. The routines for calculating these descriptors are inspired by the Matlab code of the original authors.
in lbp.hpp , #include <opencv2\imgproc\imgproc.hpp> , I am using OS X and it should be #include <opencv2/imgproc/imgproc.hpp>
when run lbp_test.py , the result is
objc[40469]: Class CaptureDelegate is implemented in both /usr/local/Cellar/opencv/2.4.13/lib/libopencv_highgui.2.4.dylib and /usr/local/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined. Traceback (most recent call last): File "lbp_test.py", line 15, in <module> l.calcLBP(img) File "/Library/Python/2.7/site-packages/lbp.py", line 250, in calcLBP return _lbp.LBP_calcLBP(self, img, radius, borderCopy) TypeError: Array of type 'unsigned byte' required. Array of type 'double' given
Fixed... don't know where that came from as I developed this on OS X as well.
Don't know how to help you with that. I never used the Python interface myself. It was developed by a colleague for another colleague. It could have something to do with your Numpy version. This code was generated with version 1.7
I found 2 issues ;
#include <opencv2\imgproc\imgproc.hpp>
, I am using OS X and it should be#include <opencv2/imgproc/imgproc.hpp>
objc[40469]: Class CaptureDelegate is implemented in both /usr/local/Cellar/opencv/2.4.13/lib/libopencv_highgui.2.4.dylib and /usr/local/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined. Traceback (most recent call last): File "lbp_test.py", line 15, in <module> l.calcLBP(img) File "/Library/Python/2.7/site-packages/lbp.py", line 250, in calcLBP return _lbp.LBP_calcLBP(self, img, radius, borderCopy) TypeError: Array of type 'unsigned byte' required. Array of type 'double' given
Do you happen to know how to fix it ? thanks .