SlideShare a Scribd company logo
Morphological Image Operation
   Download di http://rumah-belajar.org




                                           2
Mathematical Morphology

   Mathematical morphology is a powerful
    methodology which was initiated in the late
    1960s by G.Matheron and J.Serra at the
    Fontainebleau School of Mines in France.
   nowadays it offers many theoretic and
    algorithmic tools inspiring the development of
    research in the fields of signal
    processing, image processing, machine
    vision, and pattern recognition.



                                                     3
Morphological Operations -1

The four most basic operations in mathematical
morphology are dilation, erosion, opening and Closing:




                                                         4
Morphological Image Processing

   Boolean algebra
   Dilation and erosion
   Opening and closing
   Hit-or-miss
   Basic algorithms
   Extension to gray-scale




                                     5
Examples of Boolean Algebra
   Switching algebra
       S = {0, 1}
   Finite Boolean algebras
       Example: S = {(0, 0), (0, 1), (1, 0), (1, 1)}
       (a1, a2)’ = (a’1, a’2)
       (0, 1) (1, 0) = (0, 0)
   Set unions/intersections
       Union is like
       Intersection is like
       Empty set is like 0
       There is no 1 (universal set)



                                                        6
Review: Boolean Algebra
   A Boolean algebra is a set with at least two
    elements, three operations (and , or , not ‘) and two
    special elements (0, 1) that have the following
    properties.
       A B is an element of the set. This function is defined for all
        elements A and B in the set. It is symmetric (A B = B A)
       A B has the same properties
       A’ is defined for all elements in the set.
           A A’=0, A A’=1
       The operations    and + are distributive.
           A (B C)=(A B) (A C)
           A (B C)=(A B) (A C)
       0 and 1 are identities, in the following sense
           0 A=A
           1 A=A

                                                                         7
Some Basic Definitions
    Let A and B be sets with components a=(a1,a2) and
     b=(b1,b2), respectively.
    The translation of A by x=(x1,x2) is
          A + x = {c | c = a + x, for a A}
    The reflection of A is
          Ar = {x | x = -a for a A}
    The complement of A is
          Ac = {x | x A}
    The union of A and B is
          A B = {x | x A or x B }
    The intersection of A and B is
          A B = {x | x A and x B }
                                                         8
Some Basic Definitions
    The difference of A and B is.
          A – B = A Bc = {x | x A and x B}
    A and B are said to be disjoint or mutually exclusive if they
     have no common elements.
    If every element of a set A is also an element of another set
     B, then A is said to be a subset of B.




                                                                     9
Additional Operations
   Elements of set: points
       Points are integers (1-D discrete space)
       Points are 2-D vectors with integer components (2-D
        discrete space)
   Operations
       Addition (vector addition)
       Reflection (multiply by -1)
       Integer multiplication
   A set of points can be translated or reflected
       S+x = x+S (new set consists of all points of
        S, translated by x)
       S^ is the set reflected through the origin

                                                              10
Boolean Algebra




                  11
Continuous and Discrete Morphology

   There are morphology theories of continuous
    and discrete spaces
   Example of continuous space
       Real line
   Example of discrete space
       Integers
   We will talk about the morphology of discrete
    spaces


                                                    12
Morphology




     A binary image containing two object sets A and B

     B = {(0,0), (0,1), (1,0)}
     A = {(5,0), (3,1), (4,1), (5,1), (3,2), (4,2), (5,2)}



                                                              13
Basic Morphological Operations

   Dilation
       A+B = {x| x = y+z, y in A, z in B}
       Equivalent definition
           {x, (x+B^) A is not empty}
   Erosion
       A-B = {x| x+B is a subset of A}




                                             14
Some Basic Definitions (Dilation)
    Dilation
          A B = {x | (B + x) A    }
    Dilation expands a region.




                                      15
Example (1)




              16
More Examples (2)




                    17
Some Basic Definitions (Erosion)
    Erosion
         A B = {x | (B + x) A}
    Erosion shrinks a region.




                                   18
More Examples (3)




                    19
Some Basic Definitions (opening)
    Opening is erosion followed by dilation:
          A B = (A B) B
    Opening smoothes regions, removes spurs, breaks narrow
     lines.




                                                              20
Morphological Opening
      A oB @(A   B) B

        A opened by B




                         21
