Binary image processing - PowerPoint PPT Presentation

About This Presentation
Title:

Binary image processing

Description:

Binary images; Morphological operations on the binary images: Dilation and Erosion, Opening and Closing, Thinning and Thickenning, Skeletonization – PowerPoint PPT presentation

Number of Views:486

less

Transcript and Presenter's Notes

Title: Binary image processing


1
Binary Image Processing
SUKHROB ATOEV
  • IT CONVERGENCE AND APPLICATON ENGINEERING
  • DEPARTMENT
  • PUKYONG NATIONAL UNIVERSITY

2
Outline
  • Binary Images
  • Morphological operators
  • Dilation and Erosion
  • Closing and Opening
  • Thinning and Thickening
  • Skeletonization
  • Summary

3
Binary Images
  • Each pixel 0 or 1 background or foreground
    black or white
  • Binary images require little memory processed
    very quickly.
  • They are a good representation of an object if
  • we are only interested in the contour of that
    object
  • the object can be separated from the background
    and from other objects (no occlusion).

4
From image to binary image
  • Classification dividing pixels into "foreground"
    and "background"
  • Thresholding
  • If a pixel has a value in range (min, max) it is
    foreground
  • Often min is 0 or max is maximum pixel value
  • Choice of range can be manual or automatic
  • (E.g. look for peaks / valleys in histogram)
  • More complex operations
  • Use information from neighboring pixels
  • Use properties besides pixel value (e.g.
    location)

5
RGB Binary
RGB image
Binary image with a thresholding 100
6
Morphological operators
  • Morphology "Study of Shape
  • Goals of morphological operations
  • Simplifies image data
  • Preserves essential shape characteristics
  • Eliminates noise
  • Permits the underlying shape to be identified
    and optimally reconstructed from their distorted,
    noisy forms
  • Morphological operators are used to prepare
    binary (thresholded) images for object
    segmentation/recognition

7
Morphological operators
Morphological operators often take a binary image
and a structuring element as input and combine
them using a set operator.
  • Morphological operators are
  • Dilation and Erosion
  • Closing and Opening
  • Thickening and Thinning
  • Skeletonization.

8
Dilation
9
Dilation
Dilation enlarges a region by one pixel along
all directions.
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
0 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Structuring Element (S)
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
Dilation Expanding. Change a pixel
from 0 to 1 if any of the neighbors of the pixel
are 1.
10
Dilation (contd)
Dilation by 3x3 mask
Dilation by 5x5 mask
11
Erosion
12
Erosion
Erosion removes one pixel element from the
borders.
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Structuring Element (S)
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
Erosion Shrinking. Change a pixel
from 1 to 0 if any neighbor of the pixel are 0.
13
Erosion(contd)
Erosion by 3x3 mask
Erosion by 5x5 mask
14
Closing
15
Closing
The Closing operation performs a dilation
followed by an erosion.
0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Structuring Element (S)
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
Closing B?S(B S) ? S
Closing can be used to close up holes or gaps in
the object of interest.
16
Closing (contd)
Closing by 3x3 mask
Closing by 5x5 mask
17
Opening
18
Opening
The Opening operation performs an erosion
followed by a dilation.
0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Structuring Element (S)
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
Opening can be used to eliminate point noise.
19
Opening (contd)
Opening by 3x3 mask
Opening by 5x5 mask
20
Binary image
Eroded
Dilated
dilated
eroded
Opened
Closed
21
Thinning
22
Thinning
Thinning is used to remove selected foreground
pixels, somewhat like erosion or opening.
0 0 0 0 0 0 0 0
0 1 1 1 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 1 1 1 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Structuring Element (S)
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
Thinning is commonly used to tidy up the output
of edge detectors by reducing all lines to
single-pixel thickness.
23
Thinning(contd)
Thinned image
Binary image
24
Thickening
25
Thickening
Thickening is used to grow selected regions of
foreground pixels, somewhat similar to dilation
or closing.
Structuring Element (S)
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 1 1 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Binary Image (B)
26
Thickening(contd)
Thickenned image
Binary image
27
Skeletonization
28
Skeletonization
Skeletonization is a process for reducing
foreground regions to a skeletal remnant that
largely preserves the extent and connectivity of
the original region.
The skeleton of binary image is defined by terms
of erosions and openings
Skeleton subsets
Last iterative step before B erodes to an empty
set
B Binary image C
Structuring element k Times
29
Skeletonization
Structuring Element (S)
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 1 1 1 1 1 0 0
0 0 0 0 1 1 0 0
0 0 0 0 1 1 0 0
0 0 1 1 1 1 0 0
0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1
1 1 1
1 1 1
Mask used for binary morphology
Skeletonization S(B)
Binary Image (B)
30
Skeletonization
Binary image
After Skeletonization
31
Summary
  • Binary Image 0 or 1
  • Morphology is an approach for processing binary
    image based on its shape
  • The structuring element acts as a probe of the
    binary image
  • Erosion shrinks an object Dilation expands it
  • Opening erosion then dilation
  • Closing dilation then erosion
  • Thinning removes selected foreground pixels
  • Thickening grows selected regions of foreground
    pixels
  • Morphological skeletonization is a skeleton (or
    medial axis) representation of binary image.

32
Thank You
Write a Comment
User Comments (0)
About PowerShow.com