partition_linesT_partition_linesPartitionLinesPartitionLinespartition_lines划分线(算子)

名称

partition_linesT_partition_linesPartitionLinesPartitionLinespartition_lines — 根据各种标准划分线。

警告

partition_linespartition_linesPartitionLinesPartitionLinesPartitionLinespartition_lines 已过时,仅出于向后兼容性考虑而保留。

签名

partition_lines( : : RowBeginIn, ColBeginIn, RowEndIn, ColEndIn, Feature, Operation, Min, Max : RowBeginOut, ColBeginOut, RowEndOut, ColEndOut, FailRowBOut, FailColBOut, FailRowEOut, FailColEOut)

Herror T_partition_lines(const Htuple RowBeginIn, const Htuple ColBeginIn, const Htuple RowEndIn, const Htuple ColEndIn, const Htuple Feature, const Htuple Operation, const Htuple Min, const Htuple Max, Htuple* RowBeginOut, Htuple* ColBeginOut, Htuple* RowEndOut, Htuple* ColEndOut, Htuple* FailRowBOut, Htuple* FailColBOut, Htuple* FailRowEOut, Htuple* FailColEOut)

void PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HTuple& Feature, const HTuple& Operation, const HTuple& Min, const HTuple& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut)

static void HMisc::PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HTuple& Feature, const HString& Operation, const HTuple& Min, const HTuple& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut)

static void HMisc::PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HString& Feature, const HString& Operation, const HString& Min, const HString& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut)

static void HMisc::PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const char* Feature, const char* Operation, const char* Min, const char* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut)

static void HMisc::PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const wchar_t* Feature, const wchar_t* Operation, const wchar_t* Min, const wchar_t* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut)   ( Windows only)

static void HOperatorSet.PartitionLines(HTuple rowBeginIn, HTuple colBeginIn, HTuple rowEndIn, HTuple colEndIn, HTuple feature, HTuple operation, HTuple min, HTuple max, out HTuple rowBeginOut, out HTuple colBeginOut, out HTuple rowEndOut, out HTuple colEndOut, out HTuple failRowBOut, out HTuple failColBOut, out HTuple failRowEOut, out HTuple failColEOut)

static void HMisc.PartitionLines(HTuple rowBeginIn, HTuple colBeginIn, HTuple rowEndIn, HTuple colEndIn, HTuple feature, string operation, HTuple min, HTuple max, out HTuple rowBeginOut, out HTuple colBeginOut, out HTuple rowEndOut, out HTuple colEndOut, out HTuple failRowBOut, out HTuple failColBOut, out HTuple failRowEOut, out HTuple failColEOut)

static void HMisc.PartitionLines(HTuple rowBeginIn, HTuple colBeginIn, HTuple rowEndIn, HTuple colEndIn, string feature, string operation, string min, string max, out HTuple rowBeginOut, out HTuple colBeginOut, out HTuple rowEndOut, out HTuple colEndOut, out HTuple failRowBOut, out HTuple failColBOut, out HTuple failRowEOut, out HTuple failColEOut)

def partition_lines(row_begin_in: Sequence[int], col_begin_in: Sequence[int], row_end_in: Sequence[int], col_end_in: Sequence[int], feature: MaybeSequence[str], operation: str, min: MaybeSequence[Union[int, float, str]], max: MaybeSequence[Union[int, float, str]]) -> Tuple[Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int]]

描述

算子 partition_linespartition_linesPartitionLinesPartitionLinesPartitionLinespartition_lines divides lines into two sets according to various criteria. For each input line the indicated features (FeatureFeatureFeatureFeaturefeaturefeature) are calculated. If each (OperationOperationOperationOperationoperationoperation = 'and'"and""and""and""and""and") or at least one (OperationOperationOperationOperationoperationoperation = 'or'"or""or""or""or""or") of the calculated features is within the given limits (MinMinMinMinminmin,MaxMaxMaxMaxmaxmax) the line is transferred into the first set (parameters RowBeginOutRowBeginOutRowBeginOutRowBeginOutrowBeginOutrow_begin_out to ColEndOutColEndOutColEndOutColEndOutcolEndOutcol_end_out), otherwise into the second set (parameters FailRowBOutFailRowBOutFailRowBOutFailRowBOutfailRowBOutfail_row_bout to FailColEOutFailColEOutFailColEOutFailColEOutfailColEOutfail_col_eout). The default values 'min'"min""min""min""min""min"'max'"max""max""max""max""max" of the parameters MinMinMinMinminminMaxMaxMaxMaxmaxmax are used to leave bottom and top limit, respectively, open. Possible values for FeatureFeatureFeatureFeaturefeaturefeature:

