条码图像在C#代码39的转换? [英] barcode image to Code39 conversion in C#?

查看:379
本文介绍了条码图像在C#代码39的转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jpg格式的条形码图像,并希望从这些提取条码#。 !请帮助

I have barcode images in jpg format and want to extract barcode # from those. Please help!

推荐答案

查看CodeProject上的文章:的读取条形码,从图像 - 二

See the CodeProject article: Reading Barcodes from an Image - II.

作者(的詹姆斯)提高了(和学分)一的以前写VB 库解码只使用.NET代码从图像条形码。

The author (James) improves (and credits) a previously written VB library to decode barcodes from an image using only .NET code.

有在可下载的解决方案两个项目:

There are two projects in the downloadable solution:


  • 条码库 - 用C#编写

  • 测试程序 - 用VB写的

我已经成功地使用了C#代码针对与扩展(包括阿尔法字符)代码39条码的JPG图像VS2008。

I have successfully used the C# code in VS2008 against a JPG image with an extended (includes alpha chars) code 39 barcode.

图书馆有扫描整个图像条形码的能力所在条形码是仅一部分。这有好的和坏的点。这是更灵活,但你可能要解析出的噪音。当然,你将要开始与干净的图像可能。此外,扫描条形码必须相当直的,以一个角度不旋转或倾斜

The library has the ability to scan an entire image for a barcode, where the barcode is only a portion. This has good and bad points. It is more flexible, but you may have to parse out noise. Of course, you will want to start with the cleanest image possible. Also, the scanned barcode must be fairly straight, not rotated or skewed at an angle.

如果可以将扫描限制到一个实际的条形码的切片,则可能会得到更好的精度。

If you can limit the scan to a "slice" of the actual barcode, you might get better accuracy.

在文章评论中,的其他用户提交 一个功能的重新扫描条形码和使用校验位,如果你控制了原条码印刷及可包括首先校验这是伟大的。

In the article comments, another user submits a function that re-scans the barcode and uses a checksum digit, which is great if you control the printing of the original barcode and can include the checksum in the first place.

有,当然由于改善的图像的一些非常可观的(和一些非常昂贵的)的商业解决方案,有一种被充分测试,更灵活的优点,可以扫描更多的条码格式,和更宽容的图像质量的采样。但是,这是一个很好的(免费的)开始!

There are, of course some very impressive (and some very expensive) commercial solutions that have the advantage of being well-tested, more flexible, can scan more barcode formats, and are more tolerant of image quality due to improved image sampling. But this is a good (free) start!

您将需要与CodeProject上注册下载代码,但是免费的也是 - 和价值的时候,因为没有在该网站上这么多优秀的代码

更新:顺便说一句,我只是看着的博客约阿希姆·Kerschbaumer 提到了另一个答案你的问题。绝对盯紧该项目!它看起来像一个非常强大的解决方案。如果它可以从那些忙碌的图像读取这些条形码歪斜,那么就可以做任何事情!

UPDATE: Incidentally, I just looked at the blog that Joachim Kerschbaumer mentions in another answer to your question. Definitely keep an eye on that project! It looks like a very robust solution. If it can read those skewed barcodes from those busy images, then it can do anything!

这篇关于条码图像在C#代码39的转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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