Operators |
sort_contours_xld — Sort contours with respect to their relative position.
sort_contours_xld(Contours : SortedContours : SortMode, Order, RowOrCol : )
The operator sort_contours_xld sorts the contours with respect to their relative position. RowOrCol specifies the sorting criteria: 'row' sorts the contours with respect to the row coordinate of their position first and, if the row coordinates are identical, with respect to the column coordinate. In contrast, 'column' sorts contours according to the column coordinate first. SortMode defines the position of a contour by individual reference points. The following parameter values are available:
The position is determined by the upper left corner of the surrounding rectangle.
The position is determined by the upper right corner of the surrounding rectangle.
The position is determined by the lower left corner of the surrounding rectangle.
The position is determined by the lower right corner of the surrounding rectangle.
The position is determined by the upper left corner of the surrounding rectangle. In contrast to 'upper_left' , the contours are also sorted according to the remaining coordinate, if they overlap in the direction of the coordinate which is specified by the parameter RowOrCol.
The parameter Order determines whether the sorting order is increasing or decreasing: using 'true' the order will be increasing, using 'false' the order will be decreasing.
Contours to be sorted.
Sorted contours.
Kind of sorting.
Default value: 'upper_left'
List of values: 'character' , 'lower_left' , 'lower_right' , 'upper_left' , 'upper_right'
Increasing or decreasing sorting order.
Default value: 'true'
List of values: 'false' , 'true'
Sorting first with respect to row, then to column.
Default value: 'row'
List of values: 'column' , 'row'
If the parameters are correct, the operator sort_contours_xld returns the value 2 (H_MSG_TRUE). Otherwise an exception will be raised.
Foundation
Operators |