Document Deskewer

Author: Sebastian Kirch (Fraunhofer IAIS)

The scanning of printed documents involves several challenges that result from the quality of the material to be scanned and the scanning process itself. One of these challenges is the accidental production of skewed images due to an imprecise alignment of the printed document (Figure 1).

deskewer1

Figure 1: Skewed image due to an imprecise alignment of the document

 The Document Deskewer is a simple and easy to use command-line tool for automatically correcting skewed pages. Given a skewed input image the tool detects the skew angle and automatically corrects the rotation for the full range of 0-360 degrees. The processing can be adjusted using parameters which allow the user to select the resampling method or the colour used to fill blank areas introduced by the image rotation.

This tool is particularly interesting for institutions with printed material which is difficult to scan and thus might result in skewed images. By correcting skewed images it is possible to improve the results of subsequent post-processing steps such as OCR or to improve the overall visual appearance of an image that is supposed to be shown to users.

The Document Deskewer can be integrated into the existing scanning and post-processing workflow to correct these images. The best results are achieved for documents written in Roman scripts.