zoukankan      html  css  js  c++  java
  • halcon采集一幅图像

    **顺序也很重要,必须现有窗口,才能设置属性

    dev_close_window()
    dev_open_window (0, 0, 1400, 1200, 'black', WindowHandle)
    dev_set_draw ('margin')
    dev_set_color('green')
    dev_set_line_width(5)
    dev_update_window('off')
    * Image Acquisition 01: Code generated by Image Acquisition 01
    open_framegrabber ('DahengCAM', 1, 1, 0, 0, 0, 0, 'interlaced', 8, 'rgb', -1, 'false', 'SV-xxxx', '1', 1, -1, AcqHandle)
    grab_image_start (AcqHandle, -1)
    ** 必须是2行,第一行不出结果(是黑色图像)
    grab_image_async (Image, AcqHandle, -1)
    grab_image_async (Image, AcqHandle, -1)
    * Image Acquisition 01: Do something

    create_bar_code_model ([], [], BarCodeHandle)
    find_bar_code (Image, SymbolRegions, BarCodeHandle, 'Code 128', DecodedDataStrings)

    dev_display (Image)
    dev_display (SymbolRegions)
    if(|DecodedDataStrings|>0)
    set_tposition (WindowHandle, 24, 12)
    write_string (WindowHandle, DecodedDataStrings)
    endif



    close_framegrabber (AcqHandle)
    clear_bar_code_model (BarCodeHandle)

  • 相关阅读:
    752.打开转盘锁
    733. 图像渲染
    704.二分查找
    leetcode 87 Scramble String
    找实习总结
    leetcode 44 Wildcard Matching
    Linux,网络编程接口记录
    leetcode 172 Factorial Trailing Zeroes
    leetcode 168 Excel Sheet Column Title
    leetcode 65 Valid Number
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/7359678.html
Copyright © 2011-2022 走看看