High Accuracy OCR, Face Recognition & Liveness
  • Language
    • Overview
    • Android
      • Project Setup
      • Accura OCR
      • Accura Face Match
      • Accura Liveness
    • iOS
      • Project Setup
        • Check Pod Size
      • Accura OCR
        • Setup Accura License and Configurations
        • Set Camera View
      • Accura Face Match
      • Accura liveness
    • Flutter
      • Project Setup
      • Android Setup
        • Adding Permissions, Packaging options and Auth Token
        • Adding License
      • iOS Setup
        • Installing pods and Adding Permissions.
        • Adding License
      • Functions
        • Fetching Details From License
        • Setting Configurations, Error messages, Camera customization
        • OCR
        • MRZ
        • Barcode and Bankcard
        • Facematch and Liveness
    • Cordova
      • Project Setup
      • Android Setup
        • Packaging options and Auth Token
        • Adding License
      • iOS Setup
        • Installing pods
        • Adding License
      • Functions
        • Fetching Details From License
        • Setting Title & Error messages
        • OCR
        • MRZ
        • Barcode & Bankcard
        • Facematch & Liveness
    • React-Native
      • Project Setup
      • Android Setup
        • Adding Permissions, Packaging options and Auth Token
        • Adding License
      • iOS Setup
        • Adding Permissions.
        • Adding License
      • Functions
        • Fetching License Details
        • Setting Configurations, Error messages, Camera customization
        • OCR
        • MRZ
        • Barcode & Bankcard
        • Facematch & Liveness
    • Xamarin
      • Project Setup
      • Android Setup
        • Adding Permission & Packages
        • Adding License
      • iOS Setup
        • Adding Permissions
        • Adding License
      • Functions
        • Fetching License details
        • Setup custom messages
        • OCR
        • MRZ
        • Barcode & Bankcard
        • Facematch & Liveness
    • Docker
      • MRZ
      • FaceMatch
      • Face Liveness
      • ID Liveness
      • ID Forgery
    • Web API
      • Accura OCR
      • Accura Face Match
      • Accura Face Liveness
      • Accura ID Liveness
  • Solutions
    • MRZ
      • Android
        • SDK Setup
        • Setup Accura MRZ
      • iOS
        • SDK Setup
        • Setup Accura MRZ
      • Flutter
        • SDK Setup
        • Setup Accura MRZ
      • React Native
        • SDK Setup
        • Setup Accura MRZ
      • Cordova
        • SDK Setup
        • Setup Accura MRZ
    • OCR
      • Android
        • SDK Setup
        • Setup Accura OCR
      • iOS
        • SDK Setup
        • Setup Accura OCR
      • Flutter
        • SDK Setup
        • Setup Accura OCR
      • React Native
        • SDK Setup
        • Setup Accura OCR
      • Cordova
        • SDK Setup
        • Setup Accura OCR
    • Barcode with PDF417
      • Android
        • SDK Setup
        • Setup Accura Barcode with PDF417
      • iOS
        • SDK Setup
        • Setup Accura Barcode with PDF417
      • Flutter
        • SDK Setup
        • Setup Accura Barcode with PDF417
      • React Native
        • SDK Setup
        • Setup Accura Barcode with PDF417
      • Cordova
        • SDK Setup
        • Setup Accura Barcode with PDF417
    • Face Match
      • Android
        • Setup SDK
        • Setup Accura Face Match
      • iOS
        • Setup SDK
        • Setup Accura Face Match
      • Flutter
        • Setup SDK
        • Setup Accura Face Match
      • React Native
        • Setup SDK
        • Setup Accura Face Match
      • Cordova
        • Setup SDK
        • Setup Accura Face Match
    • Face Liveness (2D / Silent / Passive)
      • Android
        • SDK Setup
        • Setup Accura Face Liveness
      • iOS
        • SDK Setup
        • Setup Accura Face Liveness
      • Flutter
        • Setup SDK
        • Setup Accura Face Liveness
      • React Native
        • SDK Setup
        • Setup Accura Face Liveness
      • Cordova
        • Setup SDK
        • Setup Accura Face Liveness
    • Face Liveness (3D / Face Movement)
      • Android
        • SDK Setup
        • Setup Accura Face Liveness
      • iOS
        • SDK Setup
        • Setup Accura Face Liveness
      • Flutter
        • Setup SDK
        • Setup Accura Face Liveness
      • React Native
        • SDK Setup
        • Setup Accura Face Liveness
      • Cordova
        • Setup SDK
        • Setup Accura Face Liveness
    • Face Liveness with Voice Authentication
      • Android
        • SDK Setup
        • Setup Accura Face Liveness
      • iOS
        • SDK Setup
        • Setup Accura Face Liveness
      • Flutter
        • Setup SDK
        • Setup Accura Face Liveness
      • React Native
        • SDK Setup
        • Setup Accura Face Liveness
      • Cordova
        • Setup SDK
        • Set up Accura Face Liveness
    • ⁠Document Liveness and ID Forgery
      • Android
        • SDK Setup
        • Setup Accura OCR
      • iOS
        • SDK Setup
        • Setup Accura OCR
      • Flutter
        • SDK Setup
        • Setup Accura OCR
      • React Native
        • SDK Setup
        • Setup Accura OCR
      • Cordova
        • SDK Setup
        • Setup Accura OCR
    • NFC scanner
      • Android
        • SDK Setup
        • Setup Accura NFC
      • iOS
        • SDK Setup
        • Setup Accura NFC
      • Flutter
        • SDK Setup
        • Setup Accura NFC
      • React Native
        • SDK Setup
        • Setup Accura NFC
      • Cordova
        • SDK Setup
        • Setup Accura NFC
    • Voice Biometrics
      • Android
        • Setup Voice Verification
      • iOS
        • Setup Voice Verification
      • Flutter
        • Setup Voice Verification
      • React Native
        • Setup Voice Verification
      • Cordova
        • Setup Voice Verification
    • Finger Biometrics
      • Android
        • SDK Setup
        • Setup Accura Finger
      • iOS
        • SDK Setup
        • Setup Accura Finger
      • Flutter
        • SDK Setup
        • Setup Accura Finger
      • React Native
        • SDK Setup
        • Setup Accura Finger
      • Cordova
        • SDK Setup
        • Setup Accura Finger
    • MICR Cheque scanner
      • Android
        • SDK Setup
        • Setup Accura MICR
      • iOS
        • SDK Setup
        • Setup Accura MICR
      • Flutter
        • SDK Setup
        • Setup Accura MICR
      • React Native
        • SDK Setup
        • Setup Accura MICR
      • Cordova
        • SDK Setup
        • Setup Accura MICR
