Name
opening_segopening_segOpeningSegOpeningSeg — Separate overlapping regions.
Warning
opening_segopening_segOpeningSegOpeningSegOpeningSeg is obsolete and is only provided for
reasons of backward compatibility.
The opening_segopening_segOpeningSegOpeningSegOpeningSeg operation is defined as a sequence of
the following operators: erosion1erosion1Erosion1Erosion1Erosion1,
connectionconnectionConnectionConnectionConnection and dilation1dilation1Dilation1Dilation1Dilation1 (see example).
Only one iteration is done in erosion1erosion1Erosion1Erosion1Erosion1 and
dilation1dilation1Dilation1Dilation1Dilation1.
opening_segopening_segOpeningSegOpeningSegOpeningSeg serves to separate overlapping regions whose
area of overlap is smaller than StructElementStructElementStructElementStructElementstructElement. It should
be noted that the resulting regions can overlap without actually
merging (see expand_regionexpand_regionExpandRegionExpandRegionExpandRegion). opening_segopening_segOpeningSegOpeningSegOpeningSeg uses the
center of gravity as the reference point of the structuring element.
Structuring elements (StructElementStructElementStructElementStructElementstructElement) can be generated
with operators such as 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.
- 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-invariant).
* Simulation of opening_seg
* opening_seg(Region,StructElement,RegionOpening):
erosion1(Region,StructElement,H1,1)
connection(H1,H2)
dilation1(H2,StructElement,RegionOpening,1)
/* Simulation of opening_seg */
my_opening_seg(Hobject Region, Hobject StructElement, Hobject *Opening)
{
Hobject H1,H2;
erosion1(Region,StructElement,&H1,1);
connection(H1,&H2);
dilation1(H2,StructElement,Opening,1);
clear_obj(H1); clear_obj(H2);
}
/* separation of circular objects */
gen_random_regions(&Regions,"circle",8.5,10.5,0.0,0.0,0.0,0.0,400,512,512);
union1(Regions,&UnionReg);
gen_circle(&Mask,100,100,8.5);
opening_seg(UnionReg,Mask,&RegionsNew);
* Simulation of opening_seg
* opening_seg(Region,StructElement,RegionOpening):
erosion1(Region,StructElement,H1,1)
connection(H1,H2)
dilation1(H2,StructElement,RegionOpening,1)
* Simulation of opening_seg
* opening_seg(Region,StructElement,RegionOpening):
erosion1(Region,StructElement,H1,1)
connection(H1,H2)
dilation1(H2,StructElement,RegionOpening,1)
* Simulation of opening_seg
* opening_seg(Region,StructElement,RegionOpening):
erosion1(Region,StructElement,H1,1)
connection(H1,H2)
dilation1(H2,StructElement,RegionOpening,1)
Let F1 be the area of the input region, and F2 be the area of
the structuring element. Then the runtime complexity for one region
is:
opening_segopening_segOpeningSegOpeningSegOpeningSeg 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_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
expand_regionexpand_regionExpandRegionExpandRegionExpandRegion,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain,
select_shapeselect_shapeSelectShapeSelectShapeSelectShape,
area_centerarea_centerAreaCenterAreaCenterAreaCenter,
connectionconnectionConnectionConnectionConnection
erosion1erosion1Erosion1Erosion1Erosion1,
connectionconnectionConnectionConnectionConnection,
dilation1dilation1Dilation1Dilation1Dilation1
Foundation