bottom_hatbottom_hatBottomHatBottomHat (Operator)

Name

bottom_hatbottom_hatBottomHatBottomHat — Ermitteln von Lücken zwischen Regionen.

Signatur

bottom_hat(Region, StructElement : RegionBottomHat : : )

Herror bottom_hat(const Hobject Region, const Hobject StructElement, Hobject* RegionBottomHat)

Herror T_bottom_hat(const Hobject Region, const Hobject StructElement, Hobject* RegionBottomHat)

void BottomHat(const HObject& Region, const HObject& StructElement, HObject* RegionBottomHat)

HRegion HRegion::BottomHat(const HRegion& StructElement) const

static void HOperatorSet.BottomHat(HObject region, HObject structElement, out HObject regionBottomHat)

HRegion HRegion.BottomHat(HRegion structElement)

Beschreibung

bottom_hatbottom_hatBottomHatBottomHatBottomHat berechnet die Bottom-Hat-Operation, indem zunächst eine Closing-Operation mit StructElementStructElementStructElementStructElementstructElement (siehe closingclosingClosingClosingClosing) durchgeführt wird. Von diesem Zwischenergebnis wird die Originalregion abgezogen. Im Gegensatz zu closingclosingClosingClosingClosing, das aus Einzelregionen bei entsprechender Voraussetzung mehrere Regionen zu einer größeren zusammenschließt, bestimmt bottom_hatbottom_hatBottomHatBottomHatBottomHat die Region, welche für diesen Zusammenschluss notwendig ist.

Die Position von StructElementStructElementStructElementStructElementstructElement ist ohne Bedeutung, da die Closing-Operation translationsinvariant bzgl. StructElementStructElementStructElementStructElementstructElement ist.

Das struktuirierende Element (StructElementStructElementStructElementStructElementstructElement) kann mit Operatoren wie gen_circlegen_circleGenCircleGenCircleGenCircle, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse, draw_regiondraw_regionDrawRegionDrawRegionDrawRegion, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygon, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPoints, etc. erzeugt werden.

Ausführungsinformationen

Parameter

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHobject

Regionen, die verarbeitet werden sollen.

StructElementStructElementStructElementStructElementstructElement (input_object)  region objectHRegionHRegionHobject

Strukturierendes Element (lageinvariant).

RegionBottomHatRegionBottomHatRegionBottomHatRegionBottomHatregionBottomHat (output_object)  region(-array) objectHRegionHRegionHobject *

Ergebnis des Bottom-Hat-Operators.

Beispiel (HDevelop)

read_image (Image, 'brake_disk/brake_disk_bike_01')
threshold (Image, Regions, 128, 255)
gen_circle (Circle, 40, 40, 20)
bottom_hat (Regions, Circle, RegionBottomHat)

Beispiel (C)

threshold(Image,&Regions,128.0,255.0);
gen_circle(&Circle,128.0,128.0,16.0);
bottom_hat(Regions,Circle,&RegionBottomHat);
set_color(WindowHandle,"red");
disp_region(Regions,WindowHandle);
set_color(WindowHandle,"green");
disp_region(RegionBottomHat,WindowHandle);

Beispiel (HDevelop)

read_image (Image, 'brake_disk/brake_disk_bike_01')
threshold (Image, Regions, 128, 255)
gen_circle (Circle, 40, 40, 20)
bottom_hat (Regions, Circle, RegionBottomHat)

Beispiel (HDevelop)

read_image (Image, 'brake_disk/brake_disk_bike_01')
threshold (Image, Regions, 128, 255)
gen_circle (Circle, 40, 40, 20)
bottom_hat (Regions, Circle, RegionBottomHat)

Beispiel (HDevelop)

read_image (Image, 'brake_disk/brake_disk_bike_01')
threshold (Image, Regions, 128, 255)
gen_circle (Circle, 40, 40, 20)
bottom_hat (Regions, Circle, RegionBottomHat)

Ergebnis

Bei korrekter Parametrisierung liefert die Funktion bottom_hatbottom_hatBottomHatBottomHatBottomHat 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, gen_circlegen_circleGenCircleGenCircleGenCircle, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2, draw_regiondraw_regionDrawRegionDrawRegionDrawRegion, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPoints, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilled

Nachfolger

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain, select_shapeselect_shapeSelectShapeSelectShapeSelectShape, area_centerarea_centerAreaCenterAreaCenterAreaCenter, connectionconnectionConnectionConnectionConnection

Alternativen

closingclosingClosingClosingClosing, differencedifferenceDifferenceDifferenceDifference

Siehe auch

top_hattop_hatTopHatTopHatTopHat, gray_bothatgray_bothatGrayBothatGrayBothatGrayBothat, openingopeningOpeningOpeningOpening

Modul

Foundation