Skip to content

info_smoothInfoSmoothInfoSmoothinfo_smoothT_info_smoothπŸ”—

Short descriptionπŸ”—

info_smoothInfoSmoothInfoSmoothinfo_smoothT_info_smooth β€” Information on smoothing filter smooth_imageSmoothImage.

SignatureπŸ”—

info_smooth( string Filter, real Alpha, out integer Size, out integer Coeffs )void InfoSmooth( const HTuple& Filter, const HTuple& Alpha, HTuple* Size, HTuple* Coeffs )static void HOperatorSet.InfoSmooth( HTuple filter, HTuple alpha, out HTuple size, out HTuple coeffs )def info_smooth( filter: str, alpha: float ) -> Tuple[int, Sequence[int]]

Herror T_info_smooth( 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 int HMisc.InfoSmooth( string filter, double alpha, out HTuple coeffs )

DescriptionπŸ”—

The operator info_smoothInfoSmooth returns an estimation of the width of the smoothing filters used in routine smooth_imageSmoothImage. For this purpose the underlying continuous impulse answers of Filterfilterfilter are scanned until a filter coefficient is smaller than five percent of the maximum coefficient (at the origin). Alphaalphaalpha is the filter parameter (see smooth_imageSmoothImage). Currently four filters are supported (parameter Filterfilterfilter): β€˜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 \(f(n)\) with \(n \ge 0\)) are returned in Coeffscoeffscoeffs 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πŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

Filterfilterfilter (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of required filter.

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

Alphaalphaalpha (input_control) real β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Filter parameter: small values effect strong smoothing (reversed in case of β€˜gauss’).

Default: 0.50.5
Suggested values: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 7.0, 10.00.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

Sizesizesize (output_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of filter is approx. size x size pixels.

Coeffscoeffscoeffs (output_control) integer-array β†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (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)
(C)
info_smooth('deriche2',0.5,Size,Coeffs)\;
smooth_image(Input,&Smooth,'deriche2',7)\;

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

read_imageReadImage

Possible successors

smooth_imageSmoothImage

See also

smooth_imageSmoothImage

ModuleπŸ”—

Foundation