没有内置函数matlab的图像过滤

时间:2017-11-18 18:28:54

标签: image matlab octave

我需要帮助来过滤图像的功能。我试过这个:

originalImage = imread('A4.jpg');
n = 100;
resizedImage = imresize(originalImage, [n n]);

figure;
imshow(resizedImage);
title('Original Bild');

J = im2double(resizedImage);
h1 = [1 1 1; 1 -8 1; 1 1 1];
h2 = 1/16 * [1 2 1; 2 4 2; 1 2 1];
h3 = [1 2 1; 0 0 0; -1 -2 -1];

h1_180 = imrotate(h1, 180);
h2_180 = imrotate(h2, 180);
h3_180 = imrotate(h3, 180);
J1 = padarray(J,[1 1]);

for a =1:100
J2= J1.* h1;   
end

figure;
imshow(J2);
title('Faltung mit h1');    

这不起作用。我需要什么?

0 个答案:

没有答案