KlassenKlassenKlassenKlassen | | | | Operatoren

binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter (Operator)

Name

binomial_filterbinomial_filterBinomialFilterbinomial_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)

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

HImage HImage::BinomialFilter(const HTuple& MaskWidth, const HTuple& MaskHeight) const

HImageArray HImageArray::BinomialFilter(const HTuple& MaskWidth, const HTuple& MaskHeight) const

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

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

void HOperatorSetX.BinomialFilter(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageBinomial, [in] VARIANT MaskWidth, [in] VARIANT MaskHeight)

IHImageX* HImageX.BinomialFilter(
[in] Hlong MaskWidth, [in] Hlong MaskHeight)

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

HImage HImage.BinomialFilter(int maskWidth, int maskHeight)

Beschreibung

binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter glättet das Bild ImageImageImageImageImageimage mit einem Binomialfilter mit einer Maskengröße von MaskWidthMaskWidthMaskWidthMaskWidthMaskWidthmaskWidth * MaskHeightMaskHeightMaskHeightMaskHeightMaskHeightmaskHeight Pixeln und liefert das geglättete Bild in ImageBinomialImageBinomialImageBinomialImageBinomialImageBinomialimageBinomial 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_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter sehr schnell. Sei m = MaskHeightMaskHeightMaskHeightMaskHeightMaskHeightmaskHeight und n = MaskWidthMaskWidthMaskWidthMaskWidthMaskWidthmaskWidth. 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 MaskHeightMaskHeightMaskHeightMaskHeightMaskHeightmaskHeight und MaskWidthMaskWidthMaskWidthMaskWidthMaskWidthmaskWidth 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_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter kann auf OpenCL Geräten ausgeführt werden.

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.

Parallelisierung

Parameter

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

Eingabebild.

ImageBinomialImageBinomialImageBinomialImageBinomialImageBinomialimageBinomial (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Geglättetes Bild.

MaskWidthMaskWidthMaskWidthMaskWidthMaskWidthmaskWidth (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (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

MaskHeightMaskHeightMaskHeightMaskHeightMaskHeightmaskHeight (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (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_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter 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>)set_system("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_imageReadImageread_imageReadImageReadImage, grab_imagegrab_imageGrabImagegrab_imageGrabImageGrabImage

Nachfolger

regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, thresholdthresholdThresholdthresholdThresholdThreshold, sub_imagesub_imageSubImagesub_imageSubImageSubImage, dyn_thresholddyn_thresholdDynThresholddyn_thresholdDynThresholdDynThreshold, auto_thresholdauto_thresholdAutoThresholdauto_thresholdAutoThresholdAutoThreshold

Alternativen

gauss_filtergauss_filterGaussFiltergauss_filterGaussFilterGaussFilter, smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage, derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss, isotropic_diffusionisotropic_diffusionIsotropicDiffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusion

Siehe auch

mean_imagemean_imageMeanImagemean_imageMeanImageMeanImage, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion, sigma_imagesigma_imageSigmaImagesigma_imageSigmaImageSigmaImage, gen_lowpassgen_lowpassGenLowpassgen_lowpassGenLowpassGenLowpass

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren