Halcon中的sort_region函数用于对区域进行排序。这个函数可以按照区域的不同属性对其进行排序,比如面积、周长等。下面是对该函数的详解: python sorted_regions = sort_region(regions, 'attribute', 'order', 'subregion') 参数解释: regions:待排序的区域,可以是单个区域或区域数组。 'attribute':排序所依据的属性...
sort_region (Region, SortedRegions,'first_point','true','row')*区域排序*参数1:原区域*参数2:排序后的区域*参数3:排序模式*'first_point':按照第一个点排序:一个区域的第一行的最前面的点*'last_point':按照最后一个点排序:一个区域的最后一行最后一列的那个点*'upper_left':外接矩形的左上角*'up...
halcon-sort_region区域排序 在HDevelop中 read_image (Image, 'D:/bb/tu/4.jpg') rgb1_to_gray(Image,Image1) threshold (Image1, Region,[80,87,206,195] , [90,100, 228,205]) sort_region (Region, SortedRegions, 'first_point', 'true', 'row') *区域排序 *参数1:原区域 *参数2:排序后...
halcon-sort_region区域排序 在HDevelop中 read_image (Image, 'D:/bb/tu/4.jpg')rgb1_to_gray(Image,Image1)threshold (Image1, Region,[80,87,206,195] , [90,100, 228,205])sort_region (Region, SortedRegions, 'first_point', 'true', 'row')*区域排序 *参数1:原区域 *参数2:排序后的...
'row': Regarded as rows, the reading direction is firstly from left to right and then from top to bottom. 'column': Regarded as columns, the reading direction is firstly from top to bottom and then from left to right. ForSortMode'character', a second numeric value can be passed toSort...
'character' The regions are treated like characters, which can be read horizontally or vertically. They are sorted according to the reading direction given byRowOrColwith the following specifications: 'row': Regarded as rows, the reading direction is firstly from left to right and then from top...
sort_region是个很有用的算子,在对多个Region进行排序时,经常用到。 算子含义:根据区域的相对位置对区域进行排序。(Sorting of regions with respect to their relative position.) 算子签名:sort_region(Regions : SortedRegions : SortMode, Order, RowOrCol : ) ...
'first_point' The point with the lowest column value in the first row of the region. 'last_point' The point with the highest column value in the last row of the region. 'upper_left' Upper left corner of the surrounding rectangle. ...
Upper left corner of the surrounding rectangle. 'upper_right' Upper right corner of the surrounding rectangle. 'lower_left' Lower left corner of the surrounding rectangle. 'lower_right' Lower right corner of the surrounding rectangle. The parameterOrderdetermines whether the sorting order is increasi...
'first_point' The point with the lowest column value in the first row of the region. 'last_point' The point with the highest column value in the last row of the region. 'upper_left' Upper left corner of the surrounding rectangle. ...