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