KlassenKlassenKlassenKlassen | | | | Operatoren

anisotrope_diffanisotrope_diffAnisotropeDiffanisotrope_diffAnisotropeDiffAnisotropeDiff (Operator)

Name

anisotrope_diffanisotrope_diffAnisotropeDiffanisotrope_diffAnisotropeDiffAnisotropeDiff — Kantenerhaltende Glättung durch anisotrope Diffusion.

Warnung

anisotrope_diffanisotrope_diffAnisotropeDiffanisotrope_diffAnisotropeDiffAnisotropeDiff ist veraltet und wird nur aus Gründen der Rückwärtskompatibilität zur Verfügung gestellt. Neue Applikationen sollten stattdessen anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion verwenden.

Signatur

anisotrope_diff(Image : ImageAniso : Percent, Mode, Iteration, NeighborhoodType : )

Herror anisotrope_diff(const Hobject Image, Hobject* ImageAniso, const Hlong Percent, const Hlong Mode, const Hlong Iteration, const Hlong NeighborhoodType)

Herror T_anisotrope_diff(const Hobject Image, Hobject* ImageAniso, const Htuple Percent, const Htuple Mode, const Htuple Iteration, const Htuple NeighborhoodType)

Herror anisotrope_diff(Hobject Image, Hobject* ImageAniso, const HTuple& Percent, const HTuple& Mode, const HTuple& Iteration, const HTuple& NeighborhoodType)

HImage HImage::AnisotropeDiff(const HTuple& Percent, const HTuple& Mode, const HTuple& Iteration, const HTuple& NeighborhoodType) const

HImageArray HImageArray::AnisotropeDiff(const HTuple& Percent, const HTuple& Mode, const HTuple& Iteration, const HTuple& NeighborhoodType) const

void AnisotropeDiff(const HObject& Image, HObject* ImageAniso, const HTuple& Percent, const HTuple& Mode, const HTuple& Iteration, const HTuple& NeighborhoodType)

HImage HImage::AnisotropeDiff(Hlong Percent, Hlong Mode, Hlong Iteration, Hlong NeighborhoodType) const

void HOperatorSetX.AnisotropeDiff(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageAniso, [in] VARIANT Percent, [in] VARIANT Mode, [in] VARIANT Iteration, [in] VARIANT NeighborhoodType)

IHImageX* HImageX.AnisotropeDiff(
[in] Hlong Percent, [in] Hlong Mode, [in] Hlong Iteration, [in] Hlong NeighborhoodType)

static void HOperatorSet.AnisotropeDiff(HObject image, out HObject imageAniso, HTuple percent, HTuple mode, HTuple iteration, HTuple neighborhoodType)

HImage HImage.AnisotropeDiff(int percent, int mode, int iteration, int neighborhoodType)

Beschreibung

anisotrope_diffanisotrope_diffAnisotropeDiffanisotrope_diffAnisotropeDiffAnisotropeDiff realisiert ein iteratives, anisotropes Glättungsverfahren, das auf den mathematischen Grundlagen der physikalischen Diffusion beruht. In Analogie zum physikalischen Diffusionsprozess, der den Konzentrationsausgleich zwischen Molekülen in Abhängigkeit vom Dichtegradienten beschreibt, führt der Diffusionsfilter eine Glättung der Grauwerte, abhängig von den lokalen Grauwertgradienten, durch.

Zur iterativen Berechnung des Grauwertes eines Pixels werden die Grauwertdifferenzen zu den vier bzw. acht Nachbarn herangezogen. Diese Grauwertdifferenzen gehen jedoch mit unterschiedlicher Gewichtung in die Berechnung ein, d.h. es handelt sich um einen nichtlinearen Diffusionsprozess.

