Docstoc

03

Document Sample
03 Powered By Docstoc
					Digital Image Processing

 By: Eng. Mohanned Dawoud




                            1
    Digital image representation
• Digital image is a finite collection of discrete
  samples (pixels).
• Each pixel having its own discrete value in a
  finite range.
• The images may be obtained by a digital
  camera, scanner, electron microscope,
  ultrasound stethoscope, or any other optical
  or non-optical sensor.

                                                 2
    Digital image representation (Cont.)
•   Examples of digital image are:
•   Digital photographs.
•   Satellite images.
•   Radiological images (x-rays, mammograms).
•   Binary images, fax images, engineering
    drawings.



                                            3
  Digital image representation (Cont.)
• Computer graphics, CAD drawings, and vector
  graphics reproductions is a possible source of
  an image.
• One goal of intermediate level image
  processing may be to reconstruct a model
  (e.g. vector representation) for a given digital
  image.


                                                 4
                 Digitization
For gray level Images:
• Digital image consists of N M pixels, each
  represented by k bits.
• A pixel can thus have 2 different values
  typically illustrated using a different shades
  of gray.
• In practical applications, the pixel values are
  considered as integers varying from 0 (black
  pixel) to 2k-1 (white pixel).
                                                    5
           Digitization (Cont.)
The main parameters of
  the digitization are:
• Image resolution: the
  number of samples in
  the grid.
• pixel accuracy: how
  many bits are used per
  sample.

                                  6
           Digitization (Cont.)
• The quality of the images increase as the
  resolution and the bits per pixel increase.
• There are a few exceptions when reducing the
  number of bits increases the image quality
  because of increasing the contrast.
• If we have a certain amount of bits to allocate
  for an image, it makes difference how to
  choose the digitization parameters.

                                                7
Digitization (Cont.)




                       8
             Digitization (Cont.)

                                  Bits per pixel:

Resolution      1         2             4             6          8

  32 32        128       256           512           768       1,024

  64 64        512       1,024        2,048          3,072     4,096

 128 128       2,048     4,096        8,192         12,288     16,384

 256 256       8,192    16,384        32,768        49,152     65,536

 512 512      32,768    65,536       131,072        196,608   262,144

1024 1024     131,072   262,144      524,288        786,432   1,048,576




                                                                          9
            Digitization (Cont.)
• The properties of human eye implies some
  upper limits.
• It is known that the human eye can observe at
  most one thousand different gray levels in
  ideal conditions.
• In any practical situations 8 bits per pixel (256
  gray level) is usually enough.


                                                  10
           Digitization (Cont.)
• In a laser quality printing, as in this lecture
  notes, even 6 bits (64 levels) used.
• If the pixels represent some physical measure
  and/or the image will be analyzed by a
  computer, the additional accuracy may be
  useful.



                                                11
                   Digitization (Cont.)
• If the image has very fine structure exceeding
  the sampling resolution, it may cause so-called
  aliasing effect.
• The digitized image has patterns that does not
  exists in the original



       Original signal   Digitized signal




                                                12
          Color image models
• Visible light is composed of relatively narrow
  band of frequencies in the electromagnetic
  energy spectrum approximately between 400 and
  700 nm.
• A green object, for example, reflects light with
  wavelength primarily in the 500 to 570 nm range,
  while absorbing most of the energy at other
  wavelengths.
• A white object reflects light that is relatively
  balanced in all visible wavelengths.
                                                 13
      Color image models (Cont.)
• According to the theory of the human eye, all
  colors are seen as variable combinations of the
  three so-called primary colors red (R), green (G),
  and blue (B).
• (International Commission on Illumination)
  designated in 1931 the following specific
  wavelength values to the primary colors:
  – blue (B)     = 435.8 nm
  – green (G)    = 546.1 nm
  – red (R)      = 700.0 nm

                                                  14
     Color image models (Cont.)
• RGB color model
                               B


                           Blue (0,0,1)                Cyan



          Magenta                              White

                                         le
                                          a
                                       Sc

                                                       (0,1,0)
                                     y
                                   ra


                       Black
                                   G



                                                                 G
                                                       Green

           (1,0,0)
                     Red                      Yellow

          R
                                                                     15
     Color image models (Cont.)
