Filestack Documentation

Class Document​Detection​Transform

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/

DocumentDetectionTransform DocumentDetectionTransform Transform Transform DocumentDetectionTransform->Transform

Superclass

Transform

:nodoc:

Initializers

init()

public init()  

Initializes a DocumentDetectionTransform object.

Methods

coords(_:​)

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

Adds the coords option.

Parameters

value Bool

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

preprocess(_:​)

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

Adds the preprocess option.

Parameters

value Bool

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