Setup Accura OCR

To initialize sdk on app start:

RecogEngine recogEngine = new RecogEngine();
RecogEngine.SDKModel sdkModel = recogEngine.initEngine(your activity context);

if (sdkModel.i > 0) { // if license is valid
    

    // sdkModel.isOCREnable is true then get card list which you are selected on creating license
    if (sdkModel.isOCREnable) List<ContryModel> modelList = recogEngine.getCardList(MainActivity.this);
    if (modelList != null) { // if country & card added in license
        ContryModel contryModel = modelList.get(selected country position);
        contryModel.getCountry_id(); // getting country id
        CardModel model = contryModel.getCards().get(0/*selected card position*/); // getting card
        model.getCard_id() // getting card id
        model.getCard_name()  // getting card name

        if (cardModel.getCard_type() == 1) {
            // RecogType.PDF417
        } else if (cardModel.getCard_type() == 2) {
            // RecogType.DL_PLATE
        } else {
            // RecogType.OCR
        }
    }
}

Optional: Load License File Dynamically

If you prefer to place the license file dynamically, you can use the following method. This allows you to specify the license file path at runtime. For a demo of dynamic licensing, please refer to the dynamic_license_demo branch.


Update filters like below.

Call this function after initialize sdk if license is valid(sdkModel.i > 0)

  • Set Blur Percentage to allow blur on document

  • Set Face blur Percentage to allow blur on detected Face

  • Set Glare Percentage to detect Glare on document

  • Set Hologram detection to verify the hologram on the face

  • Set light tolerance to detect light on document

  • Set motion threshold to detect motion on camera document


Set CameraView

Last updated