• CMY color model
  – The CMY color model is closely related to the RGB
    model.
  – Its primary colors are C (cyan), M (magenta), and Y
    (yellow).
 The RGB to CMY conversion can be performed
 by:
                   C  1 R
                   M  1 G
                   Y  1 B
                                                     16
    Color image models (Cont.)
• YUV color model
  – The basic idea in the YUV color model is to
    separate the color information apart from the
    brightness information.

  The components of YUV are:
             Y  0. 3  R  0. 6  G  0.1  B
            U  BY
             V  RY

                                                 17
    Color image models (Cont.)
• YUV color model
  – Y represents the luminance of the image, while
    U,V consists of the color information i.e.
    chrominance.
  – The luminance component can be considered as a
    gray-scale version of the RGB image.




                                                 18
      Color image models (Cont.)
• YUV color model
  The advantages of YUV compared to RGB are:
   – The brightness information is separated from the color
     information.
   – The correlations between the color components are
     reduced.
   – Most of the information is collected to the Y component,
     while the information content in the U and V is less.

  The YUV color system is adopted in the JPEG image
  compression standard.

                                                           19
     Color image models (Cont.)
• YIQ color model
  – YIQ is a slightly different version of YUV.
  – It is mainly used in North American television
    systems.
  – Here Y is the luminance component, just as in
    YUV.
  – I and Q correspond to U and V of YUV color
    systems.


                                                 20
     Color image models (Cont.)
• The RGB to YIQ conversion can be calculated
  by:   Y  0. 299  R  0. 587  G  0.114  B
         I  0. 596  R  0. 275  G  0 . 321  B
         Q  0. 212  R  0 . 523  G  0 . 311  B

• The YIQ color model can also be described
  corresponding to YUV:
          Y  0 . 3  R  0 . 6  G  0 .1  B
          I  0. 74  V  0. 27  U
          Q  0. 48  V  0. 41  U
                                                      21
       Color image models (Cont.)
• HSI color model
   – The HSI model consists of hue (H), saturation (S), and intensity
     (I).
   – Intensity corresponds to the luminance component (Y) of the
     YUV and YIQ models.
   – Hue is an attribute associated with the dominant wavelength in
     a mixture of light waves, i.e. the dominant color as perceived by
     an observer.
   – Saturation refers to relative purity of the amount of white light
     mixed with hue.
   – The advantages of HSI are:
       • The intensity is separated from the color information (the same holds
         for the YUV and YIQ models though).
       • The hue and saturation components are intimately related to the way
         in which human beings perceive color.

                                                                             22
            Color image models (Cont.)

•   All colors lie inside the triangle whose
    vertices are defined by the three initial                                                 White

    colors.                                                     Blue

•   Let us draw a vector from the central
    point of the triangle to the color point     Magenta                 Cyan
                                                                                                           Intensity
    P.                                                                                           Blue

•   The hue (H) is the angle of the vector                  H
                                                                                        Red             Green
    with respect to the red axis, For                      P
    example 0 indicates red color, 60 yellow,   Red             Yellow          Green

    120 green, and so on.
•   Saturation (S) is the degree to which the
    color is undiluted by white and is
    proportional to the distance to the                                                       Black

    center of the triangle.




                                                                                                           23
       Color image models (Cont.)
• The RGB to HSI conversion can be summarized
  as follows:
       1              1   R  G    R  B   
  H         cos 1       2                          , if B  G
                       R  G    R  B  G  B  
          
      360                        2
                                                      
            1              1   R  G    R  B   
                       1     2                           , otherwise
  H  1         cos
         360                R  G    R  B  G  B  
                                     2
                                                          
                 3
  S = 1-                 min R, G, B
            R  G  B
       1
  I       R  G  B
       3
                                                                          24
Color image models (Cont.)




                             25
                 Summary
• Good quality photographs needs 24 bits per
  pixel.
• 8 bits (256 colors) is often sufficient to
  represent the icons in Windows desktop if the
  colors are properly chosen.
