SBSDKGenericDocumentRecognizerViewController
@interface SBSDKGenericDocumentRecognizerViewController
: SBSDKBaseScannerViewController
A UIViewController subclass to recognize documents, e.g. German passports, ID cards and driver’s licenses on video frames.
-
The receivers delegate.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<SBSDKGenericDocumentRecognizerViewControllerDelegate> delegate;
Swift
weak var delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate? { get set }
-
The accepted minimal sharpness score. Images with a score less than that will be rejected with blurry status.
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.
The default value is 80.
Declaration
Objective-C
@property (nonatomic) CGFloat sharpnessAcceptanceFactor;
Swift
var sharpnessAcceptanceFactor: CGFloat { get set }
-
The array of recognizable document types. If nil, all document types will be recognized.
Declaration
Objective-C
@property (nonatomic, copy, nonnull) NSArray<SBSDKGenericDocumentRootType *> *acceptedDocumentTypes;
Swift
var acceptedDocumentTypes: [SBSDKGenericDocumentRootType] { get set }
-
An array of normalized names for the document field types that should not be recognized. If nil all the fields are going to be recognized.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *excludedFieldTypes;
Swift
var excludedFieldTypes: [String]? { get set }
-
Installs the receiver as child view controller onto the parent view controllers view using its entire bounds area.
Declaration
Objective-C
- (nullable instancetype) initWithAcceptedDocumentTypes: (nullable NSArray<SBSDKGenericDocumentRootType *> *) acceptedDocumentTypes excludedFieldTypes: (nullable NSArray<NSString *> *)excludedFieldTypes delegate: (nullable id< SBSDKGenericDocumentRecognizerViewControllerDelegate>) delegate;
Swift
init?(acceptedDocumentTypes: [SBSDKGenericDocumentRootType]?, excludedFieldTypes: [String]?, delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate?)
Parameters
acceptedDocumentTypes
Array of document types to be recognized. If nil, all document types will be recognized.
excludedFieldTypes
An array of normalized names for the document field types that should not be recognized.
delegate
The delegate of the receiver.
-
Installs the receiver as child view controller onto the parent view controllers view using its entire bounds area.
Declaration
Objective-C
- (nullable instancetype) initWithParentViewController: (nonnull UIViewController *)parentViewController parentView:(nonnull UIView *)parentView delegate: (nullable id< SBSDKGenericDocumentRecognizerViewControllerDelegate>) delegate;
Swift
init?(parentViewController: UIViewController, parentView: UIView, delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate?)
Parameters
parentViewController
The view controller the newly created instance is embedded into.
parentView
The view the newly created instance is embedded into.
delegate
The delegate of the receiver.
-
Installs the receiver as child view controller onto the parent view controllers view using its entire bounds area.
Declaration
Objective-C
- (nullable instancetype) initWithParentViewController: (nonnull UIViewController *)parentViewController parentView:(nonnull UIView *)parentView acceptedDocumentTypes: (nullable NSArray<SBSDKGenericDocumentRootType *> *) acceptedDocumentTypes excludedFieldTypes: (nullable NSArray<NSString *> *)excludedFieldTypes delegate: (nullable id< SBSDKGenericDocumentRecognizerViewControllerDelegate>) delegate;
Swift
init?(parentViewController: UIViewController, parentView: UIView, acceptedDocumentTypes: [SBSDKGenericDocumentRootType]?, excludedFieldTypes: [String]?, delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate?)
Parameters
parentViewController
The view controller the newly created instance is embedded into.
parentView
The view the newly created instance is embedded into.
acceptedDocumentTypes
Array of document types to be recognized. If nil, all document types will be recognized.
excludedFieldTypes
An array of normalized names for the document field types that should not be recognized.
delegate
The delegate of the receiver.
-
Resets the recognized-documents-accumulator.
Declaration
Objective-C
- (void)resetDocumentAccumulation;
Swift
func resetDocumentAccumulation()