Matlab Image Processing

advertisement
Linear Algebra
and
Image Processing
Topics
• Vectors and Matrices
• Vector Spaces
• Eigenvalues and Eigenvectors
• Digital Images - Basic Concepts
• Histograms
• Spatial Filtering
Vectors
• Scalar – single value
• Vector – tuple of values
• Dimension – Cardinality of vector*
• Standard operations
• Inner product, Outer product
• Usage
Matrices
• Matrix – 2D vector*
• Dimensions
• Standard operations
• Matrix multiplication
• Trace and determinant
• Rows and columns
• Matrix types
• Usage
Vector Spaces
• A collection of vectors over a field
• Supports addition and scalar multiplication
• Satisfies:
   v     v
    v   v   v
 u  v   u   v
u v  vu
1v  v
• Examples
Vector Space Properties
• Also true:
• Linear combination
• Linearly independent vectors
1v1  ...   n vn  0  1 ,...,  n  0
Subspaces
• A subspace is a subset of vectors from the
vector space.
• It must be closed for addition and scalar
multiplication
• Subspaces are vector spaces themselves
• Examples
Spanning Set and Basis
• A spanning set is a set of all possible linear
combinations of v1 ,..., vn
• A basis is a set of vectors satisfying
• Spanning the space
• Linearly independent
• Dimension – the length of the basis
• Examples
Eigenvalues and Eigenvectors
• Eigenvector of a square matrix A is a non-zero
vector v such that Av   v for some scalar 
• The scalar  is the matching Eigenvalue
• Number of non-zero eigenvalues = matrix rank
• Examples
• Importance
Solving for Eigenvalues
• Characteristic polynomial P( )  det( A   I )
• Roots are eigenvalues of A
• Algebraic and geometric multiplicities
• Diagonalization: P 1 AP  D
• Importance
Properties of Eigenvalues
• Trace – sum of eigenvalues
• Determinant – product of eigenvalues
• Power - A  1 ,...n leads to Ak  1k ,...nk
• A is invertible for non-zero eigenvalues only
• Invertible – power property holds for -1
• A is hermitian – eigenvalues are real
• A is unitary – eigenvalues satisfy   1
Numerical Linear Algebra
• Further reading
• QR
• LU
• SVD
•…
Digital Images - Basic Concepts
• Digital image – A matrix of pixels
• Pixel – Smallest picture element
• Digital image acquisition:
• Optics
• Sampling
• Quantization
Digital Image Processing
• Representation - discrete signal, 1D or 2D
• Discrete convolution, discrete derivatives, …
• Discrete transforms (e.g. DFT, DCT)
• Notable applications
• Enhancement – Denoising, Inpainting, Debluring
• Compression
• Super-Resolution
Histogram
• Density function of the image
• Statistical tool for estimation and processing
• Gray levels vs. number of occurrences
• Can be normalized  PDF
• Global, Invariant to order of pixels
Histogram Importance
• Brightness and contrast
• Information theory
• Image matching
• Local features
Spatial Convolution
• Convolution in 1D
• Convolution in 2D
• Usage
• Filtering
• Edge Detection
• Template matching
Linear Filtering
• Linear combination of image and filter

J [m, n]  1  I [m, n]   2  I [m  1, n] 
 3  I [m, n  1]   4  I [m  1, n]   5  I [m, n  1]
• Examples
• Averaging
• Gaussian
• Laplacian
2 3 2
3 5 3


 2 3 2 
Non-Linear Filtering
• Not all filters can be formulated as matrices
• Minimum, Maximum
• Median filter
• Frequency mixer
• Energy transfer filter
•…
Adaptive Filtering
• Not all filters are space invariant
• Image statistics may be local
• Corruption may be location dependent
• Different schemes at edges and at textures
• How to create location dependent filters?
Examples
• Wallis filter – local dynamic range correction
• Edge based denoising
• Importance for Computer Vision
Download