Scanning a vehicle identification number from an image
Provided a still image, the vehicle identification number scanner can perform detection on the image and return the result.
The recognize(on:)
method of SBSDKVehicleIdentificationNumberScanner
takes an input of a still image, and returns the result.
Example for detecting vehicle identification number on the Image
- Swift
- Objective-C
import Foundation
import ScanbotSDK
func detectVinOnImage() {
// Image containing Vehicle identification number.
guard let image = UIImage(named: "vinImage") else { return }
// Creates an instance of `SBSDKVehicleIdentificationNumberScanner` using the default configuration.
let scanner = SBSDKVehicleIdentificationNumberScanner(configuration: .defaultConfiguration)
// Returns the result after running detector on the image.
let result = scanner.recognize(on: image)
}
#import "VinDetectionOnImage.h"
@import ScanbotSDK;
@implementation VinDetectionOnImage
- (void) detectVinOnImage {
// Image containing Vehicle Identification number.
UIImage *image = [UIImage imageNamed:@"vinImage"];
// Creates an instance of `SBSDKVehicleIdentificationNumberScannerConfiguration`.
SBSDKVehicleIdentificationNumberScannerConfiguration *configuration = [SBSDKVehicleIdentificationNumberScannerConfiguration defaultConfiguration];
// Creates an instance of `SBSDKVehicleIdentificationNumberScanner` using the configuration created above.
SBSDKVehicleIdentificationNumberScanner *scanner = [[SBSDKVehicleIdentificationNumberScanner alloc] initWithConfiguration:configuration];
// Returns the result after running detector on the image.
SBSDKVehicleIdentificationNumberScannerResult *result = [scanner recognizeOnStillImage: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.