DOC PREVIEW
UW-Madison CS 559 - Filters

This preview shows page 1-2-3-24-25-26 out of 26 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

FiltersQualitative FiltersLow-Pass Filtered ImageHigh-Pass Filtered ImageFiltering in the Spatial DomainFiltering ImagesBox FilterSlide 8Filtering AlgorithmBartlett FilterConstructing Masks: 1DConstructing Masks: 2DSlide 13Guassian FilterGaussian FilterConstructing Gaussian MaskHigh-Pass FiltersHigh-Pass FilterEdge EnhancementEdge-Enhance FilterSlide 21Fixing Negative ValuesImage WarpingReducing Image Size2D Reduction Example (Bartlett)Ideal Image Size Reduction02/12/02(c) 2002 University of Wisconsin, CS 559Filters•A filter is something that attenuates or enhances particular frequencies•Easiest to visualize in the frequency domain, where filtering is defined as multiplication:•Here, F is the spectrum of the function, G is the spectrum of the filter, and H is the filtered function. Multiplication is point-wise)()()(GFH 02/12/02(c) 2002 University of Wisconsin, CS 559Qualitative FiltersFunction: F Filter: G===Result: HLow-passHigh-passBand-pass02/12/02(c) 2002 University of Wisconsin, CS 559Low-Pass Filtered Image02/12/02(c) 2002 University of Wisconsin, CS 559High-Pass Filtered Image02/12/02(c) 2002 University of Wisconsin, CS 559Filtering in the Spatial Domain•Filtering the spatial domain is achieved by convolution•Qualitatively: Slide the filter to each position, x, then sum up the function multiplied by the filter at that position duuxgufgfxh )()()(02/12/02(c) 2002 University of Wisconsin, CS 559Filtering Images•Work in the discrete spatial domain•Convert the filter into a matrix, the filter mask•Move the matrix over each point in the image, multiply the entries by the pixels below, then sum–eg 3x3 box filter–averages1111111119102/12/02(c) 2002 University of Wisconsin, CS 559Box Filter•Box filters smooth by averaging neighbors•In frequency domain, keeps low frequencies and attenuates (reduces) high frequencies, so clearly a low-pass filter 11111111191Spatial: Box Frequency: sinc02/12/02(c) 2002 University of Wisconsin, CS 559Box Filter02/12/02(c) 2002 University of Wisconsin, CS 559Filtering Algorithm•If Iinput is the input image, and Ioutput is the output image, M is the filter mask and k is the mask size:•Care must taken at the boundary–Make the output image smaller–Extend the input image in some way  2/2/2/2/]2/][2/[]][[]][[kkikkjinputoutputkjkiMjyixIyxI02/12/02(c) 2002 University of Wisconsin, CS 559Bartlett Filter•Triangle shaped filter in spatial domain•In frequency domain, product of two box filters, so attenuates high frequencies more than a box 1232124642369632464212321811Spatial: Triangle (BoxBox) Frequency: sinc202/12/02(c) 2002 University of Wisconsin, CS 559Constructing Masks: 1D•Sample the filter function at matrix “pixels”•eg 2D Bartlett•Can go to edge of pixel or middle of next: results are slightly different0 1 21 3 1151 2 11402/12/02(c) 2002 University of Wisconsin, CS 559Constructing Masks: 2D•Multiply 2 1D masks together using outer product•M is 2D mask, m is 1D mask][][]][[ jmimjiM 0.2 0.6 0.20.20.60.20.04 0.12 0.040.120.360.120.04 0.12 0.0402/12/02(c) 2002 University of Wisconsin, CS 559Bartlett Filter02/12/02(c) 2002 University of Wisconsin, CS 559Guassian Filter•Attenuates high frequencies even further•In 2d, rotationally symmetric, so fewer artifacts2221xe1464141624164624362464162416414641256102/12/02(c) 2002 University of Wisconsin, CS 559Gaussian Filter02/12/02(c) 2002 University of Wisconsin, CS 559Constructing Gaussian Mask•Use the binomial coefficients–Central Limit Theorem (probability) says that with more samples, binomial converges to Gaussian1 2 1141 4 61614 11 6 1564120 15 6 102/12/02(c) 2002 University of Wisconsin, CS 559High-Pass Filters•A high-pass filter can be obtained from a low-pass filter–If we subtract the smoothed image from the original, we must be subtracting out the low frequencies–What remains must contain only the high frequencies•High-pass masks come from matrix subtraction:•eg: 3x3 Bartlett121212212116112124212116100001000002/12/02(c) 2002 University of Wisconsin, CS 559High-Pass Filter02/12/02(c) 2002 University of Wisconsin, CS 559Edge Enhancement•High-pass filters give high values at edges, low values in constant regions•Adding high frequencies back into the image enhances edges•One approach:–Image = Image + [Image – smooth(Image)]Low-passHigh-pass02/12/02(c) 2002 University of Wisconsin, CS 559Edge-Enhance Filter02/12/02(c) 2002 University of Wisconsin, CS 559Edge Enhancement02/12/02(c) 2002 University of Wisconsin, CS 559Fixing Negative Values•The negative values in high-pass filters can lead to negative image values–Most image formats don’t support this•Solutions:–Truncate: Chop off values below min or above max–Offset: Add a constant to move the min value to 0–Re-scale: Rescale the image values to fill the range (0,max)02/12/02(c) 2002 University of Wisconsin, CS 559Image Warping•An image warp is a mapping from the points in one image to points in another•f tells us where in the new image to put the data from x in the old image–Simple example: Translating warp, f(x) = x+o, shifts an image)]([][ xx fIIinout02/12/02(c) 2002 University of Wisconsin, CS 559Reducing Image Size•Warp function: f(x)=kx, k > 1•Problem: More than one input pixel maps to each output pixel•Solution: Filter down to smaller size–Apply the filter, but not at every pixel, only at desired output locations–eg: To get half image size, only apply filter at every second pixel02/12/02(c) 2002 University of Wisconsin, CS 5592D Reduction Example (Bartlett)02/12/02(c) 2002 University of Wisconsin, CS 559Ideal Image Size Reduction•Reconstruct original function using reconstruction filter•Resample at new resolution (lower frequency)–Clearly demonstrates that shrinking removes detail•Expensive, and not possible to do perfectly in the spatial


View Full Document

UW-Madison CS 559 - Filters

Documents in this Course
Filters

Filters

14 pages

Lecture 2

Lecture 2

24 pages

Clipping

Clipping

22 pages

Modeling

Modeling

33 pages

Dithering

Dithering

33 pages

Lecture 4

Lecture 4

20 pages

Load more
Download Filters
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Filters and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Filters 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?