info_smoothT_info_smoothInfoSmoothInfoSmoothinfo_smooth (Operator)

Name

info_smoothT_info_smoothInfoSmoothInfoSmoothinfo_smooth — Information on smoothing filter smooth_imagesmooth_imageSmoothImageSmoothImagesmooth_image.

Signature

info_smooth( : : Filter, Alpha : Size, Coeffs)

Herror T_info_smooth(const Htuple Filter, const Htuple Alpha, Htuple* Size, Htuple* Coeffs)

void InfoSmooth(const HTuple& Filter, const HTuple& Alpha, HTuple* Size, HTuple* Coeffs)

static Hlong HMisc::InfoSmooth(const HString& Filter, double Alpha, HTuple* Coeffs)

static Hlong HMisc::InfoSmooth(const char* Filter, double Alpha, HTuple* Coeffs)

static Hlong HMisc::InfoSmooth(const wchar_t* Filter, double Alpha, HTuple* Coeffs)   ( Windows only)

static void HOperatorSet.InfoSmooth(HTuple filter, HTuple alpha, out HTuple size, out HTuple coeffs)

static int HMisc.InfoSmooth(string filter, double alpha, out HTuple coeffs)

def info_smooth(filter: str, alpha: float) -> Tuple[int, Sequence[int]]

Description

The operator info_smoothinfo_smoothInfoSmoothInfoSmoothinfo_smooth returns an estimation of the width of the smoothing filters used in routine smooth_imagesmooth_imageSmoothImageSmoothImagesmooth_image. For this purpose the underlying continuous impulse answers of FilterFilterFilterfilterfilter are scanned until a filter coefficient is smaller than five percent of the maximum coefficient (at the origin). AlphaAlphaAlphaalphaalpha is the filter parameter (see smooth_imagesmooth_imageSmoothImageSmoothImagesmooth_image). Currently four filters are supported (parameter FilterFilterFilterfilterfilter): '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 CoeffsCoeffsCoeffscoeffscoeffs in addition to the filter size.

For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.

Attention

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

Parameters

FilterFilterFilterfilterfilter (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of required filter.

Default: 'deriche2' "deriche2" "deriche2" "deriche2" "deriche2"

List of values: 'deriche1'"deriche1""deriche1""deriche1""deriche1", 'deriche2'"deriche2""deriche2""deriche2""deriche2", 'gauss'"gauss""gauss""gauss""gauss", 'shen'"shen""shen""shen""shen"

AlphaAlphaAlphaalphaalpha (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Filter parameter: small values effect strong smoothing (reversed in case of 'gauss').

Default: 0.5

Suggested values: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 7.0, 10.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Alpha > 0.0

SizeSizeSizesizesize (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of filter is approx. size x size pixels.

CoeffsCoeffsCoeffscoeffscoeffs (output_control)  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.

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (C)

info_smooth('deriche2',0.5,Size,Coeffs);
smooth_image(Input,&Smooth,'deriche2',7);

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Result

If the parameter values are correct the operator info_smoothinfo_smoothInfoSmoothInfoSmoothinfo_smooth returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

read_imageread_imageReadImageReadImageread_image

Possible Successors

smooth_imagesmooth_imageSmoothImageSmoothImagesmooth_image

See also

smooth_imagesmooth_imageSmoothImageSmoothImagesmooth_image

Module

Foundation