zoukankan      html  css  js  c++  java
  • halcon连续采集图像

    dev_close_window()
    dev_update_window('off')
    create_bar_code_model ([], [], BarCodeHandle)
    dev_open_window (0, 0, 1400, 1200, 'black', WindowHandle)
    dev_set_line_width(10)
    dev_set_draw ('margin')
    * 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)
    while (true)
    grab_image_async (Image, AcqHandle, -1)
    * Image Acquisition 01: Do something
    find_bar_code (Image, SymbolRegions, BarCodeHandle, 'Code 128', DecodedDataStrings)
    dev_display (Image)
    dev_display (SymbolRegions)
    if(|DecodedDataStrings|>0)
    smallest_rectangle1 (SymbolRegions, Row1, Column1, Row2, Column2)
    count_obj (SymbolRegions, Number)
    for Index:=0 to Number-1 by 1
    set_tposition (WindowHandle,Row1[Index]-20, Column1[Index]+20)
    write_string (WindowHandle, DecodedDataStrings[Index])
    endfor
    endif


    endwhile
    close_framegrabber (AcqHandle)
    clear_bar_code_model (BarCodeHandle)

  • 相关阅读:
    写在最前面
    Bzoj 2281 [Sdoi2011]黑白棋 题解
    bzoj3125: CITY 题解
    CDQZ 集训大总结
    CDQZ集训DAY10 日记
    CDQZ集训DAY9 日记
    CDQZ集训DAY7 日记
    CDQZ集训DAY6 日记
    CDQZ集训DAY5 日记
    CDQZ集训DAY4 日记
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/7359674.html
Copyright © 2011-2022 走看看