0% found this document useful (0 votes)
47 views43 pages

Binary Image Analysis: Skeleton Finding Via Distance Transform

The document discusses various techniques for analyzing binary images, including skeletonization, boundary and skeleton representations, and applications. It covers finding connectivity and the Euler number to characterize image topology. Boundary representations like chain codes, shape numbers, and Fourier descriptors are examined. Skeleton representations using string codes, tree grammars and automata are also introduced. Example applications provided are character, barcode and handwriting recognition.

Uploaded by

Lal Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views43 pages

Binary Image Analysis: Skeleton Finding Via Distance Transform

The document discusses various techniques for analyzing binary images, including skeletonization, boundary and skeleton representations, and applications. It covers finding connectivity and the Euler number to characterize image topology. Boundary representations like chain codes, shape numbers, and Fourier descriptors are examined. Skeleton representations using string codes, tree grammars and automata are also introduced. Example applications provided are character, barcode and handwriting recognition.

Uploaded by

Lal Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 43

Binary Image Analysis

 Skeleton finding via distance transform


 Image topology: connectivity and Euler number
 Boundary representation
 Chain codes, shape numbers
 Skeleton representation
 String codes, tree grammar, automata
 Applications
 Character/barcode/handwriting recognition
 Boundary representation contd…
 Fourier descriptors

1
Binary Image Analysis
 Skeleton finding via distance transform
 Image topology: connectivity and Euler
number
 Boundary representation
 Chain codes, shape numbers, Fourier descriptors*
 Skeleton representation
 String codes, tree grammar*, automata*
 Applications
 Character/barcode/handwriting recognition

2
From Processing to Analysis
Localized perspective in binary image processing

Low-level vision

PHIL
High-level vision

Holistic perspective in binary image analysis

3
High-level Vision Questions

How many objects?

What is each object?

What is the relationship


among different objects?

……

4
Image Topology
Topology is the study of properties of a figure that are unaffected
by rubber-sheet distortions

5
Connectivity
X’

Y’
Y

X and Y are connected X’ and Y’ are NOT connected

a and b are connected if there exists a path from a to b

Notation: if a and b are connected, we write a ~ b

6
Connectivity Properties

 Reflexive: x ~ x for all x


 Symmetric: if x ~ y, then y ~ x
 Transitive: if x ~ y and y ~ z, then x ~ z

How do we define the path for discrete images?

4-neighbors 8-neighbors

7
Finding Connected
Component

Xk=(Xk-1B)A, k=1,2,3…

8
Connected Component
Labeling 1

2 3

4 5

MATLAN function: > help bwlabel

9
Image Example

X label2rgb(y)

>y=bwlabel(x);
>imshow(label2rgb(y));

10
Objects With Holes

Euler Number EN=number of connected components – number of holes

11
Image Examples

EN=0 EN=-1

EN=-3

MATLAB codes: >help bweuler

12
Binary Image Analysis

 Image topology: connectivity and Euler


number
 Boundary representation
 Chain codes, shape numbers, Fourier
descriptors*
 Skeleton representation
 String codes, tree grammar, automata*
 Applications
 Character/barcode/handwriting recognition
13
Boundary of Binary Objects

X X
X=X-(X _ B) or X=(X + B) – B

14
Chain Codes Boundary
Representation

4-directional chain code: 8-directional chain code:


0033333323221211101101 076666553321212

15
Two Problems with the Chain
Code
 Chain code representation is conceptually
appealing, yet has the following two problems
 Dependent on the starting point
 Dependent on the orientation
 To use boundary representation in object
recognition, we need to achieve invariance to
starting point and orientation
 Normalized codes
 Differential codes

16
Normalization Strategy

33001122

33001122 00112233
30011223 01122330
00112233 11223300
First row gives the
01122330 Sort 12233001
normalized chain code
11223300 rows 22330011
12233001 23300112 00112233
22330011 30011223
23300112 33001122

17
Differential Strategy
90o

33001212 33010122
normalize normalize
00121233 01012233

Differential coding:

dk=ck-ck-1 (mod 4) for 4-directional chain codes

dk=ck-ck-1 (mod 8) for 8-directional chain codes

18
Shape Numbers= Normalized
Differential Chain Codes

33001212 33010122
Differential code: differentiate differentiate
dk=ck-ck-1 (mod 4) 10101131 10113110
normalize normalize
01011311 01011311

Note that the shape numbers of two objects related by 90o rotation
are indeed identical

19
Exercise

What are the shape numbers of this shape?

20
Binary Image Analysis

 Image topology: connectivity and Euler


number
 Boundary representation
 Chain codes, shape numbers, Fourier
descriptors*
 Skeleton representation
 String codes, tree grammar, automata*
 Applications
 Character/barcode/handwriting recognition
21
Skeleton Finding

22
String Codes

23
Tree Grammar*
G={N, , P, r, S}

N={X1,X2,X3,S} nonterminals
={a,b,c,d,e} terminals
S: start symbol
r: ranking function
P: a set of productions
Expansive production example

X k

X1 Xn
X2 …

24
Example
1) S a 2) X b
1

X1 X1

3) X1 c 4) X d
2

X2 X3
X2
5) X a
2
6) X e
3

7) X X3
3 a

25
Automata as String
Recognizer*
0 1
Examples

0 1
1

S1 S2
0
start accept
state state
010
Recognizable string
(0*1*)*1 0011

a* denotes n concatenated a (n=0,1,2,…)

26
Applications of Binary Image
Processing and Analysis
 Optical Character Recognition (OCR)
 Tax form processing, Google Books, …
 Barcode recognition
 Grocery shopping
 Handwriting recognition
 Biometrics, forensics
 Fingerprint recognition
 Biometrics, forensics

27
Bank Note Character
Recognition American Banker’s
Association E-13B
Font character set:

14 characters
9-by-7 grid

Distinct 1D signature
is generated as the
reading head moves
from left to right and
detects the change
of ink area under the
head

28
Fourier Descriptor*
z(k)=x(k)+j y(k)

DFT

N
1
a ( n) 
N
 z
k 1
( k ) e  j 2nk / N

Fourier IDFT
descriptors
N
{x(k),y(k)}, k=1,2,..,N 1
z (k ) 
N
 a
n 1
( n ) e j 2nk / N

29
Numerical Example
P
1
zˆ (k ) 
N
 a
n 1
( n ) e j 2nk / N

P : the number of Fourier coefficients used in reconstruction

30
31
32
33
34
35
36
37
38
39
40
41
42
43

You might also like