Tilt Process

Tilt Process



Mangodoc AI

Author: Farin Kulapichitr(ictfarin@gmail.com)

This plugin is used as a preprocessing step before OCR to adjust document tilt to the optimal angle.

To determine document tilt, it detects and utilizes the inclination of lines contained within the document image.

Technical Information: It uses the Fast Line Detector algorithm provided by the opencv-contrib-python package.

For more detailed information, please refer to the official documentation page:

: https://docs.opencv.org/4.x/df/ded/group__ximgproc__fast__line__detector.html



Need help?

Technical contact to tech@argos-labs.com


May you search all operations,

Input(Properties)

|

Parameter Name
Description

Input File

Path of the input image to process (e.g., path\input.png).

Output File

Path of the output image (e.g., path\output.png).

Length Threshold1

Minimum line length used for tilt detection (*px).

Distance Threshold1

The length at which broken lines are permitted to join (*px).

The following two parameters will be processed only when the slope falls within the range of Max Angle and Min Angle.

Max Angle

Maximum accuracy allowing adjustment processing (*percent). Will not handle excessive tilts.

Min Angle

Minimum accuracy allowing adjustment processing (*percent). Will not process small tilts.

Min Rotate

If the image is tilted beyond the specified angle in the adjustment results, it will not be output.

Please refer to:

https://docs.opencv.org/4.x/df/ded/group__ximgproc__fast__line__detector.html

Return Value

No specific Return type for this plugin (neither String, CSV, nor, File).

The result of the processed image will be saved in the directory specified via the input parameter Output File.

Return Code

Code

Description

0

Success

1

Failure: Invalid input (Missing input, wrong type, etc.)

98

Failure: Exceptional case







All Plugins