Class GenericDocument
-
- All Implemented Interfaces:
-
android.os.Parcelable,java.lang.AutoCloseable
public final class GenericDocument implements AutoCloseable, Parcelable
Generic document.
-
-
Field Summary
Fields Modifier and Type Field Description private final GenericDocumentTypetypeprivate final List<Field>fieldsprivate final List<GenericDocument>childrenprivate final List<PointF>quadprivate final List<PointF>quadInRootprivate final ImageRefcropprivate final Doubleconfidenceprivate final DoubleconfidenceWeight
-
Constructor Summary
Constructors Constructor Description GenericDocument(Map<String, Object> source)GenericDocument(JSONObject json)GenericDocument(GenericDocumentType type, List<Field> fields, List<GenericDocument> children, List<PointF> quad, List<PointF> quadInRoot, ImageRef crop, Double confidence, Double confidenceWeight)
-
Method Summary
Modifier and Type Method Description final GenericDocumentTypegetType()Document type. final List<Field>getFields()List of document fields. final List<GenericDocument>getChildren()List of document sub-documents. final List<PointF>getQuad()Coordinates of the document in the parent document coordinate system. final List<PointF>getQuadInRoot()Coordinates of the document in the root document coordinate system. final ImageRefgetCrop()Image crop of the document. final DoublegetConfidence()The average confidence in the accuracy of the document recognition result. final DoublegetConfidenceWeight()The weight of the confidence. final JSONObjecttoJson(ToJsonConfiguration config)final GenericDocumentclone()Unitclose()-
-
Constructor Detail
-
GenericDocument
GenericDocument(JSONObject json)
-
-
Method Detail
-
getType
final GenericDocumentType getType()
Document type.
-
getChildren
final List<GenericDocument> getChildren()
List of document sub-documents.
-
getQuad
final List<PointF> getQuad()
Coordinates of the document in the parent document coordinate system.
-
getQuadInRoot
final List<PointF> getQuadInRoot()
Coordinates of the document in the root document coordinate system.
-
getConfidence
final Double getConfidence()
The average confidence in the accuracy of the document recognition result.
Default is 0
-
getConfidenceWeight
final Double getConfidenceWeight()
The weight of the confidence. Can be used to calculate the weighted average confidence of two documents.
Default is 0
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final GenericDocument clone()
-
-
-
-