SlideShare a Scribd company logo
1 of 29
Download to read offline
1
CSC447: Digital Image
Processing
Chapter 10:
Prof. Dr. Mostafa Gadal-Haqq
Computer Science Department
Faculty of Computer & Information Sciences
AIN SHAMS UNIVERSITY
10. Image Segmentation - 2
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
 Segmentation attempts to partition the pixels of
an image into groups that strongly correlate
with the objects in an image
 Typically the first step in any automated
computer vision application
Image Segmentation
2
Image Segmentation
• Segmentation algorithms generally are based
on one of two basis properties of intensity
values
• Discontinuity: to partition an image based
on abrupt changes in intensity (such as
edges)
• Similarity: to partition an image into regions
that are similar according to a set of
predefined criteria.
10. Image Segmentation - 3
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Image Segmentation
 Image Segmentation
10. Image Segmentation - 4
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
3
Image Segmentation
 Image Segmentation
10. Image Segmentation - 5
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Image Segmentation
 Detection of discontinuities:
 There are three basic types of gray-level
discontinuities:
 points , lines , edges
 the common way is to run a mask through
the image
10. Image Segmentation - 6
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
4
Point Detection:
• Note that the mark is the same as the mask of
Laplacian Operation (in chapter 3)
• The only differences that are considered of
interest are those large enough (as determined
by T) to be considered isolated points.
|R| >T
10. Image Segmentation - 7
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Point Detection:
10. Image Segmentation - 8
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
5
Line Detection
• Horizontal mask will result with max response when a line
passed through the middle row of the mask with a constant
background.
• the similar idea is used with other masks.
• note: the preferred direction of each mask is weighted with
a larger coefficient (i.e.,2) than other possible directions.
R1 R2 R3 R4
10. Image Segmentation - 9
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Line Detection
• Apply every masks on the image
• let R1, R2, R3, R4 denotes the response of
the horizontal, +45 degree, vertical and -45
degree masks, respectively.
• if, at a certain point in the image
|Ri| > |Rj|, for all j≠i,
• that point is said to be more likely
associated with a line in the direction of
mask i.
10. Image Segmentation - 10
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
6
Line Detection
• Alternatively, if we are interested in detecting all
lines in an image in the direction defined by a
given mask, we simply run the mask through the
image and threshold the absolute value of the
result.
• The points that are left are the strongest
responses, which, for lines one pixel thick,
correspond closest to the direction defined by
the mask.
10. Image Segmentation - 11
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Line Detection
10. Image Segmentation - 12
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
7
Edge Detection Approach
 Segmentation by finding pixels on a region
boundary.
 Edges found by looking at neighboring pixels.
 Region boundary formed by measuring gray
value differences between neighboring pixels
Edge Detection
• an edge is a set of connected pixels that
lie on the boundary between two regions.
• an edge is a “local” concept whereas a
region boundary, owing to the way it is
defined, is a more global idea.
10. Image Segmentation - 14
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
8
Edge Detection
10. Image Segmentation - 15
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
10. Image Segmentation - 16
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
9
Edge Detection
10. Image Segmentation - 17
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
 Detection of discontinuities: Image Derivatives
