SlideShare a Scribd company logo
1 of 26
03. Image Transforms


     Tati R. Mengko
2-D Orthogonal and Unitary Transforms
• Image transforms → refers to a class of unitary matrices which serves
                      as a basis for representing digital images.
    – Unitary matrices : fullfills AA*T = ATA* = I
    – Basis images     : a discrete set of basis arrays that expands an image.

• For a N×N image, unitary transform of u(m, n) is given by:
                         N −1 N −1
         u (m, n ) =    ∑ ∑ v (k , l ) a * (m, n )
                         k =0 l =0
                                        k ,l         0 ≤ m, n ≤ N − 1

                        N − 1 N −1
         v (k , l ) =   ∑ ∑ u (m, n ) a (m, n )
                        m =0 n=0
                                        k ,l         0 ≤ k,l ≤ N −1

    v(k, l)        → transform coefficients
    V ≡ {v(k, l)} → the transformed image
    {ak,l (m, n)} → a set of complete orthonormal discrete basis functions
                    satisfying the properties: orthonormality and completeness.
2-D Orthogonal and Unitary Transforms
                              N −1 N −1

ORTHONORMALITY:               ∑∑ a ( m, n ) a * ( m, n ) = δ ( k − k ', l − l ')
                              m=0 n =0
                                          k ,l           k ',l '



                              N −1 N −1

COMPLETENESS :                ∑∑ a ( m, n ) a * ( m ', n ') = δ ( m − m ', n − n ')
                              k =0 l =0
                                          k ,l           k ,l



• The orthonormality properties assures that any truncated series
  expansion of the form:
                      P −1 Q −1
     u P ,Q ( m, n ) ≡ ∑∑ v ( k , l ) a *k ,l ( m, n )             P ≤ N, Q ≤ N
                      k =0 l =0
                                                                    N −1 N −1
                                                         σ = ∑∑ u ( m, n ) − u P ,Q ( m, n ) 
                                                            2                                     2
  will minimize the sum of squared error                    e                                
                                                                    m =0 n =0

• The completeness property assures that this error will be zero for
  P=Q=N.
Separable Unitary Transforms
• To reduce the computation order, transformation operation is desired
  to be separable.
  Separability:
             ak ,l ( m, n ) = ak ( m ) al ( n ) ≡ a ( k , m ) b ( l , n )
    {ak(m), k = 0, 1, …, N-1}
                                     1-D complete orthogonal sets of basis vectors.
    {bl(n), l = 0, 1, …, N-1}
    → Reduction of transformation computation order from O(N4) to O(N3) .

• Imposition of orthonormality and completeness on the unitary A ≡{a(k,
  m)} and B ≡ {b(l, n)}, gives the following equation for B = A :
                     N −1 N −1
           v ( k , l ) = ∑∑ a ( k , m ) u ( m, n ) a ( l , n ) ↔ V = AUAT
                     m =0 n =0
                       N −1 N −1
          u ( m, n ) = ∑∑ a * ( k , m ) v ( k , l ) a * ( l , n ) ↔ U = A*T VA*
                       k =0 l =0
Separable Unitary Transforms
• For an M×N rectangular image, the transform pair is:

               V = AMUAN        and    U = A*M V A*TN

• For separable unitary matrix, image transforms can be written as:

                       VT = AUAT = A [AU]T

  Which means transformation process can be performed by first
  transforming each column of U and then transforming each row of
  the result to obtain the rows of V.
Basis Images
• Let ak* denote the kth column of A*T. Define the matrices:
               A*k,l = a*k a*Tl
  and the matrix inner product of two N×N matrices F and G as
                            N −1 N −1
                F, G = ∑∑ f ( m, n ) g * ( m, n )
                            m =0 n =0

• Then image transform can be written as:
               N −1 N −1
          U = ∑∑ v ( k , l ) Ak ,l
                              *
                                        v ( k , l ) = U , A * ,l
                                                            k
               k =0 l =0

  The transform expresses any image U as linear combination of the
  N2 matrices A*k, l , k, l = 0, 1, … , N-1 which are called Basis Image.
• The transform coefficient v(k, l) is simply the inner product of the
  (k, l)th. It is also called the projection of the image on the (k, l)th
  basis image.
Basis Images




Cosinus        Sinus
Basis Images




Hadamard       Haar
Basis Images




