info_smoothT_info_smoothInfoSmoothInfoSmoothinfo_smooth(算子)
名称
info_smoothT_info_smoothInfoSmoothInfoSmoothinfo_smooth — 平滑滤波器 smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image 的信息。
签名
def info_smooth(filter: str, alpha: float) -> Tuple[int, Sequence[int]]
描述
算子 info_smoothinfo_smoothInfoSmoothInfoSmoothInfoSmoothinfo_smooth returns an estimation of the
width of the smoothing filters used in routine smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image。For this purpose the underlying continuous impulse answers of
FilterFilterFilterFilterfilterfilter are scanned until a filter coefficient is smaller
than five percent of the maximum coefficient (at the origin).
AlphaAlphaAlphaAlphaalphaalpha is the filter parameter (see smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image).
Currently four filters are supported (parameter FilterFilterFilterFilterfilterfilter):
'deriche1', 'deriche2', 'shen' and 'gauss'.
The gauss filter was conventionally implemented with filter masks
(the other three are recursive filters). In the case of the gauss
filter the filter coefficients (of the one-dimensional impulse
answer ) are returned
in CoeffsCoeffsCoeffsCoeffscoeffscoeffs in addition to the filter size.
有关平滑滤波器概念的说明,请参阅 滤波器 / 平滑 一章的引言。
注意
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
FilterFilterFilterFilterfilterfilter (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of required filter.
默认值:
'deriche2'
"deriche2"
"deriche2"
"deriche2"
"deriche2"
"deriche2"
值列表:
'deriche1'"deriche1""deriche1""deriche1""deriche1""deriche1", 'deriche2'"deriche2""deriche2""deriche2""deriche2""deriche2", 'gauss'"gauss""gauss""gauss""gauss""gauss", 'shen'"shen""shen""shen""shen""shen"
AlphaAlphaAlphaAlphaalphaalpha (输入控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Filter parameter: small values effect strong
smoothing (reversed in case of 'gauss').
默认值:
0.5
建议值:
0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 7.0, 10.0
最小增量:
0.01
建议增量:
0.1
限制:
Alpha > 0.0
SizeSizeSizeSizesizesize (输出控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of filter is approx. size x size pixels.
CoeffsCoeffsCoeffsCoeffscoeffscoeffs (输出控制) integer-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
In case of gauss filter: coefficients of the “positive”
half of the 1D impulse answer.
示例(HDevelop)
info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)
示例(C)
info_smooth('deriche2',0.5,Size,Coeffs);
smooth_image(Input,&Smooth,'deriche2',7);
示例(HDevelop)
info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)
示例(HDevelop)
info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)
示例(HDevelop)
info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)
结果
如果参数值正确,算子 info_smoothinfo_smoothInfoSmoothInfoSmoothInfoSmoothinfo_smooth 返回值 2 (H_MSG_TRUE)。否则将抛出异常。
可能的前趋
read_imageread_imageReadImageReadImageReadImageread_image
可能的后继
smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image
另见
smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image
模块
基础