540 likes | 548 Views
Learn about the concept of texture in digital image processing, its uses, and various techniques for texture analysis and synthesis. Explore Fourier transform, DFT, DWT, and wavelet transforms for texture representation.
E N D
Texture ECE 847:Digital Image Processing Stan Birchfield Clemson University
What is texture? • No formal definition exists • Basically, repetition of a pattern • Pattern can be deterministic or stochastic • Repetition can be deterministic or stochastic (rep/patt)
Another definition Texture is the abstraction of certain homogeneous statistical properties from a portion of the visual field containing a quantity of information in excess of the observer’s perceptual capacity. http://www.cns.nyu.edu/~msl/papers/landygraham02.pdf
Uses of texture S. C. Zhu, PAMI 1996 texture segmentation shape from texture http://graphics.stanford.edu/papers/texture-synthesis-sig01/ texture synthesis (texture mapping)
Textons Preattentive texture discrimination (0.1-0.4 sec) Julesz’ psychophysics experiments in the 1960s: The fundamental elements are textons (elongated blobs, terminators, crossings)
Things vs. Stuff “Things” are often emphasized (object recognition) count nouns But “stuff” is important, too (material properties) mass nouns Adelson, SPIE 2001 http://web.mit.edu/persci/people/adelson/pub_pdfs/adelson_spie_01.pdf
Statistical representation • Texture is usually represented using statistics of the image, captured at various frequencies and orientations • Frequencies can also be thought of as scales
Co-occurrence matrices • features: http://www.cse.msu.edu/~stockman/CV/F09Lectures/Storehouse/week06-texture-LS.ppt
Laws’ masks (Level, Edge, Spot, Wave, Ripple) • 1D convolution kernels: • Combine to 2D • Apply kernels to image • Perform windowing operation • Normalize for contrast • Combine similar features: • Each pixel is now represented by 14 values http://www.ccs3.lanl.gov/~kelly/notebook/laws.shtml http://www.ccs3.lanl.gov/~kelly/notebook/laws.shtml K. Laws. Textured Image Segmentation, Ph.D. Dissertation, University of Southern California, January 1980.
water tiger fence flag grass small flowers big flowers http://www.cse.msu.edu/~stockman/CV/F09Lectures/Storehouse/week06-texture-LS.ppt
Short-time Fourier transform • Multiply signal by windowing function • Then compute Fourier transform • AKA windowed Fourier transform • Drawback: Fixed resolution forces tradeoff • Either good time resolution or • Good frequency resolution, but not both
Discrete Fourier Transform (DFT) • Signal g(x), x=0, ..., w-1 – spatial domain • DFT G(k), k=0, ..., w-1 – frequency domain Forward:(analysis) Inverse: (synthesis) only difference is sign
DFT implementation • Euler’s formula: • Slow version is O(n2)(where n=w) • Fast version is Fast Fourier Transform (FFT), O(n log n)
Rectangular and polar coordinates } } rectangular polar Gi |G| Gr
DFT properties • Linear • Periodic • Shift theorem • Modulation
DFT properties (cont.) • Hermitian symmetry (if g is real-valued) • Unitarity(Parseval’s theorem) • DC component • Circular convolution
Example What is the DFT of this signal?
Example (cont.) Answer: But why? What does this mean?
Example (cont.) Other ways of looking at the same data: • f = k/w is the frequency (in cycles per sample) • ½ ≤ f ≤ ½ • The period T=1/f in samples per cycle
More examples What are their DFTs?
More examples What are their DFTs?
2D DFT • Fwd and inverse 2D DFT: where
2D DFT properties • Linear transform of (x,y) • Scaling (special case) • Rotation (special case)
Discrete Fourier Transform (DFT) White pixel is DC component (black rectangle provides contrast) log magnitude = log |G(I(x,y))| phase
DFT (cont.) slice through DFT (first row): DC component |G(I(x,y))| log |G(I(x,y))|
Periodicity Intention is to take the DFT of the image: DFT
Periodicity DC component But the DFT sees the replicated signal and computes a replicated transform: Shifted DFT is easier to view Strong horizontal edge leads to high coefficients for ej2pky/h
Periodicity ... and carries the same information: A B A B non-shifted DFT C D C D A B A B C D C D Shifted DFT
Periodicity To shift DFT, first multiply image by (-1)x+y DFT x +1 -1 +1 -1 +1 -1 +1 -1 -1 +1 -1 +1 -1 +1 -1 +1 +1 -1 +1 -1 +1 -1 +1 -1 -1 +1 -1 +1 -1 +1 -1 +1 +1 -1 +1 -1 +1 -1 +1 -1 -1 +1 -1 +1 -1 +1 -1 +1 +1 -1 +1 -1 +1 -1 +1 -1 -1 +1 -1 +1 -1 +1 -1 +1
Discrete wavelet transform • Apply quadrature mirror filter: • Successive applications: or where g is highpass (downsample operator) h is lowpass filter bank
Lifting scheme • Lifting scheme performs DWT by a series of convolution-accumulate operations • Restricted to perfect reconstruction filterbanks • Enables speedup by factor of two
Another wavelet transform Captures frequencies at times
Haar wavelet • A wavelet is described by • mother wavelet function y( (x-b)/a ), and • scaling function j • Haar is oldest (1909) and simplest wavelet
Daughter wavelets • Daughter wavelet functions given by • dilations (change in frequency), and • translations of mother wavelet y( (x-b)/a ) • Usually a=2-j (scaling by octaves) b = k 2-j (translation keeps well-separated) • Draw dilated/translated Haar wavelets here
Implementing Haar • Haar is easy to implement: g = [ 1 1 ] (average) h = [1 -1 ] (difference) • Steps: • Convert sequenceto pairs • Right-multiply by Haar matrixto yield result • Haar wavelets are complete and orthogonal • Allow complete reconstruction http://en.wikipedia.org/wiki/Haar_wavelet
Wavelet packet decomposition • Process both the detail (high-pass) and approximation (low-pass) coefficients
Daubechies wavelets • Daubechies (1987) are popular family of orthogonal wavelets • Characterized by a maximal number of vanishing points for a given support • DN (N is even) has • N coefficients, and • N/2 vanishing moments • Examples of scaling functions: • D2 wavelet = [1 -1] (Haar) scaling = [1 1 ] • D4 wavelet = [-0.1830127, -0.3169873, 1.1830127, -0.6830127] scaling = [0.6830127, 1.1830127, 0.3169873, -0.1830127] • … D20 Note: scaling is derived by reversing order of wavelet, and changing sign of every other coefficient
Biological plausibility • Hubel and Wiesel (1968)
Multiresolution analysis • Mallat (1989) connected wavelets with multiresolution processing • See also image pyramids • Scale space
Steerable pyramids • (Simoncelli 1995) • Outgrowth of Laplacian pyramids • Like DWT, • decomposes image into oriented, bandpass filtered components • uses binary scales • Unlike DWT, • avoids aliasing • shift-invariant • rotation-invariant http://citeseer.ist.psu.edu/castleman98simplified.html
Efros-Leung texture synthesis http://graphics.cs.cmu.edu/people/efros/research/EfrosLeung.html