flutter_ocr_sdk 0.0.1 copy "flutter_ocr_sdk: ^0.0.1" to clipboard
flutter_ocr_sdk: ^0.0.1 copied to clipboard

outdated

A new flutter plugin project.

flutter_ocr_sdk #

A wrapper for Dynamsoft OCR SDK, focusing on Passport MRZ recognition.

Try Passport MRZ Example #

cd example
flutter run -d <device>

Flutter Passport MRZ recognition

Usage #

  • Download the model package. Unzip model files to model/ folder, and configure assets in pubspec.yaml:

    assets:
    - model/
    - model/CharacterModel/
    
  • Initialize the object and load the model path by the asset path:

    _textRecognizer = FlutterOcrSdk();
    _textRecognizer.loadModel('model/');
    
  • Recognize passport MRZ by setting an image file and the template name locr. The template name is defined in model/wholeImgMRZTemplate.json:

    String ret = await _textRecognizer.recognizeByFile(image?.path, 'locr');
    
  • Recognize passport MRZ by setting an image buffer (E.g. CameraImage) and the template name locr:

    CameraImage availableImage;
    String ret = await _textRecognizer.recognizeByFile(availableImage.planes[0].bytes,
              availableImage.width,
              availableImage.height,
              availableImage.planes[0].bytesPerRow,
              format, 'locr');
    
  • Set the organization ID if you have a Dynamsoft account:

    await _textRecognizer.setOrganizationID('YOUR-ID');
    
19
likes
0
points
92
downloads

Publisher

verified publisheryushulx.me

Weekly Downloads

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_ocr_sdk