功能:检测并识别一维码。
THIK:支持的一维码类型有:【 ‘2/5 Industrial’, ‘2/5 Interleaved’, ‘Codabar’, ‘Code 128’, ‘Code 39’, ‘Code 93’, ‘EAN-13 Add-On 2’, ‘EAN-13 Add-On 5’, ‘EAN-13’, ‘EAN-8 Add-On 2’, ‘EAN-8 Add-On 5’, ‘EAN-8’, ‘GS1 DataBar Expanded Stacked’, ‘GS1 DataBar Expanded’, ‘GS1 DataBar Limited’, ‘GS1 DataBar Omnidir’, ‘GS1 DataBar Stacked Omnidir’, ‘GS1 DataBar Stacked’, ‘GS1 DataBar Truncated’, ‘GS1-128’, ‘MSI’, ‘PharmaCode’, ‘UPC-A Add-On 2’, ‘UPC-A Add-On 5’, ‘UPC-A’, ‘UPC-E Add-On 2’, ‘UPC-E Add-On 5’, ‘UPC-E’, ‘auto’】
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| read_image (Image, 'barcode/code128/code12801')
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle) set_display_font (WindowHandle, 16, 'mono', 'true', 'false') dev_set_draw ('margin') dev_set_line_width (3)
create_bar_code_model ([], [], BarCodeHandle) find_bar_code (Image, SymbolRegions, BarCodeHandle, 'auto', DecodedDataStrings) * get_bar_code_result (BarCodeHandle, 'all', 'decoded_types', BarCodeResults)
dev_clear_window () dev_display (Image) dev_display (SymbolRegions) disp_message (WindowHandle, DecodedDataStrings, 'window', 12, 12, 'black', 'true')
|
Author:
Mr.Gu
Permalink:
http://gushuaihao.github.io/2024/10/28/%E4%B8%80%E7%BB%B4%E7%A0%81%E8%AF%86%E5%88%AB/
License:
Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan:
Do you believe in DESTINY?