Pyramids and Texture Scaled representations l Big bars
Pyramids and Texture
Scaled representations l Big bars and little bars are both interesting l l Inefficient to detect big bars with big filters l l Spots and hands vs. stripes and hairs And there is superfluous detail in the filter kernel Alternative: l l l Apply filters of fixed size to images of different sizes Typically, a collection of images whose edge length changes by a factor of 2 (or root 2) This is a pyramid (or Gaussian pyramid) by visual analogy
A bar in the big images is a hair on the zebra’s nose; in smaller images, a stripe; in the smallest, the animal’s nose
Aliasing l l Can’t shrink an image by taking every second pixel If we do, characteristic errors appear l l l In the next few slides Typically, small phenomena look bigger; fast phenomena can look slower Common phenomenon l l l Wagon wheels rolling the wrong way in movies Checkerboards misrepresented in ray tracing Striped shirts look funny on color television
Constructing a pyramid by taking every second pixel leads to layers that badly misrepresent the top layer
Open questions l l What causes the tendency of differentiation to emphasize noise? In what precise respects are discrete images different from continuous images? How do we avoid aliasing? General thread: a language for fast changes The Fourier Transform
The Fourier Transform l Represent function on a new basis l l Think of functions as vectors, with many components We now apply a linear transformation to transform the basis l dot product with each basis element In the expression, u and v select the basis element, so a function of x and y becomes a function of u and v basis elements have the form transformed image vectorized image Fourier transform base, also possible Wavelets, steerable pyramids, etc.
Fourier basis element example, real part Fu, v(x, y)=const. for (ux+vy)=const. Vector (u, v) • Magnitude gives frequency • Direction gives orientation.
Here u and v are larger than in the previous slide.
And larger still. . .
Phase and Magnitude l Fourier transform of a real function is complex l l l Phase is the phase of the complex transform Magnitude is the magnitude of the complex transform Curious fact l l l difficult to plot, visualize instead, we can think of the phase and magnitude of the transform all natural images have about the same magnitude transform hence, phase seems to matter, but magnitude largely doesn’t Demonstration l Take two pictures, swap the phase transforms, compute the inverse - what does the result look like?
This is the magnitude transform of the cheetah pic
This is the phase transform of the cheetah pic
This is the magnitude transform of the zebra pic
This is the phase transform of the zebra pic
Reconstruction with zebra phase, cheetah magnitude
Reconstruction with cheetah phase, zebra magnitude
Smoothing as low-pass filtering l l The message of the FT is that high frequencies lead to trouble with sampling. Solution: suppress high frequencies before sampling l l multiply the FT of the signal with something that suppresses high frequencies or convolve with a low-pass filter A filter whose FT is a box is bad, because the filter kernel has infinite support Common solution: use a Gaussian l multiplying FT by Gaussian is equivalent to convolving image with Gaussian.
Sampling without smoothing. Top row shows the images, sampled at every second pixel to get the next; bottom row shows the magnitude spectrum of these images.
Sampling with smoothing. Top row shows the images. We get the next image by smoothing the image with a Gaussian with sigma 1 pixel, then sampling at every second pixel to get the next; bottom row shows the magnitude spectrum of these images.
Sampling with smoothing. Top row shows the images. We get the next image by smoothing the image with a Gaussian with sigma 1. 4 pixels, then sampling at every second pixel to get the next; bottom row shows the magnitude spectrum of these images.
Applications of scaled representations l Search for correspondence l l Edge tracking l l look at coarse scales, then refine with finer scales a “good” edge at a fine scale has parents at a coarser scale Control of detail and computational cost in matching l l e. g. finding stripes terribly important in texture representation
Example: CMU face detection
The Gaussian pyramid l Smooth with gaussians, because l l Synthesis l l smooth and sample Analysis l l a gaussian*gaussian=another gaussian take the top image Gaussians are low pass filters, so representation is redundant
http: //web. mit. edu/persci/people/adelson/pub_pdfs/pyramid 83. pdf
Texture l Key issue: representing texture l Texture based matching l l Texture segmentation l l key issue: representing texture Texture synthesis l l little is known useful; also gives some insight into quality of representation Shape from texture l will skip discussion
Texture synthesis Given example, generate texture sample (that is large enough, satisfies constraints, …)
Texture analysis Compare; is the same “stuff”?
pre-attentive texture discrimination
pre-attentive texture discrimination
pre-attentive texture discrimination l same or not?
pre-attentive texture discrimination
pre-attentive texture discrimination l same or not?
Representing textures l l l Textures are made up of quite stylized subelements, repeated in meaningful ways Representation: l find the subelements, and represent their statistics But what are the subelements, and how do we find them? l recall normalized correlation l find subelements by applying filters, looking at the magnitude of the response What filters? l experience suggests spots and oriented bars at a variety of different scales l details probably don’t matter What statistics? l within reason, the more the merrier. l At least, mean and standard deviation l better, various conditional histograms.
Spots and bars at a fine scale
Spots and bars at a coarser scale
Fine scale How many filters and what orientations? Coarse scale
Texture Similarity based on Response Statistics l Collect statistics of responses over an image or subimage l l l Mean of squared response Mean and variance of squared response Euclidean distance between vectors of response statistics for two images is measure of texture similarity
Example 1: Squared response
Example 2: Mean and variance of squared response l Compute the mean and standard deviation of the filter outputs over the window, and use these for the feature vector. (Ma and Manjunath, 1996) Decreasing response vector similarity
The Choice of Scale l One approach: start with a small window and increase the size of the window until an increase does not cause a significant change.
Laplacian Pyramids as Band-Pass Filters courtesy of Wolfram from Forsyth & Ponce Each level is the difference of a more smoothed and less smoothed image ! It contains the band of frequencies in between
Oriented Pyramids l Laplacian pyramid + direction sensitivity from Forsyth & Ponce v
Oriented Pyramids Reprinted from “Shiftable Multi. Scale Transforms, ” by Simoncelli et al. , IEEE Transactions on Information Theory, 1992.
Gabor Filters l “Localized Fourier transforms”: Make each kernel from product of Fourier basis image and Gaussian Frequency Odd Even Larger scale Smaller scale from Forsyth & Ponce
Gabor Filters (cont’d) l Symmetric kernel (even): l Anti-symmetric kernel (odd):
Application: Texture synthesis l l l Use image as a source of probability model Choose pixel values by matching neighborhood, then filling in Matching process l l look at pixel differences count only synthesized pixels
Histograms: principle Intensity probability distribution Captures global brightness information in a compact, but incomplete way Doesn’t capture spatial relationships
Image-based approaches l l No difficult analysis Let’s ‘Cut & Paste’
- Slides: 56