You are on page 1of 22

Image

Segmentat
ion

10

/1
1
1

INTRODUCTION

Segmentation divides an image into its


constituent regions or objects.

Segmentation allows to extract objects in


images.
Segmentation Should Stop when the objects of
interest in an application has been solved.
EX: Automated inspection of electronic such as
missing component or broken path
Image Segmentation algorithm based on
property of intensity values :Discontinuity and
Similarity
Discontinuity: partition based on abrupt change
in intensity
Similarity: Partition of image based on predefined
criteria

10

/1
1
1

Applications of image segmentation include


Identifying objects in a scene for objectbased measurements such as size and
shape

-Identifying objects in a moving scene


for object-based video compression
(MPEG4)
-Identifying objects which are at
different distances from a sensor using
depth measurements from a laser
range finder enabling path planning for
a mobile robots

10

/1
1
1

Segmentation Based on Grey Scale


-Very simple model of grey scale leads to
inaccuracies in object labelling

Grey Scale Image

10

/1
1
1

Segmented Image

Segmentation Based on texture


-Enables object surfaces with varying patterns of
grey to be segmented

10

/1
1
1

Segmentation based on
-The main difficulty of motion segmentation is that
motion
an intermediate step is required to (either implicitly
or explicitly) estimate an optical flow field
-The segmentation must be based on this estimate
and not, in general, the true flow

10

/1
1
1

Segmentation based on
depth
-This example shows a range image,
obtained with a laser range finder
-A segmentation based on the range (the
object distance from the sensor) is useful in
guiding mobile robots

Original
image

10

/1
1
1

Segmente
d Image

Grey Level Histogram based


-TWO VERY SIMPLE IMAGE SEGMENTATION
TECHNIQUES THAT ARE BASED ON THE GREYLEVEL
Segmentation
HISTOGRAM OF AN IMAGE IS
-THRESHOLDING
-CLUSTERING

WE CAN CONSIDER THE HISTOGRAMS OF OUR


IMAGES
FOR THE NOISE FREE IMAGE, ITS SIMPLY TWO SPIKES
AT I=100, I=150
FOR THE LOW NOISE IMAGE, THERE ARE TWO CLEAR
PEAKS CENTRED ON I=100, I=150
FOR THE HIGH NOISE IMAGE, THERE IS A SINGLE
PEAK

10

/1
1
1

Edge-based
THERE
ARE THREE BASIC TYPES OF GRAY-LEVEL
segmentation
DISCONTINUITIES IN A DIGITAL IMAGE: POINTS,
LINES, AND EDGES
THE MOST COMMON WAY TO LOOK FOR
DISCONTINUITIES IS TO RUN A MASK THROUGH
THE IMAGE.
WE SAY THAT A POINT, LINE, AND EDGE HAS BEEN
DETECTED AT THE LOCATION ON WHICH THE
MASK IS CENTERED IF R>T

10

/1
1
1

Point Detection
Point detection can be
achieved simply using
the mask below:

Points are detected at


those pixels in the
subsequent filtered
image that are above a
set threshold
10

Line Detection
The next level of complexity is to try to detect lines
The masks below will extract lines that are one
pixel thick and running in a particular direction

11

EDGE DETECTION
An edge is a set of connected pixels that lie
on the boundary between two regions

12

EDGE DETECTION
Edge detection: Gradient
operation
f GGxy

f
fx
y

f mag (f ) Gx G y
2

( x, y ) tan (
1

Gy
Gx

1st derivative tells us


where an edge is
2nd derivative can
be used to show
edge direction

13

REGION-BASED
SEGMENTATION
Region growing: Groups pixels or sub-region
into larger regions.
step1:
Start with a set of seed points and from these grow regions
by appending to each seed those neighboring pixels that have
properties similar to the seed.
step2:
Region splitting and merging
Advantage
With good connectivity

Disadvantage
Initial seed-points:
different sets of initial seedpoint cause different
segmented result
Time-consuming problem
14

THRESHOLDING
Thresholding is usually the first step in
any segmentation approach
Single value thresholding can be given
mathematically as follows:

f ( xf, y( x) ,yT) T
1 if1 if
g (gx(,xy,)y)
f ( xf, y( )x,yT) T
0 if0 if

15

Based on the histogram of an image


Partition the image histogram using a single
global threshold
The success of this technique very strongly
depends on how well the histogram can be
partitioned

Original Image

Thresholded Image
16

THRESHOLD
If you get the threshold wrong the results can
be disastrous

Threshold Too Low

Threshold Too High

17

THRESHOLDING
ALGORITHM
The basic global threshold, T, is calculated
as follows:
1. Select an initial estimate for T (typically the average grey
level in the image)
2. Segment the image using T to produce two groups of
pixels: G1 consisting of pixels with grey levels >T and G2
consisting pixels with grey levels T
3. Compute the average grey levels of pixels in G1 to give 1
and G2 to give 2
4. Compute a new
value:
1 threshold
2

5.

Repeat steps 2 4 until the difference in T in successive


iterations is less than a predefined limit T
This algorithm works very well for finding thresholds when the
histogram is suitable
18

Basic Adaptive Thresholding


An approach to handling situations in
which single value thresholding will
not work is to divide an image into
sub images and threshold these
individually
since the threshold for each pixel
depends on its location within an
image this technique is said to
adaptive

10

/1
1
1

19

BASIC ADAPTIVE THRESHOLDING EXAMPLE


The image below shows an example of
using adaptive thresholding with the
image shown previously

As can be seen success is mixed


But, we can further subdivide the
troublesome sub images for more
20
success

BASIC ADAPTIVE THRESHOLDING


EXAMPLE
These images show the
troublesome parts of the
previous problem further
subdivided
After this sub division
successful thresholding
can be
achieved
21

THANKS

10

/1
1
1

22

You might also like