필터 지우기
필터 지우기

Convolution of an image using convmtx2

조회 수: 1 (최근 30일)
Manuel
Manuel 2012년 3월 2일
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개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by