eu.id3.document

## Class DetectedDocument

- java.lang.Object
- - eu.id3.document.DetectedDocument

- All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable

      public class DetectedDocument
      extends java.lang.Object
      implements java.lang.AutoCloseable, java.io.Serializable

  Represents a detected document.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DetectedDocument()` Creates a new instance of the DetectedDocument class.
    `DetectedDocument(long handle)` Creates a new instance of the DetectedDocument class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DetectedDocument` | `clone()` Creates a copy of the DetectedDocument object.
    `void` | `close()` Releases all resources used by this DetectedDocument.
    `protected void` | `finalize()` Finalizer for this class.
    `PointList` | `getBounds()` Gets the boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
    `int` | `getConfidence()` Gets the confidence score of the detected document, from 0 to 100.
    `long` | `getHandle()` Gets the native handle.
    `DocumentInfo` | `getInfo()` Gets the document information.
    `DocumentOrientation` | `getOrientation()` Gets the document orientation in source image. [0,0,0] means the document is in front of the camera.
    `void` | `setBounds(PointList bounds)` Sets the boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DetectedDocument

          public DetectedDocument()
                           throws DocumentException

      Creates a new instance of the DetectedDocument class.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### DetectedDocument

          public DetectedDocument(long handle)
                           throws DocumentException

      Creates a new instance of the DetectedDocument class.
      Parameters:
        `handle` - Handle to the DetectedDocument.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

  - ### Method Detail

    - #### close

          public void close()

      Releases all resources used by this DetectedDocument.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### finalize

          protected void finalize()

      Finalizer for this class. Finalizers are deprecated since Java 9+. This method is not guaranteed to be called. To release all memory held by this class please be sure to call the close() method.
      Overrides:
        `finalize` in class `java.lang.Object`

    - #### getHandle

          public long getHandle()

      Gets the native handle.
      Returns:
        The native handle.

    - #### clone

          public DetectedDocument clone()
                                 throws DocumentException

      Creates a copy of the DetectedDocument object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        The newly created DetectedDocument object.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### getBounds

          public PointList getBounds()
                              throws DocumentException

      Gets the boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
      Returns:
        Boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### setBounds

          public void setBounds(PointList bounds)
                         throws DocumentException

      Sets the boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
      Parameters:
        `bounds` - Boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### getConfidence

          public int getConfidence()
                            throws DocumentException

      Gets the confidence score of the detected document, from 0 to 100.
      Returns:
        Confidence score of the detected document, from 0 to 100.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### getInfo

          public DocumentInfo getInfo()
                               throws DocumentException

      Gets the document information.
      Returns:
        Document information.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### getOrientation

          public DocumentOrientation getOrientation()
                                             throws DocumentException

      Gets the document orientation in source image. [0,0,0] means the document is in front of the camera.
      Returns:
        Document orientation in source image. [0,0,0] means the document is in front of the camera.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

Copyright © 2020-2030, id3 Technologies. All rights reserved. eu.id3.document