案例-條形碼和二維碼

案例四:條碼

算子介紹:create_bar_code_model()創建條形碼模型算子

find_bar_code()識別條形碼算子

create_data_code_2d_model()創建二維碼模型

find_data_code_2d()識別二維碼

read_image(C79iJtv5yGZq36Gm3g, '1.png')
rgb1_to_gray (C79iJtv5yGZq36Gm3g,GrayImage)
*創建條碼模型
create_bar_code_model([], [], BarCodeHandle)
*條碼識別
find_bar_code(GrayImage, SymbolRegions1, BarCodeHandle, 'auto', DecodedDataStrings3)
disp_message(3600, DecodedDataStrings3, 'window', 12, 12, 'black', 'true')
*二維碼識別
read_image (Image,'2-UTF-8.png')
rgb1_to_gray(Image, GrayImage1)
*創建二維碼模型
create_data_code_2d_model('QR Code', [], [], DataCodeHandle)
*二維碼識別
find_data_code_2d(GrayImage1, SymbolXLDs2, DataCodeHandle, 'train', 'all', ResultHandles2,DecodedDataStrings)
disp_message(3600, DecodedDataStrings, 'window', 12, 12, 'black', 'true')
read_image(Image1, '3-GB2312.png')
rgb1_to_gray(Image1, GrayImage2)
find_data_code_2d(GrayImage2, SymbolXLDs1, DataCodeHandle, 'train', 'all', ResultHandles1,DecodedDataStrings2)
disp_message(3600, DecodedDataStrings2, 'window', 12, 12, 'black', 'true')
*清楚模型
clear_bar_code_model(BarCodeHandle)
clear_data_code_2d_model(DataCodeHandle)

在這裏插入圖片描述在這裏插入圖片描述

  •                          圖1
    
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章