Download presentation
Presentation is loading. Please wait.
Published byAntonia Anthony Modified over 9 years ago
1
Image transformations Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 4 September 2003 Chapter 2
2
Introduction Content: Tools for DIP – linear superposition of elementary images Elementary image Outer product of two vectors uivjTuivjT Expand an image g = h c T fh r f = (h c T ) -1 gh r -1 = g ij u i v j T Example 2.1
3
Unitary matrix Unitary matrix U U satisfies UU T* = UU H = I T: transpose *: conjugate U T* = U H Unitary transform of f h c T fh r If h c and h r are chosen to be unitary Inverse of a unitary transform f = (h c T ) -1 gh r -1 = h c gh r H = UgV H U h c ; V h r
4
Orthogonal matrix Orthogonal matrix U U is an unitary matrix and its elements are all real U satisfies UU T = I Construct an unitary matrix U is unitary if its columns form a set of orthonormal vectors
5
Matrix diagonalization Diagonalize a matrix g g = U 1/2 V T g is a matrix of rank r U and V are orthogonal matrices of size N r U is made up from the eigenvectors of the matrix gg T V is made up from the eigenvectors of the matrix g T g 1/2 is a diagonal r r matrix Example 2.8: compute U and V from g
6
Singular value decomposition SVD of an image g g = i 1/2 u i v i T, i =1, 2, …, r Approximate an image g k = i 1/2 u i v i T, i =1, 2, …, k; k < r Error: D g – g k = i 1/2 u i v i T, i = k+1, 2, …, r ||D|| = i, i = k+1, 2, …, r Sum of the omitted eigenvalues Example 2.10 For an arbitrary matrix D, ||D|| = trace[D T D] = sum of all terms squared Minimizing the error Example 2.11
7
Eigenimages Eigenimages The base images used to expand the image Intrinsic to each image Determined by the image itself By the eigenvectors of g T g and gg T Example 2.12, 2.13 Performing SVD and identify eigenimages Example 2.14 Different stages of the SVD
8
Complete and orthogonal set Orthogonal A set of functions S n (t) is said to be orthogonal over an interval [0,T] with weight function w(t) if 0 T w(t)S n (t)S m (t)dt = k if n = m 0 if n m Orthonormal If k = 1 Complete If we cannot find any other function which is orthogonal to the set and does not belong to the set.
9
Complete sets of orthonormal discrete valued functions Harr functions Definition Walsh functions Definition Harr/Walsh image transformation matrices Scale the independent variable t by the size of the matrix Matrix form of H k (i), W k (i) Normalization (N -1/2 or T -1/2 )
10
Harr transform Example 2.18 Harr image transformation matrix (4 4) Example 2.19 Harr transformation of a 4 4 image Example 2.20 Reconstruction of an image and its square error Elementary image of Harr transformation Taking the outer product of a discretised Harr function either with itself or with another one Figure 2.3: Harr transform basis images (8 8 case)
11
Walsh transform Example 2.21 Walsh image transformation matrix (4 4) Example 2.22 Walsh transformation of a 4 4 image Hadamard matrices An orthogonal matrix with entries only +1 and –1 Definition Walsh functions can be calculated in terms of Hadamard matrices Kronecker or lexicographic ordering
12
Hadamard/Walsh transform Elementary image of Hadamard/Walsh transformation Taking the outer product of a discretised Hadamard/Walsh function either with itself or with another one Figure 2.4: Hadamard/Walsh transform basis images (8 8 case) Example 2.23 Different stages of the Harr transform Example 2.24 Different stages of the Hadamard/Walsh transform
13
Assessment of the Hadamard/Walsh and Harr transform Higher order basis images Harr: use the same basic pattern Uniform distribution of the reconstruction error Allow us to reconstruct with different levels of detail different parts of an image Hadamard/Walsh: approximate the image as a whole, with uniformly distributed details Don’t take 0 Easier to implement
14
Discrete Fourier transform 1D DFT Definition 2D DFT Definition Notation of DFT Slot machine Inverse DFT Definition Matrix form of DFT Definition
15
Discrete Fourier transform (cont.) Example 2.25 DFT image transformation matrix (4 4) Example 2.26 DFT transformation of a 4 4 image Example 2.27 DFT image transformation matrix (8 8) Elementary image of DFT transformation Taking the outer product between any two rows of U DFT transform basis images (8 8 case) Figure 2.7: Real parts Figure 2.8: Imaginary parts
16
Discrete Fourier transform (cont.) Example 2.28 DFT transformation of a 4 4 image Example 2.29 Different stages of DFT transform Advantages of DFT Obey the convolution theorem Use very detailed basis functions error Disadvantage of DFT Retain n basis images requires 2n coefficients for the reconstruction
17
Convolution theorem Convolution theorem Discrete 2-dimensional functions: g(n, m), w(n, m) u(n, m) = g(n-n’, m-m’)w(n’, m’) n’ = 0 ~ N-1 m’ = 0 ~ M-1 Periodic assumptions g(n, m) = g(n-N, m-M) = g(n-N, m) = g(n, m-M) w(n, m) = w(n-N, m-M) = w(n-N, m) = w(n, m-M) û(p, q) = (MN) 1/2 ĝ(p, q) ŵ(p, q) The factor appears because we defined the discrete Fourier transform so that the direct and the inverse ones are entirely symmetric
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.