opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircle ist als die Hintereinanderschaltung von
Erosion und Minkowski-Addition mit einer Kreismaske definiert (siehe
Beispiel). opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircle dient zur Elimination von
kleinen Regionen (kleiner als die Kreismaske) und zum Glätten der
Ränder.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Beispiel (C)
/* simulation of opening_circle */
my_opening_circle(Hobject In, double Radius, Hobject *Out)
{
Hobject Circle, tmp;
gen_circle(&Circle,100.0,100.0,Radius);
erosion1(Region,Circle,&tmp,1);
minkowski_add1(tmp,Circle,&Out,1);
}
/* Large regions in an aerial picture (beech trees or meadows): */
read_image(&Image, "forest_road");
threshold(Image, &Region, 120.0, 255.0);
/* Close the small gaps. */
closing_circle(Region, &RegionClosing, 3.5);
/* Select the large regions. */
opening_circle(RegionClosing, &RegionOpening, 19.5);
Beispiel (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Beispiel (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Beispiel (HDevelop)
* Large regions in an aerial picture (beech trees or meadows):
read_image (Image, 'forest_road')
threshold (Image, Region, 120, 255)
* Close the small gaps.
closing_circle (Region, RegionClosing, 3.5)
* Select the large regions.
opening_circle (RegionClosing, RegionOpening, 19.5)
Komplexität
Sei F1 die Fläche einer Eingaberegion, dann ist die
Laufzeitkomplexität für eine Region:
Ergebnis
Bei korrekter Parametrisierung liefert die Funktion
opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircle den Wert 2 (H_MSG_TRUE). Das Funktionsverhalten
für die beiden Fälle leere und keine Eingaberegion lässt sich wie
folgt kontrollieren:
keine Region:
set_system('no_object_result',<RegionResult>)