Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CSC447: Digital Image
Processing
Chapter 10:
Prof. Dr. Mostafa Gadal-Haqq M. Mostafa
Computer Science Department
Faculty o...
 Segmentation attempts to partition the pixels of
an image into groups that strongly correlate
with the objects in an ima...
Image Segmentation
• Segmentation algorithms generally are based
on one of two basis properties of intensity
values
• Disc...
Image Segmentation
 Image Segmentation
4CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Image Segmentation
 Image Segmentation
5CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Image Segmentation
 Detection of discontinuities:
 There are three basic types of gray-level
discontinuities:
 points ,...
Point Detection:
• Note that the mark is the same as the mask of
Laplacian Operation (in chapter 3)
• The only differences...
Point Detection:
8CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Line Detection
• Horizontal mask will result with max response when a line
passed through the middle row of the mask with ...
Line Detection
• Apply every masks on the image
• let R1, R2, R3, R4 denotes the response of
the horizontal, +45 degree, v...
Line Detection
• Alternatively, if we are interested in detecting all
lines in an image in the direction defined by a
give...
Line Detection
12CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection Approach
 Segmentation by finding pixels on a region
boundary.
 Edges found by looking at neighboring pix...
Edge Detection
• an edge is a set of connected pixels that
lie on the boundary between two regions.
• an edge is a “local”...
Edge Detection
15CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
16CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
17CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
 Detection of discontinuities: Image Derivatives
