欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

入门指南:使用Halcon进行轮廓排序操作

最编程 2024-01-23 08:47:10
...

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

 

推荐阅读