算子sort_contours_xld算子有5种排序方式,即:
'upper_left':
The position is determined by the upper left corner of the surrounding rectangle.
'upper_right':
The position is determined by the upper right corner of the surrounding rectangle.
'lower_left':
The position is determined by the lower left corner of the surrounding rectangle.
'lower_right':
The position is determined by the lower right corner of the surrounding rectangle.
'character':
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.
其中'character'排序方式不太好理解,不过从英文说明可知,它跟'upper_left'排序方式很像,我想一般来说,前面的四种排序方式一般够用了。
以'upper_left'排序方式为例,它的英文说明的翻译是:位置由环绕矩形的左上角决定。