二维码读取之2d_data_codes_rectify_symbol.hdev
*这个实例展示了如何读取一个经过修正的倾斜的条码
- This program demonstrates how to read a slanted
- 2d data code by preprocessing with rectification
- 关闭更新
dev_update_off ()
*关闭窗体
dev_close_window ()
*获取图像并且显示 - Get the image and display it
read_image (Image_slanted, ‘datacode/ecc200/ecc200_to_preprocess_001’)
*打开适合图像尺寸的窗体
dev_open_window_fit_image (Image_slanted, 0, 0, -1, -1, WindowHandle)
*设置显示字体
set_display_font (WindowHandle, 14, ‘mono’, ‘true’, ‘false’)
*设置显示颜色
dev_set_color (‘green’)
*设置线宽
dev_set_line_width (3)
*信息
Message := ‘This program demonstrates how to preprocess’
Message[1] := ‘a slanted 2d data code with rectification’
Message[2] := ‘before reading the data code symbol.’
*显示Message
disp_message (WindowHandle, Message, ‘window’, 12, 12, ‘black’, ‘true’)
*右下角显示’Press F5 TO continue’
disp_continue_message (WindowHandle, ‘black’, ‘true’)
stop ()
*初始化坐标 - Initialize coordinates
XCoordCorners := [130,225,290,63]
YCoordCorners := [101,96,289,269] - 显示倾斜图像四角坐标
- Display the slanted image and the corners of the symbol
gen_cross_contour_xld (Crosses, XCoordCorners, YCoordCorners, 6, 0.785398)
*显示图像
dev_display (Image_slanted)
*显示十字叉
dev_display (Crosses)
*显示图像
disp_message (WindowHandle, ‘Slanted image’, ‘window’, 12, 12, ‘black’, ‘true’)
Message := ‘The marked corners are used to generate a’
Message[1] := ‘homogeneous transformation matrix which’
Message[2] := ‘defines the projective transformation for’
Message[3] := ‘the rectification of the symbol.’
*显示信息
disp_message (WindowHandle, Message, ‘window’, 380, 12, ‘black’, ‘true’)
*右下角显示’Press F5 TO continue’
disp_continue_message (WindowHandle, ‘black’, ‘true’)
stop () - 第一步,用条码四角现有的点生成一个从四角点到修正后的条码正方形的变换矩阵
- First generate a transformation matrix using the given points
- of the corners of the data code symbol and the corresponding points
- of a quare.
*求投影矩阵变换
hom_vector_to_proj_hom_mat2d (XCoordCorners, YCoordCorners, [1,1,1,1], [70,270,270,70], [100,100,300,300], [1,1,1,1], ‘normalized_dlt’, HomMat2D) - 通过投影变换纠正倾斜图像
- Now rectifiy the slanted image by applying the projective transformation
projective_trans_image (Image_slanted, Image_rectified, HomMat2D, ‘bilinear’, ‘false’, ‘false’) - 创建二维码读取器,并且在纠正图像中读取二维码
- Create the data code model and search
- for the data code in the rectified image
*创建一维码读取器
create_data_code_2d_model (‘Data Matrix ECC 200’, [], [], DataCodeHandle)
*读取二维码
find_data_code_2d (Image_rectified, SymbolXLDs, DataCodeHandle, [], [], ResultHandles, DecodedDataStrings) - 显示结果
- Display result
dev_display (Image_slanted)
*显示元图像
dev_display (Image_rectified)
*显示二维码区域
dev_display (SymbolXLDs)
*显示信息
disp_message (WindowHandle, 'Decoding successful ', ‘window’, 12, 12, ‘black’, ‘true’)
*设置显示字体
set_display_font (WindowHandle, 12, ‘mono’, ‘true’, ‘false’)
*显示信息
disp_message (WindowHandle, DecodedDataStrings, ‘window’, 350, 70, ‘forest green’, ‘true’) - 清除句柄,释放内存
- Clear the data code model
clear_data_code_2d_model (DataCodeHandle)
二维码读取之2d_data_codes_rectify_symbol.hdev相关推荐
- 二维码读取之PDF_417_bottle.hdev
*本例子展示了如何读取PDF 417的条码 This programs shows how to read 2d data codes of type PDF 417. 关闭更新 dev_update ...
- 二维码读取之ecc200_small_modules_robustness.hdev
*这个实例演示了如何读取非常小的ECC200二维码 This example program shows how to find and decode ECC200 symbols that have ...
- 二维码读取之ecc200_contrast_tolerance.hdev
*这个示例程序演示了contrast_tolerance(对比差异,也就是在某些场合检测表面对比度不均匀情况下需要这个参数) *这个参数对条码读取效果的影响 This example demonstr ...
- 扫描二维码读取文档_使用深度学习读取和分类扫描的文档
扫描二维码读取文档 To many people's dismay, there is still a giant wealth of paper documents floating out the ...
- 解决自动分析仪条码二维码读取的方案
随着物联网技术的发展,越来越多的企业开始采用条码二维码读取技术来提高企业的生产效率和管理水平.条码二维码读取技术可以帮助企业自动识别和跟踪物品,从而提高企业的生产效率和管理水平.用于检查体液或组织部位 ...
- 二维码读取之ecc200_simple.dev
*在这个实例中,演示了如何读取Data Matrix ECC 200的条码,第一步呢就是,创建一个二维码读取器,在图形窗口中显示结果 This example program demonstrates ...
- 视觉检测应用之电路板二维码读取
5G时代的到来,对广大电路板企业的研发.生产以及管理能力提出了更高的要求,企业须以更快的速度向市场提供更具有成本效益的产品,提升产品管理追溯效率也是其中非常重要的一环.在电路板上标记字符.图案.一维码 ...
- 手机显示屏二维码读取,产品视觉定位,外观视觉检测方案设计
[检测目的] 手机显示屏二维码读取,产品视觉定位,外观视觉检测应用等 [正面VCR] 根据目前的拍摄条件及效果,可以读取FPC上的二维码,但后续还要根据实际情况再确认 视野:24mm*18mm 视觉精 ...
- iOS QRcode识别及相册图片二维码读取识别
对二维码的处理及系统原生API扫描. Zbar扫描和Zing扫描 比较 iOS原生API 系统扫描的效率是最高,反正包括各种你见过的没见过的码,但是有一点我不是很清楚 iOS7 扫描二维码可以,但从相 ...
最新文章
- AI一分钟 | Facebook或将面临2万亿美元罚款;大疆寻求新一轮融资,估值150亿美元
- 【zt】我所经历的ERP项目的失败
- 云计算究竟能帮你具体做些什么事?
- linux4.19安装教程,树莓派4安装Ubuntu 19.10的教程详解
- 【C++深度剖析教程11】C++学习之编写代码实现复数类
- 两位动态数码管电子秒表c语言,清翔电子51单片机6课动态显示数码管作业秒表...
- mysql执行语句返回主键_mysql语句insert后返回主键
- 多个cpp文件生成so_荐tf_sampling_so.so等文件怎么生成(多种tf版本都可的顺利解决方法)...
- 行业动态_天才、忽悠与炮灰
- Github使用教程Git下载文件
- 深度学习简明教程系列 —— 经典模型(合集)
- 软考/软件设计师资料真题/软件设计师教程
- LTCC带通滤波器设计
- 【备忘】最新区块链开发入门到精通视频教程下载
- 概念模型向逻辑模型的转换
- vivo手机支持html,vivo手机也能刷门禁了,只有这三款手机支持,教你如何开通使用...
- 数据结构——左倾红黑树
- Zookeeper简单介绍
- Furucombo被盗1400万美元启示录:切勿过度授权
- 36家互联网大厂真实薪资曝光!平均月薪 25k+