opening_circleopening_circleOpeningCircleOpeningCircleopening_circle (算子名称)

名称

opening_circleopening_circleOpeningCircleOpeningCircleopening_circle — Open a region with a circular structuring element.

参数签名

opening_circle(区域 : RegionOpening : Radius : )

Herror opening_circle(const Hobject 区域, Hobject* RegionOpening, double Radius)

Herror T_opening_circle(const Hobject 区域, Hobject* RegionOpening, const Htuple Radius)

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

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

HRegion HRegion::OpeningCircle(double Radius) const

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

HRegion HRegion.OpeningCircle(HTuple radius)

HRegion HRegion.OpeningCircle(double radius)

def opening_circle(区域: HObject, radius: Union[float, int]) -> HObject

描述

opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircleopening_circle is defined as an erosion followed by a Minkowski addition with a circular structuring element (see example). openingopeningOpeningOpeningOpeningopening serves to eliminate small regions (smaller than the circular structuring element) and to smooth the boundaries of a region.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be opened.

RegionOpeningRegionOpeningRegionOpeningRegionOpeningregionOpeningregion_opening (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Opened regions.

RadiusRadiusRadiusRadiusradiusradius (input_control)  real HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius of the circular structuring element.

Default: 3.5

Suggested values: 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

Value range: 0.5 ≤ Radius Radius Radius Radius radius radius ≤ 511.5 (lin)

Minimum increment: 1.0

Recommended increment: 1.0

例程 (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)

例程 (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);

例程 (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)

例程 (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)

例程 (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)

Complexity

Let F1 be the area of the input region. Then the runtime complexity for one region is:

结果

opening_circleopening_circleOpeningCircleOpeningCircleOpeningCircleopening_circle returns 2 ( H_MSG_TRUE) if all parameters are correct. The behavior in case of empty or no input region can be set via:

Otherwise, an exception is raised.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection, union1union1Union1Union1Union1union1, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后置算子

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

可替代算子

openingopeningOpeningOpeningOpeningopening, dilation1dilation1Dilation1Dilation1Dilation1dilation1, minkowski_add1minkowski_add1MinkowskiAdd1MinkowskiAdd1MinkowskiAdd1minkowski_add1, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle

参考其它

transpose_regiontranspose_regionTransposeRegionTransposeRegionTransposeRegiontranspose_region

模块

Foundation