Convolution of an image using convmtx2

1 次查看(过去 30 天)
Hello.
I've to apply a set of operators (for example: Prewitt,Sobel,Canny,Robinson) to an image.
I have the following function:
function name_fun( operador , imagen )
% the image is loaded from file to a matrix
img1 = imread(imagen,jpeg);
% the original image is shown
imshow(img1);
% image is converted to gray scale
img2 = rgb2gray(img1);
% the new image is shown
imshow(img2);
% convolution (using the operator given as parameter) is applied (?) using 3x3 pixel window
img3 = convmtx2(H,m,n)
% the convultionated image is shown
imshow(img3);
I just wonder what are m and n (like: img3 = ....). Is height and weight of the image? And Do I need to do something more or this way I get the result I want?
Thank you

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by