Basics 1
Basics 1
• Image Terminology
• Binary Operations
• Filtering
• Edge Operators
1
Digital Image Terminology:
0 0 0 0 1 0 0
pixel (with value 94)
0 0 1 1 1 0 0
0 1 95 96 94 93 92 its 3x3 neighborhood
0 0 92 93 93 92 92
0 0 93 93 94 92 93 region of medium
0 1 92 93 93 93 93 intensity
0 0 94 95 95 96 95
resolution (7x7)
• binary image
• gray-scale (or gray-tone) image
• color image
• multi-spectral image
• range image
• labeled image 2
The Three Stages of Computer Vision
• low-level
image image
• mid-level
image features
• high-level
features analysis
3
Low-Level
sharpening
blurring
4
Low-Level
Canny
ORT
data
structure
circular arcs and line segments 5
edge image
Mid-level
K-means
clustering
(followed by
connected
component
analysis)
data
structure
6
Low- to High-Level
low-level
edge image
mid-level
consistent
high-level line clusters
Building Recognition
7
Binary Image Analysis
• used in a variety of applications:
part inspection
riveting
fish counting
document processing
00010010001000
00011110001000
00010010001000
8
Example: red blood cell image
Many blood cells are
separate objects
Many touch – bad!
Salt and pepper noise
from thresholding
How useable is this
data?
What operations are
needed to clean it up?
9
Useful Operations
1. Thresholding a gray-tone image
• location features
• gray-tone features
• shape features ...
10
Thresholding
Background is black
Healthy cherry is bright
Bruise is medium dark
Histogram shows two
cherry regions (black
background has been
removed)
pixel
counts
0 256
gray-tone values 11
Automatic Thresholding:
Otsu’s Method
Grp 1 Grp 2
Assumption: the histogram is bimodal
12
Thresholding Example
• Dilation
1. growing features
14
• Erosion
1. shrinking features
15
Structuring Elements
box
hexagon disk
something
box(length,width) disk(diameter)
16
Dilation with Structuring Elements
origin
0 0 1 1 0 0 0 0 0 0
1 erode
0 0 1 1 0 0 0 1 1 0
1
0 0 1 1 0 0 0 1 1 0
1
1 1 1 1 1 0 0 0 0 0
B S B S
18
Opening and Closing
19
20
Application:
Gear Tooth Inspection
original
binary
image
detected
defects
21
Connected Components Labeling
Once you have a binary image, you can identify and
then analyze each connected set of pixels.
22
Methods for CC Analysis
1. Recursive Tracking (almost never used)
connected
components
of 1’s from
cleaned,
thresholded
image
connected
components
of cluster
labels
24