Halcon 基礎算子: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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM