420 likes | 660 Views
Image Processing. Xuejin Chen xjchen99@ustc.edu.cn. Ref: http://fourier.eng.hmc.edu/e161/lectures/gradient/node10.html. Linear Filter. Smoothing Box, Bilinear, Gaussian. Linear Filter. Smoothing Box, Bilinear, Gaussian Edge Sobel. Linear Filter.
E N D
Image Processing Xuejin Chen xjchen99@ustc.edu.cn Ref: http://fourier.eng.hmc.edu/e161/lectures/gradient/node10.html
Linear Filter • Smoothing • Box, Bilinear, Gaussian
Linear Filter • Smoothing • Box, Bilinear, Gaussian • Edge • Sobel
Linear Filter • Smoothing • Box, Bilinear, Gaussian • Edge • Sobel • Corner
Separable Filter • Convolution of K-size kernel requires K2 operations • Can be sped up to 2K operations by • First performing a 1D horizontal convolution • Followed by a 1D vertical convolution
Steerable Filters • Directional/Oriented filter • Sobel • Directional derivative A whole family of filters can be evaluated with very little cost by first convolving the image with (Gx, Gy)
Steerable Filters • Second-order filter For directional Gaussian derivatives, it is possible to steer any order of derivative with a relatively small number of basis functions.
Steerable Filters • Second-order filter Original image with oriented structures enhanced. Original image orientation map
Steerable Filters • Fourth-order steerable filter test image containing bars (lines) and step edges at different orientations oriented energy as a function of angle average oriented energy dominant orientation (Freeman and Adelson 1991)
Summed Area Table (Integral Image) • When an image needs to repeatedly convolved with different box filters (and especially filters of different sizes at different locations) • Precompute the summed area table (Crow1984)
Summed Area Table (Integral Image) • Compute the sum of any rectangle area easily Recursive filtering
Band-pass filters • Sobel, Corner • More sophisticated kernel: • Smooth image with a Gaussian filter • Take the first or second derivatives Laplacian Oriented Undirected
LoG • Discrete convolution kernel • Can be any size • Sum_elements = Zero
Difference of Gaussian (DoG) • Gaussian • DoG
LoG and DoG LoG DoG
Laplacian for Edge • Zero-crossing detection LoG DoG
Pyramids • Change resolution • Upsampling (Interpolation) • Downsmapling (Decimation)
Interpolation • Interpolation kernel h() with sampling rate r • Bilinear
Interpolation • Interpolation kernel h() with sampling rate r • Bicubic interpolation
Bicubic Interpolation • a specifies the derivative at x=1 • Usually a=-1, best matches the frequency characteristics of a sinc function • A small amount of sharpening • Ringing (does not linearly interpolate straight lines • Quadratic reproducing spline a=-0.5
Bicubic Interpolation Bilinear Cubic a=-1 Cubic a=-0.5 windowed sinc
Windowed sinc function • Best quality interpolator (Usually) • Both preserves details in the lower resolution image and avoids aliasing
Windowed sinc function • Best quality interpolator (Usually) • Both preserves details in the lower resolution image and avoids aliasing • Ringing effect • Instead, repeatedly interpolate images by a small fractional amount
Decimation (Downsampling) • Same kernel h(k,l) for both interpolation and decimation • Avoid aliasing • Convolve the image with a low-pass filter
Decimation (Downsampling) • Linear • Binomial • Separating the high and low frequencies, • but leaves a fair amount of high-frequency detail, which can lead to aliasing after downsampling
Decimation (Downsampling) • Linear • Binomial • Cubic • a=-1, • a=-0.5 • Windowed sinc • QMF-9 • Jpeg2000 Sample rate = 2
Decimation (Downsampling) • Cubic a=-1 • Sharpest but ringing • QMF-9 and Jpeg2000 • Wavelet analysis filters • Useful for compression • More aliasing
Multi-resolution Representations • Image pyramid • Accelerate coarse-to-fine search algorithms • Look for objects or patterns at different scales • Perform multi-resolution blending operations
Multi-resolution Representations • Laplacian pyramid [Burt and Adelson’s (1983a)] • Best known and most widely used in computer vision
Laplacian Pyramid • First: blur and subsample the original image with sample rate r=2 • Five-tap kernel Octave pyramid
Laplacian pyramid • First: blur and subsample the original image by sample rate = 2 Gaussian pyramid: Repeated convolutions of the binomial kernel converge to a Gaussian
Laplacian Pyramid • Actual computation of high-pass filter • Results in perfect reconstruction when Q=I Laplacian image Gaussian image