4     Nonl Imnge Pvrssn
1.2 IMAGE SAMPLING                                                                                dinerete npatial
                                                                                                                   lowation.
                                                                                                                                  AcContiuoma
                                                                                    only at   a
Sampling is the pmesw ofmeasuring the brightnews tntormatofnanplina pointa                              n the pine
                                                              linerete pridd
             C n
                                       benanmpled using a
                                                                                                               each and every           value
                                                                                                                                        val      of
     1.2.1 Theory of 2D Sampling                                                        in          delined at
                                                                                                                          hia     ia mathemat
                                                                           netion f(. )                      ivatanta.   Thie
                                                                   that
    Let f(. ) represent the amlag iage, It                                               y)at speoltio
                                                           neana
    and y. The diserete version of /              )is
                                                          obtahned   by dofining /(N.
                                                                                                                                            (.
    eally represented as
                                                          /m, n)/(mAr, nAP)
                                                                                                                   defined   lor   all valuesa
                                                                                                             not
                                                                                noted that /'(m,
                                                                                                 n) is
                                                    constants.    It is to be
                                           real                                                                                   of his analu
     c e a r a n d Ar         are positivesampling interval On taking the lourier
                                                                                                                   transform
                          Ar are known as
     mand a.  Here Ar and              analog signal /t.
                                                         P).        wlhere
                                             with the
           The 2D sampling
                                    starts
                                                        whieh is
                                                                 denoted    by P21, 82,)
      Sgnal,   we    get   the spectrum off(r.,)
                                                                                                                                                (.2)
                                                 represent the Fourier
                                                                           basis.
      In
                                and    e
           Eq. (1.2) e4 Fourier transtorm, we get
      On    taking inverse
                                                                                                                                                 (1.3)
                                                         4r   -
                                                                                                          specificd only     at   specific instants
                                                                                    the values      are
                                               of the analog signal f(x, p),
      When     we    perform sampling
                           mathematicaly as
      which is represented                                                                                                                        (4
                                                            Sm, n) f(mAr, nAy)
                                                                       =
                                         transform of this           sampled signal, we get
      On    taking   the inverse Fourier
                                                                  F,2,)eMmarnA"                            a,d,
                                           Sm,   n)=
                                         define
      For a discrete signal,        we
      and
      where w and w           are   expressed in radians.
       From Eq. (1.6), we h a v e = . Differentiating S, We g
                                                                           Introduction to Image-Processing
                                                                                                              System     5
                                                           du= dS
                                                           Ar
   Similarly from Eq. (1.7), we get
                                                                                                                   (1.8)
                                                           duw-dSl
                                                           Ay                                                     (1.9)
  Substituting Eq. (1.8) and (1.9) in Eq. (1.5), we get
                               Sm, n)=-                                emjan duj du
                                                    0-00                       Ar Ay                             (1.10)
                          Sm, n)=                               2jmi" d duz
                                             -00-O0                                                             (1.11)
 The  signalf (m, n) is discretised, hence the integral can be
 the entire (wj, w2) plane can be broken                        replaced by summation. The double integral over
                                           into an infinite series of
                                                                      integrals, each of which is over a square of
 area 4T. The range of w and w is given by T+2tk
 Incorporating this concept in Eq. (1.11), we get              S<T+2tk, -T +2tk2 w2 <T+ 2mtk
                      Som,n)                                    LF 2ejim u             du du2                   (1.12)
                                          SQk.k2)
 In order to change the limits of
                                  the  integral so as to remove the dependence of the limits of integration on
 k and k w is replaced by wj        -2tkj and w, is replaced by w -2Tk2. On including this modification in
 Eq. (1.12), we get
       fm, n)=2J J                              w-2Tk           w-27Ttkzj2nk)m            27k,)J" du dw
                            AxAy                                  Ay                                            (1.13)
                                                                                                                (1.14)
                                      2
The exponential term in Eq. (1.14) is equal to one for al values ofthe integer variables m, k, n and k. Hence
Eq. (1.14) reduces to
                                                           w-2Tk w-2Tk2|j ej du, du                              (1.15)
                               -T
                                                                         Ay
The above equation represents the inverse Fourier transform of F(w, w,) where
                                                                 u-2mk -2k,                                       (1.16)
                                                                               Ay
                                    F(,)AxAy                               2nTk         2Tk                          (1.17)
                                                                                            Ay
          The concepts discussed so far can be approached in another way, i.e., by multiplying the analog image with
       a two-dimensional comb function. The 2D comb function is a rectangular grid of points and 1s illustrated in
       Fig. .5. The spaces between successive grid points in thex and y direction are x            and ay respectively. The
       three-dimensional view ofthe comb function is shown in Fig. 1.6. The 2D comb function, which 1s otherwise
       known as bed-of-nail function, is defined as
                                  combxr, y, Ar, Ay) = 2                  6-kax,y-k,4)                               (1.18)
                                                          k=-00 k2=-00
                 Ayt...
            Fig. 1.5 2D view of a comb function              Fig. 1.6 Three-dimensional view ofacomb function
  After   multiplying the analog image f(x, y)      with the 2D comb       function,   we   get the discrete version of the
  analog image which is givén by
                                        S(m, n) =fx,y)      x
                                                                comb(x, y, Ax, Ay)                                   (1.19)
                           fm, n)   =
                                         2        shA, k,Ay)8 (x-kAx, y-k,Ay)                                        (1.20)
                                        kcok-0o
