Ip

346 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
346
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
82
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Ip

  1. 1. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Representation and Description – Representing regions in 2 ways: • Based on their external characteristics (its boundary): – Shape characteristics • Based on their internal characteristics (its region): – Regional properties: color, texture, and … • Both 1 1E. Fatemizadeh, Sharif University of Technology, 2011
  2. 2. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Representation and Description – Describes the region based on a selected  representation: • Representation  boundary or textural features • Description  length, orientation, the number of  concavities in the boundary, statistical measures of  region. 2 2E. Fatemizadeh, Sharif University of Technology, 2011
  3. 3. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Invariant Description: – Size (Scaling) – Translation – Rotation 3 3E. Fatemizadeh, Sharif University of Technology, 2011
  4. 4. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Boundary (Border) Following: – We need the boundary as a ordered sequence of points. 4 4E. Fatemizadeh, Sharif University of Technology, 2011
  5. 5. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Moore Boundary Tracking Algorithm: 1. Let the starting point, b0 , be the uppermost, leftmost point in the  image that is labeled 1. Denote by c0 the west neighbor of b0 . Clearly  c0 always will be a background point. Then, examine the 8 neighbors  of b0 , starting at c0 and proceeding in clockwise direction. Let b1 denote the first pixel encountered whose value is 1, and let c1 be the  points immediately preceding b1 in the sequence. Store the location  of b0 and b1. 2. Let b=b1 and c=c1. 3. Let the 8 neighbors of b , starting at c and proceeding in a clockwise direction be denoted by n1,n2,... , nk . Find the first nk whose value is  1. 4. Let b=nk and c=nk-1. 5. Repeat steps 3 and 4 until b=b0 and the next boundary point found  is b1. 5 5E. Fatemizadeh, Sharif University of Technology, 2011
  6. 6. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 6 6E. Fatemizadeh, Sharif University of Technology, 2011
  7. 7. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Freeman Chain Code: – Code the 4 or 8 connectivity 7 7E. Fatemizadeh, Sharif University of Technology, 2011
  8. 8. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Chain Code Problems: – Long Code – Low noise Robustness • Solution: Resampling – Starting Point: • Solution: Rotary/Circular shift until forms a minimum integer – 10103322 01033221 – Angle normalization: • First difference (Counterclockwise) – 10103322  3133030  or 33133030 (transition between last and first) • Useful for integer multiple of used chain code (45° or 90°) 8 8E. Fatemizadeh, Sharif University of Technology, 2011
  9. 9. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: – Resampling – 4 and 8 chain codes 9 9E. Fatemizadeh, Sharif University of Technology, 2011
  10. 10. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 10 10E. Fatemizadeh, Sharif University of Technology, 2011
  11. 11. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Polygon Approximation: – Minimum‐Perimeter Polygons • Read Pages 801‐807. 11 11E. Fatemizadeh, Sharif University of Technology, 2011
  12. 12. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example (Cont.): 12 12E. Fatemizadeh, Sharif University of Technology, 2011
  13. 13. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 13 13E. Fatemizadeh, Sharif University of Technology, 2011
  14. 14. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Polygon Approximation: – Merging: • Start from a seed point • Continue on a line based on local average error (e.g. linear  regression) • Stop if error exceeds a threshold • Continue from the last point • .... – No guarantee for corner detection 14 14E. Fatemizadeh, Sharif University of Technology, 2011
  15. 15. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Polygon Approximation: – Splitting: • Segments to two parts based on a criteria (e.g. maximum internal  distance) • Check each segment for splitting based on another criteria (e.g.  linearity error) • …. 15 15E. Fatemizadeh, Sharif University of Technology, 2011
  16. 16. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Signatures: – A 1‐D functional representation of a boundary • Distance vs. Angle (in the polar representation): – Invariant to translation – Non‐Invariant to rotation (may be achieved by start point selection) » Farthest point from centroid » The point on eigen axis » Use chain code solution for the start point • Line tangent angle • Histogram of tangent angle 16 16E. Fatemizadeh, Sharif University of Technology, 2011
  17. 17. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 17 17E. Fatemizadeh, Sharif University of Technology, 2011
  18. 18. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 18 18E. Fatemizadeh, Sharif University of Technology, 2011
  19. 19. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Boundary Segments: – Convex Hull: Smallest convex set containing the S – Convex Deficiency: The set difference D=H‐S – Problem of noise: • Smoothing (K‐neighbour average) • Polygon approximation – Convex Hull of Polygon  19 19E. Fatemizadeh, Sharif University of Technology, 2011
  20. 20. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Boundary Segments: • Skeletonization / Thinning: – Medial Axis Transform (MAT) • Point p is belong to medial (Region R and Border B): – Has more than one closest neighbor in B – Chapter 9 and Page 813 20 20E. Fatemizadeh, Sharif University of Technology, 2011
  21. 21. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example of Thinning: 21 21E. Fatemizadeh, Sharif University of Technology, 2011
  22. 22. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Boundary Descriptor: – Simple one: • Diameter:  – Lead to Major axis and minor axis (Perpendicular to major) – Basic Rectangle • Curvature 22 22E. Fatemizadeh, Sharif University of Technology, 2011
  23. 23. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Shape Number – Smallest integers of first difference circular chain code. 23 23E. Fatemizadeh, Sharif University of Technology, 2011
  24. 24. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 24 24E. Fatemizadeh, Sharif University of Technology, 2011
  25. 25. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Fourier Descriptors: 25 25E. Fatemizadeh, Sharif University of Technology, 2011
  26. 26. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 26 26E. Fatemizadeh, Sharif University of Technology, 2011
  27. 27. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Problem of invariance: – Rotation – Normalization will solve! 27 27E. Fatemizadeh, Sharif University of Technology, 2011
  28. 28. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Problem of invariance: – Translation – Translation to centroid will solve! 28 28E. Fatemizadeh, Sharif University of Technology, 2011
  29. 29. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Problem of invariance: – Scaling – Normalization will solve 29 29E. Fatemizadeh, Sharif University of Technology, 2011
  30. 30. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Problem of invariance: – Starting  Point – Normalization will solve 30 30E. Fatemizadeh, Sharif University of Technology, 2011
  31. 31. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Properties in a single table: 31 31E. Fatemizadeh, Sharif University of Technology, 2011
  32. 32. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Statistical Moments: – Boundary Representation 32 32E. Fatemizadeh, Sharif University of Technology, 2011
  33. 33. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Regional Descriptor: – The simple one: • Area (Number of pixels) • Perimeter (Length of boundary) • Compactness  (Perimeter2/Area) • Circularity: Ratio of the area to the area of a circle with same  perimeter • Mean, median, max, min, ratio pixels above/below … from  intensity data. 33 33E. Fatemizadeh, Sharif University of Technology, 2011
  34. 34. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: – Normalized area: • Ratio of light pixels to total light pixels 34 34E. Fatemizadeh, Sharif University of Technology, 2011
  35. 35. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Topology Descriptor: – Number of holes (H): • Invariants to several operators. 35 35E. Fatemizadeh, Sharif University of Technology, 2011
  36. 36. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Topology Descriptor: – Number of connected components (C) : • Invariants to several operators. 36 36E. Fatemizadeh, Sharif University of Technology, 2011
  37. 37. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Topology Descriptor: – Euler number (E=C‐H) : • Invariants to several operators. 0 ‐1 37 37E. Fatemizadeh, Sharif University of Technology, 2011
  38. 38. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Topology Descriptor: – Polygonal net: • V: # of vertices (7) • Q: # of edges (11) • F: # of faces (2) • E=C‐H=V‐Q+F – C=1 , H=3 – E=‐2 38 38E. Fatemizadeh, Sharif University of Technology, 2011
  39. 39. Digital Image Processing ee.sharif.edu/~dip Representation and Description Original Threshold • Example: Largest Connected Region Skeleton 39 39E. Fatemizadeh, Sharif University of Technology, 2011
  40. 40. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Texture: – No formal definition Smooth               Coarse                 Regular 40 40E. Fatemizadeh, Sharif University of Technology, 2011
  41. 41. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Statistical Approaches – 1st order grey level statistics • From normalised histogram – One pixel gray level repeat n times – 2nd order grey level statistics • From GLCM (Grey Level Co‐ocurrence Matrix) – Repeatation of two pixels in a pre‐defined neighbourhood • Needs: – A Positioning Operator, P. – GLCM(i,j): # of times that points with gray level Zi occure relative to  points with gray level Zj 41 41E. Fatemizadeh, Sharif University of Technology, 2011
  42. 42. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Texture feature from 1st order statistics: 42 42E. Fatemizadeh, Sharif University of Technology, 2011
  43. 43. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: Smooth               Coarse                 Regular 43 43E. Fatemizadeh, Sharif University of Technology, 2011
  44. 44. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Problem with 1st order histogram – Lack of spatial information 44 44E. Fatemizadeh, Sharif University of Technology, 2011
  45. 45. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Gray Level Co‐Occurence Matrix (GLCM): 45 45E. Fatemizadeh, Sharif University of Technology, 2011
  46. 46. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Gray Level Co‐Occurence Matrix (GLCM): 46 46E. Fatemizadeh, Sharif University of Technology, 2011
  47. 47. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Gray Level Co‐Occurence Matrix (GLCM): 47 47E. Fatemizadeh, Sharif University of Technology, 2011
  48. 48. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Texture feature from GLCM 48 48E. Fatemizadeh, Sharif University of Technology, 2011
  49. 49. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: – One pixel immediately to he right 49 49E. Fatemizadeh, Sharif University of Technology, 2011
  50. 50. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 50 50E. Fatemizadeh, Sharif University of Technology, 2011
  51. 51. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Effect of Horizontal offset: – Correlation index – Horizontal distance between neighbors Noisy               Sin              Circuit board 51 51E. Fatemizadeh, Sharif University of Technology, 2011
  52. 52. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Spectral approaches: – Peaks and Frequencies related to periodicity: – S(r,θ), Sr(θ),Sθ(r): 52 52E. Fatemizadeh, Sharif University of Technology, 2011
  53. 53. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Spectral approaches: 53 53E. Fatemizadeh, Sharif University of Technology, 2011
  54. 54. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Spectral approach: 54 54E. Fatemizadeh, Sharif University of Technology, 2011
  55. 55. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Moments of Image as a 2D pdf: 55 55E. Fatemizadeh, Sharif University of Technology, 2011
  56. 56. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Digital Data: 56 56E. Fatemizadeh, Sharif University of Technology, 2011
  57. 57. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Moments: • A set of invariant moments (7 by Hu) 57 57E. Fatemizadeh, Sharif University of Technology, 2011
  58. 58. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Hu Moments: 58 58E. Fatemizadeh, Sharif University of Technology, 2011
  59. 59. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 59 59E. Fatemizadeh, Sharif University of Technology, 2011
  60. 60. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Results of invariant moments: 60 60E. Fatemizadeh, Sharif University of Technology, 2011
  61. 61. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Complex Zernike Moments: • Where Vmn are Zernike polynomials: 61 61E. Fatemizadeh, Sharif University of Technology, 2011
  62. 62. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Some Zernike Polynomials: 62 62E. Fatemizadeh, Sharif University of Technology, 2011
  63. 63. Digital Image Processing ee.sharif.edu/~dip Representation and Description • How to Compute Zernike Polynomials: – Scale and Translation invariance transform: • Shift to center of gravity (m10 = m01= 0) • Fix m00 at a predetermined value (= ): – Map Image to the unit disc using polar coordinates. – The center of the image is the origin of the unit disc – Those pixels falling outside the unit disc are not used in  the computation. 63 63E. Fatemizadeh, Sharif University of Technology, 2011
  64. 64. Digital Image Processing ee.sharif.edu/~dip Representation and Description • How to Compute Zernike Polynomials: 64 64E. Fatemizadeh, Sharif University of Technology, 2011
  65. 65. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Legendre Moments: 65 65E. Fatemizadeh, Sharif University of Technology, 2011
  66. 66. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Fourier‐Mellin Moments: – Fourier‐Mellin Transform: – Fourier‐Mellin Moments: 66 66E. Fatemizadeh, Sharif University of Technology, 2011
  67. 67. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Principal Component Analysis: – Consider a multi (value/Channel/Spectral) images: 67 67E. Fatemizadeh, Sharif University of Technology, 2011
  68. 68. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Karhunen–Loève or Hotelling Transform: – Analysis: – Complete Synthesis: – Optimal Synthesis: 68 68E. Fatemizadeh, Sharif University of Technology, 2011
  69. 69. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: 69 69E. Fatemizadeh, Sharif University of Technology, 2011
  70. 70. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Data Preparation: 70 70E. Fatemizadeh, Sharif University of Technology, 2011
  71. 71. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Eigenvalues Analysis: 71 71E. Fatemizadeh, Sharif University of Technology, 2011
  72. 72. Digital Image Processing ee.sharif.edu/~dip Representation and Description • PCA Analysis: – Eigneimages 72 72E. Fatemizadeh, Sharif University of Technology, 2011
  73. 73. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: – Using 2 components 73 73E. Fatemizadeh, Sharif University of Technology, 2011
  74. 74. Digital Image Processing ee.sharif.edu/~dip Representation and Description • Example: – Difference 74 74E. Fatemizadeh, Sharif University of Technology, 2011
  75. 75. Digital Image Processing ee.sharif.edu/~dip Representation and Description • PCA in Boundary description: 75 75E. Fatemizadeh, Sharif University of Technology, 2011
  76. 76. Digital Image Processing ee.sharif.edu/~dip Representation and Description • PCA in Boundary description: 76 76E. Fatemizadeh, Sharif University of Technology, 2011

×