Image Processing - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Image Processing

Description:

2D Erosion (based on Fit) Structuring element. Objects get smaller. 29. Another erosion example ... Dilation (based on Hit): Make objects bigger. Remove holes ... – PowerPoint PPT presentation

Number of Views:135
Avg rating:3.0/5.0
Slides: 46
Provided by: thomasm46
Category:
Tags: image | make | processing

less

Transcript and Presenter's Notes

Title: Image Processing


1
Image Processing 4Morphology
2
Agenda Morphology
  • What can it be used for?
  • Basic operations
  • Fit and hit
  • Erosion
  • Dilation
  • Compound operations
  • Examples

3
What can it be used for?
  • Remove noise
  • Small objects
  • Fill holes
  • Isolate objects

4
How does it work?
  • Grayscale image
  • Threshold gt Binary image
  • Morphology
  • But also works directly on grayscale images

5
Definitions 1D
Input image
Design it as you please
Structuring Element (SE)
Output Image
Hit If just one of the 1s in the SE match with
the input gt output 1, otherwise output
0 Fit If all 1s in the SE match with input gt
output 1, otherwise output 0
6
Dilation (based on Hit)
7
Example for Dilation
Input image
Structuring Element
Output Image
Hit If just one of the 1s in the SE match with
the input gt output 1, otherwise output 0
8
Example for Dilation
Input image
Structuring Element
Output Image
9
Example for Dilation
Input image
Structuring Element
Output Image
10
Example for Dilation
Input image
Structuring Element
Output Image
11
Example for Dilation
Input image
Structuring Element
Output Image
12
Example for Dilation
Input image
Structuring Element
Output Image
13
Example for Dilation
Input image
Structuring Element
Output Image
14
Example for Dilation
Input image
Structuring Element
Output Image
The object gets bigger and holes are filled!
15
Erosion (based on Fit)
16
Example for Erosion
Input image
Structuring Element
Output Image
Fit If all 1s in the SE match with input gt
output 1, otherwise output 0
_
_
_
17
Example for Erosion
Input image
Structuring Element
Output Image
18
Example for Erosion
Input image
Structuring Element
Output Image
19
Example for Erosion
Input image
Structuring Element
Output Image
20
Example for Erosion
Input image
Structuring Element
Output Image
21
Example for Erosion
Input image
Structuring Element
Output Image
22
Example for Erosion
Input image
Structuring Element
Output Image
23
Example for Erosion
Input image
Structuring Element
Output Image
The object gets smaller
24
Morphology on images
25
Structuring Element (Kernel)
  • Structuring Elements can have varying sizes
  • Usually, element values are 0 or 1, but other
    values are possible (including none!)
  • Structural Elements have an origin
  • Empty spots in the Structuring Elements are dont
    cares!

Box Disc
26
2D Dilation (based on Hit)
Structuring element
  • Objects are merged (holes are filled)
  • Sharp corners are preserved

27
Another Dilation Example
Structuring element disc gt rounded corners
( Show Fill holes SE3x3 box, blob-holes.tif )
28
2D Erosion (based on Fit)
Structuring element
Objects get smaller
29
Another erosion example
(Show Remove small objects SEbox, cell_colony)
30
Counting Coins
  • Counting these coins is difficult because they
    touch each other!
  • Solution Threshold and Erosion separates them!

31
Compound operations
  • Combining Erosion and Dilation into higher level
    (more advanced) operations
  • Finding the outline
  • Opening Isolate objects and remove small objects
    (better than Erosion)
  • Closing Fill holes (better than Dilation)
  • Others

32
Finding the outline
  • Edge Detection
  • Dilate input image (object gets bigger)
  • Subtract input image from dilated image
  • Edges remain!

33
Opening
  • Motivation Remove small objects BUT keep
    original size (and shape) (show cell_colony, 3 x
    iteration)

34
Opening
  • Motivation Remove small objects BUT keep
    original size (and shape) (show cell_colony)
  • Erosion Dilation Opening
  • Use the same structuring element!
  • Similar to erosion but less destructive
  • Math
  • Opening is idempotent Repeated operations has no
    further effects!

35
Opening
  • Structuring element

Erosion
Dilation
36
Opening Example
  • 9x3 and 3x9 Structuring Elements

37
Opening example
  • Size of structuring element should fit into the
    smallest object to keep
  • Structuring Element 11 pixel disc

(show cell_colony, 3 x erosion, 3 x dilation)
38
Closing
  • Motivation Fill holes BUT keep original size
    (and shape) (show blobs-holes, 1 x iteration)

39
Closing
  • Motivation Fill holes BUT keep original size
    (and shape) (show blobs-holes)
  • Dilation Erosion Closing
  • Use the same structuring element!
  • Similar to Dilation but less destructive
  • Math
  • Closing is idempotent Repeated operations has no
    further effects!

40
Closing
  • Structuring element 3x3 square

41
Closing Example
  • Closing operation with a 22 pixel disc
  • Closes small holes

42
Closing Example
  • Improve segmentation
  • Threshold
  • Closing with disc of size 20

(show blobs-holes, 1 x dilation, 1 x erosion)
43
What to remember
  • Morphology
  • Fit and Hit operations
  • Erosion (based on Fit) Make objects smaller
  • Separate objects, remove small objects (noise)
  • Dilation (based on Hit) Make objects bigger
  • Remove holes in objects
  • Finding the outlines of the objects
  • Opening (Erosion Dilation)
  • As Erosion but less destructive
  • Closing (Dilation Erosion)
  • As Dilation but less destructive

44
Exercises (1/2)
  • Discuss the PE-questions
  • Solve exercise 1 on page 296 in the book
  • Play around with the different morphologic
    operations in ImageJ Process gt Binary
  • Use morphology to improve the result from last
    time on the imagedots
  • Remove the lines in the imagedots-lines

45
Exercises (2/2)
  • (Re)read about the hit and miss transform
    (287-288) and answer the following questions
  • How can the transform be used to find this type
    of corners?
  • (use 3x3 structuring
  • elements)
  • How does this relate to
  • Template Matching?
Write a Comment
User Comments (0)
About PowerShow.com