Matlab中的高斯函数有什么不同吗? [英] Is there any Difference of Gaussians function in Matlab?

查看:628
本文介绍了Matlab中的高斯函数有什么不同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是图像处理的新手,在我的实验中,我对高斯差异有困难。我给了各种实现,但我不理解它们及其参数。

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 and their parameters.

这是我的公式

我应该自己实现这个过滤,还是为此定义了现有的函数?当然,所有参数都与链接相似。我将需要使用参数并生成不同的图像。

Should I implement this filtering myself, or is there an existing function defined for this? Of course with all parameters which are like in link. I will need to play with parameters and produce different images.

推荐答案

您可以使用两个不同的std对图像进行两次高斯滤波。开发。并且只是减去它们,就像使用组合滤波器一样。

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;

这篇关于Matlab中的高斯函数有什么不同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