使用智能手机相机的ASP.Net Web应用程序中的QR码扫描仪 [英] QR Code Scanner in ASP.Net Web Application Using Smart Phone Camera

查看:237
本文介绍了使用智能手机相机的ASP.Net Web应用程序中的QR码扫描仪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用visual studio 2008开发了web应用程序,此时我想添加一个可以使用智能手机相机扫描QR码的界面来检索数据。



任何人都可以帮我提供一个想法或样本来源吗?



提前致谢。

I've developed web application using visual studio 2008 and right at this moment I would like to add one more interface which can scan QR code using smart phone camera to retrieve data.

Can anyone help me to give me an idea or sample source to do this?

Thanks in advance.

推荐答案

例如,请参阅此CodeProject文章:如何使用USB摄像头构建C#条码/ QR码扫描器 [ ^ ]。



您可以找到更多。



您可以使用WebRTC从浏览器发送媒体。从这里开始:

http://en.wikipedia.org/wiki/WebRTC [< a href =http://en.wikipedia.org/wiki/WebRTCtarget =_ blanktitle =New Window> ^ ],

http://www.html5rocks.com/en/tutorials/webrtc/basics [ ^ ],

https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC [< a href =https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC\"target =_ blanktitle =New Window> ^ ],
http://www.w3.org/TR/webrtc [ ^ ]。



当时在写作方面,WebRTC得到所有主流浏览器的支持,但不支持Safary而不是IE(不出意外)。

我想警告你反对通常的IE解决办法:嵌入在浏览器中的ActiveX。这完全不安全。对于一些精通安全的用户来说,了解你正在使用ActiveX进行那些肮脏的技巧可能足以将你的网站列入黑名单,原因很简单。



-SA
See, for example, this CodeProject article: How to Build a C# Barcode/QR Code Scanner by Using Your USB Camera[^].

You can find a lot more.

You can use WebRTC for sending media from browser. Start here:
http://en.wikipedia.org/wiki/WebRTC[^],
http://www.html5rocks.com/en/tutorials/webrtc/basics[^],
https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC[^],
http://www.w3.org/TR/webrtc[^].

At the time of writing, WebRTC is supported by all major browsers but not Safary and not IE (not surprisingly).
I want to warn you against the "usual" IE work-around: ActiveX embedded in the browser. This is utterly unsafe. For some safety-savvy users, learning that you are doing those dirty tricks with ActiveX can be enough to blacklist your site, for some very good reasons.

—SA


您需要做的是捕获客户端的条形码图像,并将其发送到服务器端。然后解码服务器端的条形码,并将结果发送回Web客户端。以下是使用智能手机相机捕获和上传图像的HTML5解决方案:拍摄照片并使用HTML5在手机上传 [ ^ ]
What you need to do is to capture the barcode image on the client side, and send it to the server side. Then decode the barcode on the server side, and send the result back to the Web client. Here is an HTML5 solution for capturing and uploading images using the smartphone camera: Take a Photo and Upload it on Mobile Phones with HTML5[^]


这篇关于使用智能手机相机的ASP.Net Web应用程序中的QR码扫描仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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