SlideShare a Scribd company logo
1 of 54
Download to read offline
Unit: 3
Image Segmentation
ET403:Principles of Image ProcessingET403:Principles of Image Processing
(Similarity Based Techniques)
Image Segmentation
 Group similar components (such as, pixels in an image,
image frames in a video) to obtain a compact
representation.
ET403:Principles of Image Processing
 Applications: Finding tumors, veins, etc. in medical images,
finding targets in satellite/aerial images, finding people in
surveillance images, summarizing video, etc.
 Methods: Thresholding, K-means clustering, etc.
Image Segmentation
 Segmentation algorithms for monochrome images generally
are based on one of two basic properties of gray-scale values:
 Discontinuity
 The approach is to partition an image based on abrupt changes in
gray-scale levels.
ET403:Principles of Image Processing
gray-scale levels.
 The principal areas of interest within this category are detection
of isolated points, lines, and edges in an image.
 Similarity
 The principal approaches in this category are based on
thresholding, region growing, and region splitting/merging.
Thresholding
 Suppose that an image, f(x,y), is composed of light objects on a
dark background, and the following figure is the histogram of the
image.
image with dark background
ET403:Principles of Image Processing
 Then, the objects can be extracted by comparing pixel values
with a threshold T.
image with dark background
and a light object
Thresholding
 One way to extract the objects from the background is to select
a threshold T that separates object from background.
 Any point (x,y) for which f(x,y) > T is called an object point;
otherwise the point is called a background point.
ET403:Principles of Image Processing
 When T is a constant applicable over an entire image, then the
above process is called as Global thresholding.
1 ( , )
( , )
0 ( , )
if f x y T
g x y
f f x y T

 

Thresholding
 When the value of T changes over an image
 Then that process is referred as Variable thresholding.
 Sometimes it is also termed as local or regional thresholding.
 Where, the value of T at any point (x,y) in an image depends
ET403:Principles of Image Processing
 Where, the value of T at any point (x,y) in an image depends
on properties of a neighborhood of (x,y).
 If T depends on the spatial coordinates (x,y) themselves, then
variable thresholding is often referred to as dynamic or
adaptive thresholding.
Thresholding
ET403:Principles of Image Processing
Thresholding
ET403:Principles of Image Processing
Multilevel Thresholding
 It is also possible to extract objects that have a specific intensity
range using multiple thresholds.
image with dark background
and two light objects
ET403:Principles of Image Processing
Extension to color images is straightforward: There are three color channels, in
each one specify the intensity range of the object… Even if objects are not
separated in a single channel, they might be with all the channels… Application
example: Detecting/Tracking faces based on skin color…
Multilevel thresholding
• A point (x,y) belongs
– to an object class if T1 < f(x,y)  T2
– to another object class if f(x,y) > T2
ET403:Principles of Image Processing
– to background if f(x,y)  T1
2
1 2
1
if ( , )
( , ) if ( , )
if ( , )
a f x y T
g x y b T f x y T
c f x y T


  
 
Thresholding
ET403:Principles of Image Processing
Thresholding
ET403:Principles of Image Processing
Role of Noise in Image Thresholding
ET403:Principles of Image Processing
Role of Illumination in Image Thresholding
 Non-uniform illumination may change the histogram in a
way that it becomes impossible to segment the image using
a single global threshold.
ET403:Principles of Image Processing
 Choosing local threshold values may help.