Slant          KLT
Properties of Unitary Transforms
1. Energy conservation and rotation
   In a unitary transform:

       v = Au ||v||2 = ||u||2

   Thus a unitary transformation preserves the signal energy or the
   length of the vector u in the N-dimensional vector space.
   This means every unitary transformation is simply a rotation of the
   vector u in the N-dimensional vector space. [Parseval Theorem!]
   For 2-D unitary transformations, it can be proven that

              N −1 N −1                N −1 N −1

              ∑∑ u ( m, n )          = ∑∑ v ( k , l )
                                 2                      2

              m =0 n =0                k =0 l =0
Properties of Unitary Transforms
2.   Energy Compaction
     Most unitary transforms have a tendency to pack a large fraction of
     the average energy of the image into a relatively few components
     of the transform coefficients. Since the total energy is preserved,
     this means many of the transform coefficients will contain very little
     energy.
3.   Decorrelation
     When the input vector elements are highly correlated, the
     transform coefficients tend to be uncorrelated. This means the off-
     diagonal terms of the covariance matrix R, tend to become small
     compared to the diagonal elements.
4.   Other properties:
     The determinant and the eigenvalues of a unitary matrix have unity
     magnitude.
     The entropy of a random vector is preserved under a unitary
     transformation.
2-D Discrete Fourier Transform (DFT)
• 2-D DFT of an N×N image {u(m, n) } is a separable transform defined as:
                N −1 N −1
     v ( k , l ) = ∑∑ u ( m, n )WN WN n ,
                                 km l
                                                0 ≤ k, l ≤ N −1
                m =0 n =0

               − j 2π 
     WN ≡ exp         
                 N 
• The 2-D DFT inverse transform is given as:
               N −1 N −1
     v ( k , l ) = ∑∑ u ( m, n ) WN WN n ,
                                  km l
                                             0 ≤ k, l ≤ N −1
               m=0 n =0

• In matrix notation: V = FUF     and U = F*VF*
Properties of 2-D DFT
       [The N2×N2 matrix F represents the N×N 2-D unitary DFT]
• Symmetric and unitary
     F T = F and F –1 = F *
• Periodic extensions
        v(k + N, l + N) = v(k, l)                  ∀k, l
        u(m + N, n+N) = u(m, n)                    ∀m, n
• Sampled Fourier spectrum
  If u ( m, n ) = u ( m, n ) , 0 ≤ m, n ≤ N − 1 ,and u ( m, n ) = 0 otherwise,
  then:
          %  2π k , 2π l  = DFT {u ( m, n )} = v ( k , lx )
          U              
             N N 

    where      %
              U (ω1 ,ω 2 ) is the Fourier transform of u ( m, n )

•   Fast transform
    Since 2-D DFT is separable, it is equivalent to 2N 1-D unitary DFTs, each of
    which can be performed in O(N log2N) via the FFT. Hence the total number of
    operations is O(N2 log2N).
Properties of 2-D DFT
• Conjugate symmetry
           N    N           N    N               N
         v  ± k, ± l  = v *  m k, m l , 0 ≤ k,l ≤ − 1
           2    2           2    2               2
    or     v(k, l) = v*(N-k, N-l),       0 ≤ k, l ≤ N-1

• Basis Images
  The basis images are given by definition:
                              1
         A* , l = Φ k Φ T =
          k             l
                              N
                                {
                                WN (
                                 − km + ln )
                                                               }
                                             , 0 ≤ m, n ≤ N − 1 , 0 ≤ k , l ≤ N − 1

• 2-D circular convolution theorem
  The DFT of the 2-D circular convolution of two arrays is the product of
  their DFTs:

         DFT{h(m, n)⊗ u(m, n)} = DFT{h(m, n)}.DFT{ u(m, n)}
Examples of DFT

50                                    50                                50




100                                  100                                100




150                                  150                                150




200                                                                     200
                                     200



250                                                                     250
                                     250
      50   100   150   200   250                                              50   100   150   200   250
                                           50   100   150   200   250




      Original Image               Log(magnitude of DFT coeff)                Phase Image
