openingopeningOpeningOpeningopening (Operator)

Name

openingopeningOpeningOpeningopening — Auftrennen von Lücken.

Signatur

opening(Region, StructElement : RegionOpening : : )

Herror opening(const Hobject Region, const Hobject StructElement, Hobject* RegionOpening)

Herror T_opening(const Hobject Region, const Hobject StructElement, Hobject* RegionOpening)

void Opening(const HObject& Region, const HObject& StructElement, HObject* RegionOpening)

HRegion HRegion::Opening(const HRegion& StructElement) const

static void HOperatorSet.Opening(HObject region, HObject structElement, out HObject regionOpening)

HRegion HRegion.Opening(HRegion structElement)

def opening(region: HObject, struct_element: HObject) -> HObject

Beschreibung

Die openingopeningOpeningOpeningOpeningopening-Operation ist als die Hintereinanderschaltung von Erosion und Minkowski-Addition definiert. Durch Anwendung von openingopeningOpeningOpeningOpeningopening bleiben größere Strukturen weitgehend erhalten, kleine Regionen wie Linien und Punkte sowie feine Strukturen werden gelöscht. Im Gegensatz dazu bewirkt eine closingclosingClosingClosingClosingclosing-Operation, dass kleine Unterbrechungen, Lücken und Risse erhalten bleiben bzw. ausgefüllt werden (siehe hierzu closingclosingClosingClosingClosingclosing).

openingopeningOpeningOpeningOpeningopening dient zur Elimination von kleinen Regionen (kleiner als StructElementStructElementStructElementStructElementstructElementstruct_element) und zum Glätten der Ränder. openingopeningOpeningOpeningOpeningopening verwendet intern als Bezugspunkt den Schwerpunkt des strukturierenden Elementes. Die Position von StructElementStructElementStructElementStructElementstructElementstruct_element ist aber ohne Bedeutung, da Opening translationsinvariant gegenüber dem strukturierende Element ist.

StructElementStructElementStructElementStructElementstructElementstruct_element kann mit Operatoren wie gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, etc. erzeugt werden.

Ausführungsinformationen

Parameter

RegionRegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regionen, die verarbeitet werden sollen.

StructElementStructElementStructElementStructElementstructElementstruct_element (input_object)  region objectHRegionHObjectHRegionHobject

Strukturierendes Element (lageinvariant).

RegionOpeningRegionOpeningRegionOpeningRegionOpeningregionOpeningregion_opening (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Ergebnis des Opening-Operators.

Beispiel (HDevelop)

* Large regions in an aerial picture (beech trees or meadows):
read_image(Image,'forest_road')
threshold(Image,Light,160,255)
gen_circle(StructElement,100,100,10)
* selecting the large regions
opening(Light,StructElement,Large)
* Selecting of edges with certain orientation:
read_image(Image,'fabrik')
sobel_amp(Image,Sobel,'sum_abs',3)
threshold(Sobel,Edges,10,255)
gen_rectangle2(StructElement,100,100,3.07819,20,1)
opening(Edges,StructElement,Direction)

Beispiel (C)

/* simulation of opening */
my_opening(Hobject In, Hobject StructElement, Hobject *Out)
{
  Hobject  H;
  erosion1(In,StructElement,&H,1);
  minkowski_add1(H,StructElement,Out,1);
}

/* Large regions in an aerial picture (beech trees or meadows): */
read_image(&Image,"forest_road");
threshold(Image,&Light,160.0,255.0);
gen_circle(&StructElement,100.0,100.0,10.0);
/* selecting the large regions */
opening(Light,StructElement,&Large);

/* Selecting of edges with certain orientation: */
read_image(&Image,"fabrik");
sobel_amp(Image,&Sobel,"sum_abs",3);
threshold(Sobel,Edges,30.0,255.0);
gen_rectangle2(&StructElement,100.0,100.0,3.07819,20.0,1.0);
opening(Edges,StructElement,&Direction);

Beispiel (HDevelop)

* Large regions in an aerial picture (beech trees or meadows):
read_image(Image,'forest_road')
threshold(Image,Light,160,255)
gen_circle(StructElement,100,100,10)
* selecting the large regions
opening(Light,StructElement,Large)
* Selecting of edges with certain orientation:
read_image(Image,'fabrik')
sobel_amp(Image,Sobel,'sum_abs',3)
threshold(Sobel,Edges,10,255)
gen_rectangle2(StructElement,100,100,3.07819,20,1)
opening(Edges,StructElement,Direction)

Beispiel (HDevelop)

* Large regions in an aerial picture (beech trees or meadows):
read_image(Image,'forest_road')
threshold(Image,Light,160,255)
gen_circle(StructElement,100,100,10)
* selecting the large regions
opening(Light,StructElement,Large)
* Selecting of edges with certain orientation:
read_image(Image,'fabrik')
sobel_amp(Image,Sobel,'sum_abs',3)
threshold(Sobel,Edges,10,255)
gen_rectangle2(StructElement,100,100,3.07819,20,1)
opening(Edges,StructElement,Direction)

Beispiel (HDevelop)

* Large regions in an aerial picture (beech trees or meadows):
read_image(Image,'forest_road')
threshold(Image,Light,160,255)
gen_circle(StructElement,100,100,10)
* selecting the large regions
opening(Light,StructElement,Large)
* Selecting of edges with certain orientation:
read_image(Image,'fabrik')
sobel_amp(Image,Sobel,'sum_abs',3)
threshold(Sobel,Edges,10,255)
gen_rectangle2(StructElement,100,100,3.07819,20,1)
opening(Edges,StructElement,Direction)

Komplexität

Sei F1 die Fläche einer Eingaberegion und F2 die Fläche des strukturierenden Elementes, dann ist die Laufzeitkomplexität für eine Region:

Ergebnis

Bei korrekter Parametrisierung liefert die Funktion openingopeningOpeningOpeningOpeningopening den Wert 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

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection, union1union1Union1Union1Union1union1, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled

Nachfolger

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

Alternativen

minkowski_add1minkowski_add1MinkowskiAdd1MinkowskiAdd1MinkowskiAdd1minkowski_add1, erosion1erosion1Erosion1Erosion1Erosion1erosion1, opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircleopening_circle

Siehe auch

gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon

Modul

Foundation