deviation_imagedeviation_imageDeviationImageDeviationImagedeviation_image(算子)
名称
deviation_imagedeviation_imageDeviationImageDeviationImagedeviation_image — 计算矩形窗口内灰度值的标准偏差。
签名
描述
deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image calculates the standard deviation of gray
values in the image ImageImageImageImageimageimage within a rectangular mask of size
(HeightHeightHeightHeightheightheight, WidthWidthWidthWidthwidthwidth). The resulting image is returned
in ImageDeviationImageDeviationImageDeviationImageDeviationimageDeviationimage_deviation. To better use the range of gray values
available in the output image, the result is multiplied by 2. If
the parameters HeightHeightHeightHeightheightheight 和 WidthWidthWidthWidthwidthwidth are even, they are
changed to the next larger odd value. At the image borders the gray
values are mirrored.
注意
deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image 可在 OpenCL 设备上执行。 As the same OpenCL
code is used, the same limitations as for mean_imagemean_imageMeanImageMeanImageMeanImagemean_image apply. Since
deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image uses single precision floating point arithmetic
internally, the results may differ slightly from the CPU version.
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
执行信息
- 支持 OpenCL 计算设备。
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
- 在通道级别上自动并行化。
- 在域级别上自动并行化。
参数
ImageImageImageImageimageimage (输入对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte* / int4* / real* / int2* / uint2*) *允许用于计算设备
Image for which the standard deviation is to be
calculated.
ImageDeviationImageDeviationImageDeviationImageDeviationimageDeviationimage_deviation (输出对象) image(-array) → objectHImageHObjectHImageHobject * (byte / int4 / real / int2 / uint2)
Image containing the standard deviation.
WidthWidthWidthWidthwidthwidth (输入控制) extent.x → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of the mask in which the standard deviation
is calculated.
默认值:
11
建议值:
3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25
限制:
3 <= Width && odd(Width) && Width < width(Image) * 2
HeightHeightHeightHeightheightheight (输入控制) extent.y → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of the mask in which the standard deviation
is calculated.
默认值:
11
建议值:
3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25
限制:
3 <= Height && odd(Height) && Height < height(Image) * 2
示例(HDevelop)
read_image(Image,'fabrik')
dev_display(Image)
deviation_image(Image,Deviation,9,9)
dev_display(Image)
示例(C)
read_image(&Image,"fabrik");
disp_image(Image,WindowHandle);
deviation_image(Image,&Deviation,9,9);
disp_image(Deviation,WindowHandle);
示例(HDevelop)
read_image(Image,'fabrik')
dev_display(Image)
deviation_image(Image,Deviation,9,9)
dev_display(Image)
示例(HDevelop)
read_image(Image,'fabrik')
dev_display(Image)
deviation_image(Image,Deviation,9,9)
dev_display(Image)
示例(HDevelop)
read_image(Image,'fabrik')
dev_display(Image)
deviation_image(Image,Deviation,9,9)
dev_display(Image)
结果
deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image 在所有参数正确时返回 2 (H_MSG_TRUE)。当输入为空时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。
可能的后继
disp_imagedisp_imageDispImageDispImageDispImagedisp_image
替代
entropy_imageentropy_imageEntropyImageEntropyImageEntropyImageentropy_image,
entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray
另见
convol_imageconvol_imageConvolImageConvolImageConvolImageconvol_image,
texture_lawstexture_lawsTextureLawsTextureLawsTextureLawstexture_laws,
intensityintensityIntensityIntensityIntensityintensity
模块
基础