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 GenericDocumentType
type
private final List<Field>
fields
private final List<GenericDocument>
children
private final List<PointF>
quad
private final List<PointF>
quadInRoot
private final ImageRef
crop
private final Double
confidence
private final Double
confidenceWeight
-
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 GenericDocumentType
getType()
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 ImageRef
getCrop()
Image crop of the document. final Double
getConfidence()
The average confidence in the accuracy of the document recognition result. final Double
getConfidenceWeight()
The weight of the confidence. final JSONObject
toJson(ToJsonConfiguration config)
final GenericDocument
clone()
Unit
close()
-
-
-
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()
-
-