spatial_fil.asv

来自「Image enhancement in spatial domain, the」· ASV 代码 · 共 22 行

ASV
22
字号
%% Program to perform spatial filtering of an image
close all;
clear all;

name = input('Enter the image name ---    ', 's')
size = input('Enter the size of the filter ---  ')
filter = zeros(size,size);
for i=1:size
      for j=1:size
      element = input('Enter the elements of the matrix ---')
      filter(i,j) = element;
      end
end
image=imread('Fig0308(a)(fractured_spine).tif');
results=imfilter(image, i);
imtool(results)
h=fspecial('average',3)
I = imread('Fig0308(a)(fractured_spine).tif');
i= ones(3,3) / 9;
I2 = imfilter(I,i);
imshow(I), title('Original Image');
figure, imshow(I2), title('Spatial Filtered Image')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?