如何通过条形码扫描仪阅读PDF417条形码 [英] How I can read PDF417 barcode through barcode scanner

查看:366
本文介绍了如何通过条形码扫描仪阅读PDF417条形码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须通过应用程序显示PDF417条形码,这里我可以显示但如果我通过扫描仪读取它无法检测为PDF417条形码。



我发现通过条形码扫描仪识别PDF417条码有问题,我怀疑这是因为右指示器和左指示器的计算错误。







i在找到左指示符代码字和右指示符代码字时引用此等式。即







集群



左行指示器

群集0 30x + y

群集3 30x + z

群集6 30x + v



右行指标

群集0 30x + v

群集3 30x + y

群集6 30x + z



其中:







x =(行号 - 1)/ 3



y =(行数 - 1)/ 3



z =(纠错级别)* 3 +(行数 - 1)mod 3



v =数据列数 - 1



这里



行数= 8



行数从1到8



错误修正等级= 4



数据列数= 2.







我在做什么是对的?请在此建议。



我的尝试:



因此我计算了簇和左行指示器的计算,并且我已经使用字节级作为选项,其中数据必须转换为基本900.然后我采用2d数组,其中我按行排列数据。

I have to display PDF417 barcode through the application, here iam able to display but if i read through the scanner it is not able to detect as PDF417 barcode.

I am finding problem in identifying PDF417 barcode through barcode scanner, iam suspecting that is because the calculation of right indicator and left indicator is wrong.



i referred this equation in finding Left indicator code word and right indicator code word. i.e



Cluster

Left Row Indicator
Cluster 0 30x + y
Cluster 3 30x + z
Cluster 6 30x + v

Right Row Indicator
Cluster 0 30x + v
Cluster 3 30x + y
Cluster 6 30x + z

Where:



x = (row number - 1) / 3

y = (number of rows – 1) / 3

z = (error correction level) * 3 + (number of rows – 1) mod 3

v = number of data columns – 1

here

number of rows = 8

row number from 1 to 8

error correction level = 4

number of data columns = 2.



What iam doing is right? please do suggest, on this.

What I have tried:

So calculation of cluster and the for left row indicator i have calculated and i have used byte level as option where the data must be converted into base 900. then i have take 2d array where i placed data accourding by row wise.

推荐答案

从头开始创建任何条形码总是很有趣 - 我有一段时间没有这样做(我曾经设计工业喷墨打印机,所以我实现了最多1D格式)但如果它不起作用,总是很难找出原因。 2D版本更加困难,因为有更多的变量。



所以首先找到一个有正确格式的有效条形码,扫描仪可以读取已知数据。

然后使用完全相同的数据来创建您的版本,并进行比较。要么将它们打印在薄纸上并用强光照射它们,要么将它们作为单独的层加载到一个好的绘图程序中 - GIMP可以这样做,但我使用PaintShop Pro,Photoshop也会这样做 - 然后降低不透明度最顶层,你可以看到差异。



当你知道它们不同的区域时,你可以开始看看这些区域是什么,为什么它们是不同 - 但是你首先需要这些信息,或者就你的代码中的问题而言,你只是在黑暗中吹口哨。
Creating any barcode from scratch is always fun - I've haven't done it for a while (I used to design industrial ink jet printers, so I've implemented most 1D formats) but if it doesn't work it's always hard to work out why. And 2D versions are more of a pain because there are more variables.

So start by finding a valid barcode in the right format with known data that your scanner can read.
Then use exactly the same data to create your version, and compare them. Either print them on thin paper and view through them both with a strong light, or load them as separate layers into a good paint program - GIMP may do, but I use PaintShop Pro, and Photoshop will also do it - then lower the opacity of the topmost layer so you can see the differences.

When you know the areas in which they differ, you can start looking at what those areas are, and why they are different - but you need that information first, or you are just whistling in the dark as far as the problem in your code is concerned.


这篇关于如何通过条形码扫描仪阅读PDF417条形码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