Discrete Cosine Transform (DCT)
 • The N×N DCT matrix C = {c(k, n)}, is defined as
                    1
                    N,                    k = 0, 0 ≤ n ≤ N − 1
                   
        c (k, n) = 
                    2 cos π ( 2n + 1) k , 1 ≤ k ≤ N − 1, 0 ≤ n ≤ N − 1
                    N
                               2N
 •   Properties of DCT:
                                                  1 − α −α 0          0 
     1. Real and orthogonal                        −α      1              
     2. C = C* ⇒ C-1 = CT                    Qr =                         
     3. Not the real part of the unitary DFT       0            1 −α 
                                                                          
     4. Fast transform                              0     −α        1−α 
     5. Excellent energy compaction.
     6. The basis vector of the DCT (rows of C) are eigen-vectors of
         symmetric traditional matrix Qr
     7. DCT is very close to the KL (Karhunen-Loeve) transform of a first-
         order stationary Markov sequence.
Example of DCT

                                                                             50
50                                   50


                                                                            100
100                                  100



                                                                            150
150                                  150



                                                                            200
200                                  200



                                                                            250
250                                  250                                          50   100   150   200   250
      50   100   150   200   250           50   100   150   200   250


      Original image                       DCT coefficient              Log(magnitude of DCT coeff)
Discrete Sine Transform (DST)
• The N×N DST matrix Ψ = {ψ(k, n)}, is defined as

                       2       π ( k + 1)( n + 1)
        ψ ( k, n) =        sin                    , 0 ≤ k, n ≤ N −1
                      N +1           N +1

•   Properties of DST:
    1. DST is real, symmetric, and orthogonal:
                        Ψ* = Ψ = ΨT = Ψ -1
    2. DST is not the imaginary part of the unitary DFT
    3. DST is a fast transform
    4. The basis vectors of the DFT are the eigenvectors of the
       symmetric tridiagonal Toeplitz matrix Q
    5. DST is close to the KL transform of first order stationary
       Markov sequences.
    6. DST leads to a fast KL transform algorithm for Markov
       sequence, whose boundary values are given.
Examples of DST

50                                  50                                      50




100                                 100                                     100




150                                 150                                     150




200                                 200                                     200




250                                 250                                     250
       50   100   150   200   250           50   100   150   200   250            50   100   150   200   250

      Original image                      DST coefficient                Log(magnitude of DST coef.)
Hadamard Transform
•   Elements of Hadamard matrices take only the binary values ±1.
    The Hadamard transform matrices, Hn, are N×N matrices,
    where N≡2n, n ∈ I+.
•   Kronecker product recursion
         1 1 1                                1  H n −1 H n −1 
    H1 =   1 −1           H n = H n −1 ⊗ H1 =                    
          2                                    2  H n −1 −H n −1 


•   Properties of Hadamard Transform:
    – The Hadamard transform is real, symmetric, and
       orthogonal:
                 H* = H = HT = H-1
    – The Hadamard transform is a fast transform {O (N log2N )}
    – The Hadamard transform has good energy compaction
Examples of Hadamard
     Transform
Haar Transform
• The Haar functions hk(x) are defined on a continuous interval,
  x ∈[-1,1] and for k = 0, 1, …, N-1 where N=2n.
• The integer k can be uniquely decomposed as: k = 2p + q -1, where
  0≤ p ≤n-1; q=0,1 for p=0 and 1≤ q ≤2p for p≠0.
• For Example, when N = 4 (or n=2) we have
        k         0         1         2         3
        p         0         0         1         1
        q         0         1         1         2
  Representing k by (p,q), the Haar functions are defined as:
                                  1
          h0 ( x ) ≡ h0,0 ( x ) =    , x ∈ [ 0,1]
                                   N
                                      p2       q −1        q −1 2
                                      2    ,        ≤x<
                                                 2p           2p
                                     
                                  1  p 2 q −1 2               q
         hk ( x ) ≡ hp ,q ( x ) =     −2 ,             ≤x< p
                                  N              2p          2
                                     0      , daerah lain untuk x ∈ [ 0,1]
                                     
                                     
Haar Transform
• For N=2 dan N=4:
                                        1    1    1     1 
                                        2    1    −1    −1 
            1    1 1             1                       
      Hr2 =      1 −1      Hr8 =
             2                    4   2   − 2   0     0 
                                                           
                                     
                                        0    0     2   − 2

•   Properties of Haar Transform:
       1. Real and orthogonal: Hr = Hr* dan Hr -1 = HrT
       2. Very fast transform : O(N) operation on Nx1 vector.
       3. Poor energy compaction for images
