Deskewing Using Binary and Grayscale Images

2166 Words5 Pages

1.6.3 Deskewing using binary and grayscale images

Method 1

This first algorithm uses the information of the binary and grayscale images to estimate the

skew angle. It is based on the binary images filtering algorithm 1.2.1, the Sobel edge detection

filter and the classical Hough transform.

Because we are looking for angles between -25 and 25 degrees, the length of the window is

set to 3 and the threshold to 2 for the filtering algorithm.

If a white pixel satisfies the conditions of the filtering algorithm, we then apply the Sobel edge

detection filter at the considered point on the grayscale image.

If the gradient magnitude is greater than 255, votes are performed in all directions in the ac-

cumulator.

Peaks in the accumulator are located by using the method proposed in 1.5.2.

Method 2

This method only differs from the previous in the voting scheme. As a matter of fact, instead of

voting in all directions, the gradient directory is used to compute the estimated skew angle at

the considered point by using (1.12).

In order to keep accuracy, votes are performed between θ − 2◦ and θ + 2◦ .

In order to increase the algorithm accuracy for little cropped image, it might be interesting

to vote in more directions than -2 to 2 degrees. However, this implies a greater computational

time for maybe not a greater accuracy.

1.7 Results

For the experimentation, 25 documents from magazines, business letters, annual reports were

considered. The documents are tested by prespecified angles between 0 and 25 degrees.

The following table gives the mean (M), the standard deviation (SD) and the computational

time (T) in seconds for the different proposed methods.

These tests were performed on a Pentium 4 ...

... middle of paper ...

...s were made on 12 randomly

chosen words or groups of words.

Finally, the boldness could be estimated by looking to the estimated boldness variation be-

tween words on the same line. It also mandatory to notice that the estimated boldness varies

depending on the words fonts.

2.4 Scaling algorithms

2.4.1 Scale2x

Scale2x is real-time graphics effect able to increase the size of small bitmaps guessing the miss-

ing pixels without interpolating pixels and blurring the images.

It was originally developed for the AdvanceMAME project in the year 2001 to improve the

quality of old games with a low video resolution. Derivative Scale3x and Scale4x effects which

scale the image of 3x and 4x are also available (8).

The image upsampling is computed by applying some rules to each pixel of the input image.

First we consider the following 3 × 3 matrix:

Open Document