SBSDKMedicalCertificateRecognizer
@interface SBSDKMedicalCertificateRecognizer : NSObject
A class to recognize medical certificates in a UIImage or CMSampleBufferRef. The result is encapsulated in SBSDKMedicalCertificateRecognizerResult instance.
-
The options to be used with the medical certificates recognizer.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) SBSDKMedicalCertificateRecognizerConfigurationOptions *recognitionOptions;
Swift
var recognitionOptions: SBSDKMedicalCertificateRecognizerConfigurationOptions { get set }
-
The designated initializer.
Declaration
Objective-C
- (nonnull instancetype)initWithConfigurationOptions: (SBSDKMedicalCertificateRecognizerConfigurationOptions *_Nonnull)options;
Swift
init(configurationOptions options: SBSDKMedicalCertificateRecognizerConfigurationOptions)
Parameters
options
The options used to create a new medical certificates recognizer.
-
Acquires all available information from an UIImage instance.
Declaration
Objective-C
- (nullable SBSDKMedicalCertificateRecognizerResult *) recognizeFromImage:(nonnull UIImage *)image detectDocument:(BOOL)detectDocument;
Swift
func recognize(from image: UIImage, detectDocument: Bool) -> SBSDKMedicalCertificateRecognizerResult?
Parameters
image
The image with the detected medical certificate.
detectDocument
Pass NO, if the image contains the medical certificate without borders. Pass YES, if there is more content on the image, e.g. a photo of the medical certificate with surroundings.
Return Value
The recognizer result.
-
Detects the document and acquires all available information from a sample buffer reference.
Declaration
Objective-C
- (nullable SBSDKMedicalCertificateRecognizerResult *) recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef orientation:(AVCaptureVideoOrientation)videoOrientation detectDocument:(BOOL)detectDocument;
Swift
func recognize(from sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation, detectDocument: Bool) -> SBSDKMedicalCertificateRecognizerResult?
Parameters
sampleBufferRef
The sample buffer reference containing the detected medical certificate.
detectDocument
Pass NO, if the image contains the medical certificate without borders. Pass YES, if there is more content on the image, e.g. a photo of the medical certificate with surroundings.
Return Value
The recognizer result.