(c) 2002 University of Wisconsin, CS 559

Slides:



Advertisements
Similar presentations
Spatial Filtering (Chapter 3)
Advertisements

Multiscale Analysis of Images Gilad Lerman Math 5467 (stealing slides from Gonzalez & Woods, and Efros)
Image Processing Frequency Filtering Instructor: Juyong Zhang
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
CS 691 Computational Photography
Digital image processing Chapter 6. Image enhancement IMAGE ENHANCEMENT Introduction Image enhancement algorithms & techniques Point-wise operations Contrast.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Sampling, Aliasing, & Mipmaps
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.
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.
Image Enhancement.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Computational Photography: Fourier Transform Jinxiang Chai.
Image Sampling Moire patterns -
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.
02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Spatial Filtering: Basics
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.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
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.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
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.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
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.
Chapter 5: Neighborhood Processing 5.1 Introduction
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.
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.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
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.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Dithering (Digital Halftoning)
Image Pre-Processing in the Spatial and Frequent Domain
ECE 692 – Advanced Topics in Computer Vision
(C) 2002 University of Wisconsin, CS 559
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.
Fourier Transform.
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
CSCE 643 Computer Vision: Image Sampling and Filtering
CSCE 643 Computer Vision: Thinking in Frequency
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Filtering Images Work in the spatial domain
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

(c) 2002 University of Wisconsin, CS 559 Last Time Signal Processing Filtering basics Homework 2 Project 1 09/24/02 (c) 2002 University of Wisconsin, CS 559

(c) 2002 University of Wisconsin, CS 559 Today More Filters Sampling and Reconstruct Image warping 09/24/02 (c) 2002 University of Wisconsin, CS 559

(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: Box Frequency: sinc 09/24/02 (c) 2002 University of Wisconsin, CS 559

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

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

(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: sinc2 09/24/02 (c) 2002 University of Wisconsin, CS 559

(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 1 1 3 1 5 1 2 1 1 2 1 4 09/24/02 (c) 2002 University of Wisconsin, CS 559

(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 0.2 0.6 0.2 0.2 0.04 0.12 0.04 0.6 0.12 0.36 0.12 0.2 0.04 0.12 0.04 09/24/02 (c) 2002 University of Wisconsin, CS 559

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

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

(c) 2002 University of Wisconsin, CS 559 Gaussian Filter 09/24/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 1 1 2 1 4 1 1 4 6 4 1 16 1 1 6 15 20 15 6 1 64 09/24/02 (c) 2002 University of Wisconsin, CS 559

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

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

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

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

(c) 2002 University of Wisconsin, CS 559 Edge Enhancement 09/24/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) 09/24/02 (c) 2002 University of Wisconsin, CS 559

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

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

2D Reduction Example (Bartlett) 09/24/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… 09/24/02 (c) 2002 University of Wisconsin, CS 559

(c) 2002 University of Wisconsin, CS 559 Enlarging Images Warp function: f(x)=kx, k < 1 Problem: Have to create pixel data More pixels in output than in input Solution: Filter up to larger size Apply the filter at intermediate pixel locations eg: To get double image size, apply filter at every pixel and every half pixel New pixels are interpolated from old ones Filter encodes interpolation function 09/24/02 (c) 2002 University of Wisconsin, CS 559

(c) 2002 University of Wisconsin, CS 559 Enlargement 09/24/02 (c) 2002 University of Wisconsin, CS 559

(c) 2002 University of Wisconsin, CS 559 Ideal Enlargement Reconstruct original function Resample at higher frequency Original function was band-limited, so re-sampling does not add any extra frequency information 09/24/02 (c) 2002 University of Wisconsin, CS 559