Thinning image of handwritten digit recognition system

2016/07/31 13:18
Number of readings 438

brief introduction

The so-called thinning is to remove some points from the original image after layers of stripping, but still keep the original shape until the skeleton of the image is obtained.

The skeleton can be understood as the central axis of the image. For example, a rectangular skeleton is the central axis of its rectangle upward; The skeleton of the square is its center point; The skeleton of a circle is its center, the skeleton of a line is itself, and the skeleton of an isolated point is itself.

Refine deletion conditions

  • Internal points cannot be deleted
  • Orphans cannot be deleted
  • Line endpoints cannot be deleted
  • If P is the boundary point, after removing P, if the connected component does not increase, P can be deleted

Refine Steps

Through the erosion thinning method based on mathematical morphology and the deletion conditions just mentioned, the matching deletion is carried out. Because it is a direct judgment, this step of template matching is saved.

For the eight neighborhoods of 3 * 3, perform the following operations:

 || p3 || p2 || p9 || || p4 || p1 || p8 || || p5 || p6 || p7 ||
 Where p1=1 is a black dot. If the following four conditions are met at the same time, p1 is deleted, that is, p1=0: 2 ≤ NZ (p1) ≤ 6//Used to exclude isolated points and internal points NZ (p1)=l//NZ (p1) is the number of branches at p1 point. If the number of branches is 1, it indicates the boundary point. After deletion, no connected component will be added p2 * p4 * p8 = 0 or NZ(p2) !=  1//Delete downwards to avoid interruption p2 * p4 * p6 = 0 or NZ(p4) !=  1//Delete to the right to avoid interruption p6 * p8 * p2 = 0 or NZ(p8) !=  1//Delete to the left to avoid interruption p6 * p4 * p8 = 0 or NZ(p6) !=  1//Delete upward to avoid interruption

experimental result

Before refinement:

 thin_1

After refinement:

 thin_2

Deficiency and improvement

It can be seen that the effect of using this algorithm is good, but there are still many shortcomings, such as:

  • Necking: deformation occurs at the intersection of lines
  • Extra branches: extra branches will be generated due to uneven thickness of lines
  • Head reduction: the ends of thicker lines are easy to be reduced in layer by layer corrosion, which is especially serious for the originally shorter digital lines.

Although there are some solutions to these problems, the effect of my current implementation is not good and needs further research

reference

If you want to know more about digital image processing, you can go to my Bookcase Look at that book by Gonzalez digital image processing It's still very classic..


TBOOX Project Home Page

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