Package io.scanbot.sdk.genericdocument
Class GenericDocument
- java.lang.Object
-
- io.scanbot.sdk.genericdocument.GenericDocument
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class GenericDocument extends java.lang.Object implements java.lang.AutoCloseableGeneric document.
-
-
Constructor Summary
Constructors Constructor Description GenericDocument(GenericDocumentType type, java.util.List<Field> fields, java.util.List<GenericDocument> children, java.util.List<PointF> quad, java.util.List<PointF> quadInRoot)Constructs GenericDocument with default parameters.GenericDocument(GenericDocumentType type, java.util.List<Field> fields, java.util.List<GenericDocument> children, java.util.List<PointF> quad, java.util.List<PointF> quadInRoot, ImageRef crop, double confidence, double confidenceWeight)Constructs GenericDocument with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes native resources (images) held by the object.java.util.List<GenericDocument>getChildren()Getter for children field.doublegetConfidence()Getter for confidence field.doublegetConfidenceWeight()Getter for confidenceWeight field.ImageRefgetCrop()Getter for crop field.java.util.List<Field>getFields()Getter for fields field.java.util.List<PointF>getQuad()Getter for quad field.java.util.List<PointF>getQuadInRoot()Getter for quadInRoot field.GenericDocumentTypegetType()Getter for type field.
-
-
-
Constructor Detail
-
GenericDocument
public GenericDocument(GenericDocumentType type, java.util.List<Field> fields, java.util.List<GenericDocument> children, java.util.List<PointF> quad, java.util.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 0confidenceWeight- 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, java.util.List<Field> fields, java.util.List<GenericDocument> children, java.util.List<PointF> quad, java.util.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 Detail
-
getType
public GenericDocumentType getType()
Getter for type field. See constructor documentation for more information about the field.- Returns:
- type
-
getFields
public java.util.List<Field> getFields()
Getter for fields field. See constructor documentation for more information about the field.- Returns:
- fields
-
getChildren
public java.util.List<GenericDocument> getChildren()
Getter for children field. See constructor documentation for more information about the field.- Returns:
- children
-
getQuad
public java.util.List<PointF> getQuad()
Getter for quad field. See constructor documentation for more information about the field.- Returns:
- quad
-
getQuadInRoot
public java.util.List<PointF> getQuadInRoot()
Getter for quadInRoot field. See constructor documentation for more information about the field.- Returns:
- quadInRoot
-
getCrop
public ImageRef 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 interfacejava.lang.AutoCloseable
-
-