opening_circleopening_circleOpeningCircleOpeningCircle (Operator)

Name

opening_circleopening_circleOpeningCircleOpeningCircle — Auftrennen von Lücken mit einer Kreismaske.

Signatur

opening_circle(Region : RegionOpening : Radius : )

Herror opening_circle(const Hobject Region, Hobject* RegionOpening, double Radius)

Herror T_opening_circle(const Hobject Region, Hobject* RegionOpening, const Htuple Radius)

void OpeningCircle(const HObject& Region, HObject* RegionOpening, const HTuple& Radius)

HRegion HRegion::OpeningCircle(const HTuple& Radius) const

HRegion HRegion::OpeningCircle(double Radius) const

static void HOperatorSet.OpeningCircle(HObject region, out HObject regionOpening, HTuple radius)

HRegion HRegion.OpeningCircle(HTuple radius)

HRegion HRegion.OpeningCircle(double radius)

Beschreibung

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

Parameter

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHobject

Regionen, die verarbeitet werden sollen.

RegionOpeningRegionOpeningRegionOpeningRegionOpeningregionOpening (output_object)  region(-array) objectHRegionHRegionHobject *

Ergebnis des Opening-Operators.

RadiusRadiusRadiusRadiusradius (input_control)  real HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius der Kreismaske.

Defaultwert: 3.5

Wertevorschläge: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5

Typischer Wertebereich: 0.5 ≤ Radius Radius Radius Radius radius ≤ 511.5 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 1.0

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 (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:

Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionConnectionConnection, union1union1Union1Union1Union1, watershedswatershedsWatershedsWatershedsWatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNorm

Nachfolger

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain, select_shapeselect_shapeSelectShapeSelectShapeSelectShape, area_centerarea_centerAreaCenterAreaCenterAreaCenter, connectionconnectionConnectionConnectionConnection

Alternativen

openingopeningOpeningOpeningOpening, dilation1dilation1Dilation1Dilation1Dilation1, minkowski_add1minkowski_add1MinkowskiAdd1MinkowskiAdd1MinkowskiAdd1, gen_circlegen_circleGenCircleGenCircleGenCircle

Siehe auch

transpose_regiontranspose_regionTransposeRegionTransposeRegionTransposeRegion

Modul

Foundation