Main Content

imgaussfilt3

3-D高斯滤波3-D图像

描述

例子

b= imgaussfilt3(一个过滤器3-D图像一个具有3-D高斯平滑核,标准偏差为0.5,并返回过滤的图像b

b= imgaussfilt3(一个,,,,西格玛过滤器3-D图像一个具有3-D高斯平滑核,标准偏差指定西格玛

b= imgaussfilt3(___,,,,名称,价值使用名称值对参数来控制过滤的方面。

例子

全部收缩

加载MRI数据并显示。

vol = load('mri');图蒙太奇(第1卷)标题(“原始图像卷”

图包含一个轴对象。带有标题原始图像卷的轴对象包含类型图像的对象。

使用3-D高斯滤波器平滑图像。

siz = vol.siz;vol =挤压(vol.d);Sigma = 2;volsmooth = imgaussfilt3(vol,sigma);图蒙太奇(Reshape(volsmooth,siz(1),siz(2),1,siz(3)))标题(“高斯过滤图像卷”

图包含一个轴对象。带有标题高斯过滤的图像卷的轴对象包含类型图像的对象。

输入参数

全部收缩

要过滤的图像,指定为3-D数字阵列。

数据类型:单身的|双倍的|int8|UINT8|int16|UINT16|int32|UINT32

高斯分布的标准偏差,指定为正数或正数的3元素向量。如果西格玛is a scalar, thenimgaussfilt3使用立方高斯内核。

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

名称值参数

Specify optional pairs of arguments asname1 = value1,...,namen = valuen, 在哪里姓名是参数名称和Value相应的价值。名称-值参数must appear after other arguments, but the order of the pairs does not matter.

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

例子:volsmooth = imgaussfilt3(vol,sigma,“填充”,“圆形”);

高斯滤波器的大小,指定为正,奇数,整数的标量或3元素向量。如果指定标量,则imgaussfilt3uses a cubic filter. The default filter size is2*ceil(2*西格玛)+1

例子:volsmooth = imgaussfilt3(vol,sigma,'filltersize',5);

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64

图像填充,,,,specified as one of the following.

Value 描述
numeric scalar 带有恒定值元素的垫图像。
'圆'

垫子在尺寸内的循环重复。

'replicate'

Pad by repeating border elements of array.

“对称”

带有镜子反射的垫图像。

例子:volsmooth = imgaussfilt3(vol,sigma,“填充”,“圆形”);

数据类型:单身的|双倍的|int8|int16|int32|INT64|UINT8|UINT16|UINT32|Uint64|逻辑|char|细绳

Domain in which to perform filtering, specified as one of the following values.

Filter Domain 描述
'汽车' 基于内部启发式方法,在空间或频域中执行卷积。
'频率' 在频域中执行卷积。
'spatial' 在空间域中执行卷积。

例子:volsmooth = imgaussfilt3(vol,sigma,'filterDomain','频率');

数据类型:char|细绳

输出参数

全部收缩

过滤的图像,作为与输入图像相同的类和大小的数字阵列返回。

Tips

  • 如果图像一个包含InfS或s, then the behavior ofimgaussfilt3for frequency domain filtering is undefined. This can happen if you set the'FilterDomain'参数为'频率'或者如果将其设置为'汽车'andimgaussfilt3使用频域过滤。限制传播Infs in the output in a manner similar toImfilter,,,,consider setting the“ FilterDomain”参数为'spatial'

  • 如果您设置“ FilterDomain”参数为'汽车', 然后imgaussfilt3使用内部启发式方法来确定空间域或频域过滤的速度更快。这种启发式是机器依赖性的,并且对于不同的配置可能会有所不同。为了获得最佳性能,请尝试这两个选项,'spatial'and'频率',,,,to determine the best filtering domain for your image and kernel size.

  • 如果您不指定'填充'参数,然后imgaussfilt3uses'replicate'padding by default, which is different from the default used byImfilter

扩展功能

版本历史记录

Introduced in R2015a

也可以看看

|