Halcon视觉distance_pp-@龙熙视觉培训

这篇博客介绍了如何使用Halcon进行图像处理,通过读取图像、设置阈值和连接区域,选取特定形状并获取轮廓。接着,计算并显示了所选区域轮廓点与固定点之间的距离,详细展示了距离_pp函数的应用。
摘要由CSDN通过智能技术生成
  • Calculate the distance between two points

dev_close_window ()
read_image (Image, ‘mreut’)
dev_open_window (0, 0, 512, 512, ‘white’, WindowID)
dev_display (Image)
dev_set_color (‘black’)

在这里插入图片描述

threshold (Image, Region, 180, 255)

  • dev_clear_window ()
    dev_display (Region)
    connection (Region, ConnectedRegions)
    select_shape (ConnectedRegions, SelectedRegions, ‘area’, ‘and’, 10000, 100000000)
    get_region_contour (SelectedRegions, Rows, Columns)
    RowPoint := 80
    ColPoint := 250
    NumberTuple := |Rows|
    dev_set_color (‘red’)
    dev_set_draw (‘margin’)
  • Display a circle that represented one point
    gen_circle (Circle, RowPoint, ColPoint, 10)
    dev_display (Circle)
    dev_set_color (‘green’)
  • Calculate the distance between points of th
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值