SlideShare a Scribd company logo
1 of 41
COMPUTER GRAPHICS & IMAGE PROCESSING
COM2304
Segmentation Techniques -II
K.A.S.H.Kulathilake
B.Sc. (Hons) IT (SLIIT), MCS (UCSC)
Rajarata University of Sri Lanka
Faculty of Applied Sciences
Department of Physical Sciences
Learning Outcomes
COM 2304 - Computer Graphics & Image
Processing
• At the end of this lecture, you should be able to;
– describe Connected Components and Contours in
image segmentation.
– discuss region based segmentation method.
– discuss Region Growing segmentation technique.
– discuss Morphological Watersheds segmentation.
– discuss Model Based Segmentation.
– discuss Motion Segmentation.
– implement connected components, flood fill,
watershed, template matching and frame difference
techniques.
– formulate possible mechanisms to propose
segmentation methods to solve problems.
2
Connected Components & Contours
• Let S represent subset of pixels in
an image.
• Two pixels p and q are said to be
connected in S if there exist a
path between them consisting
entirely of pixels in S.
• For any pixel p in S, the set of
pixels that are connected to it in
S is called a connected
component of S.
• If it only has one connected
component, then set is
called connected set.
COM 2304 - Computer Graphics & Image
Processing
3
Connected Components & Contours
(Cont…)
• Contours are sequences of points defining a
line/curve in an image.
• Contour matching can be used to classify
image objects.
COM 2304 - Computer Graphics & Image
Processing
4
Connected Components & Contours
(Cont…)
COM 2304 - Computer Graphics & Image
Processing
5
Region Based Segmentation
• The main idea here is to classify a particular
image into a number of regions or classes.
• Thus for each pixel in the image we need to
somehow decide or estimate which class it
belongs to.
• There are a variety of approaches to do region
based segmentation.
COM 2304 - Computer Graphics & Image
Processing
6
Region Growing
• Region growing is a procedure that groups
pixels or sub regions into larger regions based
on pre-defined criteria for growth.
• Region growing algorithms utilize the concept
of size, likeness between a candidate pixel and
the pixel grown so far and the shape of the
region being grown.
COM 2304 - Computer Graphics & Image
Processing
7
Region Growing (Cont…)
• Properties of region grown algorithms:
– Seed point:
• It starts with a set of “seed” points and from these grow regions by appending
to each seed those neighboring pixels that have predefined properties similar
to the seed.
• Selecting one or a set of seed points can be based on the nature of the
problem.
– Selection of similarity criteria:
• It depends not only on the problem under consideration, but also on the type
of image data available.
– Connectivity:
• descriptors alone can yield misleading results if connectivity properties are not
used in the region growing process.
– Stopping Rule:
• Region growing should stop when no more pixels satisfy the criteria for
inclusion in that region.
COM 2304 - Computer Graphics & Image
Processing
8
Region Growing (Cont…)
• Algorithm
Let f(x, y) denote the input image array; s(x, y) denote a seed array
containing 1s at the locations of seed points and 0s elsewhere; and
Q denote a predicate to be applied at each location (x, y). f(x,y)
and s(x, y) are in same size and algorithm based on 8-connectivity.
1. Find all connected components in s(x, y) and erode each connected
component to 1 pixel; label all such pixels found as 1. All other pixels
in are labeled 0.
2. Form an image fQ such that, at a pair of coordinates (x, y), let
fQ(x,y)=1 if the input image satisfies the given predicate Q, at those
coordinates; otherwise, let fQ (x, y) = 0.
3. Let g be an image formed by appending to each seed point in S all
the 1-valued points in fQ that are 8-connected to that seed point.
4. Label each connected component in g with a different region label
(e.g. 1, 2, 3, ….). This is the segmented image obtained by the region
growing.
COM 2304 - Computer Graphics & Image
Processing
9
Region Growing (Cont…)
• Flood Fill
– It is useful to mark or isolate potions of an image
for further processing or analysis.
– In flood fill method a seed point is selected from
an image and then all similar neighboring points
are colored with a uniform color.
– The result of a flood fill operation will always be a
single contiguous region.
COM 2304 - Computer Graphics & Image
Processing
10
Region Growing (Cont…)
COM 2304 - Computer Graphics & Image
Processing
11
Original Image Enhanced Image  Remove non
uniform illumination and salt and
pepper noise
Region Growing (Cont…)
COM 2304 - Computer Graphics & Image
Processing
12
Apply morphological operation to
obtained the connectivity
Background subtraction to reduce
over segmentation
Region Growing (Cont…)
COM 2304 - Computer Graphics & Image
Processing
13
Flood Fill to extract foreground Extracted foreground
Region Growing (Cont…)
COM 2304 - Computer Graphics & Image
Processing
14
Binary image of extracted foreground Original image for comparison
Morphological Watersheds
• Any grayscale image can be
viewed as a topographic
surface where high intensity
denotes peaks and hills while
low intensity denotes valleys.
• You start filling every isolated
valleys (local minima) with
different colored water
(labels).
• As the water rises, depending
on the peaks (gradients)
nearby, water from different
valleys, obviously with
different colors will start to
merge.
COM 2304 - Computer Graphics & Image
Processing
15
Morphological Watersheds (Cont…)
• To avoid that, you build barriers in the locations
where water merges.
• You continue the work of filling water and
building barriers until all the peaks are under
water.
• Then the barriers you created gives you the
segmentation result.
• visit :
http://cmm.ensmp.fr/~beucher/wtshed.html for
animation
COM 2304 - Computer Graphics & Image
Processing
16
Morphological Watersheds (Cont…)
• This segmentation method used to extraction of
nearly uniform (blob like) objects from the
background.
• Region characterized by small variations in intensity
have small gradient values.
• Thus, in practice we often see watershed
segmentation applied to the gradient of an image,
rather than to the image itself.
• In this formulation, the regional minima of the
catchment basins correlate nicely with the small
value of the gradient corresponding to the objects of
interest.
17
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
• Three types of points
– Points belonging to a regional minimum
– Catchment basin / watershed of a regional
minimum
• Points at which a drop of water will certainly fall
to a single minimum
– Divide lines / Watershed lines
• Points at which a drop of water will be equally
likely to fall to more than one minimum
• Crest lines on the topographic surface
• This technique is to identify all the third type
of points for segmentation
COM 2304 - Computer Graphics & Image
Processing
18
Morphological Watersheds (Cont…)
1. Piercing holes in each
regional minimum of I
2. The 3D topography is
flooded from below
gradually
3. When the rising water
in distinct catchment
basins is about to
merge, a dam is built
to prevent the merging
19
COM 2304 - Computer Graphics & Image
Processing
3. The dam boundaries
correspond to the
watershed lines to be
extracted by a watershed
segmentation algorithm
- Eventually only constructed
dams can be seen from
above
Morphological Watersheds (Cont…)
20
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
• Dam Construction:
– Based on binary morphological dilation
– At each step of the algorithm, the binary image
in obtained in the following manner
1. Initially, the set of pixels with minimum gray level are
1, others 0.
2. In each subsequent step, we flood the 3D topography
from below and the pixels covered by the rising water
are 1s and others 0s. (See previous slides)
21
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
– M1, M2:
• Sets of coordinates of points in the
two regional minima
– Cn-1(M1), Cn-1(M2)
• Sets of coordinates of points in the
catchment basins associated with
M1 M2 at stage n-1 of flooding
(catchment basins up to the
flooding level)
– C[n-1]
• Union of Cn-1(M1), Cn-1(M2)
22
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
– At flooding step n-1, there are two
connected components. At flooding
step n, there is only one connected
component
• This indicates that the water
between the two catchment basins
has merged at flooding step n
• Use “q” to denote the single
connected component
– Steps
• Repeatedly dilate Cn-1(M1), Cn-1(M2)
by the 3×3 structuring element
shown, subject to the following
condition
– Constrained to q (center of
the structuring element can
not go beyond q during
dilation)
– The dilation cannot be
performed on point that
would cause the sets being
dilated to merge.
23
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
– The dam is constructed by the
points on which the dilation
would cause the sets being
dilated to merge.
• Resulting one-pixel thick
connected path
– Setting the gray level at each
point in the resultant path to a
value greater than the
maximum gray value of the
image. Usually max+1
24
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
• The Use of Markers:
– Discussed watershed approach gives
oversegmented result due to noise or any other
irregularities in the image.
– Internal markers are used to limit the number of
regions by specifying the objects of interest
• Like seeds in region growing method
• Can be assigned manually or automatically
• Regions without markers are allowed to be merged (no
dam is to be built)
– External markers those pixels we are confident to
belong to the background
– Watershed lines are typical external markers and
they belong the same (background) region
25
COM 2304 - Computer Graphics & Image
Processing
Morphological Watersheds (Cont…)
COM 2304 - Computer Graphics & Image
Processing
26
Markers
Morphological Watersheds (Cont…)
COM 2304 - Computer Graphics & Image
Processing
27
Model Based Segmentation
• Model based approaches apply explicit image
model to locate the specific objects in a
particular image.
• There are various model based segmentation
methods available such as parametric models,
deformable models and template matching.
•
COM 2304 - Computer Graphics & Image
Processing
28
Model Based Segmentation (Cont…)
• Template Matching:
– Template matching tries to recognize a structure model
(template) in an image.
– The method uses a template as a context, which is a priori
model.
– Thus, it is a contextual method and top down approach.
– Within the matching process match against the input
image by sliding the template over the input image.
– It uses matching method/ similarity measurement to
locate the matching point.
– http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching
/template_matching.html
COM 2304 - Computer Graphics & Image
Processing
29
Model Based Segmentation (Cont…)
COM 2304 - Computer Graphics & Image
Processing
30
Template
Matched
template
We used the template matching here to locate the marked template at
consecutive frame and find the motion vector of this angiogram.
Correlation coefficient is used as the similarity measure.
Motion Segmentation
• Motion is a powerful cue used by humans and
many other animals to extract objects or ROI
from a background of irrelevant detail.
• In imaging applications, motion arises from a
relative displacement between the sensing
system and the sense being viewed.
• It is used in robotic applications, autonomous
navigation and dynamic scene analysis.
COM 2304 - Computer Graphics & Image
Processing
31
Motion Segmentation (Cont…)
• Spatial techniques:
– As a simplest approach we can compute the frame
difference.
– It computes the pixel by pixel difference between two
frames f(x,y,ti) and f(x,y,tj) taken at times ti and tj.
– A difference image between two images taken at ti and tj
may be defined as:
COM 2304 - Computer Graphics & Image
Processing
32
 Ttyxftyxfif