Some Basic Definitions (closing)
    Closing is dilation followed by erosion:
         A B = (A B) B
    Closing fills narrow gaps and holes in a region.




                                                        22
Morphological Closing

    A • B @(A B) B
       A closed by B




                        23
Example




          24
Combination of Opening and Closing




                                     25
Hit-or-Miss

   Given: points on plane
   Template: Set of one points (foreground) and set
    of zero points (background)
   Example foreground: B1=D, B2=D
   Find: Points x for which B1+x are 1, B2+x are 0
   Solution:




                                                      26
Exp:




       27
Boundary Extraction

    (A) A (A B)'




                      28
Region Filling


   Xk (Xk 1 B) A'
•Start with point in region A.
Keep expanding by
dilation, using points in region A
only.




                                              29
Extraction of Connected Component

    Xk   (Xk   1   B) A


   Start with point
    on object. Keep
    adding points




                                    30
Skeleton

   Morphological skeleton
      Start with structuring element, B
      Generate a sequence of elements Bk=kB,
      B0=0                 n
                 A       k 0   Sk Bk
      Construction

      Sk    (A Bk ) ((A Bk ) B)'



    Connected       skeleton

                                               31
Morphological Skeleton




                         32
Connected Skeleton




                     33
Some Morphological Algorithms




                                34
Some Morphological Algorithms
    Boundary of a set, A, can be found by
        A - (A B)




                                             B




                                                 35
Some Morphological Algorithms
   A region can be filled iteratively by
        Xk+1 = (Xk B) Ac ,
                where k = 0,1,…
                and X0 is a point inside the region.




                                                       36
Some Morphological Algorithms




                                37
Morphological Operations

BWMORPH Perform morphological operations on binary image.
 BW2 = BWMORPH(BW1,OPERATION) applies a specific
 morphological operation to the binary image BW1.

  BW2 = BWMORPH(BW1,OPERATION,N) applies the operation N
  times. N can be Inf, in which case the operation is repeated
  until the image no longer changes.

