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

Partition lines according to various criteria.

The operator ::partition_lines divides lines into two sets according to various criteria. For each input line the indicated features (Feature) are calculated. If each (Operation = 'and') or at least one (Operation = 'or') of the calculated features is within the given limits (Min,Max) the line is transferred into the first set (parameters RowBeginOut to ColEndOut), otherwise into the second set (parameters FailRowBOut to FailColEOut).

Condition:   Min_i <= Feature_i(Line) <= Max_i
Possible values for Feature:
  - 'length'       (Euclidean) length of the line
  - 'row'          Line index of the center
  - 'column'       Column index of the center
  - 'phi'          Orientation of the line (-pi/2 < phi <= pi/2)


Attention

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


Parameters

RowBeginIn (input_control)
line.begin.y-array -> HTuple.long
Row coordinates of the starting points of the input lines.

ColBeginIn (input_control)
line.begin.x-array -> HTuple.long
Column coordinates of the starting points of the input lines.

RowEndIn (input_control)
line.end.y-array -> HTuple.long
Row coordinates of the ending points of the input lines.

ColEndIn (input_control)
line.end.x-array -> HTuple.long
Column coordinates of the ending points of the input lines.

Feature (input_control)
string(-array) -> HTuple.char *
Features to be used for selection.
List of values: 'length', 'row', 'column', 'phi'

Operation (input_control)
string -> HTuple.char *
Desired combination of the features.
List of values: 'and', 'or'

Min (input_control)
string(-array) -> HTuple.char * / long / double
Lower limits of the features or 'min'.
Default value: 'min'

Max (input_control)
string(-array) -> HTuple.char * / long / double
Upper limits of the features or 'max'.
Default value: 'max'

RowBeginOut (output_control)
line.begin.y-array -> HTuple.long *
Row coordinates of the starting points of the lines fulfilling the conditions.

ColBeginOut (output_control)
line.begin.x-array -> HTuple.long *
Column coordinates of the starting points of the lines fulfilling the conditions.

RowEndOut (output_control)
line.end.y-array -> HTuple.long *
Row coordinates of the ending points of the lines fulfilling the conditions.

ColEndOut (output_control)
line.begin.x-array -> HTuple.long *
Column coordinates of the ending points of the lines fulfilling the conditions.

FailRowBOut (output_control)
line.begin.y-array -> HTuple.long *
Row coordinates of the starting points of the lines not fulfilling the conditions.

FailColBOut (output_control)
line.begin.x-array -> HTuple.long *
Column coordinates of the starting points of the lines not fulfilling the conditions.

FailRowEOut (output_control)
line.end.y-array -> HTuple.long *
Row coordinates of the ending points of the lines not fulfilling the conditions.

FailColEOut (output_control)
line.end.x-array -> HTuple.long *
Column coordinates of the ending points of the lines not fulfilling the conditions.


Result

The operator ::partition_lines returns the value H_MSG_TRUE if the parameter values are correct. Otherwise an exception is raised.


Possible Predecessors

::sobel_amp, ::edges_image, ::threshold, ::hysteresis_threshold, ::split_skeleton_region, ::split_skeleton_lines


Possible Successors

::set_line_width, ::disp_line


Alternatives

::line_orientation, ::line_position, ::select_lines, ::select_lines_longest


See also

::select_lines, ::select_lines_longest, ::detect_edge_segments, ::select_shape


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH