Clear Filters
Clear Filters

Convolution of an image using convmtx2

1 view (last 30 days)
Manuel
Manuel on 2 Mar 2012
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!