Today: - PowerPoint PPT Presentation

1 / 53
About This Presentation
Title:

Today:

Description:

Digital Image Processing: Improving and transforming pictorial information ... No such problems for hexagonal tessellation ! Distance. D r. D c. Euclidian distance: ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 54
Provided by: X372
Category:

less

Transcript and Presenter's Notes

Title: Today:


1
EE545 Image Processing
  • Today
  • Image Formation Physics, image tesselation
  • Binary Image Processing
  • Transformations on image coordinates

2
EE545 Image Processing
  • 2D Image I (r,c) size N x M
  • Digital Image Processing Improving and
    transforming pictorial information
  • Computer Vision Processing of Images to extract
    information about the world

c
I
r
3
Examples of Image Processing
4
Examples of Image Processing
5
Image formation
  • How is the image obtained ?
  • A simple (but unrealistic) model
  • Orthographic (parallel) projection

6
Image formation
  • A more realistic model
  • Perspective projection (using pinhole model)

7
Perspective Images of Renaissance Painters
The Scholar of Athens, Raffaello Sanzio
(Rafael), 1518
8
Pinhole
9
Image formation Brightness
10
Image formation Lenses
11
Image formation Sampling Image Space
  • The Image pixels can be tiled with three regular
    polygons

Rectangular
Triangular
Hexagonal
12
Binary Image Processing(Two levels for pixel
values)
  • Gray Level Image (8 bit/pixel) Histogram

of pixels
0 (white)
255 (black)
TThreshold if I(r,c)gtT I(r,c)255 else
I(r,c)0
13
Adjacency in rectangular sampling
4-adjacent pixels
8-adjacent pixels
p
p
8 path
4 path
14
Foreground/Background paradoxes for binary images
8-8 connectivity for fg-bg
4-4 connectivity for fg-bg
Foreground Closed loop Background No hole
(problem)
Foreground No closed loop Background Hole
(problem)
Solution Use 8-4 or 4-8 connectivity for fg-bg
No such problems for hexagonal tessellation !
15
Distance
D r
D c
Euclidian distance Manhattan distance Chess-boar
d distance
16
First Binary Image Processing Algorithm
Connected Component (CC) Labeing
  • 8 connected component Maximal set of 1's for
    which all pairs of 1's in S are 8 connected by an
    8 path in S.
  • Connected component labeling (Iterative
    algorithm)
  • P gets its label from one of its neighbors
  • Top/down Bottom/up passes

p
p
17
Binary Image Processing
  • Connected component labeling (using memory)
  • Examples

N
j
a
b
c
abcd0 then L(p)iNj
p
d
i
M
1
0
1
1
0
1
0
1
0
0
1
0
0
1
1
1
1
1
1
0
L(p)L(a) L(c)L(a)
L(p)L(a) L(d)L(c)L(a)
L(d)L(b)
Assignments
L(p)L(b) L(d)L(b)
Equivalences
18
Representation of Binary Images
  • Matrices I(r,c)
  • Chains
  • Run length coding

7
5
6
p
0
4
2
3
1
021244567
Boundary following algorithm Start from the
first pixel in the scan order
Look for a border pixel at box 0,1,2,3
Do the same for the new pixel until
the first pixel is reached
0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 0 1
The code is ((11144)(214)(52355))
19
Representation of Binary Images
  • Hierarchical data structures
  • Pyramids
  • Quadtrees

Level 0
Level 1
Level 2
Pixel at Level k Average of pixels at Level
(k1)
11
10
0
0
2
3
13
10
11
13
2
3
120
121
122
123
20
Binary Image ProcessingRegion Properties of
CCs
  • Area
  • Centroid
  • Eulers number (genus)

,
C of connected components H of holes
21
Binary Image ProcessingRegion Properties of
CCs
  • Perimeter (P) of boundary pixels
  • Compactness (A circle is the
    most compact figure)
  • Moments
  • Central moments

Where the centroid can be found as
,
22
Binary Image ProcessingRegion Properties of CCs
  • Direction
  • Rectangularity Area of bounding rectangle

Area of the object
23
Binary Image Processing
  • Objects (or their parts) are represented by
    isolated connected components
  • Main applications Document processing, Character
    recognition, Cell counting,
  • Several descriptors of an object can be extracted
    from an image (size, centroid position, of
    holes, perimeter, compactness, dominant
    direction, horizontal/vertical/diagonal
    projections )

