Scanning a check from an image
To detect a check on a still image, you can use the recognize(on:)
method of the SBSDKCheckRecognizer
class.
It takes an image as input and returns the result after performing detection on the image.
Example for detecting Generic Document on the Image
- Swift
- Objective-C
import Foundation
import ScanbotSDK
func detectCheckOnImage() {
// Image containing Check.
guard let image = UIImage(named: "checkImage") else { return }
// Creates an instance of `SBSDKCheckRecognizer`.
let detector = SBSDKCheckRecognizer()
// Type of checks that needs to be detected.
let acceptedCheckTypes = SBSDKCheckDocumentRootType.allDocumentTypes
// Set the types of check on detector.
detector.acceptedCheckTypes = acceptedCheckTypes
// Returns the result after running detector on the image.
let result = detector.recognize(on: image)
}
#import "CheckDetectionOnImage.h"
@import ScanbotSDK;
@implementation CheckDetectionOnImage
- (void) detectCheckOnImage {
// Image containing Check.
UIImage *image = [UIImage imageNamed:@"checkImage"];
// Creates an instance of `SBSDKCheckRecognizer`.
SBSDKCheckRecognizer *detector = [[SBSDKCheckRecognizer alloc] init];
// Type of checks that needs to be detected.
NSArray<SBSDKCheckDocumentRootType *> *acceptedCheckTypes = [SBSDKCheckDocumentRootType allDocumentTypes];
// Set the types of check on detector.
[detector setAcceptedCheckTypes:acceptedCheckTypes];
// Returns the result after running detector on the image.
SBSDKCheckRecognizerResult *result = [detector recognizeOnImage:image];
}
@end
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.