Variable ScanbotDocumentEnhancerConst

ScanbotDocumentEnhancer: {
    straightenImage(params): Promise<DocumentStraighteningResult>;
}

Entry point for all Document Enhancer features.

Type declaration

  • straightenImage:function
    • Straightens the document effectively straightening its edges and text.

      Parameters

      • params: {
            image: ImageInput;
            priorCornersNormalized?: Point[];
            straighteningParameters: DocumentStraighteningParameters;
        }
        • image: ImageInput

          The image of the document to straighten.

        • Optional priorCornersNormalized?: Point[]

          If the corners are already known (e.g. from a prior detection), they can be provided here. The enhancer may take them into account to locate the document more accurately.

        • straighteningParameters: DocumentStraighteningParameters

          The parameters to use for straightening.

      Returns Promise<DocumentStraighteningResult>

      • The result of the straightening operation.