Slant Transform
• The N×N Slant transform matrices are defined by the recursion
            1 0                     1         0                                  
           a b           0                               0            
            n n                    − an       bn                       S n −1 0              1    1 1 
         1  0       I ( N / 2)−2          0          I ( N / 2)− 2                       S1 =      1 −1
    Sn =                                                                                       2       
          2 1  0                   1          0                                  
            −b a         0                                0 
                                    bn         an                         0 S n −1 
            n   n                                                                
            0       I ( N / 2)−2          0          −I ( N / 2 ) − 2            
                                                                                 

  where N=2n and IM denotes an M×M identity matrix
• Parameters an dan bn are defined by the recursions:

         bn = (1 + 4a2n-1)-1/2                      a1 =1
                                                                                       1     1    1        1 
         an = 2bnan-1                          
                                                                                       3     1    −1       −3 
                                                                                                               
                                              1                                         5     5    5        5
    The 4×4 Slant transformation matrix: S 2 = 
                                                                                                            1 
•
                                              2                                        1     −1   −1
                                                                                                               
                                                                                       1     −3       3    −1 
                                                                                                              
                                                                                        5     5        5    5
Slant Transform Properties
•   Properties:
    1. Real and orthogonal: S = S* and S-1 = ST
    2. A fast transform: O(N log2N)
    3. Good energy compaction
KL Transform
• The KL transform was originally introduced as a series expansion for
  continuous random processes by Karhunen and Louve.
• For a real N×1 random vector u, the basis vectors of the KL
  transformation are given by the orthonormalized eigenvectors of its
  autocorrelation matrix R:

                Rφk = λk φk,      0≤ k ≤ N-1

•   The KL transform of u is defined as: v = Φ*Tu
                                               N −1
• And the inverse transform is:     u = Φv = ∑ v ( k ) φk
                                               k =0

More Related Content

What's hot

Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
Ashish Kumar
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
Gichelle Amon
 

What's hot (20)

Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard Transform
 
Discrete cosine transform
Discrete cosine transform   Discrete cosine transform
Discrete cosine transform
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Image compression models
Image compression modelsImage compression models
Image compression models
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image Transformation
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
Edge Detection using Hough Transform
Edge Detection using Hough TransformEdge Detection using Hough Transform
Edge Detection using Hough Transform
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier Transformation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 

Viewers also liked

morphological image processing
morphological image processingmorphological image processing
morphological image processing
John Williams
 
Discrete cosine transform
Discrete cosine transformDiscrete cosine transform
Discrete cosine transform
aniruddh Tyagi
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
Yahya Alkhaldi
 
The VP8 Video Codec
The VP8 Video CodecThe VP8 Video Codec
The VP8 Video Codec
yeahiii
 
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
CSCJournals
 

Viewers also liked (19)

Image transforms
Image transformsImage transforms
Image transforms
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
 
Introduction to Digital Image Processing
Introduction to Digital Image ProcessingIntroduction to Digital Image Processing
Introduction to Digital Image Processing
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTES
 
Discrete cosine transform
Discrete cosine transformDiscrete cosine transform
Discrete cosine transform
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
The VP8 Video Codec
The VP8 Video CodecThe VP8 Video Codec
The VP8 Video Codec
 
La Transformación Unitaria U(1)
La Transformación Unitaria U(1)La Transformación Unitaria U(1)
La Transformación Unitaria U(1)
 
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
Comprehensive Performance Comparison of Cosine, Walsh, Haar, Kekre, Sine, Sla...
 
Unit 1 a notes
Unit 1 a notesUnit 1 a notes
Unit 1 a notes
 
A Fast Hadamard Transform for Signals with Sub-linear Sparsity
A Fast Hadamard Transform for Signals with Sub-linear SparsityA Fast Hadamard Transform for Signals with Sub-linear Sparsity
A Fast Hadamard Transform for Signals with Sub-linear Sparsity
 
Signal Processing Course : Wavelets
Signal Processing Course : WaveletsSignal Processing Course : Wavelets
Signal Processing Course : Wavelets
 
Resolution enhancement of low-quality videos using a high-resolution frame
Resolution enhancement of low-quality videos using a high-resolution frameResolution enhancement of low-quality videos using a high-resolution frame
Resolution enhancement of low-quality videos using a high-resolution frame
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
 