• A color palette of 256 specially chosen colors
  may generated to approximate the image.


                                               26
                       Summary
    Image type        Typical bpp    No. of             Common
                                     colors           file formats

  Binary image            1             2        JBIG, PCX, GIF, TIFF
    Gray-scale            8            256       JPEG, GIF, PNG, TIFF
   Color image            24        16.6  106     JPEG, PNG, TIFF
Color palette image       8            256            GIF, PNG
   Video image            24        16.6  106          MPEG




                                                                        27
 Basic image processing operations
Changing resolution:
• A reduced resolution version of a given image is
  sometimes needed for a preview purpose.
• A preview image (or thumbnail) must be small
  enough to allow fast access but also with sufficient
  quality so that the original image is still recognizable.
• Sometimes the image resolution may be reduced just
  for saving memory.


                                                         28
          Changing resolution
  Resolution reduction is formally defined as
  follows:
• given an image of N M pixels.
• generate an image of size N/c M/c pixels
  (where c is a zooming factor) so that the visual
  content of the image is preserved as well as
  possible.


                                                 29
          Changing resolution
There are two alternative strategies:
• Sub sampling.
• Averaging.
  In both cases, the input image is divided into
  blocks of c×c pixels. For each block, one
  representative pixel is generated to the output
  image.


                                                30
          Changing resolution
Sub sampling
• Any of the input pixels is chosen, e.g. the
  upper leftmost pixel in the block.
Averaging
• The pixel depends on the values of all input
  pixels in the block.
• It could be chosen as the average, weighted
  average, or the median of the pixels.
                                             31
       Changing resolution


Averaging results in smoother image whereas
    sub sampling preserves more details.




                                          32
          Changing resolution
• The resolution of an image must sometimes
  be increased.
• For each input pixels there are c×c output
  pixels to be generated.
• straightforward method simply takes copies of
  the input pixel but this results in a jagged
  (blocky) image where the pixels are clearly
  visible.

                                              33
            Changing resolution
• A more sophisticated method known as
  bilinear interpolation generates the unknown
  pixel values by taking the linear combination
  of the four nearest known pixel values.
                        a                    b

                                  j
                            i
                                  x


                        c                    d

       f  x  a  i b  a  j c  a  ij a  b  c  d 
                                                                      34
                       Changing resolution

Resolution reduction               Resolution enhancement



                          ?                             ?       ?       ?       ?
                                                    ?   ?   ?   ?   ?   ?   ?   ?
                                                        ?       ?       ?       ?
                                                    ?   ?   ?   ?   ?   ?   ?   ?
                                                        ?       ?       ?       ?
                                                    ?   ?   ?   ?   ?   ?   ?   ?
                                                        ?       ?       ?       ?
                                                    ?   ?   ?   ?   ?   ?   ?   ?




                                                                                35
Changing resolution




                      36
         Gray-level transforms
• A general gray-level transform can be
  described as:
                   y = f(x)
  where x is the original pixel value and y is the
  result after transform
• The function f depends only on the pixel
  value, and some global information in the
  image given by the frequency distribution of
  the pixels (i.e. histogram).
                                                 37
         Gray-level transforms
• The transform can also use prior knowledge of
  the image given by the user of the image
  processing application.
• The transform, however, is independent from
  the neighboring pixel values.




                                              38
          Gray-level transforms
Constant addition and negation
• The simplest form of global transform are constant
  addition (also known as DC-shift) and negation.
• Constant addition is used to enhance dark images.
• Constant negation can be used for displaying medical
  images and photographs on screen with
  monochrome positive film with the idea of using the
  resulting negatives as normal slides.


                                                    39
         Gray-level transforms
• Constant addition:   f(x) = x + c
• Constant Negation:   f(x) = c - x




                                      40
           Gray-level transforms
Contrast Stretching
• The visible quality of a low contrast image can be
  improved by contrast stretching.
• This is based on an assumption that the dynamic scale, or
  the relevant information of the image is concentrated
  between two pixel values x1 and x2.
• These values are already prior knowledge.
• The scale of the histogram in the range [x1, x2] is
  enlarged while the scales below x1 and above x2 are
  compressed.
                                                         41
