Extract Document

Kalipso - Form - Actions - Actions Description - Group Files - Extract Document

This action will try to detect the contours of a document and extract that part of the image. It also allows you to convert one image to a new image with a different format. You can change the format (BMP, JPG, GIF, PCX), quality of the image in JPG or even change to grayscale or black and white.

Action available for the following operating systems:

Parameters

  • Source File Name <string> - The full path and name of the source file.

  • Format <numeric> - The type of format of the file to be converted. There are several formats available:

    • 0 - Auto

    • 1 - BMP

    • 2 - JPG

    • 3 - GIF

    • 4 - PCX

  • Target File Name <string> - The target file name that saves the image. The user must indicate the full path and the file name.

  • Format <unquoted string> - The type of format of the saved file. There are several formats available:

    • 0 - Auto

    • 1 - BMP

    • 2 - JPG

    • 3 - GIF

    • 4 - PCX

  • Quality <numeric> - A number that represents the quality of the image. It only available when the image format is JPEG. Quality 1 to 100.

  • Output Color <unquoted string>

    • 1 - Original

    • 2 - Gray Scale

    • 3 - Black and White

  • Threshold Block Size <unquoted string> - Used when extracting to black and white. This is the block size for the adaptive threshold algorithm to determine the neighbor area size. You can read information about it here in OpenCV documentation: https://docs.opencv.org/master/d7/d4d/tutorial_py_thresholding.html

This action uses the Open Computer Vision library to try to detect a document in the area, and convert to the specified color space.

What it does is to try to detect an area with 4 corner points, that should be the 4 corner points of a document. If more than one area is detected, the biggest area will be returned. If no area is detected, the original image is returned.

Last updated