.. index:: 
  !DetectedDocument Class

.. _id3_document_detected_document_class:

===============================================================================
DetectedDocument Class
===============================================================================

Namespace: :ref:`id3.Document<reference_document>`

.. toctree::
  :hidden:

  bounds<bounds>
  clone<clone>
  confidence<confidence>
  info<info>
  orientation<orientation>


Definition
----------
.. line-block::
    Represents a detected document.

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        class DetectedDocument

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        class DetectedDocument implements Finalizable

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public partial class DetectedDocument

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public class DetectedDocument implements AutoCloseable, Serializable

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public class DetectedDocument

    .. tab-item:: C
      :sync: C

      .. code:: C

        typedef struct id3DetectedDocument *ID3_DETECTED_DOCUMENT;



Usage
-----

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        detectedDocumentInstance = DetectedDocument()
        # ...

      **Explicit destruction**

      .. code:: Python

        # ...
        del detectedDocumentInstance

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        final detectedDocumentInstance = sdk.DetectedDocument();
        // ...

      **Explicit destruction**

      .. code:: Dart

        // ...
        detectedDocumentInstance.dispose()

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        using (var detectedDocumentInstance = new DetectedDocument())
        {
           // ...
        }

      **Explicit destruction**

      .. code:: C#

        var detectedDocumentInstance = new DetectedDocument()
        // ...
        detectedDocumentInstance.Dispose()

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        try (DetectedDocument detectedDocumentInstance = new DetectedDocument()) {
        // ...
        }

      **Explicit destruction**

      .. code:: Java

        DetectedDocument detectedDocumentInstance = new DetectedDocument();
        // ...
        detectedDocumentInstance.close();

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        private var detectedDocumentInstance: DetectedDocument? = nil
        detectedDocumentInstance = try DetectedDocument()

    .. tab-item:: C
      :sync: C

      .. code:: C

        ID3_DETECTED_DOCUMENT hDetectedDocument{};
        int err = id3DetectedDocument_Initialize(&hDetectedDocument);
        if (err == ID3_SUCCESS) {
            // ...
            id3DetectedDocument_Dispose(&hDetectedDocument);
        }


Properties
----------

.. list-table:: 
  :width: 100%
  :widths: 30 5 65
  :header-rows: 1

  * - Name
    - Type
    - Description
  * - :ref:`bounds<id3_document_detected_document_bounds_class_member>`
    - :ref:`PointList<id3_document_point_list_class>`
    - Boundaries of the document detected, in the following order: top-left, top-right, bottom-right, bottom-left.
  * - :ref:`confidence<id3_document_detected_document_confidence_class_member>`
    - int
    - Confidence score of the detected document, from 0 to 100.
  * - :ref:`info<id3_document_detected_document_info_class_member>`
    - :ref:`DocumentInfo<id3_document_document_info_class>`
    - Document information.
  * - :ref:`orientation<id3_document_detected_document_orientation_class_member>`
    - :ref:`DocumentOrientation<id3_document_document_orientation_struct>`
    - Document orientation in source image. [0,0,0] means the document is in front of the camera.

Methods
-------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`clone<id3_document_detected_document_clone_class_method>`
    - Clones the DetectedDocument object.