otherwiseij
ji
yxd


)|,,(),,(|1
0),(
Motion Segmentation (Cont…)
• Note that dij(x,y) has a value of 1 as spatial coordinates (x,
y) only if the intensity difference between two images is
different at those coordinates, as determined by the
specified threshod T.
• In dynamic image processing, all pixels in dij(x,y) with value
1 are considered the result of object motion.
• This approach is applicable only if the two images are
registered spatially and if the illumination is relatively
constant within the bound established by T.
• 1 valued entries in dij(x,y) may arise as a result of noise.
COM 2304 - Computer Graphics & Image
Processing
33
Motion Segmentation (Cont…)
COM 2304 - Computer Graphics & Image
Processing
34
f(x,y,ti) f(x,y,tj)
Motion Segmentation (Cont…)
COM 2304 - Computer Graphics & Image
Processing
35
Image difference Threshold (T=55)
Noise
Motion Segmentation (Cont…)
– To reduce noise, we can post process the dij(x,y) to remove isolated
noise blobs.
– Although it may result in ignoring small and/or slow moving objects.
• Accumulative differences:
– Consider a sequence of image frames f(x,y,t1), f(x,y,t2), ……, f(x,y,tn)
and let f(x,y,t1) be the reference image.
– An Accumulative Difference Image (ADI) is formed by comparing this
reference image with every subsequent image in the sequence.
– A counter for each pixel location in the accumulative image is
incremented every time a difference occurs at that pixel location
between the reference and an image in the sequence.
•
COM 2304 - Computer Graphics & Image
Processing
36
Motion Segmentation (Cont…)
COM 2304 - Computer Graphics & Image
Processing
37
ADI model of the 20
frames
Motion Segmentation (Cont…)
COM 2304 - Computer Graphics & Image
Processing
38
Reference
• Chapter 10, of Gonzalez, R.C., Woods, R.E., Digital Image
Processing, 3rd ed. Addison-Wesley Pub.
• Flood Fill, Learning OpenCV, pp 124-129
• Template Matching, Learning OpenCV, pp 214-219
• http://www.labbookpages.co.uk/software/imgProc/otsuThr
eshold.html
• http://docs.opencv.org/doc/tutorials/imgproc/histograms/t
emplate_matching/template_matching.html
• http://cmm.ensmp.fr/~beucher/wtshed.html
• https://opencv-code.com/tutorials/count-and-segment-
overlapping-objects-with-watershed-and-distance-
transform/
COM 2304 - Computer Graphics & Image
Processing
39
Learning Outcomes Revisit
• Now, you should be able to;
– describe Connected Components and Contours in
image segmentation.
– discuss region based segmentation method.
– discuss Region Growing segmentation technique.
– discuss Morphological Watersheds segmentation.
– discuss Model Based Segmentation.
– discuss Motion Segmentation.
– implement connected components, flood fill,
watershed, template matching and frame difference
techniques.
– formulate possible mechanisms to propose
segmentation methods to solve problems.
COM 2304 - Computer Graphics & Image
Processing
40
QUESTIONS ?
Next Lecture – Segmentation Techniques - III
COM 2304 - Computer Graphics & Image
Processing
41

More Related Content

What's hot

Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementVarun Ojha
 
Image restoration and degradation model
Image restoration and degradation modelImage restoration and degradation model
Image restoration and degradation modelAnupriyaDurai
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filtersA B Shinde
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentationramya marichamy
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point ProcessingGayathri31093
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationMostafa G. M. Mostafa
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESEzhilya venkat
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingVARUN KUMAR
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lectureISRAR HUSSAIN
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processingPremaPRC211300301103
 

What's hot (20)

Edge detection
Edge detectionEdge detection
Edge detection
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
Image restoration and degradation model
Image restoration and degradation modelImage restoration and degradation model
Image restoration and degradation model
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTES
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image Processing
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processing
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Module 31
Module 31Module 31
Module 31
 

Viewers also liked

A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationHabibur Rahman
 
Image segmentation
Image segmentationImage segmentation
Image segmentationMukul Jindal
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Habibur Rahman
 
Image segmentation
Image segmentationImage segmentation
Image segmentationRania H
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingRaghu Kumar
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation pptGichelle Amon
 
An Application of Video Segmentation Using Optical Flows
An Application of Video Segmentation Using Optical FlowsAn Application of Video Segmentation Using Optical Flows
An Application of Video Segmentation Using Optical FlowsYusuf Uzun
 
Detection of acute leukemia using white blood cells segmentation based on
Detection of acute leukemia using white blood cells segmentation based onDetection of acute leukemia using white blood cells segmentation based on
Detection of acute leukemia using white blood cells segmentation based onIAEME Publication
 
A Literature Review on Iris Segmentation Techniques for Iris Recognition Systems
A Literature Review on Iris Segmentation Techniques for Iris Recognition SystemsA Literature Review on Iris Segmentation Techniques for Iris Recognition Systems
A Literature Review on Iris Segmentation Techniques for Iris Recognition SystemsIOSR Journals
 
04b interpolation and extrapolation
04b   interpolation and extrapolation04b   interpolation and extrapolation
04b interpolation and extrapolationbplett
 
Review of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging ApproachReview of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging ApproachEditor IJMTER
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation Rappy Saha
 

Viewers also liked (20)

Segmentation Techniques -I
Segmentation Techniques -ISegmentation Techniques -I
Segmentation Techniques -I
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentation
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Segmentation
SegmentationSegmentation
Segmentation
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Dip Image Segmentation
Dip Image SegmentationDip Image Segmentation
Dip Image Segmentation
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
An Application of Video Segmentation Using Optical Flows
An Application of Video Segmentation Using Optical FlowsAn Application of Video Segmentation Using Optical Flows
An Application of Video Segmentation Using Optical Flows
 
Detection of acute leukemia using white blood cells segmentation based on
Detection of acute leukemia using white blood cells segmentation based onDetection of acute leukemia using white blood cells segmentation based on
Detection of acute leukemia using white blood cells segmentation based on
 
A Literature Review on Iris Segmentation Techniques for Iris Recognition Systems
A Literature Review on Iris Segmentation Techniques for Iris Recognition SystemsA Literature Review on Iris Segmentation Techniques for Iris Recognition Systems
A Literature Review on Iris Segmentation Techniques for Iris Recognition Systems
 
CV(Dr.B.Kazemi)
CV(Dr.B.Kazemi)CV(Dr.B.Kazemi)
CV(Dr.B.Kazemi)
 
04b interpolation and extrapolation
04b   interpolation and extrapolation04b   interpolation and extrapolation
04b interpolation and extrapolation
 
Review of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging ApproachReview of Image Segmentation Techniques based on Region Merging Approach
Review of Image Segmentation Techniques based on Region Merging Approach
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation
 
regions
regionsregions
regions
 

Similar to Segmentation Techniques -II

COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...Hemantha Kulathilake
 
Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Dr. Radhey Shyam
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingHemantha Kulathilake
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...Hemantha Kulathilake
 
Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot IRJET Journal
 
Watershed Segmentation Image Processing
Watershed Segmentation Image ProcessingWatershed Segmentation Image Processing
Watershed Segmentation Image ProcessingArshad Hussain
 
Vehicle detection in Aerial Images
Vehicle detection in Aerial ImagesVehicle detection in Aerial Images
Vehicle detection in Aerial ImagesKoshy Geoji
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern PresentationDaniel Cahall
 
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3NanubalaDhruvan
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfvikasmittal92
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFITC
 
Image representation
Image representationImage representation
Image representationRahul Dadwal
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGIRJET Journal
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptGaganvirKaur
 
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013Sunando Sengupta
 
Object Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesObject Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesVasuhiSamydurai1
 
Carved visual hulls for image based modeling
Carved visual hulls for image based modelingCarved visual hulls for image based modeling
Carved visual hulls for image based modelingaftab alam
 
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...xavier_sa
 

Similar to Segmentation Techniques -II (20)

COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
 
Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
 
Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot Environment Detection and Path Planning Using the E-puck Robot
Environment Detection and Path Planning Using the E-puck Robot
 
Watershed Segmentation Image Processing
Watershed Segmentation Image ProcessingWatershed Segmentation Image Processing
Watershed Segmentation Image Processing
 
Tele immersion
Tele immersionTele immersion
Tele immersion
 
Vehicle detection in Aerial Images
Vehicle detection in Aerial ImagesVehicle detection in Aerial Images
Vehicle detection in Aerial Images
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
 
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3
TRAFFIC MANAGEMENT THROUGH SATELLITE IMAGING-- Part 3
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
 
427lects
427lects427lects
427lects
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGL
 
Image representation
Image representationImage representation
Image representation
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.ppt
 
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013
Urban 3D Semantic Modelling Using Stereo Vision, ICRA 2013
 
Object Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesObject Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic Techniques
 
Carved visual hulls for image based modeling
Carved visual hulls for image based modelingCarved visual hulls for image based modeling
Carved visual hulls for image based modeling
 
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...
Camera Analytics System (Based on IEEE topic Camera Selection for adaptive hu...
 

More from Hemantha Kulathilake

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar Hemantha Kulathilake
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishHemantha Kulathilake
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelHemantha Kulathilake
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingHemantha Kulathilake
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation Hemantha Kulathilake
 

More from Hemantha Kulathilake (20)

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
NLP_KASHK:POS Tagging
NLP_KASHK:POS TaggingNLP_KASHK:POS Tagging
NLP_KASHK:POS Tagging
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
 
NLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram ModelsNLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram Models
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
 
NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 
NLP_KASHK:Morphology
NLP_KASHK:MorphologyNLP_KASHK:Morphology
NLP_KASHK:Morphology
 
NLP_KASHK:Text Normalization
NLP_KASHK:Text NormalizationNLP_KASHK:Text Normalization
NLP_KASHK:Text Normalization
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
 
NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions
 
NLP_KASHK: Introduction
NLP_KASHK: Introduction NLP_KASHK: Introduction
NLP_KASHK: Introduction
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
 
COm1407: Character & Strings
COm1407: Character & StringsCOm1407: Character & Strings
COm1407: Character & Strings
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
 
COM1407: Working with Pointers
COM1407: Working with PointersCOM1407: Working with Pointers
COM1407: Working with Pointers
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
 

Recently uploaded

Types of different blotting techniques.pptx
Types of different blotting techniques.pptxTypes of different blotting techniques.pptx
Types of different blotting techniques.pptxkhadijarafiq2012
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisDiwakar Mishra
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Caco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionCaco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionPriyansha Singh
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 

Recently uploaded (20)

Types of different blotting techniques.pptx
Types of different blotting techniques.pptxTypes of different blotting techniques.pptx
Types of different blotting techniques.pptx
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Caco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionCaco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorption
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 

Segmentation Techniques -II

  • 1. COMPUTER GRAPHICS & IMAGE PROCESSING COM2304 Segmentation Techniques -II K.A.S.H.Kulathilake B.Sc. (Hons) IT (SLIIT), MCS (UCSC) Rajarata University of Sri Lanka Faculty of Applied Sciences Department of Physical Sciences
  • 2. Learning Outcomes COM 2304 - Computer Graphics & Image Processing • At the end of this lecture, you should be able to; – describe Connected Components and Contours in image segmentation. – discuss region based segmentation method. – discuss Region Growing segmentation technique. – discuss Morphological Watersheds segmentation. – discuss Model Based Segmentation. – discuss Motion Segmentation. – implement connected components, flood fill, watershed, template matching and frame difference techniques. – formulate possible mechanisms to propose segmentation methods to solve problems. 2
  • 3. Connected Components & Contours • Let S represent subset of pixels in an image. • Two pixels p and q are said to be connected in S if there exist a path between them consisting entirely of pixels in S. • For any pixel p in S, the set of pixels that are connected to it in S is called a connected component of S. • If it only has one connected component, then set is called connected set. COM 2304 - Computer Graphics & Image Processing 3
  • 4. Connected Components & Contours (Cont…) • Contours are sequences of points defining a line/curve in an image. • Contour matching can be used to classify image objects. COM 2304 - Computer Graphics & Image Processing 4
  • 5. Connected Components & Contours (Cont…) COM 2304 - Computer Graphics & Image Processing 5
  • 6. Region Based Segmentation • The main idea here is to classify a particular image into a number of regions or classes. • Thus for each pixel in the image we need to somehow decide or estimate which class it belongs to. • There are a variety of approaches to do region based segmentation. COM 2304 - Computer Graphics & Image Processing 6
  • 7. Region Growing • Region growing is a procedure that groups pixels or sub regions into larger regions based on pre-defined criteria for growth. • Region growing algorithms utilize the concept of size, likeness between a candidate pixel and the pixel grown so far and the shape of the region being grown. COM 2304 - Computer Graphics & Image Processing 7
  • 8. Region Growing (Cont…) • Properties of region grown algorithms: – Seed point: • It starts with a set of “seed” points and from these grow regions by appending to each seed those neighboring pixels that have predefined properties similar to the seed. • Selecting one or a set of seed points can be based on the nature of the problem. – Selection of similarity criteria: • It depends not only on the problem under consideration, but also on the type of image data available. – Connectivity: • descriptors alone can yield misleading results if connectivity properties are not used in the region growing process. – Stopping Rule: • Region growing should stop when no more pixels satisfy the criteria for inclusion in that region. COM 2304 - Computer Graphics & Image Processing 8
  • 9. Region Growing (Cont…) • Algorithm Let f(x, y) denote the input image array; s(x, y) denote a seed array containing 1s at the locations of seed points and 0s elsewhere; and Q denote a predicate to be applied at each location (x, y). f(x,y) and s(x, y) are in same size and algorithm based on 8-connectivity. 1. Find all connected components in s(x, y) and erode each connected component to 1 pixel; label all such pixels found as 1. All other pixels in are labeled 0. 2. Form an image fQ such that, at a pair of coordinates (x, y), let fQ(x,y)=1 if the input image satisfies the given predicate Q, at those coordinates; otherwise, let fQ (x, y) = 0. 3. Let g be an image formed by appending to each seed point in S all the 1-valued points in fQ that are 8-connected to that seed point. 4. Label each connected component in g with a different region label (e.g. 1, 2, 3, ….). This is the segmented image obtained by the region growing. COM 2304 - Computer Graphics & Image Processing 9
  • 10. Region Growing (Cont…) • Flood Fill – It is useful to mark or isolate potions of an image for further processing or analysis. – In flood fill method a seed point is selected from an image and then all similar neighboring points are colored with a uniform color. – The result of a flood fill operation will always be a single contiguous region. COM 2304 - Computer Graphics & Image Processing 10
  • 11. Region Growing (Cont…) COM 2304 - Computer Graphics & Image Processing 11 Original Image Enhanced Image  Remove non uniform illumination and salt and pepper noise
  • 12. Region Growing (Cont…) COM 2304 - Computer Graphics & Image Processing 12 Apply morphological operation to obtained the connectivity Background subtraction to reduce over segmentation
  • 13. Region Growing (Cont…) COM 2304 - Computer Graphics & Image Processing 13 Flood Fill to extract foreground Extracted foreground
  • 14. Region Growing (Cont…) COM 2304 - Computer Graphics & Image Processing 14 Binary image of extracted foreground Original image for comparison
  • 15. Morphological Watersheds • Any grayscale image can be viewed as a topographic surface where high intensity denotes peaks and hills while low intensity denotes valleys. • You start filling every isolated valleys (local minima) with different colored water (labels). • As the water rises, depending on the peaks (gradients) nearby, water from different valleys, obviously with different colors will start to merge. COM 2304 - Computer Graphics & Image Processing 15
  • 16. Morphological Watersheds (Cont…) • To avoid that, you build barriers in the locations where water merges. • You continue the work of filling water and building barriers until all the peaks are under water. • Then the barriers you created gives you the segmentation result. • visit : http://cmm.ensmp.fr/~beucher/wtshed.html for animation COM 2304 - Computer Graphics & Image Processing 16
  • 17. Morphological Watersheds (Cont…) • This segmentation method used to extraction of nearly uniform (blob like) objects from the background. • Region characterized by small variations in intensity have small gradient values. • Thus, in practice we often see watershed segmentation applied to the gradient of an image, rather than to the image itself. • In this formulation, the regional minima of the catchment basins correlate nicely with the small value of the gradient corresponding to the objects of interest. 17 COM 2304 - Computer Graphics & Image Processing
  • 18. Morphological Watersheds (Cont…) • Three types of points – Points belonging to a regional minimum – Catchment basin / watershed of a regional minimum • Points at which a drop of water will certainly fall to a single minimum – Divide lines / Watershed lines • Points at which a drop of water will be equally likely to fall to more than one minimum • Crest lines on the topographic surface • This technique is to identify all the third type of points for segmentation COM 2304 - Computer Graphics & Image Processing 18
  • 19. Morphological Watersheds (Cont…) 1. Piercing holes in each regional minimum of I 2. The 3D topography is flooded from below gradually 3. When the rising water in distinct catchment basins is about to merge, a dam is built to prevent the merging 19 COM 2304 - Computer Graphics & Image Processing
  • 20. 3. The dam boundaries correspond to the watershed lines to be extracted by a watershed segmentation algorithm - Eventually only constructed dams can be seen from above Morphological Watersheds (Cont…) 20 COM 2304 - Computer Graphics & Image Processing
  • 21. Morphological Watersheds (Cont…) • Dam Construction: – Based on binary morphological dilation – At each step of the algorithm, the binary image in obtained in the following manner 1. Initially, the set of pixels with minimum gray level are 1, others 0. 2. In each subsequent step, we flood the 3D topography from below and the pixels covered by the rising water are 1s and others 0s. (See previous slides) 21 COM 2304 - Computer Graphics & Image Processing
  • 22. Morphological Watersheds (Cont…) – M1, M2: • Sets of coordinates of points in the two regional minima – Cn-1(M1), Cn-1(M2) • Sets of coordinates of points in the catchment basins associated with M1 M2 at stage n-1 of flooding (catchment basins up to the flooding level) – C[n-1] • Union of Cn-1(M1), Cn-1(M2) 22 COM 2304 - Computer Graphics & Image Processing
  • 23. Morphological Watersheds (Cont…) – At flooding step n-1, there are two connected components. At flooding step n, there is only one connected component • This indicates that the water between the two catchment basins has merged at flooding step n • Use “q” to denote the single connected component – Steps • Repeatedly dilate Cn-1(M1), Cn-1(M2) by the 3×3 structuring element shown, subject to the following condition – Constrained to q (center of the structuring element can not go beyond q during dilation) – The dilation cannot be performed on point that would cause the sets being dilated to merge. 23 COM 2304 - Computer Graphics & Image Processing
  • 24. Morphological Watersheds (Cont…) – The dam is constructed by the points on which the dilation would cause the sets being dilated to merge. • Resulting one-pixel thick connected path – Setting the gray level at each point in the resultant path to a value greater than the maximum gray value of the image. Usually max+1 24 COM 2304 - Computer Graphics & Image Processing
  • 25. Morphological Watersheds (Cont…) • The Use of Markers: – Discussed watershed approach gives oversegmented result due to noise or any other irregularities in the image. – Internal markers are used to limit the number of regions by specifying the objects of interest • Like seeds in region growing method • Can be assigned manually or automatically • Regions without markers are allowed to be merged (no dam is to be built) – External markers those pixels we are confident to belong to the background – Watershed lines are typical external markers and they belong the same (background) region 25 COM 2304 - Computer Graphics & Image Processing
  • 26. Morphological Watersheds (Cont…) COM 2304 - Computer Graphics & Image Processing 26 Markers
  • 27. Morphological Watersheds (Cont…) COM 2304 - Computer Graphics & Image Processing 27
  • 28. Model Based Segmentation • Model based approaches apply explicit image model to locate the specific objects in a particular image. • There are various model based segmentation methods available such as parametric models, deformable models and template matching. • COM 2304 - Computer Graphics & Image Processing 28
  • 29. Model Based Segmentation (Cont…) • Template Matching: – Template matching tries to recognize a structure model (template) in an image. – The method uses a template as a context, which is a priori model. – Thus, it is a contextual method and top down approach. – Within the matching process match against the input image by sliding the template over the input image. – It uses matching method/ similarity measurement to locate the matching point. – http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching /template_matching.html COM 2304 - Computer Graphics & Image Processing 29
  • 30. Model Based Segmentation (Cont…) COM 2304 - Computer Graphics & Image Processing 30 Template Matched template We used the template matching here to locate the marked template at consecutive frame and find the motion vector of this angiogram. Correlation coefficient is used as the similarity measure.
  • 31. Motion Segmentation • Motion is a powerful cue used by humans and many other animals to extract objects or ROI from a background of irrelevant detail. • In imaging applications, motion arises from a relative displacement between the sensing system and the sense being viewed. • It is used in robotic applications, autonomous navigation and dynamic scene analysis. COM 2304 - Computer Graphics & Image Processing 31
  • 32. Motion Segmentation (Cont…) • Spatial techniques: – As a simplest approach we can compute the frame difference. – It computes the pixel by pixel difference between two frames f(x,y,ti) and f(x,y,tj) taken at times ti and tj. – A difference image between two images taken at ti and tj may be defined as: COM 2304 - Computer Graphics & Image Processing 32  Ttyxftyxfif otherwiseij ji yxd   )|,,(),,(|1 0),(
  • 33. Motion Segmentation (Cont…) • Note that dij(x,y) has a value of 1 as spatial coordinates (x, y) only if the intensity difference between two images is different at those coordinates, as determined by the specified threshod T. • In dynamic image processing, all pixels in dij(x,y) with value 1 are considered the result of object motion. • This approach is applicable only if the two images are registered spatially and if the illumination is relatively constant within the bound established by T. • 1 valued entries in dij(x,y) may arise as a result of noise. COM 2304 - Computer Graphics & Image Processing 33
  • 34. Motion Segmentation (Cont…) COM 2304 - Computer Graphics & Image Processing 34 f(x,y,ti) f(x,y,tj)
  • 35. Motion Segmentation (Cont…) COM 2304 - Computer Graphics & Image Processing 35 Image difference Threshold (T=55) Noise
  • 36. Motion Segmentation (Cont…) – To reduce noise, we can post process the dij(x,y) to remove isolated noise blobs. – Although it may result in ignoring small and/or slow moving objects. • Accumulative differences: – Consider a sequence of image frames f(x,y,t1), f(x,y,t2), ……, f(x,y,tn) and let f(x,y,t1) be the reference image. – An Accumulative Difference Image (ADI) is formed by comparing this reference image with every subsequent image in the sequence. – A counter for each pixel location in the accumulative image is incremented every time a difference occurs at that pixel location between the reference and an image in the sequence. • COM 2304 - Computer Graphics & Image Processing 36
  • 37. Motion Segmentation (Cont…) COM 2304 - Computer Graphics & Image Processing 37 ADI model of the 20 frames
  • 38. Motion Segmentation (Cont…) COM 2304 - Computer Graphics & Image Processing 38
  • 39. Reference • Chapter 10, of Gonzalez, R.C., Woods, R.E., Digital Image Processing, 3rd ed. Addison-Wesley Pub. • Flood Fill, Learning OpenCV, pp 124-129 • Template Matching, Learning OpenCV, pp 214-219 • http://www.labbookpages.co.uk/software/imgProc/otsuThr eshold.html • http://docs.opencv.org/doc/tutorials/imgproc/histograms/t emplate_matching/template_matching.html • http://cmm.ensmp.fr/~beucher/wtshed.html • https://opencv-code.com/tutorials/count-and-segment- overlapping-objects-with-watershed-and-distance- transform/ COM 2304 - Computer Graphics & Image Processing 39
  • 40. Learning Outcomes Revisit • Now, you should be able to; – describe Connected Components and Contours in image segmentation. – discuss region based segmentation method. – discuss Region Growing segmentation technique. – discuss Morphological Watersheds segmentation. – discuss Model Based Segmentation. – discuss Motion Segmentation. – implement connected components, flood fill, watershed, template matching and frame difference techniques. – formulate possible mechanisms to propose segmentation methods to solve problems. COM 2304 - Computer Graphics & Image Processing 40
  • 41. QUESTIONS ? Next Lecture – Segmentation Techniques - III COM 2304 - Computer Graphics & Image Processing 41