10. Image Segmentation - 18
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
10
Edge Detection
• First column: images and gray-
level profiles of a ramp edge
corrupted by random Gaussian
noise of mean 0 and = 0.0,
0.1, 1.0 and 10.0, respectively.
• Second column: first-derivative
images and gray-level profiles.
• Third column : second-
derivative images and gray-
level profiles.
10. Image Segmentation - 19
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
 Gradient Operator
 
)
(
)
(
)
(
)
(
mask
3
3
for
7
4
1
9
6
3
3
2
1
9
8
7
2
/
1
2
2
z
z
z
z
z
z
G
z
z
z
z
z
z
G
G
G
f
y
f
x
f
G
G
f
y
x
y
x
y
x









































10. Image Segmentation - 20
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
11
Edge Detection
 Prewitt and Sobel Operators
10. Image Segmentation - 21
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
10. Image Segmentation - 22
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
12
Edge Detection
10. Image Segmentation - 23
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
10. Image Segmentation - 24
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
13
Edge Detection
10. Image Segmentation - 25
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
 The Laplacian
10. Image Segmentation - 26
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
14
Edge Detection
10. Image Segmentation - 27
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Edge Detection
 The Laplacian of Gaussian (LoG)
10. Image Segmentation - 28
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
15
Edge Detection
 The Laplacian of Gaussian (LoG)
10. Image Segmentation - 29
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
The Hough Transform
10. Image Segmentation - 30
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
16
The Hough Transform
 Global processing: The Hough Transform
10. Image Segmentation - 31
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
The Hough Transform
 Global processing: The Hough Transform
10. Image Segmentation - 32
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
17
The Hough Transform
 Global processing: The Hough Transform
10. Image Segmentation - 33
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
2. Image Operations - 34
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Region-Based Segmentation
18
What is a Region?
 Basic definition :- A group of connected
pixels with similar properties.
 Important in interpreting an image because
they may correspond to objects in a scene.
 For that an image must be partitioned into
regions that correspond to objects or parts of
an object.
Region-Based vs. Edge-Based
Region-Based
 Closed boundaries
 Multi-spectral
images improve
segmentation
 Computation based
on similarity
Edge-Based
 Boundaries formed
not necessarily
closed
 No significant
improvement for
multi-spectral images
 Computation based
on difference
19
2. Image Operations - 37
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Image Thresholding
•What is thresholding?
•Simple thresholding
•Adaptive thresholding
Thresholding – A Key Aspect
 Most algorithms involve establishing a
threshold level of certain parameter.
 Correct thresholding leads to better
segmentation.
 Using samples of image intensity available,
appropriate threshold should be set
automatically in a robust algorithm i.e. no
hard-wiring of gray values
20
Automatic Thresholding
 Use of one or more of the following:-
1. Intensity characteristics of objects
2. Sizes of objects
3. Fractions of image occupied by objects
4. Number of different types of objects
 Size and probability of occurrence – most
popular
 Intensity distributions estimate by histogram
computation.
Automatic Thresholding Methods
 Some automatic thresholding schemes:
1. P-tile method
2. Iterative threshold selection
3. Adaptive thresholding
21
Thresholding Methods
 P-tile Method:- If object
occupies P% of image pixels
then set a threshold T such
that P% of pixels have
intensity below T.
 Iterative Thresholding:-
Successively refines an
approx. threshold to get a
new value which partitions
the image better.
 
2
1
2
1

 

T
2. Image Operations - 42
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
P-Tile Thresholding
• Thresholding is usually the first
step in any segmentation approach
• Single value thresholding can be
given mathematically as follows:






T
y
x
f
T
y
x
f
y
x
g
)
,
(
if
0
)
,
(
if
1
)
,
(
22
2. Image Operations - 43
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
P-Tile Thresholding
• Basic global thresholding:
• Based on the histogram of an image
Partition the image histogram using
a single global threshold
2. Image Operations - 44
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
P-Tile Thresholding
• Basic global thresholding:
• The success of this technique very
strongly depends on how well the
histogram can be partitioned
23
2. Image Operations - 45
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Iterative P-Tile Thresholding
• The Basic global thresholding:
1. Select an initial estimate for T (typically the
average grey level in the image)
2. Segment the image using T to produce two
groups of pixels: G1 consisting of pixels with
grey levels >T and G2 consisting pixels with
grey levels ≤ T
3. Compute the average grey levels of pixels
in G1 to give μ1 and G2 to give μ2
2. Image Operations - 46
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Iterative P-Tile Thresholding
• The Basic global thresholding:
4. Compute a new threshold value:
5. Repeat steps 2 – 4 until the difference in T
in successive iterations is less than a
predefined limit T∞
This algorithm works very well for finding thresholds
when the histogram is suitable.
2
2
1 
 

T
24
2. Image Operations - 47
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
P-Tile Thresholding
P-Tile Thresholding
10. Image Segmentation - 48
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
25
P-Tile Thresholding
10. Image Segmentation - 49
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
• Limitation of P-Tile thresholding:
P-Tile Thresholding
10. Image Segmentation - 50
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
• Limitation of P-Tile thresholding:
26
P-Tile Thresholding
10. Image Segmentation - 51
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
• Limitation of P-Tile thresholding:
Adaptive Thresholding
 Adaptive Thresholding is used in scenes with
uneven illumination where same threshold
value not usable throughout complete image.
 In such case, look at small regions in the
image and obtain thresholds for individual
sub-images. Final segmentation is the union
of the regions of sub-images.
27
Adaptive Thresholding
10. Image Segmentation - 53
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
 Thresholding – Basic Adaptive Thresholding
Adaptive Thresholding
10. Image Segmentation - 54
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
 Thresholding – Basic Adaptive Thresholding
28
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
10. Image Segmentation - 55
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
10. Image Segmentation - 56
Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
29
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
10. Image Segmentation - 57
Dr. Mostafa Gadal-Haqq. CS482:Introduction to Digital Image Processing
Summary
 Segmentation is the most essential step
in most scene analysis and automatic
pictorial pattern recognition problems.
 Choice of the technique depends on the
peculiar characteristics of individual
problem in hand.
10. Image Segmentation - 58
Dr. Mostafa Gadal-Haqq. CS482:Introduction to Digital Image Processing

More Related Content

Similar to csc447dipch10-160628144302.pdf

Pose estimation from RGB images by deep learning
Pose estimation from RGB images by deep learningPose estimation from RGB images by deep learning
Pose estimation from RGB images by deep learningYu Huang
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfDrAhmedElngar
 
A Novel Edge Detection Technique for Image Classification and Analysis
A Novel Edge Detection Technique for Image Classification and AnalysisA Novel Edge Detection Technique for Image Classification and Analysis
A Novel Edge Detection Technique for Image Classification and AnalysisIOSR Journals
 
3D Image visualization
3D Image visualization3D Image visualization
3D Image visualizationalok ray
 
3-d interpretation from single 2-d image III
3-d interpretation from single 2-d image III3-d interpretation from single 2-d image III
3-d interpretation from single 2-d image IIIYu Huang
 
ZJPeng.3DSolderBallReconstruction
ZJPeng.3DSolderBallReconstructionZJPeng.3DSolderBallReconstruction
ZJPeng.3DSolderBallReconstructionZhejian Peng
 
Defect detection in circlips using image processing in ni lab view
Defect detection in circlips using image processing in ni lab viewDefect detection in circlips using image processing in ni lab view
Defect detection in circlips using image processing in ni lab viewSayali Bodhankar
 
Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...IRJET Journal
 
Scrdet++ analysis
Scrdet++ analysisScrdet++ analysis
Scrdet++ analysisNEHA Kapoor
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...KAIST
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...KAIST
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentalsA B Shinde
 
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision GroupDTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision GroupLihang Li
 

Similar to csc447dipch10-160628144302.pdf (20)

G04654247
G04654247G04654247
G04654247
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
[DL輪読会]ClearGrasp
[DL輪読会]ClearGrasp[DL輪読会]ClearGrasp
[DL輪読会]ClearGrasp
 
Pose estimation from RGB images by deep learning
Pose estimation from RGB images by deep learningPose estimation from RGB images by deep learning
Pose estimation from RGB images by deep learning
 
Cgm Lab Manual
Cgm Lab ManualCgm Lab Manual
Cgm Lab Manual
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
A Novel Edge Detection Technique for Image Classification and Analysis
A Novel Edge Detection Technique for Image Classification and AnalysisA Novel Edge Detection Technique for Image Classification and Analysis
A Novel Edge Detection Technique for Image Classification and Analysis
 
Digital.cc
Digital.ccDigital.cc
Digital.cc
 
3D Image visualization
3D Image visualization3D Image visualization
3D Image visualization
 
3-d interpretation from single 2-d image III
3-d interpretation from single 2-d image III3-d interpretation from single 2-d image III
3-d interpretation from single 2-d image III
 
ZJPeng.3DSolderBallReconstruction
ZJPeng.3DSolderBallReconstructionZJPeng.3DSolderBallReconstruction
ZJPeng.3DSolderBallReconstruction
 
Defect detection in circlips using image processing in ni lab view
Defect detection in circlips using image processing in ni lab viewDefect detection in circlips using image processing in ni lab view
Defect detection in circlips using image processing in ni lab view
 
Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...
 
Scrdet++ analysis
Scrdet++ analysisScrdet++ analysis
Scrdet++ analysis
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision GroupDTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
 

Recently uploaded

(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 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
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(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
 
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
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
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
 
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
 
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
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(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
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

(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 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, ...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(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...
 
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...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ 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
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
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
 
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
 
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 )
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(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...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

csc447dipch10-160628144302.pdf

  • 1. 1 CSC447: Digital Image Processing Chapter 10: Prof. Dr. Mostafa Gadal-Haqq Computer Science Department Faculty of Computer & Information Sciences AIN SHAMS UNIVERSITY 10. Image Segmentation - 2 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing  Segmentation attempts to partition the pixels of an image into groups that strongly correlate with the objects in an image  Typically the first step in any automated computer vision application Image Segmentation
  • 2. 2 Image Segmentation • Segmentation algorithms generally are based on one of two basis properties of intensity values • Discontinuity: to partition an image based on abrupt changes in intensity (such as edges) • Similarity: to partition an image into regions that are similar according to a set of predefined criteria. 10. Image Segmentation - 3 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Image Segmentation  Image Segmentation 10. Image Segmentation - 4 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 3. 3 Image Segmentation  Image Segmentation 10. Image Segmentation - 5 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Image Segmentation  Detection of discontinuities:  There are three basic types of gray-level discontinuities:  points , lines , edges  the common way is to run a mask through the image 10. Image Segmentation - 6 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 4. 4 Point Detection: • Note that the mark is the same as the mask of Laplacian Operation (in chapter 3) • The only differences that are considered of interest are those large enough (as determined by T) to be considered isolated points. |R| >T 10. Image Segmentation - 7 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Point Detection: 10. Image Segmentation - 8 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 5. 5 Line Detection • Horizontal mask will result with max response when a line passed through the middle row of the mask with a constant background. • the similar idea is used with other masks. • note: the preferred direction of each mask is weighted with a larger coefficient (i.e.,2) than other possible directions. R1 R2 R3 R4 10. Image Segmentation - 9 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Line Detection • Apply every masks on the image • let R1, R2, R3, R4 denotes the response of the horizontal, +45 degree, vertical and -45 degree masks, respectively. • if, at a certain point in the image |Ri| > |Rj|, for all j≠i, • that point is said to be more likely associated with a line in the direction of mask i. 10. Image Segmentation - 10 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 6. 6 Line Detection • Alternatively, if we are interested in detecting all lines in an image in the direction defined by a given mask, we simply run the mask through the image and threshold the absolute value of the result. • The points that are left are the strongest responses, which, for lines one pixel thick, correspond closest to the direction defined by the mask. 10. Image Segmentation - 11 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Line Detection 10. Image Segmentation - 12 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 7. 7 Edge Detection Approach  Segmentation by finding pixels on a region boundary.  Edges found by looking at neighboring pixels.  Region boundary formed by measuring gray value differences between neighboring pixels Edge Detection • an edge is a set of connected pixels that lie on the boundary between two regions. • an edge is a “local” concept whereas a region boundary, owing to the way it is defined, is a more global idea. 10. Image Segmentation - 14 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 8. 8 Edge Detection 10. Image Segmentation - 15 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection 10. Image Segmentation - 16 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 9. 9 Edge Detection 10. Image Segmentation - 17 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection  Detection of discontinuities: Image Derivatives 10. Image Segmentation - 18 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 10. 10 Edge Detection • First column: images and gray- level profiles of a ramp edge corrupted by random Gaussian noise of mean 0 and = 0.0, 0.1, 1.0 and 10.0, respectively. • Second column: first-derivative images and gray-level profiles. • Third column : second- derivative images and gray- level profiles. 10. Image Segmentation - 19 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection  Gradient Operator   ) ( ) ( ) ( ) ( mask 3 3 for 7 4 1 9 6 3 3 2 1 9 8 7 2 / 1 2 2 z z z z z z G z z z z z z G G G f y f x f G G f y x y x y x                                          10. Image Segmentation - 20 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 11. 11 Edge Detection  Prewitt and Sobel Operators 10. Image Segmentation - 21 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection 10. Image Segmentation - 22 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 12. 12 Edge Detection 10. Image Segmentation - 23 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection 10. Image Segmentation - 24 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 13. 13 Edge Detection 10. Image Segmentation - 25 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection  The Laplacian 10. Image Segmentation - 26 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 14. 14 Edge Detection 10. Image Segmentation - 27 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Edge Detection  The Laplacian of Gaussian (LoG) 10. Image Segmentation - 28 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 15. 15 Edge Detection  The Laplacian of Gaussian (LoG) 10. Image Segmentation - 29 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing The Hough Transform 10. Image Segmentation - 30 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 16. 16 The Hough Transform  Global processing: The Hough Transform 10. Image Segmentation - 31 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing The Hough Transform  Global processing: The Hough Transform 10. Image Segmentation - 32 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 17. 17 The Hough Transform  Global processing: The Hough Transform 10. Image Segmentation - 33 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing 2. Image Operations - 34 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Region-Based Segmentation
  • 18. 18 What is a Region?  Basic definition :- A group of connected pixels with similar properties.  Important in interpreting an image because they may correspond to objects in a scene.  For that an image must be partitioned into regions that correspond to objects or parts of an object. Region-Based vs. Edge-Based Region-Based  Closed boundaries  Multi-spectral images improve segmentation  Computation based on similarity Edge-Based  Boundaries formed not necessarily closed  No significant improvement for multi-spectral images  Computation based on difference
  • 19. 19 2. Image Operations - 37 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Image Thresholding •What is thresholding? •Simple thresholding •Adaptive thresholding Thresholding – A Key Aspect  Most algorithms involve establishing a threshold level of certain parameter.  Correct thresholding leads to better segmentation.  Using samples of image intensity available, appropriate threshold should be set automatically in a robust algorithm i.e. no hard-wiring of gray values
  • 20. 20 Automatic Thresholding  Use of one or more of the following:- 1. Intensity characteristics of objects 2. Sizes of objects 3. Fractions of image occupied by objects 4. Number of different types of objects  Size and probability of occurrence – most popular  Intensity distributions estimate by histogram computation. Automatic Thresholding Methods  Some automatic thresholding schemes: 1. P-tile method 2. Iterative threshold selection 3. Adaptive thresholding
  • 21. 21 Thresholding Methods  P-tile Method:- If object occupies P% of image pixels then set a threshold T such that P% of pixels have intensity below T.  Iterative Thresholding:- Successively refines an approx. threshold to get a new value which partitions the image better.   2 1 2 1     T 2. Image Operations - 42 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing P-Tile Thresholding • Thresholding is usually the first step in any segmentation approach • Single value thresholding can be given mathematically as follows:       T y x f T y x f y x g ) , ( if 0 ) , ( if 1 ) , (
  • 22. 22 2. Image Operations - 43 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing P-Tile Thresholding • Basic global thresholding: • Based on the histogram of an image Partition the image histogram using a single global threshold 2. Image Operations - 44 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing P-Tile Thresholding • Basic global thresholding: • The success of this technique very strongly depends on how well the histogram can be partitioned
  • 23. 23 2. Image Operations - 45 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Iterative P-Tile Thresholding • The Basic global thresholding: 1. Select an initial estimate for T (typically the average grey level in the image) 2. Segment the image using T to produce two groups of pixels: G1 consisting of pixels with grey levels >T and G2 consisting pixels with grey levels ≤ T 3. Compute the average grey levels of pixels in G1 to give μ1 and G2 to give μ2 2. Image Operations - 46 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Iterative P-Tile Thresholding • The Basic global thresholding: 4. Compute a new threshold value: 5. Repeat steps 2 – 4 until the difference in T in successive iterations is less than a predefined limit T∞ This algorithm works very well for finding thresholds when the histogram is suitable. 2 2 1     T
  • 24. 24 2. Image Operations - 47 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing P-Tile Thresholding P-Tile Thresholding 10. Image Segmentation - 48 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 25. 25 P-Tile Thresholding 10. Image Segmentation - 49 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing • Limitation of P-Tile thresholding: P-Tile Thresholding 10. Image Segmentation - 50 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing • Limitation of P-Tile thresholding:
  • 26. 26 P-Tile Thresholding 10. Image Segmentation - 51 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing • Limitation of P-Tile thresholding: Adaptive Thresholding  Adaptive Thresholding is used in scenes with uneven illumination where same threshold value not usable throughout complete image.  In such case, look at small regions in the image and obtain thresholds for individual sub-images. Final segmentation is the union of the regions of sub-images.
  • 27. 27 Adaptive Thresholding 10. Image Segmentation - 53 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing  Thresholding – Basic Adaptive Thresholding Adaptive Thresholding 10. Image Segmentation - 54 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing  Thresholding – Basic Adaptive Thresholding
  • 28. 28 Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 10. Image Segmentation - 55 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 10. Image Segmentation - 56 Dr. Mostafa GadalHaqq. CS482:Introduction to Digital Image Processing
  • 29. 29 Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 10. Image Segmentation - 57 Dr. Mostafa Gadal-Haqq. CS482:Introduction to Digital Image Processing Summary  Segmentation is the most essential step in most scene analysis and automatic pictorial pattern recognition problems.  Choice of the technique depends on the peculiar characteristics of individual problem in hand. 10. Image Segmentation - 58 Dr. Mostafa Gadal-Haqq. CS482:Introduction to Digital Image Processing