# Revision history [back]

### Is this a bug or not about filter2D?

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!

 2 fixed code-tags and some language errors Guanta 6736 ●6 ●25 ●79

### Is this a bug or not about filter2D?

Hi all: Above pic is the orginal picture. I try tried some kernels to check filter2D.But filter2D. For some kernels i get right result,somethings are result, sometimes not. So I am confused that the code is wrong,or wrong, or that there are some bugs in filter2D. The code is here: 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();kernel.release();


But I get get:

This is the wrong pic. I ever use imagj & ni vision to check result. The correct pic should be liked like

How

What to do?If do? I want to get correct image!