天天看點

問題:sort_contours_xld

sort_contours_xld(Contours : SortedContours : SortMode, Order, RowOrCol : )

 功能:對xld進行排序

 排序方式:

'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.

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.

簡單注釋一下:

以外接矩形的相應頂點(左上,右上,左下,右下)為排序點,true時升序,false降序

character可以了解為 等于多次的左上點排序,避免重疊時卡bug

------------------------------------------------------------------------------------------------------

作者:97老徐

個簽:獨學無友,則孤陋而寡聞。一起成長,一起做一個靈魂有趣的人