'length'

(Euclidean) length of the line

'row'

Line index of the center

'column'

Column index of the center

'phi'

Orientation of the line

注意

If only one feature is used the value of OperationOperationOperationOperationoperationoperation is meaningless. Several features are processed according to the sequence in which they are passed.

执行信息

参数

RowBeginInRowBeginInRowBeginInRowBeginInrowBeginInrow_begin_in (输入控制)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the starting points of the input lines.

ColBeginInColBeginInColBeginInColBeginIncolBeginIncol_begin_in (输入控制)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the starting points of the input lines.

RowEndInRowEndInRowEndInRowEndInrowEndInrow_end_in (输入控制)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the ending points of the input lines.

ColEndInColEndInColEndInColEndIncolEndIncol_end_in (输入控制)  line.end.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the ending points of the input lines.

FeatureFeatureFeatureFeaturefeaturefeature (输入控制)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Features to be used for selection.

值列表: 'column'"column""column""column""column""column", 'length'"length""length""length""length""length", 'phi'"phi""phi""phi""phi""phi", 'row'"row""row""row""row""row"

OperationOperationOperationOperationoperationoperation (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Desired combination of the features.

值列表: 'and'"and""and""and""and""and", 'or'"or""or""or""or""or"

MinMinMinMinminmin (输入控制)  string(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Lower limits of the features or 'min'.

默认值: 'min' "min" "min" "min" "min" "min"

MaxMaxMaxMaxmaxmax (输入控制)  string(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Upper limits of the features or 'max'.

默认值: 'max' "max" "max" "max" "max" "max"

RowBeginOutRowBeginOutRowBeginOutRowBeginOutrowBeginOutrow_begin_out (输出控制)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the starting points of the lines fulfilling the conditions.

ColBeginOutColBeginOutColBeginOutColBeginOutcolBeginOutcol_begin_out (输出控制)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the starting points of the lines fulfilling the conditions.

RowEndOutRowEndOutRowEndOutRowEndOutrowEndOutrow_end_out (输出控制)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the ending points of the lines fulfilling the conditions.

ColEndOutColEndOutColEndOutColEndOutcolEndOutcol_end_out (输出控制)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the ending points of the lines fulfilling the conditions.

FailRowBOutFailRowBOutFailRowBOutFailRowBOutfailRowBOutfail_row_bout (输出控制)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the starting points of the lines not fulfilling the conditions.

FailColBOutFailColBOutFailColBOutFailColBOutfailColBOutfail_col_bout (输出控制)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the starting points of the lines not fulfilling the conditions.

FailRowEOutFailRowEOutFailRowEOutFailRowEOutfailRowEOutfail_row_eout (输出控制)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the ending points of the lines not fulfilling the conditions.

FailColEOutFailColEOutFailColEOutFailColEOutfailColEOutfail_col_eout (输出控制)  line.end.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the ending points of the lines not fulfilling the conditions.

结果

算子 partition_linespartition_linesPartitionLinesPartitionLinesPartitionLinespartition_lines 在参数值正确时返回值 2 (H_MSG_TRUE)。否则将抛出异常。

可能的前趋

sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, thresholdthresholdThresholdThresholdThresholdthreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold, split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegionSplitSkeletonRegionsplit_skeleton_region, split_skeleton_linessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLinesSplitSkeletonLinessplit_skeleton_lines

可能的后继

set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, disp_linedisp_lineDispLineDispLineDispLinedisp_line

替代

line_orientationline_orientationLineOrientationLineOrientationLineOrientationline_orientation, line_positionline_positionLinePositionLinePositionLinePositionline_position, select_linesselect_linesSelectLinesSelectLinesSelectLinesselect_lines, select_lines_longestselect_lines_longestSelectLinesLongestSelectLinesLongestSelectLinesLongestselect_lines_longest

另见

select_linesselect_linesSelectLinesSelectLinesSelectLinesselect_lines, select_lines_longestselect_lines_longestSelectLinesLongestSelectLinesLongestSelectLinesLongestselect_lines_longest, detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegmentsDetectEdgeSegmentsdetect_edge_segments, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape

模块

基础