02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.

Slides:



Advertisements
Similar presentations
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Advertisements

Spatial Filtering (Chapter 3)
Chap 4 Image Enhancement in the Frequency Domain.
Image Processing Frequency Filtering Instructor: Juyong Zhang
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Digital image processing Chapter 6. Image enhancement IMAGE ENHANCEMENT Introduction Image enhancement algorithms & techniques Point-wise operations Contrast.
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
CHAPTER 4 Image Enhancement in Frequency Domain
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Preprocessing ROI Image Geometry
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Image Enhancement.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Computational Photography: Fourier Transform Jinxiang Chai.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
Presentation Image Filters
Image Restoration and Reconstruction (Noise Removal)
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Chapter 5 Neighborhood Processing
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering Prof. Charlene Tsai.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
DCT.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
Chapter 5: Neighborhood Processing
Image Subtraction Mask mode radiography h(x,y) is the mask.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
1 CMPB 345: IMAGE PROCESSING DISCRETE TRANSFORM 2.
Wilf LaLonde ©2012 Comp Filters. Wilf LaLonde ©2012 Comp 4501 A filter is a matrix of weights centered on a specific pixel in an image and.
Fourier Transform.
(c) 2002 University of Wisconsin, CS 559
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
Lecture 5: Fourier and Pyramids
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
9/28/04© University of Wisconsin, CS559 Fall 2004 Last Time Filtering –Box –Bartlett –Gaussian –Edge Detect (High-Pass) –Edge Enhance –How to apply filters.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Dithering (Digital Halftoning)
ECE 692 – Advanced Topics in Computer Vision
(C) 2002 University of Wisconsin, CS 559
CS-565 Computer Vision Nazar Khan Lecture 4.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
- photometric aspects of image formation gray level images
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
ENG4BF3 Medical Image Processing
Outline Linear Shift-invariant system Linear filters
CSCE 643 Computer Vision: Image Sampling and Filtering
CSCE 643 Computer Vision: Thinking in Frequency
Spatial operations and transformations
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Filtering Images Work in the spatial domain
Spatial operations and transformations
Presentation transcript:

02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters 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

02/12/02 (c) 2002 University of Wisconsin, CS 559 Qualitative Filters  Function: FFilter: G =   = = Result: H Low-pass High-pass Band-pass

02/12/02 (c) 2002 University of Wisconsin, CS 559 Low-Pass Filtered Image

02/12/02 (c) 2002 University of Wisconsin, CS 559 High-Pass Filtered Image

02/12/02 (c) 2002 University of Wisconsin, CS 559 Filtering 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

02/12/02 (c) 2002 University of Wisconsin, CS 559 Filtering 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

02/12/02 (c) 2002 University of Wisconsin, CS 559 Box Filter Box filters smooth by averaging neighbors In frequency domain, keeps low frequencies and attenuates (reduces) high frequencies, so clearly a low-pass filter Spatial: BoxFrequency: sinc

02/12/02 (c) 2002 University of Wisconsin, CS 559 Box Filter

02/12/02 (c) 2002 University of Wisconsin, CS 559 Filtering Algorithm If I input is the input image, and I output 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

02/12/02 (c) 2002 University of Wisconsin, CS 559 Bartlett Filter Triangle shaped filter in spatial domain In frequency domain, product of two box filters, so attenuates high frequencies more than a box Spatial: Triangle (Box  Box) Frequency: sinc 2

02/12/02 (c) 2002 University of Wisconsin, CS 559 Constructing 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 different

02/12/02 (c) 2002 University of Wisconsin, CS 559 Constructing Masks: 2D Multiply 2 1D masks together using outer product M is 2D mask, m is 1D mask

02/12/02 (c) 2002 University of Wisconsin, CS 559 Bartlett Filter

02/12/02 (c) 2002 University of Wisconsin, CS 559 Guassian Filter Attenuates high frequencies even further In 2d, rotationally symmetric, so fewer artifacts

02/12/02 (c) 2002 University of Wisconsin, CS 559 Gaussian Filter

02/12/02 (c) 2002 University of Wisconsin, CS 559 Constructing Gaussian Mask Use the binomial coefficients –Central Limit Theorem (probability) says that with more samples, binomial converges to Gaussian

02/12/02 (c) 2002 University of Wisconsin, CS 559 High-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

02/12/02 (c) 2002 University of Wisconsin, CS 559 High-Pass Filter

02/12/02 (c) 2002 University of Wisconsin, CS 559 Edge 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-pass High-pass

02/12/02 (c) 2002 University of Wisconsin, CS 559 Edge-Enhance Filter

02/12/02 (c) 2002 University of Wisconsin, CS 559 Edge Enhancement

02/12/02 (c) 2002 University of Wisconsin, CS 559 Fixing 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 559 Image 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

02/12/02 (c) 2002 University of Wisconsin, CS 559 Reducing 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 pixel

02/12/02 (c) 2002 University of Wisconsin, CS 559 2D Reduction Example (Bartlett)

02/12/02 (c) 2002 University of Wisconsin, CS 559 Ideal 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 domain