List of OCR Image Filters
The OCR Image Filters is one of the Template Options in the Document Parser. There are two ways to add them. You can click on the Template Options
button right below the Template Name field or click on the Edit Template
button and look for the "ocrImageFilters"
option.
Here's how you declare a single filter.
{
"ocrImageFilters": "deskew"
}
To declare multiple filters, use a comma to separate the them.
{
"ocrImageFilters": "dilate, gamma(1.4), removeVerticalLines"
}
Here are the list of the different filters and their functions.
deskew
- straightens a crooked image.dilate
- cures broken letters.removeVerticalLines
- removing vertical lines helps to avoid segmentation errors of the OCR engine.removeHorizontalLines
- removes unnecessary horizontal lines and also helps avoid segmentation errors of the OCR engine.median
- removes noise.gamma(1.4)
- deals with blurred letters. Value can go from0.6
to2.0
.contrast(-20)
- helps make an object distinguishable from other objects. Value can go from-60
to60
.