Role of Illumination in Image Thresholding
ET403:Principles of Image Processing
Basic Global Thresholding
Based on visual inspection of histogram
1. Select an initial estimate for T.
2. Segment the image using T. This will produce two groups of pixels: G1
consisting of all pixels with gray level values > T and G2 consisting of
pixels with gray level values  T
ET403:Principles of Image Processing
3. Compute the average gray level values 1 and 2 for the pixels in
regions G1 and G2
4. Compute a new threshold value
5. T = 0.5 (1 + 2)
6. Repeat steps 2 through 4 until the difference between the values of T
in successive iterations is smaller than a predefined parameter ΔT.
Basic Global Thresholding
Note: the clear
valley of the
histogram and the
segmentation
between object and
background
ET403:Principles of Image Processing
background
Initially T= average intensity of image
T0 = 0
3 iterations
with result T = 125
Basic Global Thresholding
1. Works well in situations where there is a reasonably clear
valley between the modes of the histogram related to
objects and background.
2. ΔT is used to control the number of iterations.
ET403:Principles of Image Processing
2. ΔT is used to control the number of iterations.
3. Initial threshold must be chosen greater than the minimum
and less than the maximum intensity level in the image
4. The average intensity of the image is a good initial choice
for T.
Basic Adaptive Thresholding
• subdivide original image into small areas.
• utilize a different threshold to segment each
subimages.
• since the threshold used for each pixel
ET403:Principles of Image Processing
• since the threshold used for each pixel
depends on the location of the pixel in terms
of the subimages, this type of thresholding is
adaptive.
Example : Adaptive Thresholding
ET403:Principles of Image Processing
Example : Adaptive Thresholding
ET403:Principles of Image Processing
How to solve this problem?
Further subdivision
ET403:Principles of Image Processing
• This method treats pixel values as probability density functions.
• The goal of this method is to minimize the probability of
misclassifying pixels as either object or background.
• There are two kinds of error:
– mislabeling an object pixel as background, and
Optimal Global and Adaptive Thresholding
ET403:Principles of Image Processing
– mislabeling an object pixel as background, and
– mislabeling a background pixel as object.
Optimal Global and Adaptive Thresholding
• Method for estimating thresholds that produce the
minimum average segmentation error.
• Let an image contains only two principal gray
regions.
ET403:Principles of Image Processing
regions.
• Let z represents the gray-level values.
• These can be viewed as random quantities, and the
histogram may be considered an estimate of their
probability density function (PDF), p(z).
Optimal Global and Adaptive Thresholding
ET403:Principles of Image Processing
1 1 2 2
1 2
( ) ( ) ( )
1
p z P p z P p z
P P
 
 
P1: probability that a random pixel
with value z is an object pixel.
P2: probability that a random pixel
Is a background pixel
Probability of erroneously


