hit_or_misshit_or_missHitOrMissHitOrMisshit_or_miss (算子)

名称

hit_or_misshit_or_missHitOrMissHitOrMisshit_or_miss — 区域的击中击不中操作。

签名

hit_or_miss(Region, StructElement1, StructElement2 : RegionHitMiss : Row, Column : )

Herror hit_or_miss(const Hobject Region, const Hobject StructElement1, const Hobject StructElement2, Hobject* RegionHitMiss, const Hlong Row, const Hlong Column)

Herror T_hit_or_miss(const Hobject Region, const Hobject StructElement1, const Hobject StructElement2, Hobject* RegionHitMiss, const Htuple Row, const Htuple Column)

void HitOrMiss(const HObject& Region, const HObject& StructElement1, const HObject& StructElement2, HObject* RegionHitMiss, const HTuple& Row, const HTuple& Column)

HRegion HRegion::HitOrMiss(const HRegion& StructElement1, const HRegion& StructElement2, Hlong Row, Hlong Column) const

static void HOperatorSet.HitOrMiss(HObject region, HObject structElement1, HObject structElement2, out HObject regionHitMiss, HTuple row, HTuple column)

HRegion HRegion.HitOrMiss(HRegion structElement1, HRegion structElement2, int row, int column)

def hit_or_miss(region: HObject, struct_element_1: HObject, struct_element_2: HObject, row: int, column: int) -> HObject

描述

hit_or_misshit_or_missHitOrMissHitOrMissHitOrMisshit_or_miss performs the hit-or-miss-transformation. First, an erosion with the structuring element StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 is done on the input region RegionRegionRegionRegionregionregion. Then an erosion with the structuring element StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 is performed on the complement of the input region. The intersection of the two resulting regions is the result RegionHitMissRegionHitMissRegionHitMissRegionHitMissregionHitMissregion_hit_miss of hit_or_misshit_or_missHitOrMissHitOrMissHitOrMisshit_or_miss.

The hit-or-miss-transformation selects precisely the points for which the conditions given by the structuring elements StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 and StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 are fulfilled. StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 determines the condition for the foreground pixels, while StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 determines the condition for the background pixels. In order to obtain sensible results, StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 and StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 must fit like key and lock. In any case, StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 and StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 must be disjunct. RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn determine the reference point of the structuring elements.

Structuring elements (StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1, StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2) can be generated by calling operators like gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, etc.

执行信息

参数

RegionRegionRegionRegionregionregion (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be processed.

StructElement1StructElement1StructElement1StructElement1structElement1struct_element_1 (输入对象)  region objectHRegionHObjectHRegionHobject

Erosion mask for the input regions.

StructElement2StructElement2StructElement2StructElement2structElement2struct_element_2 (输入对象)  region objectHRegionHObjectHRegionHobject

Erosion mask for the complements of the input regions.

RegionHitMissRegionHitMissRegionHitMissRegionHitMissregionHitMissregion_hit_miss (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Result of the hit-or-miss operation.

RowRowRowRowrowrow (输入控制)  point.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinate of the reference point.

默认值: 16

建议值: 0, 16, 32, 128, 256

值范围: 0 ≤ Row Row Row Row row row ≤ 511 (lin)

最小增量: 1

建议增量: 1

ColumnColumnColumnColumncolumncolumn (输入控制)  point.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinate of the reference point.

默认值: 16

建议值: 0, 16, 32, 128, 256

值范围: 0 ≤ Column Column Column Column column column ≤ 511 (lin)

最小增量: 1

建议增量: 1

复杂度

Let F be the area of an input region, F1 the area of the structuring element 1, and F2 the area of the structuring element 2. Then the runtime complexity for one object is:

结果

hit_or_misshit_or_missHitOrMissHitOrMissHitOrMisshit_or_miss 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入区域为空或不存在时,其行为可通过以下方式设置:

否则,将抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection, union1union1Union1Union1Union1union1, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后继

differencedifferenceDifferenceDifferenceDifferencedifference, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection

替代

erosion2erosion2Erosion2Erosion2Erosion2erosion2, dilation2dilation2Dilation2Dilation2Dilation2dilation2

另见

gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled

模块

基础