Binary Thinning Algorithms for Image Processing
Explore various thinning algorithms used to convert thick binary images to thin ones, with examples and rules for effective image processing.
Binary Thinning Algorithms for Image Processing
E N D
Presentation Transcript
Binary Thinning Algorithms Thick images Thin images Color images Character Recognition (OCR)
Thinning of thick binary images Thinning: from many pixels width to just one • Much work has been done on the thinning of ``thick'' binary images, • where attempts are made to reduce shape outlines which are many pixels thick to outlines which are only one pixel thick. • Skeletonization
Thinning using Zhang and Suen algorithm [1984].) (b) is slightly increased image Point just removed 7 8 26 25 results of the first pass results of the second pass final results
Example 1 of Rules for Thinning Algorithm Rule 1 All four rules can be illustrated like that New and old one Old one Don’t care Rule 2 Rule 3 Rule 4 Rule 1
Applying thinning to fault detection in PCB All lines are thinned to one pixel width Now you can check connectivity
Thinning Algorithm Correct background shows desired shape of letter T image • Thinning algorithm is sensitive to corrupted image segments Noise leads to lack of connectivity. BAD
Thinning of thin binary images Rules of binary thinning • We will present the rules used for the ``binary thinning'' which is applied to the edge images (found using the edge detector). • The rules are simple and quick to carry out, requiring only one pass through the image.
The SUSAN Thinning Algorithm • It follows a few simple rules • remove spurious or unwanted edge points • add in edge points where they should be reported but have not been. • The rules fall into three categories; • removing spurious or unwanted edge points • adding new edge points • shifting edge points to new positions. • Note that the new edge points will only be created if the edge response allows this. These all can be called “local improving” rules
The SUSAN Thinning Algorithm 0 neighbors • The rules are listed according to the number of edge point neighbours which an edge point has (in the eight pixel neighbourhood) 1 neighbor 2 neighbors 2 neighbors 3 neighbors Discuss size of window and direction of movement
The SUSAN Thinning Algorithm • 0 neighbors. • Remove the edge point. • 1 neighbor. • Search for the neighbor with the maximum (non-zero) edge response, to continue the edge, and to fill in gaps in edges. • The responses used are those found by the initial stage of the SUSAN edge detector, before non-maximum suppression. • They are slightly weighted according to the existing edge orientation so that the edge will prefer to continue in a straight line. • An edge can be extended by a maximum of three pixels. Filling gaps by adding new edge points
The SUSAN Thinning Algorithm “Edge response” is a measure of neighborhood • 2 neighbours. • There are three possible cases: • 1. If the point is ``sticking out'' of an otherwise straight line, then compare its edge response to that of the corresponding point within the line. • If the potential point within the straight edge has an edge response greater than 0.7 of the current point's response, move the current point into line with the edge. • 2. If the point is adjoining a diagonal edge then remove it. • 3. Otherwise, the point is a valid edge point. My point has two neighbors My point has two neighbors
The SUSAN Thinning Algorithm • More than 2 neighbours. • If the point is not a link between multiple edgesthen thin the edge. • This will involve a choice between the current point and one of its neighbours. • If this choice is made in a logical consistent way then a ``clean'' looking thinned edge will result.
The SUSAN Thinning Algorithm How rules are applied? • These rules are applied to every pixel in the image sequentially left to right and top to bottom. • If a change is made to the edge image then the current search point is moved backwards up to two pixelsleftwards and upwards. • This means that iterative alterations to the image can be achieved using only one pass of the algorithm.
Correct and Incorrect Thinning Examples • X correct • V misread as Y • 8 has noise added and not removed, wrong semantic network will be created
Good thinning examples • Here every symbol correctly thinned
Another set of Rules for Thinning Algorithm Thinning Rules new Old and new Down rules • Examples of rules for shifting up and down algorithm Up rules
Tracing Direction from left to right Tracing direction • Notation for points in window • Rules based on point replacements
Tracing Direction This pixed changed to white
Example of bad thinning • We would like to have one pixel width everywhere
Encoding to discrete angles • Image after thinning
Replacement of blocks with points Select the closest point Coding in 8 directions Also, coding in 4 directions or more directions
Polygon Approximation -Encoding We start with the set of rectangles with points inside • Two Methods are used: • Included objects • Minimal objects • Included objects Line Segments make minimum change to the line
start • (a) original figure, (b) computation of distances,(c) connection of vertices, (d) resultant polygon Draw straight angles Method of minimal objects
Encoding of figures • (a) completion of a figure • (b) partitioning to segments
영문자 숫자 한글 한자
Feature segmentation A Dist(A,B) vs Dist(A,C) C B
Distortion at Crossing Point Thinning OverlappingStroke @99 Daru 김진형
Erosion at end point Noise Sensitivity Thinning @99 Daru 김진형
Gray-scale Image @99 Daru 김진형
1:N Stroke Matching reference Model input character @99 Daru 김진형
Processing Whole Image • original