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, readonly) id<SBSDKGenericDocumentRecognizerViewControllerDelegate> _Nullable delegate;

    Swift

    weak var delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate? { get }
  • 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 }
  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Not available.

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • Designated initializer. 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:(nullable UIView *)parentView
                            delegate:
                                (nonnull id<
                                    SBSDKGenericDocumentRecognizerViewControllerDelegate>)
                                    delegate;

    Swift

    init?(parentViewController: UIViewController, parentView: UIView?, delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate)

    Parameters

    parentViewController

    The view controller the newly created instance is embedded into. If parentViewController conforms to SBSDKGenericDocumentRecognizerViewControllerDelegate, it is automatically set as delegate.

    parentView

    The view the newly created instance is embedded into. If nil the parentViewControllers view is used.

    delegate

    The delegate of the receiver.

  • Designated initializer. 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:(nullable UIView *)parentView
               acceptedDocumentTypes:
                   (nullable NSArray<SBSDKGenericDocumentRootType *> *)
                       acceptedDocumentTypes
                            delegate:
                                (nonnull id<
                                    SBSDKGenericDocumentRecognizerViewControllerDelegate>)
                                    delegate;

    Swift

    init?(parentViewController: UIViewController, parentView: UIView?, acceptedDocumentTypes: [SBSDKGenericDocumentRootType]?, delegate: SBSDKGenericDocumentRecognizerViewControllerDelegate)

    Parameters

    parentViewController

    The view controller the newly created instance is embedded into. If parentViewController conforms to SBSDKGenericDocumentRecognizerViewControllerDelegate, it is automatically set as delegate.

    parentView

    The view the newly created instance is embedded into. If nil the parentViewControllers view is used.

    acceptedDocumentTypes

    Array of document types to be recognized. If nil, all document types will be recognized.

    delegate

    The delegate of the receiver.

  • Convenient initializer. 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:(nullable UIView *)parentView
               acceptedDocumentTypes:
                   (nullable NSArray<SBSDKGenericDocumentRootType *> *)
                       acceptedDocumentTypes
                  excludedFieldTypes:
                      (nullable NSArray<NSString *> *)excludedFieldTypes
                            delegate:
                                (nonnull 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. If parentViewController conforms to SBSDKGenericDocumentRecognizerViewControllerDelegate, it is automatically set as delegate.

    parentView

    The view the newly created instance is embedded into. If nil the parentViewControllers view is used.

    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()