We know that convolution in spatial domain is
For the purpose of analysis in the
                                              equal to multiplication in the frequency domain and vice versa.
                                   frequency domain, let us take the Fourier transform of the input analog
image and the 2D comb function.
  The Fourier transform
                        of the signalf(r, y) is f(21, 22).
  The Fourier transform of 2D comb
                                    function is another comb function which is                   represented by
                                    comb(1, N,)      =
                                                         FT(comb(x, y Ax, Ay)                                        (1.21)
                        comba,2,) =                      p=-00 q=-o
                                                                      s           9                                  (1.22)
                                                                            Introduction to
                                                                                              Image-Processing System     7
                                      comb(,22)=             comb|,2                    1
                                                                                                                  (1.23)
                                                                                    Ay
   Now the spectrum of the 2D comb function is convolved with the
   given by F1, D2) ® comb (1, 2).                                           spectrum of the analog image which is
                                           F(1, )= F{24, 2)       ®   comb (Q4,   92)                             (1.24)
   Substituting Eq. (1.22) in Eq. (1.24), we get
                         FC ) F (9,.,)                          2     2sn,-9                                      (1.25)
                                                               p=-0q=-o0
   Upon convolving the spectrum of the signal with the spectrum of the comb
                                                                            function,           we   get
               Fly,)                             Ë F%-k,-1)
                                   Ax Ay ke-ol=-00
                                                                        p=-0 q-00
                                                                                        k1                       (1.26)
  As summation is    a   linear   operator, interchanging the order of summation, we get
                F(, w)= T
                                   Ar Ay   p=-0q=-0 k
                                                             F-k, 22 -1)6                                        (1.27)
                                                                                                                 (1.28)
                                                                                        Ay
 Equation (1.28) resembles Eq. (1:17).
   1.2.2 Retrieving the image from its Samples
 We know that discreteness in one domain leads to periodicity in another domain. Hence sampling in the spa-
 tial domain leads to periodic spectrum in the fequency domain, which is illustrated in Fig. 1.7.
    In order to retrieve the original image from the sampled spectrum, the following conditions have to be satisfied.
                                                        s2w0                                                     (1.29)
where w,, =     1   and 2wo is the bandwidth ofthe spectrum in the w direction.
               Ar
Similarly,
                                                        wys2uo                                                    (1.30)
where = a n d 2w,o is the bandwidth of the spectrum in the u direction. The condition given in
where wys
               Ay
Eqs. (1.29) and (1.30) implies that the sampling frequency should be greater than twice the maximum signal
frequency, which is generally termed the sampling theorem. Here, 2w,0 and 2w, are called Nyquist rates.
8   Digital mage Processng
                                                                                      The traaler huneton
                                                                                                                  he
low-pass filter is normaly employed in orderto oxtrnet the dkonired wpectrun,                                 0
low-pass filter is given as tollows
                               H(w,   w,)
                                                ( j ,w,) roglon of support
                                                               G                                               (1.31)
                                                          otherwiso
                                                                             can bo obtained
                                                                                               trom tne      Nnngpled
ne
         of support is indicated as
     region                                     1.7,The continuous image
                                            in Fi,                               IN gIvoi us
pectrum by multiplying the sampled      spectrum with the low pusa filter wlhich
                                                                                                               (1.32)
                                                            w)
                                      P(w,w)nU(1, wz)x P(j,
                                                                       as
By takmg inverse Fourier transtorm,    wo   got the continuous imuge
                                                                                                                (.33)
                                                                       AX
                                                                                               L   wys
                                                                                              AY
                   2wyo
                                                                                                         w
                                                                            wxs
                                                     x0
                                  Fig.1.7    Periodicspectrum ofthe sampled image
                                   Criterion
  1.2.3 Violation of Sampling                                                                                Violation of
                                                  of violation of the              sampling criterion.
                 let us discuss the consequences                                                             due       to
In this section,                                    leads to aliasing.             Aliasing basically occurs
          criterion   givenin Eq. (1.29) and (1.30)
sampling
                                                                                                                  direction-
under-sampling.
  Violation sampling criterion given in Eq.          (1.29) leads to overlapping   ofthe spectrum in thew
              of
which is illustrated   1.8. Here, w <
                     in Fig.
                                            whereas
                                                20             w,s    2u,o