Title: Fast and Accurate Detection of Document Skew and Orientation
1Fast and Accurate Detection of Document Skew and
Orientation
Shijian Lu, Jie Wang, and Chew Lim Tan (dcslsj,
wangjie, tancl_at_comp.nus.edu.sg) School of
Computing, National University of Singapore
Introduction and objectives Documents are often
degraded by the rotation-induced skew, which must
be corrected before the ensuing processing tasks.
Besides, documents are sometimes scanned
upside-down and document orientation needs to be
detected as well.
Finally, the overall document skew angle can be
estimated as follows
Our Methods
The proposed technique estimates document skew
based on the observation that text images
normally hold a large amount of equidistant
interline spacing, which can be detected by the
white run illustrated in Figure 1.
Figure 3 The detection of second peak runs
spanning across the interline spacing
Figure 1 Definition of white run and different
types of white runs
Given a skewed document image, a horizontal and
vertical white run histograms are first
constructed. Figure 2 shows the horizontal and
vertical white run histograms built based on the
two documents in Figures 3(a) and 4(a).
Figure 2 Built white run histograms
Figure 4 The detection of white runs lying over
character ascenders and descenders
The second peak corresponding to the white runs
that span the interline spacing can thus be
detected as follows
Experimental Results
52 skewed document images have been experimented.
Experimental results show that the proposed
technique is much faster and more accurate than
most reported skew estimation techniques as shown
in Table 1. Besides, orientations of 49 of the 52
test documents are correctly detected as well.
where the L can be determined as the white run
length that maximizes the inter-class variance of
the histogram as follows
Table 1 Character classification based on
perspective invariants
The detected peak white runs in Figure 3(b) are
then clustered as follows
A skew angle is thus estimated based on the white
run cluster formed by each peak white run as
follows
The skew angle can thus be estimated based on
median skew angle
The white runs labeled by 3 in Figure 1 is then
detected and Figure 4 shows detected white runs.
The document orientation can accordingly be
estimated based on the numbers of character
ascenders and descenders
- Discussion
- A document skew and orientation detection
technique is reported, which is fast and accurate
and able to handle most of scanned text
documents. - 2. The proposed technique can be extended to
detect the skew of other non-Latin documents.
However, the orientation of non-Latin documents
cannot be detected by the proposed white run
information. Well study this in our future work.