nourani / LBP

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.
GNU General Public License v3.0
97 stars 60 forks source link

python binding error #9

Closed deter3 closed 7 years ago

deter3 commented 8 years ago

I found 2 issues ;

  1. in lbp.hpp , #include <opencv2\imgproc\imgproc.hpp> , I am using OS X and it should be #include <opencv2/imgproc/imgproc.hpp>
  2. 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

Do you happen to know how to fix it ? thanks .

nourani commented 7 years ago
  1. Fixed... don't know where that came from as I developed this on OS X as well.
  2. 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