Gray-level transforms




                        42
         Gray-level transforms
Range compression
• A counter example to the previous situation
  appear when the dynamic range of an image
  far exceeds the capability of the display
  device.
• In this case only the brightest parts of the
  image are visible.


                                             43
        Gray-level transforms
• An effective way to compress the dynamic
  range of pixel values is to perform the
  following intensity transform:

Range compression:     f(x) = c log( 1 + |x| )




                                                 44
          Gray-level transforms

Gray-level slicing
• Suppose that the gray-level values that are of
  particular interest are known.
• These pixel values can then be separated from the
  background by the gray-level slicing technique.




                                                  45
         Gray-level transforms
• The method assigns a bright pixel value to the
  pixels of interest, and a dark value to the rest
  of the pixels belonging to the "background".
• In the former case, the gray-level slicing
  technique thus performs a kind of
  thresholding (explained later).



                                                 46
Gray-level transforms




                        47
         Gray-level transforms
Quantization and global thresholding
• Quantization is a technique where the number
  of gray-levels are reduced.
• For 8 bit encoding image, the image can be
  quantized for example to 16 levels simply by
  taking the 4 most significant bits of the pixel
  values.


                                                48
         Gray-level transforms
• This operation performs a uniform
  quantization, where the range of each gray-
  level value is equal.
• The applications of quantization can be found
  in image compression.
• It can also be used as a basic tool in image
  segmentation.


                                              49
         Gray-level transforms
• It can help a human observer to detect
  possible objects in an image that is otherwise
  not seen because of the smoothness of the
  image.
• Quantization generates artificial edges into
  the images which may be of help in the
  analysis.


                                               50
         Gray-level transforms
• Quantization is also necessary when displaying
  256-level gray-scale images on a VGA-display
  that can only show a maximum of 64 gray-
  levels.
• Thresholding      performs      a    two-level
  quantization of the image.



                                               51
         Gray-level transforms
• The purpose of thresholding is to classify the
  image pixels according to some threshold
  criterion.
• The operation splits the pixels into two (or
  more) groups in the same manner as the gray-
  level slicing.



                                               52
Gray-level transforms




                        53
         Gray-level transforms
Histogram equalization
• Sometimes the histogram of an image
  contains mostly dark pixels; this is the case of
  an insufficiently exposed photograph.




                                                 54
         Gray-level transforms
• The image can be enhanced by constant
  addition.
• histogram equalization is generally more
  efficient technique for enhancement.
• It is also applicable whenever the contrast of
  the image is too small for whatever reason.



                                               55
         Gray-level transforms
• The idea of the method is to spread the
  histogram as evenly as possible over the full
  intensity scale.




                                              56
Gray-level transforms




                        57
Gray-level transforms




                        58
                 Filtering
• Filtering is an image processing operation
  where the value of a pixel depends on the
  values of its neighboring pixels.
• Each of the pixels are processed separately
  with a predefined window (or template, or
  mask).



                                            59
                     Filtering
• Weighted sum of the pixels inside the window
  is calculated using the weights given by a
  mask as shown below
                      w1 w2 w3
                      w4 w5 w6
                      w7 w8 w9
            General mask for filtering with a 33
                       window.


                                                   60
                 Filtering
• The result of the sum replaces the original
  value in the processed image:

                  w1 w2 w3
                  w4 w5 w6
                  w7 w8 w9

                        9
              f  x    wi  x i
                       i 1

                                            61
                  Filtering
• In the case of border pixels, the part of the
  mask lying outside of the image is assumed to
  have the same pixel values as that of the
  border pixels.




                                              62
                   Filtering
• Note that the filtering is a parallel operation,
  i.e. the neighboring values used in the
  calculations are always taken from the original
  image, not from the processed image.




                                                 63
                  Filtering
Low-pass filtering
• Low-pass filtering (or averaging filtering, or
  smoothing) reduces the high frequency
  components (or noise) in the image by
  averaging the pixel values over a small region
  (block).



                                               64
                  Filtering
