how to get gabor feature using opencv

2019-06-13 15:58发布

I want to use the Gabor feature to do some classification job. But the OpenCV do not support this function. Would you give some idea for implementing this function. OpenSource library is also OK. Thanks in advance.

1条回答
姐就是有狂的资本
2楼-- · 2019-06-13 16:37

oh, there is a gabor kernel in opencv:

#include "opencv2/imgproc/imgproc.hpp"

cv::Mat kernel = cv::getGaborKernel(cv::Size(kernel_size,kernel_size), sig, th, lm, gm, ps);
Mat src_f; // img converted to float 
Mat dest;
cv::filter2D(src_f, dest, CV_32F, kernel);
查看更多
登录 后发表回答