How to improve table recognition quality?
In some cases, it is possible to get a corrupted layout, because the tables in the document were not detected.
- Make sure that your images come in sufficient quality. Recommended is 300 DPI, color or grayscale images.
- If documents have good quality, then make sure that any of the parameters below are not used because they turn off table detection:
- IPageAnalysisParams.EnableTextExtractionMode = true;
- IPageAnalysisParams.DetectTables = false;
- It is possible to use the following parameter to make table detection a priority for the Analyser:
- IPageAnalysisParams.AggressiveTableDetection = true;
- In rare cases, FineReader Engine cannot detect tables even if forced. For example, this happens if your table has a lot of decorative formatting, does not have clear separators or decorate fonts are not detected clearly.
There is one last method of table recognition, applicable only to the pages, which consist of the table alone (no pictures or text blocks outside the table). It is possible to create a table block covering the whole page area and forcefully analyze that block. C# code sample:
FREngine.IRegion wholePageRegion = engineLoader.Engine.CreateRegion();
wholePageRegion.AddRect(0, 0, document.Pages.ImageDocument.BlackWhiteImage.Width, document.Pages.ImageDocument.BlackWhiteImage.Height);
FREngine.IBlock block = document.Pages.Layout.Blocks.AddNew(FREngine.BlockTypeEnum.BT_Table, wholePageRegion);
FREngine.ITableBlock tableBlock = block.GetAsTableBlock();