Die Gewichtung erfolgt mittels einer Diffusionsfunktion (implementiert wurden zwei verschiedene Funktionen, ModeModeModeModeModemode = 1 bzw. 2), die --- abhängig vom Gradienten --- dafür sorgt, dass innerhalb homogener Regionen stärker geglättet wird als über die Regionengrenzen hinweg. Die Kanten bleiben deswegen scharf erhalten. Die Diffusionsfunktion wird mittels einer Histogrammanalyse im Gradientenbild (nach Canny) auf das Rauschverhältnis des Bildes hin abgestimmt. Ein hoher Wert für PercentPercentPercentPercentPercentpercent erhöht dabei die glättende Wirkung, verwischt aber auch Kanten etwas mehr (typisch sind Werte von 80 - 90 Prozent).

Der Parameter IterationIterationIterationIterationIterationiteration legt die Zahl der Iterationen fest (typisch 3--7).

Parallelisierung

Parameter

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte)

Zu glättendes Bild.

ImageAnisoImageAnisoImageAnisoImageAnisoImageAnisoimageAniso (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte)

Geglättetes Bild.

PercentPercentPercentPercentPercentpercent (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Für Histogrammanalyse. Größere Werte erhöhen die glättende Wirkung, typisch: 80 - 90.

Defaultwert: 80

Wertevorschläge: 65, 70, 75, 80, 85, 90

Typischer Wertebereich: 50 ≤ Percent Percent Percent Percent Percent percent ≤ 100

Minimale Schrittweite: 1

Empfohlene Schrittweite: 5

ModeModeModeModeModemode (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Auswahl der Diffusionsfunktion.

Defaultwert: 1

Werteliste: 1, 2

IterationIterationIterationIterationIterationiteration (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Anzahl der Iterationen, typische Werte: 3 - 7.

Defaultwert: 5

Wertevorschläge: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Typischer Wertebereich: 1 ≤ Iteration Iteration Iteration Iteration Iteration iteration ≤ 30

Minimale Schrittweite: 1

Empfohlene Schrittweite: 1

NeighborhoodTypeNeighborhoodTypeNeighborhoodTypeNeighborhoodTypeNeighborhoodTypeneighborhoodType (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Gewünschter Nachbarschaftstyp.

Defaultwert: 8

Werteliste: 4, 8

Beispiel (HDevelop)

read_image(Image,'fabrik')
anisotrope_diff(Image,Aniso,80,1,5,8)
sub_image(Image,Aniso,Sub,2.0,127)
dev_display(Sub)

Beispiel (C)

read_image(&Image,"fabrik");
anisotrope_diff(Image,&Aniso,80,1,5,8);
sub_image(Image,Aniso,&Sub,2.0,127.0);
disp_image(Sub,WindowHandle);

Beispiel (HDevelop)

read_image(Image,'fabrik')
anisotrope_diff(Image,Aniso,80,1,5,8)
sub_image(Image,Aniso,Sub,2.0,127)
dev_display(Sub)

Beispiel (HDevelop)

read_image(Image,'fabrik')
anisotrope_diff(Image,Aniso,80,1,5,8)
sub_image(Image,Aniso,Sub,2.0,127)
dev_display(Sub)

Beispiel (HDevelop)

read_image(Image,'fabrik')
anisotrope_diff(Image,Aniso,80,1,5,8)
sub_image(Image,Aniso,Sub,2.0,127)
dev_display(Sub)

Beispiel (HDevelop)

read_image(Image,'fabrik')
anisotrope_diff(Image,Aniso,80,1,5,8)
sub_image(Image,Aniso,Sub,2.0,127)
dev_display(Sub)

Komplexität

Pro Bildpunkt: O(Iterations * 18).

Ergebnis

Sind die Parameterwerte korrekt, dann liefert anisotrope_diffanisotrope_diffAnisotropeDiffanisotrope_diffAnisotropeDiffAnisotropeDiff 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.

Literatur

P. Perona, J. Malik: „Scale-space and edge detection using anisotropic diffusion“, IEEE transaction on pattern analysis and machine intelligence, Vol. 12, No. 7, July 1990.

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren