Is there any Difference of Gaussians function in Matlab?

后端 未结 1 460
执笔经年
执笔经年 2021-01-02 18:44

I am new to Image Processing, and in my experiment I am having difficulty with Difference of Gaussians. Various implementation were given to me but I don\'t understand them

1条回答
  •  走了就别回头了
    2021-01-02 19:33

    You could Gaussian filter an image twice with two different std. dev. and just subtract them, would be the same as using the combined filter.

    k = 10;
    sigma1 =  0.5;
    sigma2 = sigma1*k;
    
    hsize = [3,3];
    
    h1 = fspecial('gaussian', hsize, sigma1);
    h2 = fspecial('gaussian', hsize, sigma2);
    
    gauss1 = imfilter(img,h1,'replicate');
    gauss2 = imfilter(img,h2,'replicate');
    
    dogImg = gauss1 - gauss2;
    

    0 讨论(0)
提交回复
热议问题