从 PHP / JS 中的图像中识别 EAN / UPC 条形码编号?
我正在寻找一种方法来从 PHP 或 Javascript 中的相机捕获的图像中识别 EAN / UPC(主要是 EAN)条形码数字。我找到了一些 Java 库,但理想情况下希望使用 PHP 或 JS 之一来管理它。不确定是否可行,但任何建议表示赞赏!
编辑:尝试了 http://zxing.org/w/decode.jspx 以及来自的一些示例图像iPod Touch 摄像头的成功有好有坏。
I'm looking for a way to identify EAN / UPC (primarily EAN) barcode numerals from a camera-captured image in PHP or Javascript. I've found a few libraries for Java but ideally would like one of PHP or JS to manage it. Not sure if feasible, but any advice appreciated!
Edit: tried http://zxing.org/w/decode.jspx with some sample images from iPod Touch camera, with mixed success.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
http://tobeytailor.s3.amazonaws.com/get_barcode_from_image/index.html
http://tobeytailor.s3.amazonaws.com/get_barcode_from_image/index.html
我做了一个项目,这是一个要求,所以我们最终使用了这个库。 http://sourceforge.net/projects/zbar/
一位与我一起工作的顾问同事写了一张图片裁剪工具,允许用户将上传的图像裁剪为条形码,然后使用 sqlite 将其推入 ghetto MQ,其中机器上运行的常驻代理轮询 sqlite 并处理待处理记录( transaction_id、path2file、date trx )通过 Web 服务调用将结果报告回应用程序。
我是为这个功能请求进行研发的人,我不记得有任何 PHP 和 Python 的条形扫描库学起来并不那么痛苦,只需掌握守护 python 脚本以作为服务运行即可阅读 urllib2 以将响应发送回 PHP 应用程序。我们两个人花了 48 个小时完成了这件事,再加上 15-20 个小时来充分了解 Python,这应该是可行的。
I did a project where this was a requirement so we ended up using this library. http://sourceforge.net/projects/zbar/
A fellow consultant working with me wrote up an image crop tool that allowed a user to crop an uploaded image down to just the barcode, this was then shoved into a ghetto MQ using sqlite, where a resident agent running on the machine polled sqlite and processing pending records ( transaction_id, path2file, date of trx ) reported back to the application via a web service call the result.
I was the one that did the R&D for this feature request and I don't remember any bar scanning libraries for PHP plus Python isn't so painful to learn, just got to master daemonizing a python script to run as a service then read up on urllib2 for sending the response back to the PHP app. We did it in 48 man hours between two people, add another 15-20 hours to learn enough about Python and it should be doable.
我认为你可以使用一些 api 来帮助你的项目。
检查的答案在程序语言和更新数据方面有一些限制。
我们有几种不同类型的 EAN 代码。
我们可以称它们为 Gtin 代码。
它的长度可以是 8、12、13 或 14 位数字。
你可以使用这个数据库:
https://market.mashape.com/mignify/gtin2product
这是一个非常用户友好和智能的API,您可以使用它直接通过gtin获取产品信息。它还可以帮助您从电子商务网站中提取页面信息。
希望可以帮助U。
I think u could use some api to help you in your project.
the checked answer has some limits in the program language and update data.
We have several different types of EAN code.
We can call them Gtin code.
It could be 8, 12, 13 or 14 digits long.
You could use this database:
https://market.mashape.com/mignify/gtin2product
It's a very user friendly and intelligent API, U can use it to get directly the product information by gtin. Also It could help u to extract the information of a page from E-commerce site.
Hope could help U.