public final class DocumentReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAMERA_ID |
static int |
FORMAT_JSON |
static int |
FORMAT_XML |
static int |
READER_REQUEST_CODE |
Modifier and Type | Method and Description |
---|---|
void |
about(android.content.Context context)
Use this method to show detailed information screen about the MRZ detector
|
java.util.List<GraphicField> |
getAllGraphicFields()
Use this method to receive all the graphic fields from MRZ detection results
|
java.util.List<TextField> |
getAllTextFields()
Use this method to get all the text fields from parsed MRZ results
|
GraphicField |
getGraphicFieldByType(int fieldType)
Use this method to get selected graphic field from MRZ detection results (currently, only cropped MRZ area is available)
|
java.lang.String |
getLibVersion()
Use this method to get Document reader's recognition engine version
|
java.lang.String |
getRawResult()
Use this method to get "raw" MRZ detection result in XML format
|
android.graphics.Bitmap |
getSourceImage()
Use this method, to get video stream frame MRZ was detected and recognized on
|
TextField |
getTextFieldByType(int fieldType)
Use this method to get selected text field from MRZ detection parsed results.
|
boolean |
Init(android.content.Context context,
byte[] license)
Performs the resource loading and overall initialization of Document Reader instance
|
static DocumentReader |
Instance()
This method returns a Singleton instance of Documen Reader class
|
int |
processBitmap(android.graphics.Bitmap bitmap)
Use this method to find and recognize MRZ on single images, like ones taken earlier and stored in Gallery
|
int |
processVideoFrame(byte[] frame,
int width,
int height,
int previewFormat)
Use this method to find and recognize MRZ on sequential images, like video stream frames
|
public static final int FORMAT_JSON
public static final int FORMAT_XML
public static final int READER_REQUEST_CODE
public static final java.lang.String CAMERA_ID
public static DocumentReader Instance()
public boolean Init(android.content.Context context, byte[] license)
context
- Current contextlicense
- Library's licensepublic int processBitmap(android.graphics.Bitmap bitmap) throws java.lang.IllegalStateException
bitmap
- Bitmap to find and recognize MRZ onjava.lang.IllegalStateException
public int processVideoFrame(byte[] frame, int width, int height, int previewFormat) throws java.lang.IllegalStateException
frame
- Video frame as byte arraywidth
- Video frame width (Camera.getParameters().getPreviewSize().width)height
- Video frame width (Camera.getParameters().getPreviewSize().height)previewFormat
- Video frame format (Camera.getParameters().getPreviewFormat())java.lang.IllegalStateException
public java.lang.String getRawResult()
public GraphicField getGraphicFieldByType(int fieldType)
fieldType
- One of eGraphicFieldType members, representing the selected field (currently, only gt_Other is used)public android.graphics.Bitmap getSourceImage()
public java.util.List<GraphicField> getAllGraphicFields()
public TextField getTextFieldByType(int fieldType)
fieldType
- one of eVisualFieldType members, representing the selected fieldpublic java.util.List<TextField> getAllTextFields()
public void about(android.content.Context context)
public java.lang.String getLibVersion()