• Low-pass filtering reduces noise and makes
  the image generally smoother, especially near
  the edges.
• The level of smoothing can be changed by
  increasing the size of the window.




                                              65
                   Filtering
High-pass filtering
• High-pass filtering is the opposite operation to
  low-pass filtering.
• The low frequency components are eliminated
  and only the high frequency components in
  the image are retained.



                                                 66
                   Filtering
• Sharpening is done by adding the result of the
  filtering to the original image.
• Sharpening enhances the pixels near edges
  and makes it easier to observe details in the
  image.
• The use of negative weights in the mask may
  result in negative values, thus the pixel values
  must be scaled back to [0, 255].

                                                 67
Filtering




            68
                  Filtering
Median filtering
• Low-pass and high-pass filters are in the class
  of linear filters; they can always be described
  by a weighting mask.
• Median filtering, on the other hand, belong to
  a class of rank filters.



                                                69
                   Filtering
• In rank filters, the pixels within the window
  are ranked (or sorted) and the result of the
  filtering is chosen according to the ordering of
  the pixel values.
• In median filtering the new value of a pixel is
  the median of the pixel values in the window.
• The parameter of the filtering is the size and
  the shape of the filtering window (mask).

                                                 70
                  Filtering
• The median filter is used for removing noise.
• It can remove isolated impulsive noise and at
  the same time it preserves the edges and
  other structures in the image.
• Contrary to average filtering it does not
  smooth the edges.



                                              71
Filtering




            72
Filtering




            73
Filtering




            74
Filtering




            75
Filtering




            76
Filtering




            77
Filtering




            78
              Segmentation
• Detection of discontinuities
• Thresholding.
• Region-based segmentation
• Watershed Segmentation




                                 79
     Introduction to segmentation
• The main purpose is to find meaningful regions with
 respect to a particular application
  − To detect homogeneous regions
  − To detect edges (boundaries, contours)
• Segmentation of non trivial images is one of the difficult
  task in image processing. Still under research
• Applications of image segmentation include
  − Objects in a scene (for object-based retrieval)
  − Objects in a moving scene (MPEG4)
  − Spatial layout of objects (Path planning for a mobile robots)




                                                                    80
                 Principal approaches
• Edge based methods
   − Based on discontinuity: ex. to partition an image based on abrupt
     changes in intensity
• Region based methods
   − Based on similarity: to partition an image into regions that are
     similar according to a set of predefined criteria


 Solution can be based on intensity, texture, color, motion, etc.




                                                                         81
              Segmentation
• Detection of discontinuities
• Thresholding.
• Region-based segmentation
• Watershed Segmentation




                                 82
     Detection of discontinuities
• 3 basic types of gray-level discontinuities:
  − points , lines , edges
• The common way is to run a mask through the
 image




                                                 83
              Point detection
• A point has been detected if |R|  T,
  – T is a nonnegative threshold




                                          84
                            Line detection




• If |Ri| > |Rj| for all ji – the point is within line i.
• Use one mask to detect lines of a given direction




                                                             85
                       Edge Detection




• First derivative – detect if a point is on the edge
• Second derivative – detect the midpoint of the edge (zero-crossing property)


                                                                            86
Edge detection in noisy images
               •   Examples of a ramp edge corrupted by
                   random Gaussian noise of mean 0
                   and  = 0.0, 0.1, 1.0 and 10.0.




                                                      87
           Edge detection: calculating
                  derivatives
• First derivative: magnitude of the gradient
               f                                                    1
       G x   x                              f  2  f  2        2
                                       2 12
  f      f  ,   | f |  [G  G ]
                                 2
                                                    
                                                           y                 Gx  G y
                                                 x 
                                 x     y
       G y                                                 
               y 
               


• To calculate: apply gradient masks

  Roberts:                   Prewitt:                                             Sobel:




                                                                                            88
Example




          89
          Edge detection: calculating
                 derivatives
• Second derivative: Laplacian
        2 f ( x, y )  2 f ( x, y )
  f 
   2
                     
           x  2
                          y 2


• To calculate: apply laplacian masks




                                        90
        Edge detection: Laplacian of
                 Gaussian
