Difference-of-Gaussian (DoG) matlab代码

clear;
img = double(imread('imgs/4.bmp'))/255;
gray=rgb2gray(img);

sigma1=0.1;
sigma2=0.8;
window=7;
H1=fspecial('gaussian', window, sigma1);
H2=fspecial('gaussian', window, sigma2);

DiffGauss=H1-H2;
out=imfilter(gray,DiffGauss,'replicate');
out=mat2gray(out);

figure;imshow(out);

Difference-of-Gaussian (DoG) matlab代码_第1张图片

Difference-of-Gaussian (DoG) matlab代码_第2张图片

你可能感兴趣的:(图像处理)