Image enhancement sharpening
Image enhancement  sharpeningImage enhancement  sharpening
Image enhancement sharpening
 

Similar to 03 image transform

Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dft
mikeproud
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
dessybudiyanti
 
Iast.lect19.slides
Iast.lect19.slidesIast.lect19.slides
Iast.lect19.slides
ha88ni
 
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
Luke Underwood
 

Similar to 03 image transform (20)

Dft
DftDft
Dft
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
 
Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dft
 
Introduction to Diffusion Monte Carlo
Introduction to Diffusion Monte CarloIntroduction to Diffusion Monte Carlo
Introduction to Diffusion Monte Carlo
 
Ch13
Ch13Ch13
Ch13
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
maa_talk
maa_talkmaa_talk
maa_talk
 
Monopole zurich
Monopole zurichMonopole zurich
Monopole zurich
 
DFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdfDFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdf
 
Iast.lect19.slides
Iast.lect19.slidesIast.lect19.slides
Iast.lect19.slides
 
Relative superior mandelbrot and julia sets for integer and non integer values
Relative superior mandelbrot and julia sets for integer and non integer valuesRelative superior mandelbrot and julia sets for integer and non integer values
Relative superior mandelbrot and julia sets for integer and non integer values
 
Relative superior mandelbrot sets and relative
Relative superior mandelbrot sets and relativeRelative superior mandelbrot sets and relative
Relative superior mandelbrot sets and relative
 
Linear response theory
Linear response theoryLinear response theory
Linear response theory
 
B spline
B splineB spline
B spline
 
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
Electromagnetic Scattering from Objects with Thin Coatings.2016.05.04.02
 
Quantum chaos of generic systems - Marko Robnik
Quantum chaos of generic systems - Marko RobnikQuantum chaos of generic systems - Marko Robnik
Quantum chaos of generic systems - Marko Robnik
 

More from Rumah Belajar

Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
Rumah Belajar
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
Rumah Belajar
 
Bab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan lasBab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan las
Rumah Belajar
 

More from Rumah Belajar (20)

Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
 
point processing
point processingpoint processing
point processing
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
 
01 introduction image processing analysis
01 introduction image processing analysis01 introduction image processing analysis
01 introduction image processing analysis
 
06 object measurement
06 object measurement06 object measurement
06 object measurement
 
Bab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasanBab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasan
 
Bab 10 spring arif hary
Bab 10 spring  arif hary Bab 10 spring  arif hary
Bab 10 spring arif hary
 
Bab 06 kriteria kegagalan lelah
Bab 06 kriteria kegagalan lelahBab 06 kriteria kegagalan lelah
Bab 06 kriteria kegagalan lelah
 
Bab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan lasBab 09 kekuatan sambungan las
Bab 09 kekuatan sambungan las
 
Bab 08 screws, fasteners and connection syarif
Bab 08 screws, fasteners and connection  syarif Bab 08 screws, fasteners and connection  syarif
Bab 08 screws, fasteners and connection syarif
 
Bab 07 poros dan aksesoriny
Bab 07 poros dan aksesorinyBab 07 poros dan aksesoriny
Bab 07 poros dan aksesoriny
 
Bab 05 kriteria kegagalan 1
Bab 05 kriteria kegagalan 1Bab 05 kriteria kegagalan 1
Bab 05 kriteria kegagalan 1
 
Bab 04 tegangan regangan defleksi
Bab 04 tegangan regangan defleksiBab 04 tegangan regangan defleksi
Bab 04 tegangan regangan defleksi
 
Bab 03 load analysis
Bab 03 load analysisBab 03 load analysis
Bab 03 load analysis
 
Bab 02 material dan proses
Bab 02 material dan prosesBab 02 material dan proses
Bab 02 material dan proses
 
Bab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasanBab 11 bantalan dan sistem pelumasan
Bab 11 bantalan dan sistem pelumasan
 
Mikrokontroler pertemuan 8
Mikrokontroler pertemuan 8Mikrokontroler pertemuan 8
Mikrokontroler pertemuan 8
 
Mikrokontroler pertemuan 7
Mikrokontroler pertemuan 7Mikrokontroler pertemuan 7
Mikrokontroler pertemuan 7
 
