gauss_image — 使用离散高斯函数平滑图像。
gauss_image 已过时,仅出于向后兼容性考虑而保留。 New applications should use the
operator gauss_filter instead.
gauss_image(Image : ImageGauss : Size : )
算子 gauss_image smoothes images using the discrete
Gaussian. The smoothing effect increases with increasing filter
size. The following filter sizes (Size) are supported
(the sigma value of the Gauss function is indicated in brackets):
3 (0.65)
5 (0.87)
7 (1.43)
9 (1.88)
11 (2.31)
For border treatment the gray values of the images are reflected at
the image borders.
The operator binomial_filter can be used as an alternative
to gauss_image. binomial_filter is significantly
faster than gauss_image. It should be noted that the mask
size in binomial_filter does not lead to the same amount of
smoothing as the mask size in gauss_image. Corresponding
mask sizes can be determined based on the respective values of the
Gaussian smoothing parameter sigma.
gauss_image 可在 OpenCL 设备上执行,适用于所有支持的图像类型。然而,OpenCL 的实现可能与标量实现产生略有不同的结果。
有关平滑滤波器概念的说明,请参阅 滤波器 / 平滑 一章的引言。
为了能够在 OpenCL 设备上处理 gauss_image,Image 必须至少为64像素的宽度和高度。
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
Image (输入对象) (multichannel-)image(-array) → object (byte* / int2* / uint2* / int4* / real*) *允许用于计算设备
待平滑的图像。
ImageGauss (输出对象) (multichannel-)image(-array) → object (byte / int2 / uint2 / int4 / real)
滤波后的图像。
Size (输入控制) integer → (integer)
所需滤波器尺寸。
默认值: 5
值列表: 3, 5, 7, 9, 11
gauss_image(Input,Gauss,7) regiongrowing(Gauss,Segments,7,7,5,100)
每个像素点:O(尺寸 * 2)。
如果参数值正确,算子 gauss_image 返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入图像)时可设置行为通过算子 set_system('no_object_result',<Result>)。如有必要,则抛出异常。
基础