Thinning is a process used in image processing to reduce multiple pixel width into single pixel width.
This process involves deletion of extra pixels in the neighborhood of the pixel without introducing any discontinuity in the connected components.
The thinning method used thins both the contour lines and the characters to their central lines with high speed.
This method is rotation invariant and preserves the topology of the contour lines and symbols.
It checks for the 8-neighborhood of the pixel into consideration and assigns the weight value to it.
The method maintains the connectivity of the contour lines.
ALGORITHM Modified Moore’s neighbor algorithm Input : A square tessellation T containing a connected component P of black cells. Output : A sequence B(b 1 , b 2 , …, b k ) of boundary pixels i.e. the contour line. We define M(p) to be the Moore neighborhood of pixel p , c denotes the current pixel under consideration i.e. c is in M(p) . Begin Set B to be empty. From bottom to top and left to right scan the cells of T until a black pixel, s, of P is found. Insert s in B. Set the current boundary point, p, to s i.e. p = s. Set c to be the next clockwise pixel in M(p). While c is not in B do If c is black Insert c in B. Set p=c. End if Advance c to the next clockwise pixel in M(p). End while Set p=s. Set c to the next anticlockwise pixel in M(p). Repeat previous step with an anticlockwise scan each time in M(p). End.