distance_rr_mindistance_rr_minDistanceRrMinDistanceRrMindistance_rr_min (算子)
名称
distance_rr_mindistance_rr_minDistanceRrMinDistanceRrMindistance_rr_min — 两个区域的轮廓像素之间的最小距离。
签名
Herror distance_rr_min(const Hobject Regions1, const Hobject Regions2, double* MinDistance, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2)
Herror T_distance_rr_min(const Hobject Regions1, const Hobject Regions2, Htuple* MinDistance, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2)
void DistanceRrMin(const HObject& Regions1, const HObject& Regions2, HTuple* MinDistance, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2)
HTuple HRegion::DistanceRrMin(const HRegion& Regions2, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2) const
double HRegion::DistanceRrMin(const HRegion& Regions2, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2) const
static void HOperatorSet.DistanceRrMin(HObject regions1, HObject regions2, out HTuple minDistance, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
HTuple HRegion.DistanceRrMin(HRegion regions2, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
double HRegion.DistanceRrMin(HRegion regions2, out int row1, out int column1, out int row2, out int column2)
def distance_rr_min(regions_1: HObject, regions_2: HObject) -> Tuple[Sequence[float], Sequence[int], Sequence[int], Sequence[int], Sequence[int]]
def distance_rr_min_s(regions_1: HObject, regions_2: HObject) -> Tuple[float, int, int, int, int]
描述
算子 distance_rr_mindistance_rr_minDistanceRrMinDistanceRrMinDistanceRrMindistance_rr_min calculates the minimum distance
of pairs of regions. If several regions are passed in
Regions1Regions1Regions1Regions1regions1regions_1 and Regions2Regions2Regions2Regions2regions2regions_2 the distance between the
contour pixels of each i-th element is calculated and then forms the
i-th entry in the output parameter MinDistanceMinDistanceMinDistanceMinDistanceminDistancemin_distance. The
Euclidean distance is used. The parameters (Row1Row1Row1Row1row1row_1,
Column1Column1Column1Column1column1column_1) and (Row2Row2Row2Row2row2row_2, Column2Column2Column2Column2column2column_2) indicate
the position on the contour of Regions1Regions1Regions1Regions1regions1regions_1 and
Regions2Regions2Regions2Regions2regions2regions_2, respectively, that have the minimum distance.
The calculation is carried out by comparing all contour pixels (see
get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour). This means in particular that
holes in the regions are ignored. Furthermore, it is not checked
whether one region lies completely within the other region. In this
case, a minimum distance > 0 is returned. It is also not checked
whether both regions contain a nonempty intersection. In the latter
case, a minimum distance of 0 or > 0 can be returned, depending on
whether the contours of the regions contain a common point or not.
注意
Both input parameters must contain the same number of regions. The
regions must not be empty.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
Regions1Regions1Regions1Regions1regions1regions_1 (输入对象) region(-array) → objectHRegionHObjectHRegionHobject
Regions to be examined.
Regions2Regions2Regions2Regions2regions2regions_2 (输入对象) region(-array) → objectHRegionHObjectHRegionHobject
Regions to be examined.
MinDistanceMinDistanceMinDistanceMinDistanceminDistancemin_distance (输出控制) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Minimum distance between contours of the regions.
Assertion:
0 <= MinDistance
复杂度
If N1,N2 are the lengths of the contours the runtime
complexity is O(N1 * N2).
结果
算子 distance_rr_mindistance_rr_minDistanceRrMinDistanceRrMinDistanceRrMindistance_rr_min 返回值 2 (
H_MSG_TRUE)
if the
input is not empty.否则将抛出异常。
可能的前趋
thresholdthresholdThresholdThresholdThresholdthreshold,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing,
connectionconnectionConnectionConnectionConnectionconnection
替代
distance_rr_min_dildistance_rr_min_dilDistanceRrMinDilDistanceRrMinDilDistanceRrMinDildistance_rr_min_dil,
dilation1dilation1Dilation1Dilation1Dilation1dilation1,
intersectionintersectionIntersectionIntersectionIntersectionintersection
模块
基础