mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapemean_image_shape (算子名称)
名称
mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapemean_image_shape — Smooth image using a mean filter with arbitrary mask.
参数签名
def mean_image_shape(image: HObject, mask: HObject) -> HObject
描述
mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapeMeanImageShapemean_image_shape performs a mean filter operation on the input image
ImageImageImageImageimageimage with a mask that is specified by the region
MaskMaskMaskMaskmaskmask and returns the filtered image in ImageMeanImageMeanImageMeanImageMeanimageMeanimage_mean.
The shape of the mask can be chosen arbitrarily and can, for
example, be created with operators like gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle or
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region. The position of the mask does not influence
the result since the center of gravity of the mask region is used as
the reference point of the mask. For border treatment the gray values are
reflected at the image edges.
For mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapeMeanImageShapemean_image_shape special optimizations are implemented that use SIMD
technology. The actual application of these special optimizations is
controlled by the system parameter 'avx2_enable'"avx2_enable""avx2_enable""avx2_enable""avx2_enable""avx2_enable"
(see set_systemset_systemSetSystemSetSystemSetSystemset_system).
If 'avx2_enable'"avx2_enable""avx2_enable""avx2_enable""avx2_enable""avx2_enable" is set to 'true'"true""true""true""true""true" (and the SIMD
instruction set is available), the internal calculations are performed
using SIMD technology. Furthermore, these optimizations are only used
for byte images and if the area of the filter mask provided by
MaskMaskMaskMaskmaskmask is smaller than 129.
Note that mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapeMeanImageShapemean_image_shape performs best on compact input regions.
At any rate, it is advantageous for the performance of mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapeMeanImageShapemean_image_shape
to choose the input region of ImageImageImageImageimageimage such that any border treatment
is avoided.
For an explanation of the concept of smoothing filters see the introduction
of chapter Filters / Smoothing.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 在元组级别自动并行化。
- 在图像通道级别自动并行化。
- Automatically parallelized on internal data level.
参数表
ImageImageImageImageimageimage (input_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte / uint2 / real)
Image to be filtered.
MaskMaskMaskMaskmaskmask (input_object) region → objectHRegionHObjectHRegionHobject
Filter mask.
ImageMeanImageMeanImageMeanImageMeanimageMeanimage_mean (output_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte / uint2 / real)
Filtered image.
例程 (HDevelop)
read_image (Image, 'fabrik')
gen_circle (Circle, 10, 10, 2)
mean_image_shape (Image, Circle, ImageMean)
dev_display (ImageMean)
结果
If the parameter values are correct 该算子 mean_image_shapemean_image_shapeMeanImageShapeMeanImageShapeMeanImageShapemean_image_shape
返回值 2 (
H_MSG_TRUE)
. The behavior in case of empty input (no
input images available) is set via 该算子
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>).
If necessary an exception is raised.
可能的前置算子
read_imageread_imageReadImageReadImageReadImageread_image,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
rectangle1_domainrectangle1_domainRectangle1DomainRectangle1DomainRectangle1Domainrectangle1_domain,
gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle
可能的后置算子
dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThresholddyn_threshold,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing
可替代算子
binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter,
gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter,
smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image,
mean_imagemean_imageMeanImageMeanImageMeanImagemean_image
参考其它
anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionAnisotropicDiffusionanisotropic_diffusion,
sigma_imagesigma_imageSigmaImageSigmaImageSigmaImagesigma_image,
convol_imageconvol_imageConvolImageConvolImageConvolImageconvol_image,
gen_lowpassgen_lowpassGenLowpassGenLowpassGenLowpassgen_lowpass
模块
Foundation