Halcon打印质量检测之variation_model_illumination.hdev

该示例展示了如何使用Halcon的变化模型进行打印质量检查。通过单张图像训练变化模型,然后将检测图像缩放以适应相同的灰度范围。通过创建可缩放的形状模板匹配和变化模型,实现对不同图像的打印缺陷检测。
摘要由CSDN通过智能技术生成

*本例子演示了使用变化模板进行打印质量检测,模板用单张图像训练而来。
*在应用检测之前,检测图像被放大或缩小,但是在同样的灰度范围

  • This example demonstrates the print inspection using
  • a variation model. The variation model is trained
  • using a single model image. Before applying the print inspection,
  • the images are scaled to the same gray value range like the model.

*关闭更新
dev_update_off ()
*关闭窗体
dev_close_window ()

  • 读取模板图像,初始化显示
  • Read model image and init visualization
    *读取图像
    read_image (ModelImage, ‘cap_illumination/cap_illumination_01’)
    *获取图像尺寸
    get_image_size (ModelImage, Width, Height)
    *打开新窗体
    dev_open_window (0, 0, Width / 2, Height / 2, ‘black’, WindowHandle)
    *设置字体
    set_display_font (WindowHandle, 14, ‘mono’, ‘true’, ‘false’)
  • 分割模板区域
  • Segment model region
    *显示模板图像
    dev_display (ModelImage)
    *获取模板区域
    get_model_region (ModelImage, RegionRO
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值