Is this a bug or not about filter2D?
Hi all: Above pic is the orginal picture. I tried some kernels to check filter2D. For some kernels i get right result, sometimes not. So I am confused that the code is wrong, or that there are some bugs in filter2D. The code is here:
float m[] = {-1.0, -1.0, -1.0,
-1.0, 10.0, -1.0,
-1.0, -1.0, -1.0 };
cv::Mat kernel=cv::Mat(3,3,CV_32F,m);
//cv::normalize(kernel,kernel,1.0,0,NORM_L1);
filter2D(src, dst,-1,kernel);
kernel.release();
But I get:
This is the wrong pic. I ever use imagj & ni vision to check result. The correct pic should be like
What to do? I want to get correct image!