ENEE631 Digital Image Processing (Spring'04) Unitary Transforms Unitary Transforms Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park www.ajconline.umd.edu (select ENEE631 S’04) [email protected]Based on ENEE631 Based on ENEE631 Spring’04 Spring’04 Section 9 Section 9
34
Embed
ENEE631 Digital Image Processing (Spring'04) Unitary Transforms Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park .
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [4]
Why Do Transforms?Why Do Transforms?
Fast computation– E.g., convolution vs. multiplication for filter with wide support
Conceptual insights for various image processing– E.g., spatial frequency info. (smooth, moderate change, fast change, etc.)
Obtain transformed data as measurement– E.g., blurred images, radiology images (medical and astrophysics)– Often need inverse transform– May need to get assistance from other transforms
For efficient storage and transmission– Pick a few “representatives” (basis) – Just store/send the “contribution” from each basis
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [7]
Basis Vectors and Basis ImagesBasis Vectors and Basis Images
A basis for a vector space ~ a set of vectors– Linearly independent ~ ai vi = 0 if and only if all ai=0– Uniquely represent every vector in the space by their linear combination
– Hermitian of row vectors of A form a set of orthonormal basis vectorsai
*T = [a*(i,0), …, a*(i,N-1)] T
Orthogonal matrix ~ A-1 = AT – Real-valued unitary matrix is also an orthogonal matrix– Row vectors of real orthogonal matrix A form orthonormal basis vectors
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [18]
2-D Transform: General Case2-D Transform: General Case
A general 2-D linear transform {ak,l(m,n)}
– y(k,l) is a transform coefficient for Image {x(m,n)} – {y(k,l)} is “Transformed Image”– Equiv to rewriting all from 2-D to 1-D and applying 1-D transform
Computational complexity– N2 values to compute– N2 terms in summation per output coefficient– O(N4) for transforming an NxN image!
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [25]
Summary and Review (1)Summary and Review (1)
1-D transform of a vector– Represent an N-sample sequence as a vector in N-dimension vector
space– Transform
Different representation of this vector in the space via different basis e.g., 1-D DFT from time domain to frequency domain
– Forward transform In the form of inner product Project a vector onto a new set of basis to obtain N “coefficients”
– Inverse transform Use linear combination of basis vectors weighted by transform coeff.
to represent the original signal
2-D transform of a matrix– Rewrite the matrix into a vector and apply 1-D transform– Separable transform allows applying transform to rows then columns
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [26]
Summary and Review (1) cont’dSummary and Review (1) cont’d Vector/matrix representation of 1-D & 2-D sampled signal
– Representing an image as a matrix or sometimes as a long vector
Basis functions/vectors and orthonomal basis– Used for representing the space via their linear combinations– Many possible sets of basis and orthonomal basis
Unitary transform on input x ~ A-1 = A*T – y = A x x = A-1 y = A*T y = ai
*T y(i) ~ represented by basis vectors {ai*T}
– Rows (and columns) of a unitary matrix form an orthonormal basis
General 2-D transform and separable unitary 2-D transform– 2-D transform involves O(N4) computation– Separable: Y = A X AT = (A X) AT ~ O(N3) computation
Apply 1-D transform to all columns, then apply 1-D transform to rows
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [31]
Review: Correlation After a Linear TransformReview: Correlation After a Linear Transform
Consider an Nx1 zero-mean random vector x
– Covariance (autocorrelation) matrix Rx = E[ x xH ] give ideas of correlation between elements Rx is a diagonal matrix for if all N r.v.’s are uncorrelated
Apply a linear transform to x: y = A x
What is the correlation matrix for y ?
Ry = E[ y yH ] = E[ (Ax) (Ax)H ] = E[ A x xH AH ]
= A E[ x xH ] AH = A Rx AH
Decorrelation: try to search for A that can produce a decorrelated y (equiv. a diagonal correlation matrix Ry )
– Keep only a subset of m transform coefficients and then perform inverse transform (1 m N)
– Basis restriction error: MSE between original & new sequences
Goal: to find the forward and backward transform matrices to minimize the restriction error for each and every m– The minimum is achieved by KLT arranged according to the
ENEE631 Digital Image Processing (Spring'04) Lec12 – Unitary Transform [41]
Summary and Review on Unitary TransformSummary and Review on Unitary Transform
Representation with orthonormal basis Unitary transform
– Preserve energy
Common unitary transforms
– DFT, DCT, Haar, KLT
Which transform to choose?
– Depend on need in particular task/application– DFT ~ reflect physical meaning of frequency or spatial frequency– KLT ~ optimal in energy compaction– DCT ~ real-to-real, and close to KLT’s energy compaction