24
1D Projections on Binary Images
Vertical
Horizontal
Diagonal
25
Binary Image Processing
  • In practice binary
  • images (obtained by
  • thresholding) need
  • conditioning
  • The tools necessary
  • for conditioning are
  • provided by
  • Mathematical Morphology

Noisy
Conditioned
26
Mathematical Morphology
  • mathematical framework used for
  • pre-processing
  • noise filtering, shape simplification, ...
  • enhancing object structure
  • skeletonization, convex hull...
  • segmentation
  • watershed,
  • quantitative description
  • area, perimeter, ...

27
Structuring element (SE)
  • small set to probe the image under study
  • for each SE, define origo
  • SE in point p origo coincides with p
  • shape and size must be adapted to geometric
    properties for the objects

28
Basic idea
  • in parallel for each pixel in binary image
  • check if SE is satisfied
  • output pixel is set to 0 or 1 depending on used
    operation

pixels in output image if check is SE fits
29
Basic morphological operations
shrink
  • erosion
  • dilation
  • combine to
  • opening
  • closening

grow
  • keep general shape but smooth with respect to
  • object
  • background

30
Mathematical Morphology
  • An algebraic system of operators
  • Complex shapes can be decomposed into meaningful
    parts
  • Set theory notation (AImage points
    BOperator points)
  • Dilation where
  • Erosion
  • Opening Closing

31
Mathematical MorphologyDilation
  • Example 1
  • Example 2

32
Dilation (example 3)
SE
33
Dilation (example 4)
SE
34
Mathematical MorphologyErosion
  • Example

35
Erosion
SE
36
Erosion
SE
37
(No Transcript)
38
Mathematical MorphologyDilation and Erosion
Dilation and Erosion by
39
  • Erosion is useful for
  • removal of structures of certain shape and size,
    given by SE
  • Dilation is useful for
  • filling of holes of certain shape and size,
  • given by SE

Combining erosion and dilation
WANTED remove structures / fill holes without
affecting remaining parts
SOLUTION combine erosion and dilation (using
same SE)
40
Mathematical MorphologyOpening and Closing
Opening and Closing by Opening Closing
41
Opening roll ball(SE) inside object
see B as a rolling ball
boundary of AB points in B that reaches
farthest into A when B is rolled inside A
42
Closing roll ball(SE) outside object
see B as a rolling ball
boundary of A?B points in B that reaches
farthest into A when B is rolled outside A
43
(No Transcript)
44
Mathematical MorphologyApplication (An example)
  • Computing the genus ( of CCs - of holes)

45
An application example (of MM) Isolating IC pins
46
MM ApplicationConditioning fingerprint images
  • erode
  • A?B

2. dilate (A?B)?B AB
4. erode ((AB)?B)?B (AB)?B
3. dilate (AB)?B
47
Imaging Geometry
  • The motion of a camera can be modeled by
    geometric transformations

?
Affine Transformations
Perspective Tr.
(Orthographic camera model)
(Perspective camera model)
48
Projective models for Camera Motion
  • 2D Affine Transformation

Where and are old
and new coordinates
of a pixel
49
Affine Transformation
  • is the translation component
  • A?

Scale Rotation
Vertical Shear
Horizontal Shear
Altered Aspect Ratio
50
Affine and Perspective Transformations in matrix
form (in Homogenous Coordinates)
  • Affine Transformation
  • Perspective Transformation

51
Perspective Transformations
  • Another form Homographies

Note 6 unknowns for affine transformations
8 unknowns for perspective transformations
52
Forward vs Backward mapping
  • Forward
  • Backward

Scan the input image, find new coordinates,
assign pixel value
Scan the output image, find old coordinates,
assign pixel value
53
Interpolation (in gray level images)
  • Forward mapping produces holes
  • Backward mapping of a pixel produces

1
  • Nearest Neighbor Interpolation
  • p gets its value from the nearest pixel
  • Bilinear Interpolation
  • p gets its value from the plane on top of 4
  • neighboring pixels

u
220
150
v
1
p
220
150
p
100
60
100
NNI p150 BI pp1(1-v)p2(v)
where p1 220(1-u)150(u)
p2100(1-u)60(u)
60
Write a Comment
User Comments (0)
About PowerShow.com