This preview shows page 1-2-3-4-5-6-7-49-50-51-52-53-54-55-98-99-100-101-102-103-104 out of 104 pages.
Image Sampling, Compositing, and MorphingJason LawrenceCS445: GraphicsFeature Based Image Metamorphosis, Beier and Neely 1992Acknowledgement: slides by Misha Kazhdan, Allison Klein, Tom Funkhouser,Adam Finkelstein and David DobkinOutline• Image Sampling• Image Compositing• Image MorphingImage Sampling• How do we reconstruct a function from a collection of samples?• To answer this question, we need to understand what kind of information the samples contain.• Signal processing helps us understand this better.?Samples ReconstructionOriginal FunctionSampling Theorem• A signal can be reconstructed from its samples, if the original signal has no frequencies above 1/2 the sampling frequency – Shannon’s Theorem• The minimum sampling rate for band-limited function is called the “Nyquist rate”A signal is band-limited if its highestnon-zero frequency is bounded.The frequency is called the bandwidth.Question• What if we have only n samples and we try to reconstruct a function with frequencies larger than the Nyquist frequency (n/2)?Aliasing• When a high-frequency signal is sampled with insufficiently many samples, it will be perceived as a lower-frequency signal. This masking of higher frequencies as lower ones is referred to as aliasing.π-πAliasing• When a high-frequency signal is sampled with insufficiently many samples, it will be perceived as a lower-frequency signal. This masking of higher frequencies as lower ones is referred to as aliasing.π-πAliasing• When a high-frequency signal is sampled with insufficiently many samples, it will be perceived as a lower-frequency signal. This masking of higher frequencies as lower ones is referred to as aliasing.π-πAliasing• When a high-frequency signal is sampled with insufficiently many samples, it will be perceived as a lower-frequency signal. This masking of higher frequencies as lower ones is referred to as aliasing.π-πTemporal Aliasing• Artifacts due to limited temporal resolutionAnti-AliasingTwo possible ways to address aliasing:• Sample at higher rate• Pre-filter to form band-limited signalAnti-AliasingTwo possible ways to address aliasing:• Sample at higher rateoNot always possibleoStill rendering to fixed resolution• Pre-filter to form band-limited signalAnti-AliasingTwo possible ways to address aliasing:• Sample at higher rate• Pre-filter to form a band-limited signaloYou still don’t get your high frequencies, but at least the low frequencies are uncorrupted.Fourier Analysis• If we just look at how much information each frequency contributes, we obtain the power spectrum of the signal:Initial Function…+++ ++ + + +=Fourier Analysis• If we just look at how much information each frequency contributes, we obtain the power spectrum of the signal:Initial Function…+++ ++ + + +=Power SpectrumPre-Filtering• Band-limit by discarding the high-frequency components of the Frequency decomposition.Initial Power SpectrumBand-Limited Power SpectrumPre-Filtering• Band-limit by discarding the high-frequency components of the Fourier decomposition.• We can do this by multiplying the frequency components by a 0/1 function:1X =Initial Power SpectrumBand-Limited SpectrumFrequency FilterPre-Filtering• Band-limit by discarding the high-frequency components of the Fourier decomposition.• We can do this by multiplying the frequency components by a 0/1 function:1X =Initial Power SpectrumBand-Limited SpectrumFrequency FilterFourier Theory• A fundamental fact from Fourier theory is that multiplication in the frequency domain is equivalent to convolution in the spatial domain.Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)1Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)(f∗g)(θ)11 0Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ).6(f∗g)(θ).4.6 .4 0Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)(f∗g)(θ)g(θ).6.4.4 .6 0Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)(f∗g)(θ)11 00Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ).6(f∗g)(θ).4.6 .40Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)(f∗g)(θ)g(θ).6.4.4 .60Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)(f∗g)(θ)110 0Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)0.5(f∗g)(θ).5 .50Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)(f∗g)(θ)110 0Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.f(θ)g(θ)(f∗g)(θ)110Convolution• To convolve two functions f and g, we resample the function f using the weights given by g.• Nearest point, bilinear, and Gaussian interpolation are just convolutions with different filters.***===Convolution• Recall that convolution in the spatial domain is the equal to multiplication in the frequency domain.• In order to avoid aliasing, we need to convolve with a filter whose power spectrum has value:o1 at low frequencieso0 at high frequencies 1X =Initial Power SpectrumBand-Limited SpectrumFrequency FilterNearest Point Convolution*=Filter SpectrumDiscrete Samples Reconstruction Filter Reconstructed Function(Bi)Linear Convolution*=Discrete Samples Reconstruction Filter Reconstructed FunctionFilter SpectrumGaussian Convolution*=Discrete Samples Reconstruction Filter Reconstructed FunctionFilter SpectrumConvolution• The ideal filter for avoiding aliasing has a power spectrum with values:o1 at low frequencieso0 at high frequencies • The sinc function has such a power spectrum and is referred to as the ideal reconstruction filter:The Sinc Filter• The ideal filter for avoiding aliasing has a power spectrum with values:o1 at low frequencieso0 at high frequencies • The sinc function has such a power spectrum and is referred to as the ideal reconstruction filter:Reconstruction Filter Filter SpectrumThe Sinc Filter• Limitations:oHas negative values, giving rise to
View Full Document