18CSC447: Digital Image Processing Prof. Dr. Mostafa Gada...
Edge Detection
• First column: images and gray-
level profiles of a ramp edge
corrupted by random Gaussian
noise of mean 0...
Edge Detection
 Gradient Operator
 
)()(
)()(
mask33for
741963
321987
2/122
zzzzzzG
zzzzzzG
GGf
y
f
x
f
G
G
f
y
x
yx
y
...
Edge Detection
 Prewitt and Sobel Operators
21CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
22CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
23CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
24CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
25CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
 The Laplacian
26CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
27CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
 The Laplacian of Gaussian (LoG)
28CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Edge Detection
 The Laplacian of Gaussian (LoG)
29CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
The Hough Transform
30CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
The Hough Transform
 Global processing: The Hough Transform
31CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaq...
The Hough Transform
 Global processing: The Hough Transform
32CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaq...
The Hough Transform
 Global processing: The Hough Transform
33CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaq...
Region-Based Segmentation
34CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
What is a Region?
 Basic definition :- A group of connected
pixels with similar properties.
 Important in interpreting a...
Region-Based vs. Edge-Based
Region-Based
 Closed boundaries
 Multi-spectral
images improve
segmentation
 Computation ba...
Image Thresholding
•What is thresholding?
•Simple thresholding
•Adaptive thresholding
37CSC447: Digital Image Processing P...
Thresholding – A Key Aspect
 Most algorithms involve establishing a
threshold level of certain parameter.
 Correct thres...
Automatic Thresholding
 Use of one or more of the following:-
1. Intensity characteristics of objects
2. Sizes of objects...
Automatic Thresholding Methods
 Some automatic thresholding schemes:
1. P-tile method
2. Iterative threshold selection
3....
Thresholding Methods
 P-tile Method:- If object
occupies P% of image pixels
then set a threshold T such
that P% of pixels...
P-Tile Thresholding
• Thresholding is usually the first
step in any segmentation approach
• Single value thresholding can ...
P-Tile Thresholding
• Basic global thresholding:
• Based on the histogram of an image
Partition the image histogram using
...
P-Tile Thresholding
• Basic global thresholding:
• The success of this technique very
strongly depends on how well the
his...
Iterative P-Tile Thresholding
• The Basic global thresholding:
1. Select an initial estimate for T (typically the
average ...
Iterative P-Tile Thresholding
• The Basic global thresholding:
4. Compute a new threshold value:
5. Repeat steps 2 – 4 unt...
P-Tile Thresholding
47CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
P-Tile Thresholding
48CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
P-Tile Thresholding
• Limitation of P-Tile thresholding:
49CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
P-Tile Thresholding
• Limitation of P-Tile thresholding:
50CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
P-Tile Thresholding
• Limitation of P-Tile thresholding:
51CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Adaptive Thresholding
 Adaptive Thresholding is used in scenes with
uneven illumination where same threshold
value not us...
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
53CSC447: Digital Image Processing Prof. Dr. Mostafa Ga...
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
54CSC447: Digital Image Processing Prof. Dr. Mostafa Ga...
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
55CSC447: Digital Image Processing Prof. Dr. Mostafa Ga...
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
56CSC447: Digital Image Processing Prof. Dr. Mostafa Ga...
Adaptive Thresholding
 Thresholding – Basic Adaptive Thresholding
57CSC447: Digital Image Processing Prof. Dr. Mostafa Ga...
Summary
 Segmentation is the most essential step
in most scene analysis and automatic
pictorial pattern recognition probl...
Upcoming SlideShare
Loading in …5
×

Digital Image Processing: Image Segmentation

A course on Digital Image Processing based on Gonzalez book

Related Books

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

Digital Image Processing: Image Segmentation

  1. 1. CSC447: Digital Image Processing Chapter 10: Prof. Dr. Mostafa Gadal-Haqq M. Mostafa Computer Science Department Faculty of Computer & Information Sciences AIN SHAMS UNIVERSITY
  2. 2.  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 2CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  3. 3. 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. 3CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  4. 4. Image Segmentation  Image Segmentation 4CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  5. 5. Image Segmentation  Image Segmentation 5CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  6. 6. 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 6CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  7. 7. 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 7CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  8. 8. Point Detection: 8CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  9. 9. 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 9CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  10. 10. 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. 10CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  11. 11. 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. 11CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  12. 12. Line Detection 12CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  13. 13. 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 13CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  14. 14. 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. 14CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  15. 15. Edge Detection 15CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  16. 16. Edge Detection 16CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  17. 17. Edge Detection 17CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  18. 18. Edge Detection  Detection of discontinuities: Image Derivatives 18CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  19. 19. 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. 19CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  20. 20. Edge Detection  Gradient Operator   )()( )()( mask33for 741963 321987 2/122 zzzzzzG zzzzzzG GGf y f x f G G f y x yx y x                            20CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  21. 21. Edge Detection  Prewitt and Sobel Operators 21CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  22. 22. Edge Detection 22CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  23. 23. Edge Detection 23CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  24. 24. Edge Detection 24CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  25. 25. Edge Detection 25CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  26. 26. Edge Detection  The Laplacian 26CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  27. 27. Edge Detection 27CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  28. 28. Edge Detection  The Laplacian of Gaussian (LoG) 28CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  29. 29. Edge Detection  The Laplacian of Gaussian (LoG) 29CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  30. 30. The Hough Transform 30CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  31. 31. The Hough Transform  Global processing: The Hough Transform 31CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  32. 32. The Hough Transform  Global processing: The Hough Transform 32CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  33. 33. The Hough Transform  Global processing: The Hough Transform 33CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  34. 34. Region-Based Segmentation 34CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  35. 35. 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. 35CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  36. 36. 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  36CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  37. 37. Image Thresholding •What is thresholding? •Simple thresholding •Adaptive thresholding 37CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  38. 38. 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 38CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  39. 39. 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. 39CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  40. 40. Automatic Thresholding Methods  Some automatic thresholding schemes: 1. P-tile method 2. Iterative threshold selection 3. Adaptive thresholding 40CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  41. 41. 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.  21 2 1  T  41 CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  42. 42. P-Tile Thresholding • Thresholding is usually the first step in any segmentation approach • Single value thresholding can be given mathematically as follows:       Tyxf Tyxf yxg ),(if0 ),(if1 ),( 42CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  43. 43. P-Tile Thresholding • Basic global thresholding: • Based on the histogram of an image Partition the image histogram using a single global threshold 43CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  44. 44. P-Tile Thresholding • Basic global thresholding: • The success of this technique very strongly depends on how well the histogram can be partitioned 44CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  45. 45. 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 45CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  46. 46. 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 21   T 46CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  47. 47. P-Tile Thresholding 47CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  48. 48. P-Tile Thresholding 48CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  49. 49. P-Tile Thresholding • Limitation of P-Tile thresholding: 49CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  50. 50. P-Tile Thresholding • Limitation of P-Tile thresholding: 50CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  51. 51. P-Tile Thresholding • Limitation of P-Tile thresholding: 51CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  52. 52. 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. 52CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  53. 53. Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 53CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  54. 54. Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 54CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  55. 55. Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 55CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  56. 56. Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 56CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  57. 57. Adaptive Thresholding  Thresholding – Basic Adaptive Thresholding 57CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  58. 58. 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. 58CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.

    Be the first to comment

    Login to see the comments

  • chetanhgowda

    May. 13, 2020
  • vinothraj6

    May. 22, 2020
  • BidyasanaWaikhom

    May. 25, 2020
  • PatrciaGenovez

    Jul. 8, 2020
  • bindusagarkurra

    Jul. 19, 2020
  • SubbuReddy18

    Aug. 15, 2020
  • hamida22

    Sep. 9, 2020
  • PawanKumar1848

    Sep. 14, 2020
  • Aveene

    Oct. 6, 2020
  • ssusereaa272

    Oct. 13, 2020
  • PhiphatKhammongkhon

    Oct. 25, 2020
  • khizra123

    Nov. 18, 2020
  • DennisThuita

    Nov. 27, 2020
  • BaLaji247

    Dec. 7, 2020
  • SreeRam168

    Feb. 16, 2021
  • AnilKumarLucky1

    Mar. 2, 2021
  • ShivarajShivu8

    Mar. 3, 2021
  • VattikutiGowthami1

    Mar. 9, 2021
  • BargaviSundaramoorth

    May. 11, 2021
  • KrupaRaja

    May. 20, 2021

A course on Digital Image Processing based on Gonzalez book

Views

Total views

39,402

On Slideshare

0

From embeds

0

Number of embeds

8

Actions

Downloads

1,712

Shares

0

Comments

0

Likes

78

×