SBSDKHealthInsuranceCardRecognizer

@interface SBSDKHealthInsuranceCardRecognizer : NSObject

Recognizer for German-issued European health insurance cards (EHIC), a.k.a. elektronische Gesundheitskarten (eGK). The recognizer performs validation on the result that is specific to German cards and returns a failure result if any of the fields that can be validated fail validation. NOTE: In order to operate, this class requires tesseract languages and trained data to be present in the application bundle.

  • Detect and extract data from EHIC in a photo given as an UIImage instance.

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)
        detectAndRecognizeFromImage:(nonnull UIImage *)image;

    Swift

    func detectAndRecognize(from image: UIImage) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    image

    A photo containing an EHIC on a clean background.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.

  • Detect and extract data from a sample buffer reference.

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)
        detectAndRecognizeFromSampleBuffer:
            (nonnull CMSampleBufferRef)sampleBufferRef
                               orientation:
                                   (AVCaptureVideoOrientation)videoOrientation;

    Swift

    func detectAndRecognize(from sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    sampleBufferRef

    The sample buffer reference possibly containing an EHIC.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.

  • Detect and extract data from a sample buffer reference.

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)
        detectAndRecognizeFromSampleBuffer:
            (nonnull CMSampleBufferRef)sampleBufferRef
                              searchInRect:(CGRect)searchInRect
                               orientation:
                                   (AVCaptureVideoOrientation)videoOrientation;

    Swift

    func detectAndRecognize(from sampleBufferRef: CMSampleBuffer, searchIn searchInRect: CGRect, orientation videoOrientation: AVCaptureVideoOrientation) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    sampleBufferRef

    The sample buffer reference possibly containing an EHIC.

    searchInRect

    Rectangle in video frame, where recognizer will try to recognize the data.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.

  • Extract data from an EHIC in an UIImage instance.

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)recognizeFromImage:
        (nonnull UIImage *)image;

    Swift

    func recognize(from image: UIImage) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    image

    An image of an EHIC.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.

  • Extract data from a sample buffer reference

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)
        recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef
                      orientation:(AVCaptureVideoOrientation)videoOrientation;

    Swift

    func recognize(from sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    sampleBufferRef

    The sample buffer reference possibly containing an EHIC.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.

  • Extract data from a sample buffer reference

    Declaration

    Objective-C

    - (nullable SBSDKHealthInsuranceCardRecognitionResult *)
        recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef
                     searchInRect:(CGRect)searchInRect
                      orientation:(AVCaptureVideoOrientation)videoOrientation;

    Swift

    func recognize(from sampleBufferRef: CMSampleBuffer, searchIn searchInRect: CGRect, orientation videoOrientation: AVCaptureVideoOrientation) -> SBSDKHealthInsuranceCardRecognitionResult?

    Parameters

    sampleBufferRef

    The sample buffer reference possibly containing an EHIC.

    searchInRect

    Rectangle in video frame, where recognizer will try to recognize the data.

    Return Value

    Recognizer result. nil if recognition failed or validation is unsuccessful.