Slant correction of handwritten digit recognition system

2016/08/01 18:18
Reading number 602

brief introduction

There are two main types of tilt correction, one is the overall tilt correction, the other is the local tilt correction.

Since this paper mainly studies the recognition of multiple numbers with irregular distribution, we only need to pay attention to the problem of digital correction after extraction, that is, the local correction of images.

Correction algorithm

There are many current correction algorithms, such as:

 For the overall tilt correction, the average pixel height on the left and right sides of the image can be counted, and the correction can be performed by calculating the overall tilt.

This method has obvious processing effect for images with more pixels, and is simple and fast to implement, but it is not suitable for those single digital images that have been extracted, because the images at this time are generally small, and the strokes are thin, and the results after statistics are not correct because the required information is too little.

In fact, the core of correction is to make the gradient of the image close to 0, so it can be regarded as an optimization problem:

 That is to find out how many angles need to be adjusted to minimize the gradient of the image. It can be seen that the gradient determines the quality of the final image. The characteristics of the numbers considered are all narrow and long. We can consider the aspect ratio of the image as the basis for the gradient of the image.

The method used in this paper does not estimate the gradient of the image, but rather uses Binary search The idea is to conduct binary search within the range of 45 degrees of inclination to find the best adjustment point so that the result is approximately optimal. The specific steps are as follows:

 1. Set the maximum adjustment angle. Generally, the inclination will not exceed 45 degrees. If it exceeds the adjustment, it will be meaningless. 2. Calculate the aspect ratio of the image, that is, the gradient. If the gradient is less than the last one, adjust the angle by half and continue searching. If the gradient tends to be stable, exit the search and use the current adjustment angle to adjust. 3. For the actual adjustment process, the rotation transformation operation is generally selected, which is relatively simple. However, considering that the tilt of actual people when writing numbers is not caused by rotation, but may be caused by incorrect posture, so it can not achieve good results only through rotation, so it can be achieved through horizontal lateral correction, That is, keep the height of the pixel unchanged, and make appropriate adjustments only by adjusting the horizontal position.

experimental result

 correct_slope

summary

It can be seen that the correction results of most digital images are quite satisfactory, but there are still some shortcomings:

 Because the lateral stretching will lead to the deformation of the image, the processing effect of the relatively slender image is poor, and the connectivity may be damaged by faults.

In order to solve this problem, proper expansion operation can be carried out before correction, so that the effect will be better.


TBOOX Project Home Page

Expand to read the full text
Loading
Click to lead the topic 📣 Post and join the discussion 🔥
Reward
zero comment
zero Collection
zero fabulous
 Back to top
Top