Gabor Filter c++(OpenCv) :error

448 views Asked by At

the code :

   for (int j = 0; j<4; j++)    
    {
    int kernel_size = 3;
        Mat dest;
         double sig = 5, th = 0, lm = 8, gm = 0.02, ps = 0;
      cv::Mat kernel = cv::getGaborKernel(cv::Size(kernel_size,kernel_size), sig, theta[j], lm, gm, ps, CV_32F);
        filter2D(src_f, dest, CV_32F, kernel);
        destArray.push_back(dest);              
    }

the error getGaborKerbel is not a member of cv :(

    37  28  F:\main.cpp [Error] 'getGaborKernel' is not a member of 'cv'   
1

There are 1 answers

0
omotto On

I had the same problem and looking for a solutions I found I must include the

imgproc library

as follows:

#include <opencv2/imgproc/imgproc.hpp>

Regards.