如何使用电脑摄像头读取二维码并打开网站 [Java] [英] How to use a computer's webcam to read a qr code and open a website [Java]
问题描述
首先让我简要描述一下我要完成的任务:
First let me provide a brief description of what I am trying to accomplish:
我正在尝试创建一个 Java 程序,该程序可以扫描/读取位于计算机网络摄像头前面的二维码(我将使用的二维码都只包含存储在其中的 url 信息).从二维码中获取到url后,我想让程序自动跳转到url.
I am trying to create a java program that can scan/read a qr code positioned in front of the computer webcam (The QR codes I would be using would all just have url information stored within them). After obtaining the url from the qr code I want to have the program automatically go to the url.
我的第一个问题是如何使用带有 Java 的计算机网络摄像头.我的第二个问题是,一旦捕获到二维码,我该如何解码.
My first question is how do I use a computer webcam with Java. My second question is how do I decode a QR code once one is captured.
感谢您的帮助.
或者,是否可以使用 .net 读取二维码?
Alternatively is it possible to read qr-codes with .net?
推荐答案
在 Java 中,您可以使用 LTI Civil 从网络摄像头捕获图像.然后将捕获的图像传递给 ZXing 以解码二维码.
In Java you could use LTI Civil to capture images from a webcam. Then pass the captured images to ZXing to decode the QR codes.
在 .NET 中,您可以使用 AForge 然后将图像传递给 ZXing.NET.
In .NET you could capture the images with AForge and then pass the images to ZXing.NET.
如果您需要更多信息,您应该提出更具体的问题.
If you need more information, you should ask a more specific question.
这篇关于如何使用电脑摄像头读取二维码并打开网站 [Java]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!