laplacian_b.m

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

M
27
字号
%% The Laplacian enhancement technique by duplicating the results of the Fig 3.38
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
image1=imread('Fig0338(a)(blurry_moon).tif');
results=imfilter(image1, i);
imtool(results)
h=fspecial('average',3)
w=fspecial('laplacian',0)
g1=imfilter(image1,w,'replicate');
imshow(g1,[])
image2=im2double(image1);
g2=imfilter(image2,w,'replicate');
imshow(g2,[])
g=image2-g2;
imshow(g)

⌨️ 快捷键说明

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