【问题标题】:Halcon - Find Row coordinate of 2 points with smallest and biggest Col coordinatesHalcon - 查找具有最小和最大 Col 坐标的 2 个点的行坐标
【发布时间】:2020-11-23 12:33:22
【问题描述】:

我有一个可以有任何形状的区域。 (示例如下) 我需要找到用箭头指向的两个点的 ROW 坐标。 (区域的最左边和最右边的像素坐标。) 我已经设法用 minimum_rectangle1 获得 Col 坐标,但找不到提取给定点的 Row 坐标的方法。

如何做到这一点?

【问题讨论】:

    标签: row coordinates points region halcon


    【解决方案1】:

    这里是你可以使用的代码

    * get the points of the region contour
    get_region_contour (Region, Rows, Columns)
    
    * sort the Columns
    tuple_sort_index ( Columns, Indices)
    
    * Left point
    LeftIndex := Indices[0]
    LeftRow := Rows[LeftIndex]
    LeftColumn :=  Columns[LeftIndex]
    
    * Right point
    RightIndex := Indices[|Indices|-1]
    RightRow := Rows[RightIndex]
    RightColumn :=  Columns[RightIndex]
    

    【讨论】:

      猜你喜欢
      • 2013-10-22
      • 2013-02-27
      • 1970-01-01
      • 2020-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-20
      • 2021-07-31
      相关资源
      最近更新 更多