Powered by GitBook
On this page
  • To initialize sdk on app start:
  • Setting up License
  • Setting up Configuration's,Error mssages and Scaning title messages
  • Method for scan OCR documents.
  1. Solutions
  2. OCR
  3. Flutter

Setup Accura OCR

To initialize sdk on app start:

Setting up License

  Future<void> getMetaData() async{
    try {
      await AccuraOcr.getMetaData().then((value) =>
          setupConfigData(json.decode(value)));
    }on PlatformException{}
    if (!mounted) return;
  }
//Sample Response
{ 
countries: Array[], isValid: boolean, isOCREnable: boolean
}

Setting up Configuration's,Error mssages and Scaning title messages

 Future<void> setAccuraConfig() async{
    try {

      await AccuraOcr.setFaceBlurPercentage(80);
      await AccuraOcr.setHologramDetection(true);
      await AccuraOcr.setLowLightTolerance(10);
      await AccuraOcr.setMotionThreshold(25);
      await AccuraOcr.setMinGlarePercentage(6);
      await AccuraOcr.setMaxGlarePercentage(99);
      await AccuraOcr.setBlurPercentage(60);
      await AccuraOcr.setCameraFacing(0);
      await AccuraOcr.Disable_Card_Name(false);
      await AccuraOcr.EnableLogs(false);

      await AccuraOcr.SCAN_TITLE_OCR_FRONT("Scan Front side of ");
      await AccuraOcr.SCAN_TITLE_OCR_BACK("Scan Back side of ");
      await AccuraOcr.SCAN_TITLE_OCR("Scan ");
      await AccuraOcr.SCAN_TITLE_MRZ_PDF417_FRONT("Scan Front Side of Document");
      await AccuraOcr.SCAN_TITLE_MRZ_PDF417_BACK("Scan Back Side of Document");
      await AccuraOcr.SCAN_TITLE_DLPLATE("Scan Number plate");
      await AccuraOcr.SCAN_TITLE_BARCODE("Scan Barcode");
      await AccuraOcr.SCAN_TITLE_BANKCARD("Scan BankCard");


      await AccuraOcr.ACCURA_ERROR_CODE_MOTION("Keep Document Steady");
      await AccuraOcr.ACCURA_ERROR_CODE_DOCUMENT_IN_FRAME("Keep document in frame");
      await AccuraOcr.ACCURA_ERROR_CODE_BRING_DOCUMENT_IN_FRAME("Bring card near to frame");
      await AccuraOcr.ACCURA_ERROR_CODE_PROCESSING("Processing");
      await AccuraOcr.ACCURA_ERROR_CODE_BLUR_DOCUMENT("Blur detect in document");
      await AccuraOcr.ACCURA_ERROR_CODE_FACE_BLUR("Blur detected over face");
      await AccuraOcr.ACCURA_ERROR_CODE_GLARE_DOCUMENT("Glare detect in document");
      await AccuraOcr.ACCURA_ERROR_CODE_HOLOGRAM("Hologram Detected");
      await AccuraOcr.ACCURA_ERROR_CODE_DARK_DOCUMENT("Low lighting detected");
      await AccuraOcr.ACCURA_ERROR_CODE_PHOTO_COPY_DOCUMENT("Can not accept Photo Copy Document");
      await AccuraOcr.ACCURA_ERROR_CODE_FACE("Face not detected");
      await AccuraOcr.ACCURA_ERROR_CODE_MRZ("MRZ not detected");
      await AccuraOcr.ACCURA_ERROR_CODE_PASSPORT_MRZ("Passport MRZ not detected");
      await AccuraOcr.ACCURA_ERROR_CODE_ID_MRZ("ID MRZ not detected");
      await AccuraOcr.ACCURA_ERROR_CODE_VISA_MRZ("Visa MRZ not detected");
      await AccuraOcr.ACCURA_ERROR_CODE_UPSIDE_DOWN_SIDE("Document is upside down. Place it properly");
      await AccuraOcr.ACCURA_ERROR_CODE_WRONG_SIDE("Scanning wrong side of Document");
      await AccuraOcr.isShowLogo(0);
      await AccuraOcr.isFlipImg(1);
      await AccuraOcr.CameraScreen_CornerBorder_Enable(false);
      await AccuraOcr.CameraScreen_Border_Width(15);
      await AccuraOcr.CameraScreen_Color("#80000000");   //Pass empty string for clear color else pass the Hex code e.g, #FFFFFF.
      await AccuraOcr.CameraScreen_Back_Button(1); //For iOS disable the back button by Passing 0.
      await AccuraOcr.CameraScreen_Change_Button(1); //To disable flip camera button pass 0.
      await AccuraOcr.CameraScreen_Frame_Color("#D5323F"); //Pass a Hex Code to change the color of the frame.
      await AccuraOcr.CameraScreen_Text_Border_Color("#000000"); //Pass a Hex Code to change the color of the text border pass empty string to disable it.
      await AccuraOcr.CameraScreen_Text_Color("#FFFFFF"); //Pass a Hex Code to change the color of the text.

      await AccuraOcr.setAccuraConfigs();

    }on PlatformException{}
  }
  

Method for scan OCR documents.

Future<void> startOCR() async {
try {
//All the card and country details will be available from the license
var config = [
  widget.countrySelect['id'],
  cardSelected['id'],
  cardSelected['name'],
  cardSelected['type'],
];
await AccuraOcr.startOcrWithCard(config)
    .then((value) =>
{
  setState(() {
    dynamic result = json.decode(value);
    print(result);
  })
})
    .onError((error, stackTrace) =>
{
});
} on PlatformException {}
}

PreviousSDK SetupNextReact Native

Last updated 2 months ago