fit_rectangle2_contour_xld

该示例程序演示了如何使用fit_rectangle2_contour_xld来检测金属零件上冲孔的制造错误,如孔洞内金属小突起。通过鲁棒地(即,具有异常抑制)拟合孔洞边缘的矩形,并使用dist_rectangle2_contour_points_xld计算边缘到矩形边的距离来检测这些错误。由于孔洞的角落略有圆润,因此需要额外处理以忽略错误检查中的角落。
摘要由CSDN通过智能技术生成
  • This example program shows how fit_rectangle2_contour_xld can be used to

  • detect manufacturing errors of punched holes in a metal part. The errors

  • show up as small protrusions of the metal into the hole. They can be detected

  • by fitting rectangles to the edges of the hole robustly (i.e., with outlier

  • suppression) and the calculating the distances of the edges to the rectangle

  • sides using dist_rectangle2_contour_points_xld. Since the corners of the

  • holes are slightly rounded, some extra processing must be performed to

  • disregard the corners in the check for errors.
    dev_update_off ()
    read_image (Image, ‘punched_holes’)
    get_image_size (Image, Width, Height)
    dev_close_window ()
    dev_open_window (0, 0, Width, Height, ‘black’, WindowHandle)
    set_display_font (WindowHandle, 16, ‘mono’, ‘true’, ‘false’)
    dev_display (Image)

    <
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值