Closed MOONBEAR0703 closed 6 years ago
img
is the input image, kern
is the convolution kernel you want to apply. Obviously you must supply both. Be sure to refer to function documentation.
Quick example:
img = im2single(imread('coins.png'));
kern = [1 1 1; 1 -8 1; 1 1 1];
res = cv.filter2D(img, kern);
imshow(res,[])
Usage
I typed
result = cv.filter2D(img,kern);
, but matlab said there is no definition of "img"