You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.
Hi,
I was playing around with the library and I found out that changing the focusMode to AutoFocus improves a lot the usability of the scanner.
Testing with iPhone 5 iOS 10 GM was really hard to focus on a QR code even if the autoFocusRangeRestriction is set to AVCaptureAutoFocusRangeRestrictionNear.
// Focus on the center of the image
if ([deviceInput.device respondsToSelector:@selector(isFocusPointOfInterestSupported)] &&
deviceInput.device.isFocusPointOfInterestSupported) {
self.initialFocusPoint = deviceInput.device.focusPointOfInterest;
deviceInput.device.focusPointOfInterest = CGPointMake(kFocalPointOfInterestX, kFocalPointOfInterestY);
deviceInput.device.focusMode = AVCaptureFocusModeContinuousAutoFocus;
}
Cheers!
The text was updated successfully, but these errors were encountered:
Thanks @JacopoKenzo - it looks like the focusMode is currently set to AVCaptureFocusModeContinuousAutoFocus in the latest version (line 338) of MTBBarcodeScanner. If you try the latest version, does this fix any focus issues on your end?
@mikebuss yes i'm using the last version, AVCaptureFocusModeContinuousAutoFocus is set when the user tap-to-focus, not when the camera starts. That means an extra tap from the user.
And also tapping the camera didn't really focus on my end, that's why i set the AutoFocus property in the init of the camera, so the user doesn't have to tap.
Hi,
I was playing around with the library and I found out that changing the focusMode to AutoFocus improves a lot the usability of the scanner.
Testing with iPhone 5 iOS 10 GM was really hard to focus on a QR code even if the
autoFocusRangeRestriction
is set toAVCaptureAutoFocusRangeRestrictionNear
.Cheers!
The text was updated successfully, but these errors were encountered: