Filtering Images Work in the spatial domain

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

Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Morphing & Warping 2D Morphing Involves 2 steps 1.Image warping “get features to line up” 2.Cross-dissolve “mix colors” (fade-in/fadeout transition)
Multiscale Analysis of Images Gilad Lerman Math 5467 (stealing slides from Gonzalez & Woods, and Efros)
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
CS 691 Computational Photography
6/9/2015Digital Image Processing1. 2 Example Histogram.
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.
Image Sampling Moire patterns
Preprocessing ROI Image Geometry
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Image Enhancement.
Computational Photography: Fourier Transform Jinxiang Chai.
Image Sampling Moire patterns -
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
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.
CSCE 441: Computer Graphics Image Filtering Jinxiang Chai.
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Spatial Filtering: Basics
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.
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.
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.
(c) 2002 University of Wisconsin, CS 559
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Chapter 10 Digital Signal and Image Processing
Digital Image Processing Chapter - 4
Medical Image Analysis
Miguel Tavares Coimbra
Image Subtraction Mask mode radiography h(x,y) is the mask.
Dithering (Digital Halftoning)
Image enhancement algorithms & techniques Point-wise operations
Image Sampling Moire patterns
Digital Image Processing
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
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
Image Sampling Moire patterns
Multiscale Analysis of Images
Image Enhancement in the Spatial Domain
CSCE 643 Computer Vision: Image Sampling and Filtering
CSCE 643 Computer Vision: Thinking in Frequency
Digital Image Processing
Motion illusion, rotating snakes
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Digital Image Processing
Resampling.
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

Filtering Images Work in the spatial domain Convert the filter into a matrix, the filter mask eg 3x3 box filter performs averaging of a neighborhood:

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

Box Filter Box filters smooth by averaging neighbors In frequency domain, clearly a low-pass filter

Bartlett Filter Triangle shaped filter in spatial domain In frequency domain, product of two box filters, so attenuates high frequencies more than a box

Constructing Masks: 2D 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

Constructing Masks: 3D Multiply 2 2D masks together using outer product M is 3D mask, m is 2D 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

Guassian Filter Attenuates high frequencies even further In 2d, rotationally symmetric, so fewer artifacts

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

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

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)

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

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

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

2D Reduction Example (Bartlett)

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

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

Enlargement

Ideal Enlargement Reconstruct original function Resample at higher frequency Original function was band-limited, so resampling does not add any extra frequency information

Image Morphing Process to turn one image into another Define parameterized path from each point in the original image to its destination in the output image Animate points along paths, while interpolating colors from source to destination

2D Morphing Example Final resample

Morphing Issues User interface to specify pixel mapping and paths is important Different interpolation schemes are possible to get different effects Simple morphs, like cross dissolve, are key to video effects: Cross dissolve simply interpolates colors between the two images. Pixels move on straight paths