Operator Reference

partition_linesT_partition_linesPartitionLinesPartitionLinespartition_lines (Operator)

partition_linesT_partition_linesPartitionLinesPartitionLinespartition_lines — Partition lines according to various criteria.

Warning

partition_linespartition_linesPartitionLinesPartitionLinespartition_lines is obsolete and is only provided for reasons of backward compatibility.

Signature

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]]

Description

The operator partition_linespartition_linesPartitionLinesPartitionLinespartition_lines divides lines into two sets according to various criteria. For each input line the indicated features (FeatureFeatureFeaturefeaturefeature) are calculated. If each (OperationOperationOperationoperationoperation = 'and'"and""and""and""and") or at least one (OperationOperationOperationoperationoperation = 'or'"or""or""or""or") of the calculated features is within the given limits (MinMinMinminmin,MaxMaxMaxmaxmax) the line is transferred into the first set (parameters RowBeginOutRowBeginOutRowBeginOutrowBeginOutrow_begin_out to ColEndOutColEndOutColEndOutcolEndOutcol_end_out), otherwise into the second set (parameters FailRowBOutFailRowBOutFailRowBOutfailRowBOutfail_row_bout to FailColEOutFailColEOutFailColEOutfailColEOutfail_col_eout). The default values 'min'"min""min""min""min" and 'max'"max""max""max""max" of the parameters MinMinMinminmin and MaxMaxMaxmaxmax are used to leave bottom and top limit, respectively, open. Possible values for FeatureFeatureFeaturefeaturefeature:

'length'

(Euclidean) length of the line

'row'

Line index of the center

'column'

Column index of the center

'phi'

Orientation of the line

Attention

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

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

RowBeginInRowBeginInRowBeginInrowBeginInrow_begin_in (input_control)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the starting points of the input lines.

ColBeginInColBeginInColBeginIncolBeginIncol_begin_in (input_control)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the starting points of the input lines.

RowEndInRowEndInRowEndInrowEndInrow_end_in (input_control)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of the ending points of the input lines.

ColEndInColEndInColEndIncolEndIncol_end_in (input_control)  line.end.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of the ending points of the input lines.

FeatureFeatureFeaturefeaturefeature (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Features to be used for selection.

List of values: 'column'"column""column""column""column", 'length'"length""length""length""length", 'phi'"phi""phi""phi""phi", 'row'"row""row""row""row"

OperationOperationOperationoperationoperation (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Desired combination of the features.

List of values: 'and'"and""and""and""and", 'or'"or""or""or""or"

MinMinMinminmin (input_control)  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'.

Default: 'min' "min" "min" "min" "min"

MaxMaxMaxmaxmax (input_control)  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'.

Default: 'max' "max" "max" "max" "max"

RowBeginOutRowBeginOutRowBeginOutrowBeginOutrow_begin_out (output_control)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

ColBeginOutColBeginOutColBeginOutcolBeginOutcol_begin_out (output_control)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

RowEndOutRowEndOutRowEndOutrowEndOutrow_end_out (output_control)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

ColEndOutColEndOutColEndOutcolEndOutcol_end_out (output_control)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

FailRowBOutFailRowBOutFailRowBOutfailRowBOutfail_row_bout (output_control)  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.

FailColBOutFailColBOutFailColBOutfailColBOutfail_col_bout (output_control)  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.

FailRowEOutFailRowEOutFailRowEOutfailRowEOutfail_row_eout (output_control)  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.

FailColEOutFailColEOutFailColEOutfailColEOutfail_col_eout (output_control)  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.

Result

The operator partition_linespartition_linesPartitionLinesPartitionLinespartition_lines returns the value 2 ( H_MSG_TRUE) if the parameter values are correct. Otherwise an exception is raised.

Possible Predecessors

sobel_ampsobel_ampSobelAmpSobelAmpsobel_amp, edges_imageedges_imageEdgesImageEdgesImageedges_image, thresholdthresholdThresholdThresholdthreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold, split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegionsplit_skeleton_region, split_skeleton_linessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLinessplit_skeleton_lines

Possible Successors

set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width, disp_linedisp_lineDispLineDispLinedisp_line

Alternatives

line_orientationline_orientationLineOrientationLineOrientationline_orientation, line_positionline_positionLinePositionLinePositionline_position, select_linesselect_linesSelectLinesSelectLinesselect_lines, select_lines_longestselect_lines_longestSelectLinesLongestSelectLinesLongestselect_lines_longest

See also

select_linesselect_linesSelectLinesSelectLinesselect_lines, select_lines_longestselect_lines_longestSelectLinesLongestSelectLinesLongestselect_lines_longest, detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegmentsdetect_edge_segments, select_shapeselect_shapeSelectShapeSelectShapeselect_shape

Module

Foundation