Hi all: Above pic is orginal picture. I try some kernels to check filter2D.But some kernels i get right result,somethings are not. So I am confused that the code is wrong,or 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 wrong pic. I ever use imagj & ni vision to check result. The correct pic should be liked How to do?If I want to get correct image!