DocumentDetectionTransform

public class DocumentDetectionTransform : Transform

Detects your document in the image, transforms it to fully fit the image, and preprocesses it using de-noising and distortion reduction in order to increase the accuracy of OCR engine in text extraction.

For more information, please check: https://www.filestack.com/docs/concepts/tasks/document-detection/

Lifecycle

  • Initializes a DocumentDetectionTransform object.

    Declaration

    Swift

    public init()

Public Functions

  • Adds the coords option.

    Declaration

    Swift

    @discardableResult
    func coords(_ value: Bool) -> Self

    Parameters

    value

    If true, it returns the coordinates of the detected document in the image.

  • Adds the preprocess option.

    Declaration

    Swift

    @discardableResult
    func preprocess(_ value: Bool) -> Self

    Parameters

    value

    If true, it returns the preprocessed image, otherwise the warped one will be returned instead.