OPERATION is a string that can have one of these values:
  'skel'   With N = Inf, remove pixels on the boundaries
           of objects without allowing objects to break
           apart
  'spur' Remove end points of lines without removing
           small objects completely.
  'fill' Fill isolated interior pixels (0's surrounded by
           1's)
  ...




                                                                 38
Morphological Operations
   BW1 = imread('circbw.tif');
   BW2 = bwmorph(BW1,'skel',Inf);
   imshow(BW1);
   figure, imshow(BW2);




                                    39
Morphological Operations
   BW1 = imread('circbw.tif');
   BW2 = bwperim(BW1);
   imshow(BW1);
   figure, imshow(BW2)




                                 40
Morphological Operations

Pixel Connectivity
Connectivity defines which pixels are connected to other pixels. A set of
pixels in a binary image that form a connected group is called an object
or a connected component.




            4-connected                    8-connected



                                                                            41
Morphological Operations
BW = [0 0 0 0 0 0   0   0;
      0 1 1 0 0 1   1   1;
      0 1 1 0 0 0   1   1;    X = bwlabel(BW,4);
      0 1 1 0 0 0   0   0;    RGB = label2rgb(X, @jet, 'k');
      0 0 0 1 1 0   0   0;    imshow(RGB,'notruesize')
      0 0 0 1 1 0   0   0;
      0 0 0 1 1 0   0   0;
      0 0 0 0 0 0   0   0];
X = bwlabel(BW,4)
X =   0 0 0 0 0 0   0   0
      0 1 1 0 0 3   3   3
      0 1 1 0 0 0   3   3
      0 1 1 0 0 0   0   0
      0 0 0 2 2 0   0   0
      0 0 0 2 2 0   0   0
      0 0 0 2 2 0   0   0
      0 0 0 0 0 0   0   0

                                                               42
Some Morphological Algorithms

                    Application example: Using
                    connected components to detect
                    foreign objects in packaged food.
                    There are four objects with
                    significant size!




                                                   43
Some Morphological Algorithms
    Thinning: Thin regions iteratively; retain connections and
     endpoints.
    Skeletons: Reduces regions to lines of one pixel thick;
     preserves shape.
    Convex hull: Follows outline of a region except for
     concavities.




    Pruning: Removes small branches.


                                                                  44
Summary




          45
Summary




          46
Summary




          47
Summary




          48
Extensions to Gray-Scale Images
  Dilation




                                  49
Extensions to Gray-Scale Images
  Dilation




             Take the maximum within the window.



                                                   50
Extensions to Gray-Scale Images
  Erosion




                                  51
Extensions to Gray-Scale Images
    Dilation:
       Makes image brighter

       Reduces or eliminates dark details

    Erosion:
       Makes image darker

       Reduces or eliminates bright details




                                               52
Extensions to Gray-Scale Images




                                  53
Extensions to Gray-Scale Images




               Opening: Narrow bright areas are reduced.
               Closing: Narrow dark areas are reduced.



                                                           54
Extensions to Gray-Scale Images




                                  56
Application Example




                      57
Application Example-Segmentation




                                   58
Application Example-Granulometry




                                   59
Morphological Reconstruction (exp.algo)

      Algorithm for binary reconstruction:
         1. M = V o K , where K is any SE.
         2. T = M,
         3. M= M      Ki , where i=4 or i=8,

         4. M = M∩ V, [Take only those pixels from M that are also in V .]
         5. if M     T then go to 2,

         6. else stop;




         Original (V)              Opened (M)          Reconstructed (T)
                                                                             60
Application in 2D Image Processing
       Character Extraction-1




    Character Extraction From Cover Image (Source)
                                                     61
Application in 2D Image Processing
       Character Extraction-2




    Character Extraction From Cover Image (Results)
                                                      62
Application in 2D Image Processing
       Character Extraction-3




           Morning       Noon




           Afternoon     Evening
                                     63
Application in 2D Image Processing
       Character Extraction-4




           Morning       Noon




           Afternoon     Evening
                                     64
Application in 3D Image Processing
        Organs Extraction-1




 slice20        slice25        slice30




                 slice25      slice30   65
 slice20
Application in 3D Image Processing
        Organs Extraction-2




        Top View           Back View


                                       66
Application in 3D Image Processing
        Organs Extraction-3




                                     67
Application in 3D Image Processing
          Organs Extraction-4




                Segmented heart beating cycle

                                                68
Application in 3D Image Processing
          Organs Extraction-5




         Kidney with Bones   Kidney with Vessels



                                                   69
Brain View snapshot-3
                --Registration tool kit

                           Features:
                              1. Cut plane in 3D
                              2. Work in 2 data sets
                              3. 2D and 3D view
                              4. Registration methods:
                                 •   LandMark
                                 •   ThinPlateSpline
                                 •   GridTransform
                                 •   MutualInformation


                                                    70
Brain View snapshot-4
                --Segmenation tool kit

                          Features:
                             1. Cut plane in 3D
                             2. Work in 2 data sets
                             3. 2D and 3D view
                             4. Segmenation
                                 methods:
                                 •   Morphology
                                 •   Snake
                                 •   Level Set
                                 •   Watershed


                                                  71
Research Plan-1
      Medical Image Analysis
                      --- Segmentation and Registration
          More efforts address on Ultrasound Image (2D, 3D)




            Segmented baby face from US




                                                  2D Segmentation using GDM 72
           Real time US, MR integration for IGS
73
Image Comparison Techniques


•   Image Subtraction
    the simplest and most direct approach to PCB inspection
    problem. The PCB is compared to an image of an ideal part. The
    subtraction can be done by logical XOR operation between the
    two images .
•   Feature Matching
    an improved form of image subtraction, in which the extracted
    features from the object and those defined by the model are
    compared.
•   Phase Only Method




                                                                     74
Example PCB and Mask




                       75
Result



         short
         spur
         dirt
         open
         mousebite
         pinhole




                     76
Question




           77

More Related Content

PPTX
mean_filter
PPTX
Fuzzy logic andits Applications
PPTX
Chapter 9 morphological image processing
PPTX
Adaptive unsharp masking
PPT
08 frequency domain filtering DIP
PPTX
Image Sensing and Acquisition.pptx
PPT
Chapter 5
PPT
Predicate logic_2(Artificial Intelligence)
mean_filter
Fuzzy logic andits Applications
Chapter 9 morphological image processing
Adaptive unsharp masking
08 frequency domain filtering DIP
Image Sensing and Acquisition.pptx
Chapter 5
Predicate logic_2(Artificial Intelligence)

What's hot (20)

PPTX
Region based segmentation
PPTX
Region based segmentation
PPT
Sharpening using frequency Domain Filter
PPT
Thresholding.ppt
PPT
Spatial filtering
PPSX
Image Processing: Spatial filters
PPTX
Digital Image Processing - Frequency Filters
PPTX
polygon clipping IN COMPUTER GRAPHICS.pptx
PPTX
Morphological image processing
PPTX
Image Smoothing using Frequency Domain Filters
PDF
neural networksNnf
PDF
Lecture 4 Relationship between pixels
PPT
knowledge presentation of saroj kaushik slides
PPTX
Image Degradation & Resoration
PPTX
Basics of Linear Hough Transform
PPTX
Basic Relationships between Pixels- Digital Image Processing
PPT
Histogram equalization
PPT
Arithmetic coding
Region based segmentation
Region based segmentation
Sharpening using frequency Domain Filter
Thresholding.ppt
Spatial filtering
Image Processing: Spatial filters
Digital Image Processing - Frequency Filters
polygon clipping IN COMPUTER GRAPHICS.pptx
Morphological image processing
Image Smoothing using Frequency Domain Filters
neural networksNnf
Lecture 4 Relationship between pixels
knowledge presentation of saroj kaushik slides
Image Degradation & Resoration
Basics of Linear Hough Transform
Basic Relationships between Pixels- Digital Image Processing
Histogram equalization
Arithmetic coding
Ad

Viewers also liked (18)

PPT
morphological image processing
PPTX
Morphological image processing
PDF
Mikrokontroler pertemuan 3
PDF
Mikrokontroler pertemuan 5
PPSX
point processing
PPSX
Image segmentation 2
ODP
2Dさんから流れてきた問題
PDF
幾何コンテスト2013
PPT
Boundary Extraction
PDF
02 2d systems matrix
PPTX
COM2304: Morphological Image Processing
PPTX
Chapter 9 morphological image processing
PDF
01 introduction image processing analysis
PPTX
Hit and-miss transform
PDF
Color tracking
PPTX
3 d image processsing operations
PPTX
Mikrokontroler dan Antar Muka (14)
PDF
Archopht 82 2_008
morphological image processing
Morphological image processing
Mikrokontroler pertemuan 3
Mikrokontroler pertemuan 5
point processing
Image segmentation 2
2Dさんから流れてきた問題
幾何コンテスト2013
Boundary Extraction
02 2d systems matrix
COM2304: Morphological Image Processing
Chapter 9 morphological image processing
01 introduction image processing analysis
Hit and-miss transform
Color tracking
3 d image processsing operations
Mikrokontroler dan Antar Muka (14)
Archopht 82 2_008
Ad

Similar to Image segmentation 3 morphology (20)

PDF
Boolean Algebra SOP POS_Computer Architecture.pdf
PPT
Introduction to Fuzzy set Theory and Fuzzy control
PPT
Math task 3
PPT
morphological image processing
PPT
Chapter_9_Morphological_Image_Processing.ppt
PPT
DIP_14_54_boundary extraction in dip .ppt
PPT
Admission for mba
PDF
Solution Strategies for Equations that Arise in Geometric (Cliff ord) Algebra
PPT
Boolean Algebra and Logic gates ( Chapter 2)
PPTX
EEE241DLDlect02 Digital logic and design Boolean function
PPT
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
PDF
Morphological.pdf
PPT
Introduction to Artificial Intelligence
PDF
Chapter 4 logic design
PPT
Morphology gonzalez-woods
PPT
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
PPTX
Linear Algebra Assignment help
PPT
Boolean algebra
PPTX
finlllllllllllllllllllllllllll (1)1.pptx
PPT
Boolean algebra And Logic Gates
Boolean Algebra SOP POS_Computer Architecture.pdf
Introduction to Fuzzy set Theory and Fuzzy control
Math task 3
morphological image processing
Chapter_9_Morphological_Image_Processing.ppt
DIP_14_54_boundary extraction in dip .ppt
Admission for mba
Solution Strategies for Equations that Arise in Geometric (Cliff ord) Algebra
Boolean Algebra and Logic gates ( Chapter 2)
EEE241DLDlect02 Digital logic and design Boolean function
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
Morphological.pdf
Introduction to Artificial Intelligence
Chapter 4 logic design
Morphology gonzalez-woods
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
Linear Algebra Assignment help
Boolean algebra
finlllllllllllllllllllllllllll (1)1.pptx
Boolean algebra And Logic Gates

More from Rumah Belajar (20)

PDF
03 image transform
PDF
04 image enhancement edge detection
PDF
06 object measurement
PDF
Bab 11 bantalan dan sistem pelumasan
PDF
Bab 10 spring arif hary
PDF
Bab 06 kriteria kegagalan lelah
PDF
Bab 09 kekuatan sambungan las
PDF
Bab 08 screws, fasteners and connection syarif
PDF
Bab 07 poros dan aksesoriny
PDF
Bab 05 kriteria kegagalan 1
PDF
Bab 04 tegangan regangan defleksi
PDF
Bab 03 load analysis
PDF
Bab 02 material dan proses
PDF
Bab 11 bantalan dan sistem pelumasan
PDF
Mikrokontroler pertemuan 8
PDF
Mikrokontroler pertemuan 7
PDF
Mikrokontroler pertemuan 4
PDF
Mikrokontroler pertemuan 2
PDF
Mikrokontroler pertemuan 1
PDF
Mikrokontroler pertemuan 6
03 image transform
04 image enhancement edge detection
06 object measurement
Bab 11 bantalan dan sistem pelumasan
Bab 10 spring arif hary
Bab 06 kriteria kegagalan lelah
Bab 09 kekuatan sambungan las
Bab 08 screws, fasteners and connection syarif
Bab 07 poros dan aksesoriny
Bab 05 kriteria kegagalan 1
Bab 04 tegangan regangan defleksi
Bab 03 load analysis
Bab 02 material dan proses
Bab 11 bantalan dan sistem pelumasan
Mikrokontroler pertemuan 8
Mikrokontroler pertemuan 7
Mikrokontroler pertemuan 4
Mikrokontroler pertemuan 2
Mikrokontroler pertemuan 1
Mikrokontroler pertemuan 6

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Pre independence Education in Inndia.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Classroom Observation Tools for Teachers
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
RMMM.pdf make it easy to upload and study
TR - Agricultural Crops Production NC III.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
Complications of Minimal Access Surgery at WLH
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Pre independence Education in Inndia.pdf
01-Introduction-to-Information-Management.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Cell Types and Its function , kingdom of life
human mycosis Human fungal infections are called human mycosis..pptx
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial disease of the cardiovascular and lymphatic systems
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Classroom Observation Tools for Teachers
Renaissance Architecture: A Journey from Faith to Humanism
Module 4: Burden of Disease Tutorial Slides S2 2025

Image segmentation 3 morphology

  • 2. Download di http://rumah-belajar.org 2
  • 3. Mathematical Morphology  Mathematical morphology is a powerful methodology which was initiated in the late 1960s by G.Matheron and J.Serra at the Fontainebleau School of Mines in France.  nowadays it offers many theoretic and algorithmic tools inspiring the development of research in the fields of signal processing, image processing, machine vision, and pattern recognition. 3
  • 4. Morphological Operations -1 The four most basic operations in mathematical morphology are dilation, erosion, opening and Closing: 4
  • 5. Morphological Image Processing  Boolean algebra  Dilation and erosion  Opening and closing  Hit-or-miss  Basic algorithms  Extension to gray-scale 5
  • 6. Examples of Boolean Algebra  Switching algebra  S = {0, 1}  Finite Boolean algebras  Example: S = {(0, 0), (0, 1), (1, 0), (1, 1)}  (a1, a2)’ = (a’1, a’2)  (0, 1) (1, 0) = (0, 0)  Set unions/intersections  Union is like  Intersection is like  Empty set is like 0  There is no 1 (universal set) 6
  • 7. Review: Boolean Algebra  A Boolean algebra is a set with at least two elements, three operations (and , or , not ‘) and two special elements (0, 1) that have the following properties.  A B is an element of the set. This function is defined for all elements A and B in the set. It is symmetric (A B = B A)  A B has the same properties  A’ is defined for all elements in the set.  A A’=0, A A’=1  The operations and + are distributive.  A (B C)=(A B) (A C)  A (B C)=(A B) (A C)  0 and 1 are identities, in the following sense  0 A=A  1 A=A 7
  • 8. Some Basic Definitions  Let A and B be sets with components a=(a1,a2) and b=(b1,b2), respectively.  The translation of A by x=(x1,x2) is A + x = {c | c = a + x, for a A}  The reflection of A is Ar = {x | x = -a for a A}  The complement of A is Ac = {x | x A}  The union of A and B is A B = {x | x A or x B }  The intersection of A and B is A B = {x | x A and x B } 8
  • 9. Some Basic Definitions  The difference of A and B is. A – B = A Bc = {x | x A and x B}  A and B are said to be disjoint or mutually exclusive if they have no common elements.  If every element of a set A is also an element of another set B, then A is said to be a subset of B. 9
  • 10. Additional Operations  Elements of set: points  Points are integers (1-D discrete space)  Points are 2-D vectors with integer components (2-D discrete space)  Operations  Addition (vector addition)  Reflection (multiply by -1)  Integer multiplication  A set of points can be translated or reflected  S+x = x+S (new set consists of all points of S, translated by x)  S^ is the set reflected through the origin 10
  • 12. Continuous and Discrete Morphology  There are morphology theories of continuous and discrete spaces  Example of continuous space  Real line  Example of discrete space  Integers  We will talk about the morphology of discrete spaces 12
  • 13. Morphology A binary image containing two object sets A and B  B = {(0,0), (0,1), (1,0)}  A = {(5,0), (3,1), (4,1), (5,1), (3,2), (4,2), (5,2)} 13
  • 14. Basic Morphological Operations  Dilation  A+B = {x| x = y+z, y in A, z in B}  Equivalent definition  {x, (x+B^) A is not empty}  Erosion  A-B = {x| x+B is a subset of A} 14
  • 15. Some Basic Definitions (Dilation)  Dilation A B = {x | (B + x) A }  Dilation expands a region. 15
  • 18. Some Basic Definitions (Erosion)  Erosion A B = {x | (B + x) A}  Erosion shrinks a region. 18
  • 20. Some Basic Definitions (opening)  Opening is erosion followed by dilation: A B = (A B) B  Opening smoothes regions, removes spurs, breaks narrow lines. 20
  • 21. Morphological Opening A oB @(A B) B A opened by B 21
  • 22. Some Basic Definitions (closing)  Closing is dilation followed by erosion: A B = (A B) B  Closing fills narrow gaps and holes in a region. 22
  • 23. Morphological Closing A • B @(A B) B A closed by B 23
  • 24. Example 24
  • 25. Combination of Opening and Closing 25
  • 26. Hit-or-Miss  Given: points on plane  Template: Set of one points (foreground) and set of zero points (background)  Example foreground: B1=D, B2=D  Find: Points x for which B1+x are 1, B2+x are 0  Solution: 26
  • 27. Exp: 27
  • 28. Boundary Extraction (A) A (A B)' 28
  • 29. Region Filling Xk (Xk 1 B) A' •Start with point in region A. Keep expanding by dilation, using points in region A only. 29
  • 30. Extraction of Connected Component Xk (Xk 1 B) A  Start with point on object. Keep adding points 30
  • 31. Skeleton  Morphological skeleton Start with structuring element, B Generate a sequence of elements Bk=kB, B0=0 n A k 0 Sk Bk Construction Sk (A Bk ) ((A Bk ) B)' Connected skeleton 31
  • 35. Some Morphological Algorithms  Boundary of a set, A, can be found by A - (A B) B 35
  • 36. Some Morphological Algorithms  A region can be filled iteratively by Xk+1 = (Xk B) Ac , where k = 0,1,… and X0 is a point inside the region. 36
  • 38. Morphological Operations BWMORPH Perform morphological operations on binary image. BW2 = BWMORPH(BW1,OPERATION) applies a specific morphological operation to the binary image BW1. BW2 = BWMORPH(BW1,OPERATION,N) applies the operation N times. N can be Inf, in which case the operation is repeated until the image no longer changes. OPERATION is a string that can have one of these values: 'skel' With N = Inf, remove pixels on the boundaries of objects without allowing objects to break apart 'spur' Remove end points of lines without removing small objects completely. 'fill' Fill isolated interior pixels (0's surrounded by 1's) ... 38
  • 39. Morphological Operations BW1 = imread('circbw.tif'); BW2 = bwmorph(BW1,'skel',Inf); imshow(BW1); figure, imshow(BW2); 39
  • 40. Morphological Operations BW1 = imread('circbw.tif'); BW2 = bwperim(BW1); imshow(BW1); figure, imshow(BW2) 40
  • 41. Morphological Operations Pixel Connectivity Connectivity defines which pixels are connected to other pixels. A set of pixels in a binary image that form a connected group is called an object or a connected component. 4-connected 8-connected 41
  • 42. Morphological Operations BW = [0 0 0 0 0 0 0 0; 0 1 1 0 0 1 1 1; 0 1 1 0 0 0 1 1; X = bwlabel(BW,4); 0 1 1 0 0 0 0 0; RGB = label2rgb(X, @jet, 'k'); 0 0 0 1 1 0 0 0; imshow(RGB,'notruesize') 0 0 0 1 1 0 0 0; 0 0 0 1 1 0 0 0; 0 0 0 0 0 0 0 0]; X = bwlabel(BW,4) X = 0 0 0 0 0 0 0 0 0 1 1 0 0 3 3 3 0 1 1 0 0 0 3 3 0 1 1 0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 42
  • 43. Some Morphological Algorithms Application example: Using connected components to detect foreign objects in packaged food. There are four objects with significant size! 43
  • 44. Some Morphological Algorithms  Thinning: Thin regions iteratively; retain connections and endpoints.  Skeletons: Reduces regions to lines of one pixel thick; preserves shape.  Convex hull: Follows outline of a region except for concavities.  Pruning: Removes small branches. 44
  • 45. Summary 45
  • 46. Summary 46
  • 47. Summary 47
  • 48. Summary 48
  • 49. Extensions to Gray-Scale Images Dilation 49
  • 50. Extensions to Gray-Scale Images Dilation Take the maximum within the window. 50
  • 51. Extensions to Gray-Scale Images Erosion 51
  • 52. Extensions to Gray-Scale Images  Dilation:  Makes image brighter  Reduces or eliminates dark details  Erosion:  Makes image darker  Reduces or eliminates bright details 52
  • 54. Extensions to Gray-Scale Images Opening: Narrow bright areas are reduced. Closing: Narrow dark areas are reduced. 54
  • 59. Morphological Reconstruction (exp.algo)  Algorithm for binary reconstruction: 1. M = V o K , where K is any SE. 2. T = M, 3. M= M Ki , where i=4 or i=8, 4. M = M∩ V, [Take only those pixels from M that are also in V .] 5. if M T then go to 2, 6. else stop; Original (V) Opened (M) Reconstructed (T) 60
  • 60. Application in 2D Image Processing Character Extraction-1 Character Extraction From Cover Image (Source) 61
  • 61. Application in 2D Image Processing Character Extraction-2 Character Extraction From Cover Image (Results) 62
  • 62. Application in 2D Image Processing Character Extraction-3 Morning Noon Afternoon Evening 63
  • 63. Application in 2D Image Processing Character Extraction-4 Morning Noon Afternoon Evening 64
  • 64. Application in 3D Image Processing Organs Extraction-1 slice20 slice25 slice30 slice25 slice30 65 slice20
  • 65. Application in 3D Image Processing Organs Extraction-2 Top View Back View 66
  • 66. Application in 3D Image Processing Organs Extraction-3 67
  • 67. Application in 3D Image Processing Organs Extraction-4 Segmented heart beating cycle 68
  • 68. Application in 3D Image Processing Organs Extraction-5 Kidney with Bones Kidney with Vessels 69
  • 69. Brain View snapshot-3 --Registration tool kit Features: 1. Cut plane in 3D 2. Work in 2 data sets 3. 2D and 3D view 4. Registration methods: • LandMark • ThinPlateSpline • GridTransform • MutualInformation 70
  • 70. Brain View snapshot-4 --Segmenation tool kit Features: 1. Cut plane in 3D 2. Work in 2 data sets 3. 2D and 3D view 4. Segmenation methods: • Morphology • Snake • Level Set • Watershed 71
  • 71. Research Plan-1  Medical Image Analysis --- Segmentation and Registration  More efforts address on Ultrasound Image (2D, 3D) Segmented baby face from US 2D Segmentation using GDM 72 Real time US, MR integration for IGS
  • 72. 73
  • 73. Image Comparison Techniques • Image Subtraction the simplest and most direct approach to PCB inspection problem. The PCB is compared to an image of an ideal part. The subtraction can be done by logical XOR operation between the two images . • Feature Matching an improved form of image subtraction, in which the extracted features from the object and those defined by the model are compared. • Phase Only Method 74
  • 74. Example PCB and Mask 75
  • 75. Result short spur dirt open mousebite pinhole 76
  • 76. Question 77