如何使用ASP.NET网页上的网络摄像头扫描二维码? [英] How to scan QR code using webcam from ASP.NET web page?

查看:692
本文介绍了如何使用ASP.NET网页上的网络摄像头扫描二维码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

我必须在Asp.net网页上使用网络摄像头扫描二维码。

目前我使用过Zxing和AForge.Net dll在Winform应用程序上创建了一个QR阅读器。但是我无法在Asp.net网页上这样做。



这里的问题是从现场网络摄像头源中捕获位图中的视频帧。并将转换为位图的帧发送到Zxing.Decoder()以解码QR码。



请帮助从网络摄像头获取实时信息并解码来自的QR码它。



PS:我有很多解决方案可以将预先捕获的图像上传到Web服务器进行解码,但这不是我的要求。我的要求是直接从网络摄像头源捕获QR码并对其进行解码。



请帮忙。谢谢。



我尝试过:



目前我使用过Zxing和AForge.Net在Winform应用程序上创建了一个QR阅读器。但我不能在Asp.net网页上这样做。

Hello All,
I have to scan a QR code using webcam on a Asp.net web page.
Currently i have used Zxing and AForge.Net dlls and made a QR reader on a Winform application. But iam not able to do that in a Asp.net webpage.

The problem area here is to capture the video frame in bitmap from the live webcam feed. And send the frame converted to bitmap to Zxing.Decoder() for decoding the QR code.

Please help in having a live feed from webcam and decoding the QR code from it.

PS: I got lot of solutions on uploading a pre-captured image to the Web server for decoding but thats not my requirement. My requirement is to capture the QR code directly from the webcam feed and decode it.

Please help. Thanks.

What I have tried:

Currently i have used Zxing and AForge.Net dlls and made a QR reader on a Winform application. But iam not able to do that in a Asp.net webpage.

推荐答案

你可以下载示例代码:

[ASP.NET-C#]从网络摄像头读取条形码 [ ^ ]



实施解决方案的步骤

1.使用HTML5在网络浏览器中打开网络摄像头。

2.在画布上显示网络摄像头预览。

3.将画布数据(base64字符串)发送到ASP.NET内置的服务器端。 />
4.使用您喜欢的任何条形码SDK从图像数据中读取条形码。
You can download the sample code:
[ASP.NET-C#] Read barcode from webcam[^]

Steps to implement the solution
1. Use HTML5 to open a webcam in your web browser.
2. Display the webcam preview on a canvas.
3. Send the canvas data (base64 string) to the server-side that built in ASP.NET.
4. Read barcodes from the image data with any barcode SDK you like.


c# - 在ASP.NET网络表单中使用网络摄像头扫描二维码 - Stack Overflow [ ^ ]


这篇关于如何使用ASP.NET网页上的网络摄像头扫描二维码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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