• Laplacian combined with smoothing as a
  precursor to find edges via zero-crossing.
                   r2
                              where r2 = x2+y2, and
  h(r )  e       2 2
                           is the standard deviation

                                r2
                r     2 2
                    2     2
   h( r )   
    2
                       e
                
                    4
                       




                                                        91
Mexican hat




      the coefficient must be sum to zero

                                            92
Example
          a) Original image
          b) Sobel Gradient
          c) Spatial Gaussian
          smoothing function
          d) Laplacian mask
          e) LoG
          f) Threshold LoG
          g) Zero crossing




                                93
              Segmentation
• Detection of discontinuities
• Thresholding.
• Region-based segmentation
• Watershed Segmentation




                                 94
                        Thresholding
image with dark background       image with dark background
and a light object               and two light objects




• Global – when T is the same for all points of the image
• Local or Dynamic – when T depends on (x,y)
• Adaptive – when T depends on I(x,y)
                                                              95
             Global thresholding
•    Based on visual inspection of histogram
•    Automatically
    – Select an initial estimate T0.
    – Segment the image using T0: regions G1 and G2
      consisting of pixels with gray level values >T0 and
       T0
    – Compute the average gray level values 1 and 2
      for the pixels in regions G1 and G2
    – T1 = 0.5 (1 + 2)
    – Repeat until | Ti - Ti+1|< Tth


                                                       96
Global thresholding: example




                Tth = 0
                3 iterations with result T = 125




                                                   97
Adaptive thresholding




                        98
Multispectral thresholding




                             99
              Segmentation
• Detection of discontinuities
• Thresholding.
• Region-based segmentation
• Watershed Segmentation




                                 100
                  Overview
•   Introduction to Regions
•   Region Segmentation – Approaches
•   Region Representation
•   Data Structures
•   Split and Merge
•   Color Image Segmentation



                                       101
             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 correct interpretation, image must be partitioned
  into regions that correspond to objects or parts of an
  object.

                                                         102
            Partitioning – How?
• Partitioning into regions done often by using gray
  values of the image pixels.

• Two general approaches :
   –    Region-based segmentation
   –    Boundary estimation using edge detection




                                                       103
       Region-based Approach
• Pixels corresponding to an object grouped
  together and marked.

• Assumption: Points on same object will
  project to spatially close pixels on the image
  with similar gray values.



                                              104
 Region-based Approach (continued)

Important Questions:
  1. How do we define similarity measure
     S?
  2. What threshold T do we use? Does it
     change or stay constant?
  3. If we wish to add q’s neighbor r, do we
     use S(p, r), S(q, r), or something else?



                                            105
                   Limitation
• The assumption does not hold true in all cases.

• To overcome this, group pixels using given principles
  and use domain-dependent knowledge.


• Match regions to object models.




                                                      106
       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




                                                    107
    Segmentation versus Edge Detection

• Closed boundaries      • Boundaries formed not
                           necessarily closed


• Computation based on   • Computation based on
  similarity               difference




                                               108
               Region Segmentation
• Problem Statement:-

 Given a set of image pixels and a homogeneity predicate
  P(.), find a partition of the image into a set of n regions Ri
  such that

                       n

                      Ri  True
                      i 1




                                                                   109
           Region Segmentation – Problem
               Statement (Continued)
• A segmentation is the
                                   • Region-Growing
  partition of an image R
                                      – Start with seed points
  into sub-regions {Ri} such          – Grow around current seed
  that                                  regions by attaching pixels
   n                                    of the same property to the
         Ri  R; Ri  R j             growing sub-regions.
  i 1                             • Region splitting and
  s. t. Ri is a connected region     Merging
• A region can be defined by          – Apply the predicate to a
                                        sub-region. If it is true, stop
  a predicate P such that               splitting. Else, split the
  P(Ri) = TRUE if all pixels            region.
  within the region satisfy a         – Quadtree is one way of
                                        splitting.
  specific property.
                                      – Neighboring sub-regions
• P(Ri Rj) = FALSE for i j.           with the same predicates
                                                                        110
                                        can be merged.
