Setup Resources
This page is the guide of how to setup resources for Dynamsoft Capture Vision Android Edition.
-
Right click on your project folder, select New, then select Directory and select the src\main\assets to create an assets folder.
-
Under the assets folder create a new folder and name it based on the type of your resource file.
For example, if you want to setup a template file
ReadVIN.json, you have to create a new folder named Templates. If you want to setup a model fileVINCharRecognition.dataand a template fileReadVIN.jsonat the same time, you have to create two new folders, Models and Templates.Folder Name Description TemplatesJSON files that define how to read barcode, scan mrz, etc. ModelsMainly are deep learning models that improves the barcode or text line read rate. ConfusableCharsResource files for text line recognition. Help distinguish easily confused characters. “0”, “O”. It helps improving the character recognition accuracy. DictionaryThe resource files used to assist in result validation. The recognition result can be corrected if it matches a word in the dictionary. OverlappingCharsThe resource files used to validate or correct recognition results by overlaying standard characters with the recognized characters. ParserResourcesThe resource files that defines the content parsing rules. -
Copy your resource files to the folder you just created.
-
For the template files, here is an additional step. You have to use
initSettingsFromFileto load your template file. Template file name should be specified as thefilePathin theinitSettingsFromFilemethod. For the other resource files, you don’t need this step.try { mRouter.initSettingsFromFile("ReadVIN.json"); } catch (CaptureVisionRouterException e) { throw new RuntimeException(e); }