Using the Straighten Columns Function

Images captured from Document Cameras can commonly have two different types of "positional" image distortion; a rotational distortion and page curl distortion from books. TopOCR tries to rectify this distortion by the following process:

  1. Perform a document layout analysis of the image and detect the location of columns of text, graphics and clipped columns of text near the edges of the document.

  2. Determine if this particular image has just one single column of text or has multiple horizontal columns.

  3. In the case of one single column, it will straighten the entire image, if the image has multiple horizontal columns, since each column can have different distortion characteristics, it will try to straighten each individual column separately. This is typical for an image of an open book with two pages, each of which can have its own unique distortion.

  4. TopOCR will straighten the columns of text and also remove graphics and clipped columns of text. The process is very fast, generally taking under .25 sec once an image has been binarized. This process can greatly improve OCR accuracy, in some cases by as much as 40%-50%!

Note: Straighten Columns will not work very well on more extreme cases of cylindrical book curvature. As a consequence of this, it's recommended that you use your hands to flatten and reduce the more extreme cases of book curvature. Doing this in combination with using the the Straighten Columns function will be much more effective at book straightening.

Straighten Columns doesn't touch single lines or short columns of less than 4 lines of text.

Some examples of using the Straighten Columns function is given below in a sequence of input and output images: