partition_linesPartitionLinesPartitionLinespartition_linesT_partition_lines
Short description
partition_linesPartitionLinesPartitionLinespartition_linesT_partition_lines β Partition lines according to various criteria.
Warning
partition_linesPartitionLines is obsolete and is only provided for
reasons of backward compatibility.
Signature
partition_lines( line.begin.y RowBeginIn, line.begin.x ColBeginIn, line.end.y RowEndIn, line.end.x ColEndIn, string Feature, string Operation, string Min, string Max, out line.begin.y RowBeginOut, out line.begin.x ColBeginOut, out line.end.y RowEndOut, out line.begin.x ColEndOut, out line.begin.y FailRowBOut, out line.begin.x FailColBOut, out line.end.y FailRowEOut, out line.end.x 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 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 )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]]
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 )
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 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 )
Description
The operator partition_linesPartitionLines divides lines into two sets
according to various criteria. For each input line the indicated
features (Featurefeaturefeature) are calculated. If each
(Operationoperationoperation = 'and'"and") or at least one
(Operationoperationoperation = 'or'"or") of the calculated features is within
the given limits (Minminmin,Maxmaxmax) the line is
transferred into the first set (parameters RowBeginOutrowBeginOutrow_begin_out to
ColEndOutcolEndOutcol_end_out), otherwise into the second set (parameters
FailRowBOutfailRowBOutfail_row_bout to FailColEOutfailColEOutfail_col_eout).
The default values 'min'"min" and 'max'"max" of the parameters
Minminmin and Maxmaxmax are used to leave bottom and top limit,
respectively, open.
\(Min_{i} \leq Feature_{i}(Line) \leq Max_{i}\) \
Possible values for Featurefeaturefeature:
-
βlengthβ (Euclidean) length of the line
-
βrowβ Line index of the center
-
βcolumnβ Column index of the center
-
βphiβ Orientation of the line \(-\frac{\pi}{2} < \varphi \leq \frac{\pi}{2}\))
Attention
If only one feature is used the value of Operationoperationoperation 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
RowBeginInrowBeginInrow_begin_in (input_control) line.begin.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the starting points of the
input lines.
ColBeginIncolBeginIncol_begin_in (input_control) line.begin.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the starting points of the
input lines.
RowEndInrowEndInrow_end_in (input_control) line.end.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the ending points of the
input lines.
ColEndIncolEndIncol_end_in (input_control) line.end.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the ending points of the
input lines.
Featurefeaturefeature (input_control) string(-array) β (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)
Features to be used for selection.
List of values: 'column', 'length', 'phi', 'row'"column", "length", "phi", "row"
Operationoperationoperation (input_control) string β (string)HTuple (HString)HTuple (string)strHtuple (char*)
Desired combination of the features.
List of values: 'and', 'or'"and", "or"
Minminmin (input_control) string(-array) β (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)
Lower limits of the features or βminβ.
Default: 'min'"min"
Maxmaxmax (input_control) string(-array) β (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)
Upper limits of the features or βmaxβ.
Default: 'max'"max"
RowBeginOutrowBeginOutrow_begin_out (output_control) line.begin.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the starting points of the
lines fulfilling the conditions.
ColBeginOutcolBeginOutcol_begin_out (output_control) line.begin.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the starting points of the
lines fulfilling the conditions.
RowEndOutrowEndOutrow_end_out (output_control) line.end.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the ending points of the
lines fulfilling the conditions.
ColEndOutcolEndOutcol_end_out (output_control) line.begin.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the ending points of the
lines fulfilling the conditions.
FailRowBOutfailRowBOutfail_row_bout (output_control) line.begin.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the starting points of the
lines not fulfilling the conditions.
FailColBOutfailColBOutfail_col_bout (output_control) line.begin.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the starting points of the
lines not fulfilling the conditions.
FailRowEOutfailRowEOutfail_row_eout (output_control) line.end.y-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Row coordinates of the ending points of the
lines not fulfilling the conditions.
FailColEOutfailColEOutfail_col_eout (output_control) line.end.x-array β (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Column coordinates of the ending points of the
lines not fulfilling the conditions.
Result
The operator partition_linesPartitionLines returns the value 2 (H_MSG_TRUE) if the
parameter values are correct. Otherwise an exception is raised.
Combinations with other operators
Combinations
Possible predecessors
sobel_ampSobelAmp, edges_imageEdgesImage, thresholdThreshold, hysteresis_thresholdHysteresisThreshold, split_skeleton_regionSplitSkeletonRegion, split_skeleton_linesSplitSkeletonLines
Possible successors
set_line_widthSetLineWidth, disp_lineDispLine
Alternatives
line_orientationLineOrientation, line_positionLinePosition, select_linesSelectLines, select_lines_longestSelectLinesLongest
See also
select_linesSelectLines, select_lines_longestSelectLinesLongest, detect_edge_segmentsDetectEdgeSegments, select_shapeSelectShape
Module
Foundation