找到你要的答案

Q:How can I delay focusing using AVCaptureDevice

Q:我怎么能用avcapturedevice延时聚焦

I am working on application (using Swift) which has the function to scan barcodes. For this I am using RSBarcodes.

Issue I am dealing with is that I need to scan barcodes from A4 paper sheet which is full of them. However the capturing is too fast and before I can focus on the right barcode the app captures wrong one.

So basically I need to ensure that the device will not capture some barcode, I don't want, but the one I will be pointing on for a longer time. My only idea is to check if the same barcode was captured for example 10 times and based on this assume that this one is the right one. Is there some more elegant solution?

Thanks for any suggestion!

我工作的应用程序(使用SWIFT)具有条形码扫描功能。这个我用rsbarcodes。

问题我处理,我需要从A4纸充满他们扫描条形码。然而,捕获太快,然后我可以集中在正确的条码应用程序捕获错误的一个。

所以基本上我需要确保设备不会捕获一些条码,我不想,但一个我会指向更长的时间。我唯一的想法是检查是否相同的条形码被捕获例如10次,并在此基础上假设这一个是正确的。有一些更优雅的解决方案吗?

谢谢你的建议!

answer1: 回答1:

I'm not an iOS dev, so I don't know the specifics - but is there a way you activate the camera but not the scanner? If so, if you can overlay a button in the camera view which says "Scan" - then your user would provide the trigger to capture the barcode once they have settled on a specific one.

我不是一个iOS开发,所以我不知道具体细节,但有一条你启动相机但没有扫描仪?如果是这样的话,如果你可以在相机视图中加上一个按钮,上面写着“扫描”,那么一旦用户解决了特定的问题,你的用户就会触发触发器来捕获条码。

ios  swift  avfoundation  rsbarcodes