当前位置:网站首页>LEADTOOLS如何检测,读取和写入条形码
LEADTOOLS如何检测,读取和写入条形码
2020-11-06 22:27:51 【roffey】
工作场所中存在许多多页的文件。能够加载、拆分和提取是许多应用程序的重要需求。一些最常见的多页文件类型是:PDF,TIFF和Microsoft Office格式,例如Docx,Doc,Xls和Xlsx。LEADTOOLS支持所有这些格式以及30多种其他多页格式。由于存在多种不同类型的多页格式,因此尝试支持常见的格式可能会让人头疼,而试图支持所有这些格式的也像一场噩梦。幸运的是,LEADTOOLS SDK可以用不到五行代码来完成此应用程序。
LEADTOOLS (Lead Technology)由Moe Daher and Rich Little创建于1990年,其总部设在北卡罗来纳州夏洛特。LEAD的建立是为了使Daher先生在数码图象与压缩技术领域的发明面向市场。在过去超过30年的发展历程中,LEAD以其在全世界主要国家中占有的市场领导地位,在数码图象开发工具领域中已成为既定的全球领导者。LEADTOOLS开发与发布的LEAD是屡获殊荣的开发工具包。
在对条形码内的机器可读数据进行编码和解码时,速度和准确性是关键。LEADTOOLS提供的顶级计算机视觉条形码库比市场上任何其他条形码SDK都更快,更可靠,从而确保您始终获得最佳结果。
无论是在驾照背面找到的PDF417条码,在贴纸上是QR条码,还是在产品背面是UPC条码,LEADTOOLS都可以支持它以及100多种不同的条码符号。
只需四行代码,您就可以确定条形码的符号体系,范围等等。无论角度或颜色如何,都可以快速找到并解码所有受支持的符号体系。为了提高准确性,LEAD提供了许多不同的配置选项,例如EnableDoublePass,EnablePreprocessing和EnableFastMode,以修改条形码解码的行为以适合您的应用程序需求。
下面的C#代码向您展示了检测和解码图像中的条形码所需的一切。如果您需要完整的分步教程,请查看我们的教程,该指南介绍了如何检测和提取条形码以及将1D和2D条形码写入图像。
// READ BARCODE
static void ReadBarcode(RasterImage image)
{
BarcodeEngine barcodeEngineInstance = new BarcodeEngine();
try
{
BarcodeData[] dataArray = barcodeEngineInstance.Reader.ReadBarcodes(image, LeadRect.Empty, 0, null);
StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} barcode(s) found", dataArray.Length);
sb.AppendLine();
for (int i = 0; i < dataArray.Length; i++)
{
BarcodeData data = dataArray[i];
sb.AppendFormat("Symbology: {0}, Location: {1}, Data: {2}", data.Symbology.ToString(), data.Bounds.ToString(), data.Value);
sb.AppendLine();
}
Console.WriteLine(sb.ToString());
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Console.ReadLine();
}
// GENERATE BARCODE
static void WriteUPCABarcode(RasterImage image)
{
BarcodeData data = new BarcodeData
{
Symbology = BarcodeSymbology.UPCA,
Value = "01234567890",
Bounds = new LeadRect(10, 10, 600, 200)
};
OneDBarcodeWriteOptions options = new OneDBarcodeWriteOptions
{
EnableErrorCheck = true,
TextPosition = BarcodeOutputTextPosition.Default
};
barcodeEngine.Writer.WriteBarcode(image, data, options);
}
试试看!
要自己进行测试,请确保从我们的网站上免费获得最新的LEADTOOLS SDK评估(如果尚未安装)。该试用版有效期为60天。
请继续关注,我们将继续发布更多教程,程序员可以使用这些教程来开发直接影响数据捕获,识别,交换和其他紧迫业务需求的应用程序。
版权声明
本文为[roffey]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4587239/blog/4484607
边栏推荐
- C++ 数字、string和char*的转换
- C++学习——centos7上部署C++开发环境
- C++学习——一步步学会写Makefile
- C++学习——临时对象的产生与优化
- C++学习——对象的引用的用法
- C++编程经验(6):使用C++风格的类型转换
- Won the CKA + CKS certificate with the highest gold content in kubernetes in 31 days!
- C + + number, string and char * conversion
- C + + Learning -- capacity() and resize() in C + +
- C + + Learning -- about code performance optimization
猜你喜欢
-
C + + programming experience (6): using C + + style type conversion
-
Latest party and government work report ppt - Park ppt
-
在线身份证号码提取生日工具
-
Online ID number extraction birthday tool
-
️野指针?悬空指针?️ 一文带你搞懂!
-
Field pointer? Dangling pointer? This article will help you understand!
-
HCNA Routing&Switching之GVRP
-
GVRP of hcna Routing & Switching
-
Seq2Seq实现闲聊机器人
-
【闲聊机器人】seq2seq模型的原理
随机推荐
- LeetCode 91. 解码方法
- Seq2seq implements chat robot
- [chat robot] principle of seq2seq model
- Leetcode 91. Decoding method
- HCNA Routing&Switching之GVRP
- GVRP of hcna Routing & Switching
- HDU7016 Random Walk 2
- [Code+#1]Yazid 的新生舞会
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- HDU7016 Random Walk 2
- [code + 1] Yazid's freshman ball
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- Qt Creator 自动补齐变慢的解决
- HALCON 20.11:如何处理标定助手品质问题
- HALCON 20.11:标定助手使用注意事项
- Solution of QT creator's automatic replenishment slowing down
- Halcon 20.11: how to deal with the quality problem of calibration assistant
- Halcon 20.11: precautions for use of calibration assistant
- “十大科学技术问题”揭晓!|青年科学家50²论坛
- "Top ten scientific and technological issues" announced| Young scientists 50 ² forum
- 求反转链表
- Reverse linked list
- js的数据类型
- JS data type
- 记一次文件读写遇到的bug
- Remember the bug encountered in reading and writing a file
- 单例模式
- Singleton mode
- 在这个 N 多编程语言争霸的世界,C++ 究竟还有没有未来?
- In this world of N programming languages, is there a future for C + +?
- es6模板字符
- js Promise
- js 数组方法 回顾
- ES6 template characters
- js Promise
- JS array method review
- 【Golang】️走进 Go 语言️ 第一课 Hello World
- [golang] go into go language lesson 1 Hello World