T
dzzpTE )()( 21
ET403:Principles of Image Processing


T
dzzpTE )()( 12
)()()( 2112 TEPTEPTE 
Minimum error
0
))()(()( 2112



TEPTEPdTdE
Differentiating E(T) with respect to T (using Leibniz’s rule) and
equating the result to 0
ET403:Principles of Image Processing
02112

dTdT
)()( 2211 TpPTpP 
find T which makes
if P1 = P2 then
the optimum threshold
is where the curve
p1(z) and p2(z) intersect
Gaussian density
Example: use PDF = Gaussian density : p1(z) and p2(z)
2
1
2
1
( )
2
1
1
1
( )
2
z
p z e


 



ET403:Principles of Image Processing
2
2
2
2
( )
2
2
2
1
( )
2
z
p z e


 



where
• 1 and 1
2 are the mean and variance of the Gaussian density
of one object
• 2 and 2
2 are the mean and variance of the Gaussian density
of the other object
Gaussian density
2
1
2
1
2
2
( )
2
1
1
( )
1
( )
2
1
T
T
p T e



 





ET403:Principles of Image Processing
)()( 2211 TpPTpP 
2
2
2
( )
2
2
2
1
( )
2
T
p T e


 



Quadratic equation
)(2
0
2
12
2
21
2
2
2
1
2
B
Awhere
CBTAT





ET403:Principles of Image Processing
)/ln(22
)(2
2112
2
2
2
1
2
1
2
2
2
2
2
1
1221
PPC
B














1
2
21
2
21
ln
2 P
P
T

 if P1 = P2 or  = 0 then
the optimal threshold
is the average of the
means
Region-Based Segmentation
ET403:Principles of Image ProcessingET403:Principles of Image Processing
Region-Based Segmentation
• Basic Formulation
, ..., n,iRb
RRa
i
i
n



21region,connectedais)(
)(
1i
ET403:Principles of Image Processing
jfor iFALSE)RP(Re
, ..., n,iTRUE)P(Rd
jiRRc
ji
i
ji
i



)(
21for)(
j,andiallfor)( 
P(Ri) is a logical predicate property defined over the points in set Ri
ex. P(Ri) = TRUE if all pixel in Ri have the same gray level
Region-Based Segmentation
 Region Growing
 Region growing is a procedure that groups pixels or
subregions into larger regions.
 The simplest of these approaches is pixel aggregation,
which starts with a set of “seed” points and from these
grows regions by appending to each seed points those
ET403:Principles of Image Processing
grows regions by appending to each seed points those
neighboring pixels that have similar properties (such as
gray level, texture, color, shape).
 Region growing based techniques are better than the
edge-based techniques in noisy images where edges are
difficult to detect.
Region-Based Segmentation
 Region Growing
 Region growing is a procedure that groups pixels or
subregions into larger regions.
 The simplest of these approaches is pixel aggregation,
which starts with a set of “seed” points and from these
grows regions by appending to each seed points those
ET403:Principles of Image Processing
grows regions by appending to each seed points those
neighboring pixels that have similar properties (such as
gray level, texture, color, shape).
 Region growing based techniques are better than the
edge-based techniques in noisy images where edges are
difficult to detect.
Region Growing
select all seed points with gray level 255
criteria:
1. the absolute gray-
level difference
between any pixel
and the seed has to
be less than 65
2. the pixel has to be 8-
connected to at least
ET403:Principles of Image Processing
connected to at least
one pixel in that
region (if more, the
regions are merged)
Region Growing
select all seed points with gray level 255
criteria:
1. the absolute gray-level
difference between any pixel
and the seed has to be less
than 65
ET403:Principles of Image Processing
than 65
2. the pixel has to be 8-
connected to at least one
pixel in that region (if more,
the regions are merged)
Histogram of fig 10.40 a)
ET403:Principles of Image Processing
used to find the criteria of the
difference gray-level between
each pixels and the seeds
Region-Based Segmentation
ET403:Principles of Image Processing
Region-Based Segmentation
ET403:Principles of Image Processing
Region-Based Segmentation
 Region Splitting
 Region growing starts from a set of seed points.
 An alternative is to start with the whole image as a single region
and subdivide the regions that do not satisfy a condition of
homogeneity.
ET403:Principles of Image Processing
 Region Merging
 Region merging is the opposite of region splitting.
 Start with small regions (e.g. 2x2 or 4x4 regions) and merge the
regions that have similar characteristics (such as gray level,
variance).
 Typically, splitting and merging approaches are used iteratively.
Region splitting and merging
ET403:Principles of Image Processing
Quadtree
1. Split into 4 disjoint quadrants any region Ri for which
P(Ri) = FALSE
2. Merge any adjacent region Rj and Rk for which
P(Ri  Rk ) = TRUE
3. Stop when no further merging or splitting is possible.
Example
ET403:Principles of Image Processing
P(Ri) = TRUE if at least 80% of the pixels in Ri have the property |zj-mi|  2i,
where
zj is the gray level of the jth pixel in Ri
mi is the mean gray level of that region
i is the standard deviation of the gray levels in Ri
Example: Apply the split and merge technique to segment
the image shown in fig. below.
ET403:Principles of Image Processing
Figure: Image
R1 R2
R4R3
R1 R2
Quadtree Representation
R
ET403:Principles of Image Processing
R2R1
Example: Apply the split and merge technique to segment
the image shown in fig. below.
ET403:Principles of Image Processing
Figure: Image
Solution:
Figure(b): step-1
R1
R3 R4
R2
ET403:Principles of Image Processing
Figure(a): Image
Figure(b): step-1
Figure(c): step-2 Figure(d): step-3
R1
R4
R31
R21
R32
R33 R34
R23
R22
R24
Quadtree Representation
R
R4R3R2R1
ET403:Principles of Image Processing
R22 R23
R21 R24
R32 R33
R31
R34
Example: Apply the split and merge technique to segment
the image shown in fig. below.
ET403:Principles of Image Processing
Example: Apply the split and merge technique to segment
the image shown in fig. below.
R1 R2
ET403:Principles of Image Processing
R4R3
More Complex Segmentation Methods
• Snakes
• Level Sets
• Graph Cuts
• Generalized PCA
ET403:Principles of Image Processing
17/09/2016
Copyright G.D. Hager
• Generalized PCA
Snakes
ET403:Principles of Image Processing
17/09/2016
Copyright G.D. Hager
Images taken from
http://www.cs.bris.ac.uk/home/xie/content.htm
Level Sets
ET403:Principles of Image Processing
17/09/2016
Copyright G.D. Hager
Images taken from
http://www.cgl.uwaterloo.ca/~mmwasile/cs870/
Graph Cuts
ET403:Principles of Image Processing
17/09/2016
Copyright G.D. Hager
Images taken from efficient graph-based segmentation paper
GPCA (Rene Vidal)
ET403:Principles of Image Processing
17/09/2016
Copyright G.D. Hager
Human GPCA

More Related Content

What's hot

Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Moe Moe Myint
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsasodariyabhavesh
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: BasicsA B Shinde
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentationramya marichamy
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram ProcessingAmnaakhaan
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filteringGautam Saxena
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentalsA B Shinde
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Kalyan Acharjya
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsA B Shinde
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point ProcessingGayathri31093
 

What's hot (20)

Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
Segmentation
SegmentationSegmentation
Segmentation
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
Noise Models
Noise ModelsNoise Models
Noise Models
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
 

Similar to Image segmentation

Similar to Image segmentation (20)

Final Review
Final ReviewFinal Review
Final Review
 
Image seg using_thresholding
Image seg using_thresholdingImage seg using_thresholding
Image seg using_thresholding
 
IR.pptx
IR.pptxIR.pptx
IR.pptx
 
08 cie552 image_segmentation
08 cie552 image_segmentation08 cie552 image_segmentation
08 cie552 image_segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
ImSeg04.ppt
ImSeg04.pptImSeg04.ppt
ImSeg04.ppt
 
Im seg04
Im seg04Im seg04
Im seg04
 
ImSeg04 (2).ppt
ImSeg04 (2).pptImSeg04 (2).ppt
ImSeg04 (2).ppt
 
Different Image Segmentation Techniques for Dental Image Extraction
Different Image Segmentation Techniques for Dental Image ExtractionDifferent Image Segmentation Techniques for Dental Image Extraction
Different Image Segmentation Techniques for Dental Image Extraction
 
Super Resolution of Image
Super Resolution of ImageSuper Resolution of Image
Super Resolution of Image
 
AUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGESAUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR OPTICAL IMAGES
 
3 ijaems nov-2015-6-development of an advanced technique for historical docum...
3 ijaems nov-2015-6-development of an advanced technique for historical docum...3 ijaems nov-2015-6-development of an advanced technique for historical docum...
3 ijaems nov-2015-6-development of an advanced technique for historical docum...
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
B070306010
B070306010B070306010
B070306010
 
J017426467
J017426467J017426467
J017426467
 
mini prjt
mini prjtmini prjt
mini prjt
 
h.pdf
h.pdfh.pdf
h.pdf
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 

Recently uploaded

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

Image segmentation

  • 1. Unit: 3 Image Segmentation ET403:Principles of Image ProcessingET403:Principles of Image Processing (Similarity Based Techniques)
  • 2. Image Segmentation  Group similar components (such as, pixels in an image, image frames in a video) to obtain a compact representation. ET403:Principles of Image Processing  Applications: Finding tumors, veins, etc. in medical images, finding targets in satellite/aerial images, finding people in surveillance images, summarizing video, etc.  Methods: Thresholding, K-means clustering, etc.
  • 3. Image Segmentation  Segmentation algorithms for monochrome images generally are based on one of two basic properties of gray-scale values:  Discontinuity  The approach is to partition an image based on abrupt changes in gray-scale levels. ET403:Principles of Image Processing gray-scale levels.  The principal areas of interest within this category are detection of isolated points, lines, and edges in an image.  Similarity  The principal approaches in this category are based on thresholding, region growing, and region splitting/merging.
  • 4. Thresholding  Suppose that an image, f(x,y), is composed of light objects on a dark background, and the following figure is the histogram of the image. image with dark background ET403:Principles of Image Processing  Then, the objects can be extracted by comparing pixel values with a threshold T. image with dark background and a light object
  • 5. Thresholding  One way to extract the objects from the background is to select a threshold T that separates object from background.  Any point (x,y) for which f(x,y) > T is called an object point; otherwise the point is called a background point. ET403:Principles of Image Processing  When T is a constant applicable over an entire image, then the above process is called as Global thresholding. 1 ( , ) ( , ) 0 ( , ) if f x y T g x y f f x y T    
  • 6. Thresholding  When the value of T changes over an image  Then that process is referred as Variable thresholding.  Sometimes it is also termed as local or regional thresholding.  Where, the value of T at any point (x,y) in an image depends ET403:Principles of Image Processing  Where, the value of T at any point (x,y) in an image depends on properties of a neighborhood of (x,y).  If T depends on the spatial coordinates (x,y) themselves, then variable thresholding is often referred to as dynamic or adaptive thresholding.
  • 9. Multilevel Thresholding  It is also possible to extract objects that have a specific intensity range using multiple thresholds. image with dark background and two light objects ET403:Principles of Image Processing Extension to color images is straightforward: There are three color channels, in each one specify the intensity range of the object… Even if objects are not separated in a single channel, they might be with all the channels… Application example: Detecting/Tracking faces based on skin color…
  • 10. Multilevel thresholding • A point (x,y) belongs – to an object class if T1 < f(x,y)  T2 – to another object class if f(x,y) > T2 ET403:Principles of Image Processing – to background if f(x,y)  T1 2 1 2 1 if ( , ) ( , ) if ( , ) if ( , ) a f x y T g x y b T f x y T c f x y T       
  • 13. Role of Noise in Image Thresholding ET403:Principles of Image Processing
  • 14. Role of Illumination in Image Thresholding  Non-uniform illumination may change the histogram in a way that it becomes impossible to segment the image using a single global threshold. ET403:Principles of Image Processing  Choosing local threshold values may help.
  • 15. Role of Illumination in Image Thresholding ET403:Principles of Image Processing
  • 16. Basic Global Thresholding Based on visual inspection of histogram 1. Select an initial estimate for T. 2. Segment the image using T. This will produce two groups of pixels: G1 consisting of all pixels with gray level values > T and G2 consisting of pixels with gray level values  T ET403:Principles of Image Processing 3. Compute the average gray level values 1 and 2 for the pixels in regions G1 and G2 4. Compute a new threshold value 5. T = 0.5 (1 + 2) 6. Repeat steps 2 through 4 until the difference between the values of T in successive iterations is smaller than a predefined parameter ΔT.
  • 17. Basic Global Thresholding Note: the clear valley of the histogram and the segmentation between object and background ET403:Principles of Image Processing background Initially T= average intensity of image T0 = 0 3 iterations with result T = 125
  • 18. Basic Global Thresholding 1. Works well in situations where there is a reasonably clear valley between the modes of the histogram related to objects and background. 2. ΔT is used to control the number of iterations. ET403:Principles of Image Processing 2. ΔT is used to control the number of iterations. 3. Initial threshold must be chosen greater than the minimum and less than the maximum intensity level in the image 4. The average intensity of the image is a good initial choice for T.
  • 19. Basic Adaptive Thresholding • subdivide original image into small areas. • utilize a different threshold to segment each subimages. • since the threshold used for each pixel ET403:Principles of Image Processing • since the threshold used for each pixel depends on the location of the pixel in terms of the subimages, this type of thresholding is adaptive.
  • 20. Example : Adaptive Thresholding ET403:Principles of Image Processing
  • 21. Example : Adaptive Thresholding ET403:Principles of Image Processing How to solve this problem?
  • 23. • This method treats pixel values as probability density functions. • The goal of this method is to minimize the probability of misclassifying pixels as either object or background. • There are two kinds of error: – mislabeling an object pixel as background, and Optimal Global and Adaptive Thresholding ET403:Principles of Image Processing – mislabeling an object pixel as background, and – mislabeling a background pixel as object.
  • 24. Optimal Global and Adaptive Thresholding • Method for estimating thresholds that produce the minimum average segmentation error. • Let an image contains only two principal gray regions. ET403:Principles of Image Processing regions. • Let z represents the gray-level values. • These can be viewed as random quantities, and the histogram may be considered an estimate of their probability density function (PDF), p(z).
  • 25. Optimal Global and Adaptive Thresholding ET403:Principles of Image Processing 1 1 2 2 1 2 ( ) ( ) ( ) 1 p z P p z P p z P P     P1: probability that a random pixel with value z is an object pixel. P2: probability that a random pixel Is a background pixel
  • 26. Probability of erroneously   T dzzpTE )()( 21 ET403:Principles of Image Processing   T dzzpTE )()( 12 )()()( 2112 TEPTEPTE 
  • 27. Minimum error 0 ))()(()( 2112    TEPTEPdTdE Differentiating E(T) with respect to T (using Leibniz’s rule) and equating the result to 0 ET403:Principles of Image Processing 02112  dTdT )()( 2211 TpPTpP  find T which makes if P1 = P2 then the optimum threshold is where the curve p1(z) and p2(z) intersect
  • 28. Gaussian density Example: use PDF = Gaussian density : p1(z) and p2(z) 2 1 2 1 ( ) 2 1 1 1 ( ) 2 z p z e        ET403:Principles of Image Processing 2 2 2 2 ( ) 2 2 2 1 ( ) 2 z p z e        where • 1 and 1 2 are the mean and variance of the Gaussian density of one object • 2 and 2 2 are the mean and variance of the Gaussian density of the other object
  • 29. Gaussian density 2 1 2 1 2 2 ( ) 2 1 1 ( ) 1 ( ) 2 1 T T p T e           ET403:Principles of Image Processing )()( 2211 TpPTpP  2 2 2 ( ) 2 2 2 1 ( ) 2 T p T e       
  • 30. Quadratic equation )(2 0 2 12 2 21 2 2 2 1 2 B Awhere CBTAT      ET403:Principles of Image Processing )/ln(22 )(2 2112 2 2 2 1 2 1 2 2 2 2 2 1 1221 PPC B               1 2 21 2 21 ln 2 P P T   if P1 = P2 or  = 0 then the optimal threshold is the average of the means
  • 31. Region-Based Segmentation ET403:Principles of Image ProcessingET403:Principles of Image Processing
  • 32. Region-Based Segmentation • Basic Formulation , ..., n,iRb RRa i i n    21region,connectedais)( )( 1i ET403:Principles of Image Processing jfor iFALSE)RP(Re , ..., n,iTRUE)P(Rd jiRRc ji i ji i    )( 21for)( j,andiallfor)(  P(Ri) is a logical predicate property defined over the points in set Ri ex. P(Ri) = TRUE if all pixel in Ri have the same gray level
  • 33. Region-Based Segmentation  Region Growing  Region growing is a procedure that groups pixels or subregions into larger regions.  The simplest of these approaches is pixel aggregation, which starts with a set of “seed” points and from these grows regions by appending to each seed points those ET403:Principles of Image Processing grows regions by appending to each seed points those neighboring pixels that have similar properties (such as gray level, texture, color, shape).  Region growing based techniques are better than the edge-based techniques in noisy images where edges are difficult to detect.
  • 34. Region-Based Segmentation  Region Growing  Region growing is a procedure that groups pixels or subregions into larger regions.  The simplest of these approaches is pixel aggregation, which starts with a set of “seed” points and from these grows regions by appending to each seed points those ET403:Principles of Image Processing grows regions by appending to each seed points those neighboring pixels that have similar properties (such as gray level, texture, color, shape).  Region growing based techniques are better than the edge-based techniques in noisy images where edges are difficult to detect.
  • 35. Region Growing select all seed points with gray level 255 criteria: 1. the absolute gray- level difference between any pixel and the seed has to be less than 65 2. the pixel has to be 8- connected to at least ET403:Principles of Image Processing connected to at least one pixel in that region (if more, the regions are merged)
  • 36. Region Growing select all seed points with gray level 255 criteria: 1. the absolute gray-level difference between any pixel and the seed has to be less than 65 ET403:Principles of Image Processing than 65 2. the pixel has to be 8- connected to at least one pixel in that region (if more, the regions are merged)
  • 37. Histogram of fig 10.40 a) ET403:Principles of Image Processing used to find the criteria of the difference gray-level between each pixels and the seeds
  • 40. Region-Based Segmentation  Region Splitting  Region growing starts from a set of seed points.  An alternative is to start with the whole image as a single region and subdivide the regions that do not satisfy a condition of homogeneity. ET403:Principles of Image Processing  Region Merging  Region merging is the opposite of region splitting.  Start with small regions (e.g. 2x2 or 4x4 regions) and merge the regions that have similar characteristics (such as gray level, variance).  Typically, splitting and merging approaches are used iteratively.
  • 41. Region splitting and merging ET403:Principles of Image Processing Quadtree 1. Split into 4 disjoint quadrants any region Ri for which P(Ri) = FALSE 2. Merge any adjacent region Rj and Rk for which P(Ri  Rk ) = TRUE 3. Stop when no further merging or splitting is possible.
  • 42. Example ET403:Principles of Image Processing P(Ri) = TRUE if at least 80% of the pixels in Ri have the property |zj-mi|  2i, where zj is the gray level of the jth pixel in Ri mi is the mean gray level of that region i is the standard deviation of the gray levels in Ri
  • 43. Example: Apply the split and merge technique to segment the image shown in fig. below. ET403:Principles of Image Processing Figure: Image R1 R2 R4R3 R1 R2
  • 45. Example: Apply the split and merge technique to segment the image shown in fig. below. ET403:Principles of Image Processing Figure: Image
  • 46. Solution: Figure(b): step-1 R1 R3 R4 R2 ET403:Principles of Image Processing Figure(a): Image Figure(b): step-1 Figure(c): step-2 Figure(d): step-3 R1 R4 R31 R21 R32 R33 R34 R23 R22 R24
  • 47. Quadtree Representation R R4R3R2R1 ET403:Principles of Image Processing R22 R23 R21 R24 R32 R33 R31 R34
  • 48. Example: Apply the split and merge technique to segment the image shown in fig. below. ET403:Principles of Image Processing
  • 49. Example: Apply the split and merge technique to segment the image shown in fig. below. R1 R2 ET403:Principles of Image Processing R4R3
  • 50. More Complex Segmentation Methods • Snakes • Level Sets • Graph Cuts • Generalized PCA ET403:Principles of Image Processing 17/09/2016 Copyright G.D. Hager • Generalized PCA
  • 51. Snakes ET403:Principles of Image Processing 17/09/2016 Copyright G.D. Hager Images taken from http://www.cs.bris.ac.uk/home/xie/content.htm
  • 52. Level Sets ET403:Principles of Image Processing 17/09/2016 Copyright G.D. Hager Images taken from http://www.cgl.uwaterloo.ca/~mmwasile/cs870/
  • 53. Graph Cuts ET403:Principles of Image Processing 17/09/2016 Copyright G.D. Hager Images taken from efficient graph-based segmentation paper
  • 54. GPCA (Rene Vidal) ET403:Principles of Image Processing 17/09/2016 Copyright G.D. Hager Human GPCA