I’m trying to aplicate an image filter with cvfilter2d
cvmSet(kernel,0,0,5);
cvmSet(kernel,0,1,5);
cvmSet(kernel,0,2,5);
cvmSet(kernel,1,0,-3);
cvmSet(kernel,1,1,0);
cvmSet(kernel,1,2,-3);
cvmSet(kernel,2,0,-3);
cvmSet(kernel,2,1,-3);
cvmSet(kernel,2,2,-3);
and then I aplicate this
cvFilter2D(imgMedia,imgRestitucion , kernel, cvPoint(-1,-1) );
but my result is a black image…what can I do? there’s some alternative?
Thanks in advance.
Finally I’ve found the solution about this.
All you have to do is initialize the kernel with a cvRealScalar number.
Then you can applicate the image filter to the ker and when you use cvFilter2D you won’t get black image.