SBSDKVehicleIdentificationNumberScanner

@interface SBSDKVehicleIdentificationNumberScanner : NSObject

A class to scan video frame for vehicle identification number and validate it.

  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializes an instance with the given configuration. Returns nil, if the required OCR resources are not installed.

    Declaration

    Objective-C

    - (nullable instancetype)initWithConfiguration:
        (nonnull SBSDKVehicleIdentificationNumberScannerConfiguration *)
            configuration;

    Parameters

    configuration

    The configuration object to be used to configure the new instance.

  • Scans vehicle identification number information from given sample buffer. Intended for usage with live detection.

    Declaration

    Objective-C

    - (nullable SBSDKVehicleIdentificationNumberScannerResult *)
        recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef
                      orientation:(AVCaptureVideoOrientation)videoOrientation
                           inRect:(CGRect)rect;

    Swift

    func recognize(from sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation, in rect: CGRect) -> SBSDKVehicleIdentificationNumberScannerResult?

    Parameters

    sampleBufferRef

    The sample buffer reference.

    videoOrientation

    Video frame orientation. Should be the orientation that the device currently has, not actual image orientation.

    rect

    Rectangle in image coordinates in which to perform the search. Must be inside the image.

    Return Value

    The result of the scanning.

  • Detects vehicle identification number on a still image.

    Declaration

    Objective-C

    - (nonnull SBSDKVehicleIdentificationNumberScannerResult *)
        recognizeFromStillImage:(nonnull UIImage *)image;

    Swift

    func recognize(fromStillImage image: UIImage) -> SBSDKVehicleIdentificationNumberScannerResult

    Parameters

    image

    An image containing vehicle identification number.

    Return Value

    The result of the scanning.

  • Detects vehicle identification number on a still image.

    Declaration

    Objective-C

    - (nonnull SBSDKVehicleIdentificationNumberScannerResult *)
        recognizeFromStillImage:(nonnull UIImage *)image
                         inRect:(CGRect)rect;

    Swift

    func recognize(fromStillImage image: UIImage, in rect: CGRect) -> SBSDKVehicleIdentificationNumberScannerResult

    Parameters

    image

    An image containing vehicle identification number.

    rect

    Rectangle in image coordinates in which to perform the search. Must be inside the image.

    Return Value

    The result of the scanning.

  • Clears the frame accumulator of the scanner. This should be called after retrieving a result and initiating a new scan.

    Declaration

    Objective-C

    - (void)clearFrameAccumulator;

    Swift

    func clearFrameAccumulator()