Mikrokontroler pertemuan 5
Mikrokontroler pertemuan 5Mikrokontroler pertemuan 5
Mikrokontroler pertemuan 5
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

03 image transform

  • 1. 03. Image Transforms Tati R. Mengko
  • 2. 2-D Orthogonal and Unitary Transforms • Image transforms → refers to a class of unitary matrices which serves as a basis for representing digital images. – Unitary matrices : fullfills AA*T = ATA* = I – Basis images : a discrete set of basis arrays that expands an image. • For a N×N image, unitary transform of u(m, n) is given by: N −1 N −1 u (m, n ) = ∑ ∑ v (k , l ) a * (m, n ) k =0 l =0 k ,l 0 ≤ m, n ≤ N − 1 N − 1 N −1 v (k , l ) = ∑ ∑ u (m, n ) a (m, n ) m =0 n=0 k ,l 0 ≤ k,l ≤ N −1 v(k, l) → transform coefficients V ≡ {v(k, l)} → the transformed image {ak,l (m, n)} → a set of complete orthonormal discrete basis functions satisfying the properties: orthonormality and completeness.
  • 3. 2-D Orthogonal and Unitary Transforms N −1 N −1 ORTHONORMALITY: ∑∑ a ( m, n ) a * ( m, n ) = δ ( k − k ', l − l ') m=0 n =0 k ,l k ',l ' N −1 N −1 COMPLETENESS : ∑∑ a ( m, n ) a * ( m ', n ') = δ ( m − m ', n − n ') k =0 l =0 k ,l k ,l • The orthonormality properties assures that any truncated series expansion of the form: P −1 Q −1 u P ,Q ( m, n ) ≡ ∑∑ v ( k , l ) a *k ,l ( m, n ) P ≤ N, Q ≤ N k =0 l =0 N −1 N −1 σ = ∑∑ u ( m, n ) − u P ,Q ( m, n )  2 2 will minimize the sum of squared error e   m =0 n =0 • The completeness property assures that this error will be zero for P=Q=N.
  • 4. Separable Unitary Transforms • To reduce the computation order, transformation operation is desired to be separable. Separability: ak ,l ( m, n ) = ak ( m ) al ( n ) ≡ a ( k , m ) b ( l , n ) {ak(m), k = 0, 1, …, N-1} 1-D complete orthogonal sets of basis vectors. {bl(n), l = 0, 1, …, N-1} → Reduction of transformation computation order from O(N4) to O(N3) . • Imposition of orthonormality and completeness on the unitary A ≡{a(k, m)} and B ≡ {b(l, n)}, gives the following equation for B = A : N −1 N −1 v ( k , l ) = ∑∑ a ( k , m ) u ( m, n ) a ( l , n ) ↔ V = AUAT m =0 n =0 N −1 N −1 u ( m, n ) = ∑∑ a * ( k , m ) v ( k , l ) a * ( l , n ) ↔ U = A*T VA* k =0 l =0
  • 5. Separable Unitary Transforms • For an M×N rectangular image, the transform pair is: V = AMUAN and U = A*M V A*TN • For separable unitary matrix, image transforms can be written as: VT = AUAT = A [AU]T Which means transformation process can be performed by first transforming each column of U and then transforming each row of the result to obtain the rows of V.
  • 6. Basis Images • Let ak* denote the kth column of A*T. Define the matrices: A*k,l = a*k a*Tl and the matrix inner product of two N×N matrices F and G as N −1 N −1 F, G = ∑∑ f ( m, n ) g * ( m, n ) m =0 n =0 • Then image transform can be written as: N −1 N −1 U = ∑∑ v ( k , l ) Ak ,l * v ( k , l ) = U , A * ,l k k =0 l =0 The transform expresses any image U as linear combination of the N2 matrices A*k, l , k, l = 0, 1, … , N-1 which are called Basis Image. • The transform coefficient v(k, l) is simply the inner product of the (k, l)th. It is also called the projection of the image on the (k, l)th basis image.
  • 10. Properties of Unitary Transforms 1. Energy conservation and rotation In a unitary transform: v = Au ||v||2 = ||u||2 Thus a unitary transformation preserves the signal energy or the length of the vector u in the N-dimensional vector space. This means every unitary transformation is simply a rotation of the vector u in the N-dimensional vector space. [Parseval Theorem!] For 2-D unitary transformations, it can be proven that N −1 N −1 N −1 N −1 ∑∑ u ( m, n ) = ∑∑ v ( k , l ) 2 2 m =0 n =0 k =0 l =0
  • 11. Properties of Unitary Transforms 2. Energy Compaction Most unitary transforms have a tendency to pack a large fraction of the average energy of the image into a relatively few components of the transform coefficients. Since the total energy is preserved, this means many of the transform coefficients will contain very little energy. 3. Decorrelation When the input vector elements are highly correlated, the transform coefficients tend to be uncorrelated. This means the off- diagonal terms of the covariance matrix R, tend to become small compared to the diagonal elements. 4. Other properties: The determinant and the eigenvalues of a unitary matrix have unity magnitude. The entropy of a random vector is preserved under a unitary transformation.
  • 12. 2-D Discrete Fourier Transform (DFT) • 2-D DFT of an N×N image {u(m, n) } is a separable transform defined as: N −1 N −1 v ( k , l ) = ∑∑ u ( m, n )WN WN n , km l 0 ≤ k, l ≤ N −1 m =0 n =0  − j 2π  WN ≡ exp    N  • The 2-D DFT inverse transform is given as: N −1 N −1 v ( k , l ) = ∑∑ u ( m, n ) WN WN n , km l 0 ≤ k, l ≤ N −1 m=0 n =0 • In matrix notation: V = FUF and U = F*VF*
  • 13. Properties of 2-D DFT [The N2×N2 matrix F represents the N×N 2-D unitary DFT] • Symmetric and unitary F T = F and F –1 = F * • Periodic extensions v(k + N, l + N) = v(k, l) ∀k, l u(m + N, n+N) = u(m, n) ∀m, n • Sampled Fourier spectrum If u ( m, n ) = u ( m, n ) , 0 ≤ m, n ≤ N − 1 ,and u ( m, n ) = 0 otherwise, then: %  2π k , 2π l  = DFT {u ( m, n )} = v ( k , lx ) U   N N  where % U (ω1 ,ω 2 ) is the Fourier transform of u ( m, n ) • Fast transform Since 2-D DFT is separable, it is equivalent to 2N 1-D unitary DFTs, each of which can be performed in O(N log2N) via the FFT. Hence the total number of operations is O(N2 log2N).
  • 14. Properties of 2-D DFT • Conjugate symmetry N N  N N  N v  ± k, ± l  = v *  m k, m l , 0 ≤ k,l ≤ − 1 2 2  2 2  2 or v(k, l) = v*(N-k, N-l), 0 ≤ k, l ≤ N-1 • Basis Images The basis images are given by definition: 1 A* , l = Φ k Φ T = k l N { WN ( − km + ln ) } , 0 ≤ m, n ≤ N − 1 , 0 ≤ k , l ≤ N − 1 • 2-D circular convolution theorem The DFT of the 2-D circular convolution of two arrays is the product of their DFTs: DFT{h(m, n)⊗ u(m, n)} = DFT{h(m, n)}.DFT{ u(m, n)}
  • 15. Examples of DFT 50 50 50 100 100 100 150 150 150 200 200 200 250 250 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 Original Image Log(magnitude of DFT coeff) Phase Image
  • 16. Discrete Cosine Transform (DCT) • The N×N DCT matrix C = {c(k, n)}, is defined as  1  N, k = 0, 0 ≤ n ≤ N − 1  c (k, n) =   2 cos π ( 2n + 1) k , 1 ≤ k ≤ N − 1, 0 ≤ n ≤ N − 1  N  2N • Properties of DCT: 1 − α −α 0 0  1. Real and orthogonal  −α 1  2. C = C* ⇒ C-1 = CT Qr =   3. Not the real part of the unitary DFT  0 1 −α    4. Fast transform  0 −α 1−α  5. Excellent energy compaction. 6. The basis vector of the DCT (rows of C) are eigen-vectors of symmetric traditional matrix Qr 7. DCT is very close to the KL (Karhunen-Loeve) transform of a first- order stationary Markov sequence.
  • 17. Example of DCT 50 50 50 100 100 100 150 150 150 200 200 200 250 250 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 Original image DCT coefficient Log(magnitude of DCT coeff)
  • 18. Discrete Sine Transform (DST) • The N×N DST matrix Ψ = {ψ(k, n)}, is defined as 2 π ( k + 1)( n + 1) ψ ( k, n) = sin , 0 ≤ k, n ≤ N −1 N +1 N +1 • Properties of DST: 1. DST is real, symmetric, and orthogonal: Ψ* = Ψ = ΨT = Ψ -1 2. DST is not the imaginary part of the unitary DFT 3. DST is a fast transform 4. The basis vectors of the DFT are the eigenvectors of the symmetric tridiagonal Toeplitz matrix Q 5. DST is close to the KL transform of first order stationary Markov sequences. 6. DST leads to a fast KL transform algorithm for Markov sequence, whose boundary values are given.
  • 19. Examples of DST 50 50 50 100 100 100 150 150 150 200 200 200 250 250 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 Original image DST coefficient Log(magnitude of DST coef.)
  • 20. Hadamard Transform • Elements of Hadamard matrices take only the binary values ±1. The Hadamard transform matrices, Hn, are N×N matrices, where N≡2n, n ∈ I+. • Kronecker product recursion 1 1 1  1  H n −1 H n −1  H1 = 1 −1 H n = H n −1 ⊗ H1 =   2  2  H n −1 −H n −1  • Properties of Hadamard Transform: – The Hadamard transform is real, symmetric, and orthogonal: H* = H = HT = H-1 – The Hadamard transform is a fast transform {O (N log2N )} – The Hadamard transform has good energy compaction
  • 21. Examples of Hadamard Transform
  • 22. Haar Transform • The Haar functions hk(x) are defined on a continuous interval, x ∈[-1,1] and for k = 0, 1, …, N-1 where N=2n. • The integer k can be uniquely decomposed as: k = 2p + q -1, where 0≤ p ≤n-1; q=0,1 for p=0 and 1≤ q ≤2p for p≠0. • For Example, when N = 4 (or n=2) we have k 0 1 2 3 p 0 0 1 1 q 0 1 1 2 Representing k by (p,q), the Haar functions are defined as: 1 h0 ( x ) ≡ h0,0 ( x ) = , x ∈ [ 0,1] N  p2 q −1 q −1 2  2 , ≤x< 2p 2p  1  p 2 q −1 2 q hk ( x ) ≡ hp ,q ( x ) =  −2 , ≤x< p N  2p 2 0 , daerah lain untuk x ∈ [ 0,1]  
  • 23. Haar Transform • For N=2 dan N=4:  1 1 1 1   2 1 −1 −1  1 1 1  1   Hr2 = 1 −1 Hr8 = 2   4 2 − 2 0 0      0 0 2 − 2 • Properties of Haar Transform: 1. Real and orthogonal: Hr = Hr* dan Hr -1 = HrT 2. Very fast transform : O(N) operation on Nx1 vector. 3. Poor energy compaction for images
  • 24. Slant Transform • The N×N Slant transform matrices are defined by the recursion  1 0 1 0   a b 0 0   n n − an bn  S n −1 0  1 1 1  1  0 I ( N / 2)−2 0 I ( N / 2)− 2    S1 = 1 −1 Sn =    2   2 1 0 1 0    −b a 0 0  bn an  0 S n −1   n n    0 I ( N / 2)−2 0 −I ( N / 2 ) − 2       where N=2n and IM denotes an M×M identity matrix • Parameters an dan bn are defined by the recursions: bn = (1 + 4a2n-1)-1/2 a1 =1  1 1 1 1  an = 2bnan-1   3 1 −1 −3   1 5 5 5 5 The 4×4 Slant transformation matrix: S 2 =  1  • 2 1 −1 −1   1 −3 3 −1     5 5 5 5
  • 25. Slant Transform Properties • Properties: 1. Real and orthogonal: S = S* and S-1 = ST 2. A fast transform: O(N log2N) 3. Good energy compaction
  • 26. KL Transform • The KL transform was originally introduced as a series expansion for continuous random processes by Karhunen and Louve. • For a real N×1 random vector u, the basis vectors of the KL transformation are given by the orthonormalized eigenvectors of its autocorrelation matrix R: Rφk = λk φk, 0≤ k ≤ N-1 • The KL transform of u is defined as: v = Φ*Tu N −1 • And the inverse transform is: u = Φv = ∑ v ( k ) φk k =0