1 / 64

What is in Common?

What is in Common?. A BW Image and Its Inverse. Application (I): FAX Document. Application (II): Scanned Documents. Application (III): Biometrics. Application (IV): Image Matting. figure-ground segmentation in computer vision. Binary Image Processing. Introduction Set theory review

calder
Download Presentation

What is in Common?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What is in Common? EE465: Introduction to Digital Image Processing

  2. A BW Image and Its Inverse EE465: Introduction to Digital Image Processing

  3. Application (I): FAX Document EE465: Introduction to Digital Image Processing

  4. Application (II): Scanned Documents EE465: Introduction to Digital Image Processing

  5. Application (III): Biometrics EE465: Introduction to Digital Image Processing

  6. Application (IV): Image Matting figure-ground segmentation in computer vision EE465: Introduction to Digital Image Processing

  7. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  8. Binary Images • Images only consist of two colors (tones): white or black Numerical example (image of a square block) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 EE465: Introduction to Digital Image Processing

  9. Why are binary images special? • Since pixels are either white or black, the locations of white (black) pixels carry ALL information of binary images Example 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 L={(3,3),(3,4),(4,3),(4,4)} location of white pixels f(m,n) matrix representation set representation It is often more convenient to consider the set representation than the matrix representation for binary images EE465: Introduction to Digital Image Processing

  10. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  11. Set Theory Review Think of sets A and B as the collections of spatial coordinates EE465: Introduction to Digital Image Processing

  12. Translation Operator Example EE465: Introduction to Digital Image Processing

  13. Reflection Operator Example ^ B B EE465: Introduction to Digital Image Processing

  14. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  15. Structuring Element B Definition: a set of local neighborhood with specified origin Examples origin B1 B2 Note: different structuring element leads to different filtering result EE465: Introduction to Digital Image Processing

  16. Dilation Definition or Example X Y mask B EE465: Introduction to Digital Image Processing

  17. Illustration by Animation X origin B B={a,b,c} a=(0,0),b=(0,-1),c=(-1,0) Xca Xcb Xcc EE465: Introduction to Digital Image Processing

  18. _ Y=X B Erosion Definition Example X Y mask B EE465: Introduction to Digital Image Processing

  19. Illustration By Animation mask B Y X EE465: Introduction to Digital Image Processing

  20. Duality Property* _ ^ =XcB (X B)c Proof: _ (X B)c ={z | Bz A }c = {z | Bz Ac = }c = {z | Bz Ac  } =XcB ^ EE465: Introduction to Digital Image Processing

  21. Example _ _ Xc X B (X B)c X B ^ B ^ XcB EE465: Introduction to Digital Image Processing

  22. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  23. _ _ + + Opening Operator Definition (X B) B Example X mask B EE465: Introduction to Digital Image Processing

  24. Geometric Interpretation of Opening Operator EE465: Introduction to Digital Image Processing

  25. _ _ + + Closing Operator Definition (X B) B Example X mask B EE465: Introduction to Digital Image Processing

  26. Geometric Interpretation of Closing Operator EE465: Introduction to Digital Image Processing

  27. Properties of Opening and Closing Operators* Opening ● ● ● ● Closing ● ● EE465: Introduction to Digital Image Processing

  28. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  29. A Little Game of Matching Templates A B EE465: Introduction to Digital Image Processing

  30. Illustration by a Simpler Case How to find the match of A in X using a computer? Hit: the southwest quadrant must be black in X Hit: the other three quadrants must be white in X X Hit: the southwest quadrant must be black in X origin Hit: the other three quadrants must be black in Xc Template B EE465: Introduction to Digital Image Processing

  31. _ _ Matching via Hit-or-Miss Hit: the southwest quadrant must be black in X origin Template B X1=X B1 Hit: the other three quadrants must be black in Xc Template B1 X2 =Xc B2 To satisfy both conditions, we need to take the intersection of X1 and X2 Template B2 EE465: Introduction to Digital Image Processing

  32. _ _ _ Hit-or-Miss Operator Why ? X B= (X B1)(Xc B2) * Definition Why complement? Why intersection? Hit Miss Structuring element example origin • 0 -1 -1 • 1 -1 • 0 1 0 x x x mask B1 mask B2 mask B MATLAB (MATLAB function: bwhitmiss) EE465: Introduction to Digital Image Processing

  33. _ _ Example 1 X X B1 Xc B2 Xc origin X B * mask B1 mask B2 EE465: Introduction to Digital Image Processing

  34. _ _ origin • -1 -1 -1 • 1 -1 • 1 1 -1 Example 2 mask B1 mask B2 mask B MATLAB X X B1 Xc B2 Xc Now, take the intersection and note that only two points Remain (highlighted by red) X B * EE465: Introduction to Digital Image Processing

  35. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  36. _ _ “BAD EXAMPLE” mask B X X B Y=X-(X B) EE465: Introduction to Digital Image Processing

  37. _ _ _ + Boundary Extraction X=X-(X B) Definition How about Example X=(X B) – B? mask B X X B X-(X B) Note that EE465: Introduction to Digital Image Processing

  38. Image Example X X EE465: Introduction to Digital Image Processing

  39. Inner vs. Outer Boundary EE465: Introduction to Digital Image Processing

  40. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  41. Region Filling P X Idea: recursively expand the region around P but stop the expansion at the boundary of X Iterations: expansion stop at the boundary Y0=P mask B Why dilation? Why intersection with Xc? Yk=(Yk-1B)Xc, k=1,2,3… Terminate when Yk=Yk-1,output YkX EE465: Introduction to Digital Image Processing

  42. Image Example P Y0B X Y0 Xc Y1 Y1B Y2B Y2 Y3=Y2 EE465: Introduction to Digital Image Processing

  43. Additional Example P EE465: Introduction to Digital Image Processing

  44. Binary Image Processing • Introduction • Set theory review • Morphological filtering operators • Erosion and dilation • Opening and closing • Hit-or-miss • Boundary extraction • Region-filling • Thinning (for finding skeleton) • Other processing algorithms • Area calculation, finding connected components • Skeleton finding via distance transform EE465: Introduction to Digital Image Processing

  45. Thinning thinning Intuitively, thinning finds the skeleton of a binary image (you will learn a different way of finding skeleton by distance transform later) EE465: Introduction to Digital Image Processing

  46. Thinning Algorithm *  Use Hit-or-Miss operator as a sifter Basic idea:  Use multiple masks to characterize different patterns x x x x x x x x x x x x x x x x B5 B6 B7 B8 B4 B1 B2 B3 X0=X Why eight different B’s? Why hit-or-miss? Xk=(…( (Xk-1 B1)  B2 …  B8) where X B=X – X B Stop the iteration when Xk=Xk-1 EE465: Introduction to Digital Image Processing

  47. Image Example EE465: Introduction to Digital Image Processing

  48. Image Example (Con’t) Skeleton image Binary fingerprint image EE465: Introduction to Digital Image Processing

  49. Morphological Filtering: Skeletons* _ _ _ _ _ _ X kB=(((X B) B) … B) Define k-fold Sk(A)=(A kB)-(A KB) B and Then the skeleton of an image A is given by EE465: Introduction to Digital Image Processing

  50. Textbook Example* EE465: Introduction to Digital Image Processing

More Related