binomial_filterbinomial_filterBinomialFilterBinomialFilter (Operator)

Name

binomial_filterbinomial_filterBinomialFilterBinomialFilter — Glättung eines Bildes mit dem Binomialfilter.

Signatur

binomial_filter(Image : ImageBinomial : MaskWidth, MaskHeight : )

Herror binomial_filter(const Hobject Image, Hobject* ImageBinomial, const Hlong MaskWidth, const Hlong MaskHeight)

Herror T_binomial_filter(const Hobject Image, Hobject* ImageBinomial, const Htuple MaskWidth, const Htuple MaskHeight)

void BinomialFilter(const HObject& Image, HObject* ImageBinomial, const HTuple& MaskWidth, const HTuple& MaskHeight)

HImage HImage::BinomialFilter(Hlong MaskWidth, Hlong MaskHeight) const

static void HOperatorSet.BinomialFilter(HObject image, out HObject imageBinomial, HTuple maskWidth, HTuple maskHeight)

HImage HImage.BinomialFilter(int maskWidth, int maskHeight)

Beschreibung

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter glättet das Bild ImageImageImageImageimage mit einem Binomialfilter mit einer Maskengröße von MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth * MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight Pixeln und liefert das geglättete Bild in ImageBinomialImageBinomialImageBinomialImageBinomialimageBinomial zurück. Der Binomialfilter ist eine sehr gute Annäherung eines Gaußfilters, die extrem effizient mit ganzzahligen Operationen berechnet werden kann. Daher ist binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter sehr schnell. Sei m = MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight und n = MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth. Dann sind die Filterkoeffizienten durch Binomialkoeffizienten wie folgt gegeben: Hierbei ist i = 0, ..., m-1 und j = 0, ..., n-1. Der Binomialfilter führt näherungsweise dieselbe Glättung durch wie ein Gaußfilter mit , wobei der Einfachheit halber m = n angenommen wird. Im Detail ist der Zusammenhang zwischen n und wie folgt:
n
3 0.7523
5 1.0317
7 1.2505
9 1.4365
11 1.6010
13 1.7502
15 1.8876
17 2.0157
19 2.1361
21 2.2501
23 2.3586
25 2.4623
27 2.5618
29 2.6576
31 2.7500
33 2.8395
35 2.9262
37 3.0104
Falls unterschiedliche Werte für MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight und MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth gewählt werden, stimmt der obige Zusammenhang zwischen n und immer noch und bezieht sich auf die Stärke der Glättung in Zeilen- und Spaltenrichtung.

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter kann auf OpenCL Geräten ausgeführt werden.

Das Konzept der Glättungsfilter ist in der Einleitung zum Kapitel Filter / Glättung beschrieben.

Achtung

Beachten Sie, dass Filteroperatoren eventuell unerwartete Resultate ausgeben, wenn ein Bild mit einer reduzierten Domäne als Input übergeben wird. Weitere Informationen können im Kapitel Filter gefunden werden.

Ausführungsinformationen

Parameter

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte* / uint2* / real*) *erlaubt für Compute Devices

Eingabebild.

ImageBinomialImageBinomialImageBinomialImageBinomialimageBinomial (output_object)  (multichannel-)image(-array) objectHImageHImageHobject * (byte / uint2 / real)

Geglättetes Bild.

MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Filterbreite.

Defaultwert: 5

Werteliste: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37

MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Filterhöhe.

Defaultwert: 5

Werteliste: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37

Ergebnis

Sind die Parameterwerte korrekt, dann liefert binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer Eingabe (keine Eingabebilder vorhanden) lässt sich mittels 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>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

read_imageread_imageReadImageReadImageReadImage, grab_imagegrab_imageGrabImageGrabImageGrabImage

Nachfolger

regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, thresholdthresholdThresholdThresholdThreshold, sub_imagesub_imageSubImageSubImageSubImage, dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThreshold, auto_thresholdauto_thresholdAutoThresholdAutoThresholdAutoThreshold

Alternativen

gauss_filtergauss_filterGaussFilterGaussFilterGaussFilter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImage, derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss, isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionIsotropicDiffusion

Siehe auch

mean_imagemean_imageMeanImageMeanImageMeanImage, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionAnisotropicDiffusion, sigma_imagesigma_imageSigmaImageSigmaImageSigmaImage, gen_lowpassgen_lowpassGenLowpassGenLowpassGenLowpass

Modul

Foundation