Enable OCR VIN support

What is OCR VIN Support #

OCR support in the barKoder SDK is currently intended primarily for VIN code recognition. Since the SDK is focused on barcode scanning, our OCR implementation has been optimized specifically for VIN use cases.

At this time, OCR is not designed to function as a general document scanner.

To enable VIN OCR in the barKoder SDK:

First Ensure you're using a license key that has OCR enabled.

Add Xamaring.Google.MLKit.TextRecognation library (116.0.0 version) in ur MAUI Application :

Enable OCR in the decoder configuration #

                BKDView.SetCustomOption("enable_ocr_functionality", 1);
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.OCRText, true);
BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Code39, true);
BKDView.SetEnableVINRestrictions(true);
            

Available symbologies #

As mentioned in the VIN section of our site, VIN scanning works with the following symbologies:

                  private void SetVinMode()
    {
        BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.QR, true);
        BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Datamatrix, true);
        BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Code128, true);
        BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.Code39, true);
        BKDView.SetBarcodeTypeEnabled(Plugin.Maui.Barkoder.Enums.BarcodeType.OCRText, true);

        BKDView.SetEnableVINRestrictions(true);
        BKDView.SetRegionOfInterest(0, 30, 100, 40);
        BKDView.SetRegionOfInterestVisible(true);

        BKDView.SetDecodingSpeed(Plugin.Maui.Barkoder.Enums.DecodingSpeed.Slow);
        BKDView.SetBarkoderResolution(Plugin.Maui.Barkoder.Enums.BarkoderResolution.FHD);

    }
            

The SDK will first attempt to extract the VIN from supported barcode formats such as Code 39, Code 128, Data Matrix, or QR codes. If barcode decoding is unsuccessful due to poor lighting or other conditions, the SDK will fall back to OCR and decode the visible text portion of the VIN, which is typically readable to the naked eye. This approach ensures the most reliable and optimal results.

Release Information #

OCR VIN has been added in version 1.6.7

Page Contents