Thinning Algorithms - PowerPoint PPT Presentation

About This Presentation
Title:

Thinning Algorithms

Description:

Thinning Algorithms Thick images Thin images Color images Character Recognition (OCR) Thinning: from many pixels width to just one Much work has been done on the ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 38
Provided by: webCecsP49
Learn more at: http://web.cecs.pdx.edu
Category:

less

Transcript and Presenter's Notes

Title: Thinning Algorithms


1
Thinning Algorithms
Thick images Thin images Color images Character
Recognition (OCR)
2
Thinning from many pixels width to just one
Thinning of thick binary images
  • 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

3
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
4
Example of Thinning algorithm from Zhang and Suen
1984
5
Example 1 of Rules for Thinning Algorithm
Rule 1
All four rules can be illustrated like that
New and old one
Old one
Dont care
Rule 2
Rule 3
Rule 4
Rule 1
6
Applying thinning to fault detection in PCB
All lines are thinned to one pixel width Now you
can check connectivity
7
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
8
Thinning applied after Edge Detection
9
Rules of binary thinning
Thinning of thin binary images
  • 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.

10
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
11
The SUSAN Thinning Algorithm
  • The rules are listed according to the number of
    edge point neighbours which an edge point has (in
    the eight pixel neighbourhood)

0 neighbors
1 neighbor
2 neighbors
2 neighbors
3 neighbors
Discuss size of window and direction of movement
12
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
13
The SUSAN Thinning Algorithm
  • 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.

Edge response is a measure of neighborhood
My point has two neighbors
My point has two neighbors
14
The SUSAN Thinning Algorithm
  • More than 2 neighbours.
  • If the point is not a link between multiple edges
    then 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.

15
How rules are applied?
The SUSAN Thinning Algorithm
  • 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
    pixels leftwards and upwards.
  • This means that iterative alterations to the
    image can be achieved using only one pass of the
    algorithm.

16
  • Thinning can remove certain types of lines from
    the image

17
Correct and Incorrect Thinning Examples
  • X correct
  • V misread as Y
  • 8 has noise added and not removed, wrong semantic
    network will be created

18
Good thinning examples
  • Here every symbol correctly thinned

19
Thinning Rules
Another set of Rules for Thinning Algorithm
  • Examples of rules for shifting up and down
    algorithm

new
Old and new
Down rules
Up rules
20
Tracing direction
Tracing Direction from left to right
  • Notation for points in window
  • Rules based on point replacements

21
Tracing Direction
This pixed changed to white
22
Example of bad thinning
  • We would like to have one pixel width everywhere

23
Thinning algorithm for images from polygons
24
Typical errors of thinning algorithms
25
Gradient based thinning
26
Encoding shapes after thinning
27
Encoding to discrete angles
  • Image after thinning

28
Use of angles in encoding
29
Replacement of blocks with points
Coding in 8 directions
Select the closest point
Also, coding in 4 directions or more directions
30
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
31
  • (a) original figure, (b) computation of
    distances, (c) connection of vertices, (d)
    resultant polygon

start
Draw straight angles
Method of minimal objects
32
Encoding of figures
  • (a) completion of a figure
  • (b) partitioning to segments

33
Problems
  • 1. Write a program for thinning with your own set
    of rules, that transform a kernel (3 by 3 or
    larger) to a point
  • 2. Write a program for thinning that replaces
    rectangle to rectangle according to one of sorted
    rules, about 10 rules.
  • 3. Compare with Zhang and Suen algorithm on
    images from FAB building interiors

34
More Problems to solve
  • The slides describe the rules used for the
    binary thinning'' which is applied to the edge
    images (found using the SUSAN edge detector - see
    9,8) after non-maximum suppression has taken
    place. The rules are simple and quick to carry
    out, requiring only one pass through the image.
    Similar text originally appeared in Appendix B of
    7.
  • Write LISP program with the code of this edge
    detector and check it on similar images.
  • For examples and reviews of work on
    skeletonization'' see 6,4,1,2,5. Implement
    any of these programs in LISP. Parametrize it.

35
Introduction
  • 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.
  • However, because of the non-maximum suppression
    which is applied before thinning in edge
    detectors such as SUSAN, this kind of approach is
    not necessary.

36
Literature
  • 1 R.M. Haralick. Performance characterization in
    image analysis Thinning, a case in point.
    Pattern Recognition Letters, 135--12, 1992.
  • 2 P. Kumar, D. Bhatnagar, and P.S. Umapathi Rao.
    Pseudo one pass thinning algorithm. Pattern
    Recognition Letters, 12543--555, 1991.
  • 3 O. Monga, R. Deriche, G. Malandain, and J.P.
    Cocquerez. Recursive filtering and edge tracking
    Two primary tools for 3D edge detection. Image
    and Vision Computing, 9(4)203--214, 1991.
  • 4 J.A. Noble. Descriptions of Image Surfaces.
    D.Phil. thesis, Robotics Research Group,
    Department of Engineering Science, Oxford
    University, 1989.
  • 5 M. Otte and H.-H. Nagel. Extraction of line
    drawings from gray value images by non-local
    analysis of edge element structures. In Proc. 2nd
    European Conf. on Computer Vision, pages
    687--695. Springer-Verlag, 1992.

37
Literature
  • 6 S. Pal. Some Low Level Image Segmentation
    Methods, Algorithms and their Analysis. PhD
    thesis, Indian Institute of Technology, 1991.
  • 7 S.M. Smith. Feature Based Image Sequence
    Understanding. D.Phil. thesis, Robotics Research
    Group, Department of Engineering Science, Oxford
    University, 1992.
  • 8 S.M. Smith. SUSAN -- a new approach to low
    level image processing. Internal Technical Report
    TR95SMS1, Defence Research Agency, Chobham Lane,
    Chertsey, Surrey, UK, 1995. Available at
    www.fmrib.ox.ac.uk/steve for downloading.
  • 9 S.M. Smith and J.M. Brady. SUSAN - a new
    approach to low level image processing. Int.
    Journal of Computer Vision, 23(1)45--78, May
    1997.
Write a Comment
User Comments (0)
About PowerShow.com