I have a AVCaptureDevice
specifically to scan QR codes (using AVMetadataObjectTypeQRCode
). My goal is to make QR code scanning as fast as possible.
Several settings of the AVCaptureDevice
camera (e.g. focus and exposure) can be programmatically adjusted in iOS.
What camera optimisations I can make to minimise the time it takes to capture a QR code on an iPhone?
Most of those settings optimal values vary based on the environment (eg dark/bright room, near/far QR Code etc.), so unless you know your user's environment (eg if the app was used exclusively in factory assembly lines), the default is probably best.
However (according to this source), If you know that the QR code will be near the camera you can speed up autofocus by setting autoFocusRangeRestriction to a near range value. You could also make sure that smoothAutoFocusEnabled is set to false.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments