Skip to content

select_linesSelectLinesSelectLinesselect_linesT_select_linesπŸ”—

Short descriptionπŸ”—

select_linesSelectLinesSelectLinesselect_linesT_select_lines β€” Select lines according to various criteria.

WarningπŸ”—

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

SignatureπŸ”—

select_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.end.x ColEndOut )void SelectLines( 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 )static void HOperatorSet.SelectLines( 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 )def select_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]]

Herror T_select_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 )

static void HMisc::SelectLines( 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 )

static void HMisc::SelectLines( 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 )

static void HMisc::SelectLines( 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 )

static void HMisc::SelectLines( 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 ) (Windows only)

static void HMisc.SelectLines( 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 )

static void HMisc.SelectLines( 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 )

DescriptionπŸ”—

The operator select_linesSelectLines chooses lines according to various criteria. For every 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 output. The default values 'min'"min" and 'max'"max" of the parameters Minminmin and Maxmaxmax are used to leave bottom and top limits, respectively, open.

Condition: \(Min_{i} \leq Feature_{i}(Line) \leq Max_{i}\) \

Possible values for Featurefeaturefeature:

  • 'length'"length" (Euclidean) length of the line

  • 'row'"row" Line index of the center

  • 'column'"column" Column index of the center

  • 'phi'"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πŸ”—

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.

Default: 'length'"length"
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.

Default: 'and'"and"
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 output lines.

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 output lines.

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 output lines.

ColEndOutcolEndOutcol_end_out (output_control) line.end.x-array β†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Column coordinates of the ending points of the output lines.

ResultπŸ”—

The operator select_linesSelectLines 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, partition_linesPartitionLines

See also

partition_linesPartitionLines, select_lines_longestSelectLinesLongest, detect_edge_segmentsDetectEdgeSegments, select_shapeSelectShape

ModuleπŸ”—

Foundation