Library for reading QR Codes using a Webcam
Asked Answered
M

3

6

I am looking for an open-source library that can read QR Codes using a laptop's integrated webcam.

Preferably, the library should be written in C#, but Java would be good as well. It should be able to run on a Windows 7 64-bit platform.

It is important that I have access to the decoded string, i.e. I don't want an application that opens up a URL in a browser. I have looked around and found libraries which either read the codes from image files, or use the webcam for input but do not allow access to the string. I haven't managed to find one which does quite what I want. Any pointers would be appreciated.

Thank you for your help and suggestions.

Moisture answered 4/3, 2012 at 21:17 Comment(0)
D
6

ZXing / Zebra Crossing is the software library behind the most popular QR-reading Android app called Barcode Scanner.

The core library is licensed under the Apache License 2.0 and it's robust for low-quality inputs (such as a webcam) and gives you the decoded content and lets you decide how to use it.

Donate answered 4/3, 2012 at 21:30 Comment(2)
Yes I did come across that but I was sort of hoping to find something ready.. It's for a really small project and I was kind of hoping that I wouldn't have to reinvent the wheel. Still, thanks for your input.Moisture
@Moisture ah i gotcha :), my mistake then, i assumed it took care of that. however, i have another answer for you, hope that one worked out better (re your WebBrowser Control Question).Hiller
T
2

This will most certainly help you out.

http://www.codeproject.com/KB/cs/qrcode.aspx All the best!

Touslesmois answered 18/5, 2012 at 7:6 Comment(4)
I'd seen that project but I think you have to load the QR image from a file. I wanted the image to be read automatically from a webcam..Moisture
Rachel, there are QR code based hardware which reads the QR code and throws the value where your cursor is pointing.Try buying them.If you do not want to follow that path, try using some native MAC apps which might solve the problem.There are some libraries which might be able to help you out in coding.Touslesmois
@Moisture Just write some code to grab a frame from the webcam (which would becoem a picture) and give the picture to the qrcode project on codeproject.com, you can access the webcam & take pics from it using DirectShow, mroe options on doing this here: social.msdn.microsoft.com/Forums/en/… and here is the VB.NET version of using DirectShow: codeproject.com/Articles/18511/Webcam-using-DirectShow-NETHiller
@Hiller This was posted a long time ago and there was a change of requirements so I didn't need to implement it. However, I don't think what you suggest would have worked because codeproject.com/Articles/20574/Open-Source-QRCode-Library takes only the QR code image - the image from the webcam would have a background and one would need to figure out where the QR code is located, crop it, rotate, etc...Moisture
M
0

There is a working solution here. It uses ZXing.NET and AForge.NET. Both can be installed via NuGet. Super easy. Super quick. It is reliable and even more efficient than some high-priced solutions.

Milesmilesian answered 7/2, 2024 at 11:22 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.