使用AVCaptureSession在iOS上阅读QRCode-对齐问题? [英] Reading on QRCodes on iOS with AVCaptureSession -- alignment issues?

查看:67
本文介绍了使用AVCaptureSession在iOS上阅读QRCode-对齐问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经使用AVCaptureSession类在iOS中实现了QRCode读取功能,如下所述:

https://github.com/HEmobile/ScanBarCode/tree/master/ScanBarCodes https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureSession_Class/

但是我们注意到的一件事... QRCode必须垂直或水平对齐.倾斜角度(例如45度下降)不会触发扫描.这个问题并不是真的出现在Google上,这令人惊讶.

我们对其他QRcode读取应用程序进行的实验表明,此限制不存在.也许/貌似(大概是因为内置的功能是新功能),这些应用并未使用AVCaptureSession.

我们的问题是,这是否表明该功能的Apple版本尚未成熟?还是有一些启用或改进此功能的选项?

感谢您的任何想法.

解决方案

似乎您在代码中写了某种限制.看看我的github仓库: https://github.com/alexekoren/qr-3d

它是专门为以漂亮的角度读取QR码而设计的.我现在正在测试它,它可以轻松拉出30-45度.

这是使扫描程序对象可以显示在UIView上所需的所有内容的直接链接:https://github.com/HEmobile/ScanBarCode/tree/master/ScanBarCodes https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureSession_Class/

But one thing we notice... the QRCode has to be aligned exactly vertically or horizontally. Oblique angles such as 45 degress does not trigger a scan. This issue doesn't really google, which is surprising.

Our experiments with other QRcode reading apps indicate that this limitation does not exist. Perhaps/seemingly (presumably -- since the built-in function is new) these apps don't use AVCaptureSession.

Our question is, is this a sign that Apple's version of this function is not mature yet? Or is there some option to enable or improve this capability?

Thanks for any thoughts.

解决方案

It seems you've written some sort of limitation in your code. Check out my github repo: https://github.com/alexekoren/qr-3d

It was built specifically for reading QR Codes at angles in a pretty way. I'm testing it now and it pulls at 30-45 degrees easily.

Here's the direct link for everything you'll need to make the scanner object that can present on a UIView: https://github.com/AlexEKoren/QR-3D/blob/master/Code%20Scanner/Scanner/CSScanner.m

It should work out of the box!

这篇关于使用AVCaptureSession在iOS上阅读QRCode-对齐问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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