HALCON Reference Manual 10.0.2
Name
bottom_hatbottom_hatbottom_hatBottomHatBottomHat — Compute the bottom hat of regions.
bottom_hatbottom_hatbottom_hatBottomHatBottomHat computes the closingclosingclosingClosingClosing of
RegionRegionRegionRegionregion with StructElementStructElementStructElementStructElementstructElement. The difference
between the result of the closing and the original region is called
the bottom hat. In contrast to closingclosingclosingClosingClosing, which merges
regions under certain circumstances, bottom_hatbottom_hatbottom_hatBottomHatBottomHat computes
the regions generated by such a merge.
The position of StructElementStructElementStructElementStructElementstructElement is meaningless, since a
closing operation is invariant with respect to the choice of the
reference point.
Structuring elements (StructElementStructElementStructElementStructElementstructElement) can be generated
with operators such as gen_circlegen_circlegen_circleGenCircleGenCircle, gen_rectangle1gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1,
gen_rectangle2gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2, gen_ellipsegen_ellipsegen_ellipseGenEllipseGenEllipse,
draw_regiondraw_regiondraw_regionDrawRegionDrawRegion, gen_region_polygongen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygon,
gen_region_pointsgen_region_pointsgen_region_pointsGenRegionPointsGenRegionPoints, etc.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
Structuring element (position independent).
Result of the bottom hat operator.
read_image (Image,'/images/name.ext')
threshold (Image,Regions,128,255)
gen_circle (Circle,0,0,16)
bottom_hat (Regions,Circle,RegionBottomHat)
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);
#include "HalconCpp.h"
main()
{
HByteImage Monkey("monkey");
HWindow w;
HRegion regs = (Monkey >= 128);
HRegion circ = HRegion::GenCircle (128, 128, 3);
HRegion rbht = regs.BottomHat (circ);
Monkey.Display (w); w.Click ();
w.SetColor ("red"); regs.Display (w); w.Click ();
w.SetColor ("green"); rbht.Display (w); w.Click ();
return(0);
}
read_image (Image,'/images/name.ext')
threshold (Image,Regions,128,255)
gen_circle (Circle,0,0,16)
bottom_hat (Regions,Circle,RegionBottomHat)
read_image (Image,'/images/name.ext')
threshold (Image,Regions,128,255)
gen_circle (Circle,0,0,16)
bottom_hat (Regions,Circle,RegionBottomHat)
bottom_hatbottom_hatbottom_hatBottomHatBottomHat returns 2 (H_MSG_TRUE) if all parameters are correct.
The behavior in case of empty or no input region can be set via:
-
no region:
set_system('no_object_result',<RegionResult>)
-
empty region:
set_system('empty_region_result',<RegionResult>)
Otherwise, an exception is raised.
thresholdthresholdthresholdThresholdThreshold,
regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing,
connectionconnectionconnectionConnectionConnection,
union1union1union1Union1Union1,
watershedswatershedswatershedsWatershedsWatersheds,
class_ndim_normclass_ndim_normclass_ndim_normClassNdimNormClassNdimNorm,
gen_circlegen_circlegen_circleGenCircleGenCircle,
gen_ellipsegen_ellipsegen_ellipseGenEllipseGenEllipse,
gen_rectangle1gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1,
gen_rectangle2gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2,
draw_regiondraw_regiondraw_regionDrawRegionDrawRegion,
gen_region_pointsgen_region_pointsgen_region_pointsGenRegionPointsGenRegionPoints,
gen_struct_elementsgen_struct_elementsgen_struct_elementsGenStructElementsGenStructElements,
gen_region_polygon_filledgen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilled
reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain,
select_shapeselect_shapeselect_shapeSelectShapeSelectShape,
area_centerarea_centerarea_centerAreaCenterAreaCenter,
connectionconnectionconnectionConnectionConnection
closingclosingclosingClosingClosing,
differencedifferencedifferenceDifferenceDifference
top_hattop_hattop_hatTopHatTopHat,
morph_hatmorph_hatmorph_hatMorphHatMorphHat,
gray_bothatgray_bothatgray_bothatGrayBothatGrayBothat,
openingopeningopeningOpeningOpening
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |