Convolution of an image using convmtx2

4 Ansichten (letzte 30 Tage)
Manuel
Manuel am 2 Mär. 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

Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by