Package io.scanbot.sdk.genericdocument
Class GenericDocument
java.lang.Object
io.scanbot.sdk.genericdocument.GenericDocument
- All Implemented Interfaces:
AutoCloseable
Generic document.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericDocument(GenericDocumentType type, List<Field> fields, List<GenericDocument> children, List<PointF> quad, List<PointF> quadInRoot) Constructs GenericDocument with default parameters.GenericDocument(GenericDocumentType type, List<Field> fields, List<GenericDocument> children, List<PointF> quad, List<PointF> quadInRoot, ImageRef crop, double confidence, double confidenceWeight) Constructs GenericDocument with the given params. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes native resources (images) held by the object.Getter for children field.doubleGetter for confidence field.doubleGetter for confidenceWeight field.getCrop()Getter for crop field.Getter for fields field.getQuad()Getter for quad field.Getter for quadInRoot field.getType()Getter for type field.
-
Constructor Details
-
GenericDocument
public GenericDocument(GenericDocumentType type, List<Field> fields, List<GenericDocument> children, List<PointF> quad, List<PointF> quadInRoot, ImageRef crop, double confidence, double confidenceWeight) Constructs GenericDocument with the given params.- Parameters:
type- Document type.fields- List of document fields.children- List of document sub-documents.quad- Coordinates of the document in the parent document coordinate system.quadInRoot- Coordinates of the document in the root document coordinate system.crop- Image crop of the document.confidence- The average confidence in the accuracy of the document recognition result. Default is `0`.confidenceWeight- The weight of the confidence. Can be used to calculate the weighted average confidence of two documents. Default is `0`.
-
GenericDocument
public GenericDocument(GenericDocumentType type, List<Field> fields, List<GenericDocument> children, List<PointF> quad, List<PointF> quadInRoot) Constructs GenericDocument with default parameters.- Parameters:
type- Document type.fields- List of document fields.children- List of document sub-documents.quad- Coordinates of the document in the parent document coordinate system.quadInRoot- Coordinates of the document in the root document coordinate system.
-
-
Method Details
-
getType
Getter for type field. See constructor documentation for more information about the field.- Returns:
- type
-
getFields
Getter for fields field. See constructor documentation for more information about the field.- Returns:
- fields
-
getChildren
Getter for children field. See constructor documentation for more information about the field.- Returns:
- children
-
getQuad
Getter for quad field. See constructor documentation for more information about the field.- Returns:
- quad
-
getQuadInRoot
Getter for quadInRoot field. See constructor documentation for more information about the field.- Returns:
- quadInRoot
-
getCrop
Getter for crop field. See constructor documentation for more information about the field.- Returns:
- crop
-
getConfidence
public double getConfidence()Getter for confidence field. See constructor documentation for more information about the field.- Returns:
- confidence
-
getConfidenceWeight
public double getConfidenceWeight()Getter for confidenceWeight field. See constructor documentation for more information about the field.- Returns:
- confidenceWeight
-
close
public void close()Closes native resources (images) held by the object.- Specified by:
closein interfaceAutoCloseable
-