Original Image   Region Segmented Image




                                          111
   Histograms
• They are applied globally to the
  entire image. This can be a
  drawback in complex scenes.
• Very useful in initial segmentation
  on the basis of gray levels.
• Very different scenes may
  give a strikingly similar histogram
  representation.




                                        Histogram for both images
                                                              112
          Region Representation
• Different representations suitable to different
  applications.
• Two general classes:-
  1. Array representation
       - same size arrays, membership arrays
  2. Hierarchical representation
       - pyramid, quad tree



                                                    113
           Array representation
• Uses array of same size
  as original image with
  entries indicating the
  region to which a pixel
  belongs.                           Image Data
• Simplest example –
  binary image




                            Array Region Representation   114
          Membership Arrays
• Membership arrays (images) commonly called
  masks. Each region has a mask that indicates
  which pixels belong to which region.
• Advantage – a pixel can be allowed to be a
  member of more than one region.




                                             115
     Hierarchical Representation
• Images represented at many resolutions
• As resolution decrease, array size decrease and
  some data is lost. More difficult to recover
  information.
• But, memory and computation requirements are also
  decreased.
• Used to accommodate various segmentation
  algorithms which operate at different resolutions.



                                                  116
                 Pyramids
• An ‘n x n’ image represented by the image and
  ‘k’ reduced versions of the image.
• Pixel at level ‘l’ has combined information
  from several pixels at level ‘l+1’
• Top level – level 0 – single pixel
• Bottom level – original image
• Simplest method for resolution reduction is
  averaging .
                                             117
Pyramid Structure




                    118
                   Quad Trees
• Extension of pyramids for binary images.

• Three types of nodes – white, black, gray.

• White or black node – no splitting.

• Gray node – split into 4 sub-regions.

• Each node is either a leaf or has 4 children.

                                                  119
Quad Tree Example
  Binary Image




                    120
                  Quad Tree Example
                  Non-binary image
              1                 1             1
   2    3               2   3         2   3
    4                   4             4




Not uniform




        uniform
                                              121
Quad Tree Example




                    122
   Data Structures for Segmentation
• Data structures used for storing region
  information during operations like splitting
  and merging.
• Commonly used data structures:-
  1. RAG – Region Adjacency Graph
  2. Picture trees



                                                 123
                     RAG
• Nodes represent regions; arcs between nodes
  represent a common boundary between
  regions.
• Different properties of regions stored in node
  data structure.
• After initial segmentation, results stored in
  RAG and regions combined to obtain a better
  segmentation.

                                               124
RAG Example




              125
               Picture Trees
• Emphasize inclusion of a region within
  another region.
• Recursive splitting of an image into
  component parts. Splitting stops with constant
  characteristic conditions.
• Quad tree is a special case.



                                              126
                 Region Merging
• Combine regions considered similar based on a few region
  characteristics.
• Determining similarity between two regions is most important
  step.
• Approaches for judging similarity based on:
  Gray values
  Color
  Texture
  Size
  Shape



                                                            127
    Segmentation by Morphological
            Watersheds
• Stable segmentation; continuous
  segmentation boundaries.

• Topographic - Visualizing in 3 dimensions: two
  spatial coordinates versus gray levels




                                               128
             Watershed 101
• Three types of points:
   1. regional minimum
   2. drop of water fall to single minimum
   3. drop of water fall to more than one
  minimum
• Catchment basin or watershed
• Divide lines or watershed lines

                                             129
    Watersheds: Concept and Method
• Watershed lines hold the key.
• Basic idea:
  Hole in regional minimums  topography uniformly flooded
  from below  build dams to prevent merging  dam
  boundaries correspond to divide lines.
• Process continued till max. level of flooding (corresponding to
  highest gray-level value) is reached.
• Watershed lines form connected path – continuous
  boundaries.




                                                               130
Example of Watershed Segmentation




        Initial Image   Topographic Surface




                                Final watersheds



                                                   131
                 Topics to search
•   Discrete Wavelet transforms.
•   Image features.
•   Video similarity.
•   Digital watermarking.
•   Sound echo.




                                    132

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:3/7/2012
language:
pages:132