Announcements. Filtering. Image Filtering. Linear Filters. Example: Smoothing by Averaging. Homework 2 is due Apr 26, 11:59 PM Reading:

Similar documents
Fourier Transform. Additive noise. Fourier Tansform. I = S + N. Noise doesn t depend on signal. We ll consider:

Computer Vision Lecture 3

Lecture 3: Linear Filters

Lecture 04 Image Filtering

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

Lecture 3: Linear Filters

CITS 4402 Computer Vision

TRACKING and DETECTION in COMPUTER VISION Filtering and edge detection

Introduction to Computer Vision

Local Enhancement. Local enhancement

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Lecture 6: Edge Detection. CAP 5415: Computer Vision Fall 2008

Reading. 3. Image processing. Pixel movement. Image processing Y R I G Q

ITK Filters. Thresholding Edge Detection Gradients Second Order Derivatives Neighborhood Filters Smoothing Filters Distance Map Image Transforms

Review Smoothing Spatial Filters Sharpening Spatial Filters. Spatial Filtering. Dr. Praveen Sankaran. Department of ECE NIT Calicut.

Digital Image Processing. Chapter 4: Image Enhancement in the Frequency Domain

Empirical Mean and Variance!

Machine vision. Summary # 4. The mask for Laplacian is given

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform

Edge Detection. Computer Vision P. Schrater Spring 2003

Machine vision, spring 2018 Summary 4

CS4670: Computer Vision Kavita Bala. Lecture 7: Harris Corner Detec=on

Filtering and Edge Detection

Computational Photography

Why does a lower resolution image still make sense to us? What do we lose? Image:

Lecture 7: Edge Detection

Computer Vision Lecture 3

Digital Image Processing

Templates, Image Pyramids, and Filter Banks

Colorado School of Mines Image and Multidimensional Signal Processing

Fourier Transform and Frequency Domain

PSET 0 Due Today by 11:59pm Any issues with submissions, post on Piazza. Fall 2018: T-R: Lopata 101. Median Filter / Order Statistics

COMP344 Digital Image Processing Fall 2007 Final Examination

Edge Detection PSY 5018H: Math Models Hum Behavior, Prof. Paul Schrater, Spring 2005

Vectors [and more on masks] Vector space theory applies directly to several image processing/ representation problems

Convolution Spatial Aliasing Frequency domain filtering fundamentals Applications Image smoothing Image sharpening

3. Lecture. Fourier Transformation Sampling

CSE 473/573 Computer Vision and Image Processing (CVIP)

Lecture 8: Interest Point Detection. Saad J Bedros

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016

Image enhancement. Why image enhancement? Why image enhancement? Why image enhancement? Example of artifacts caused by image encoding

Spatial Enhancement Region operations: k'(x,y) = F( k(x-m, y-n), k(x,y), k(x+m,y+n) ]

CS 3710: Visual Recognition Describing Images with Features. Adriana Kovashka Department of Computer Science January 8, 2015

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

NON-LINEAR DIFFUSION FILTERING

is Use at most six elementary row operations. (Partial

Review of Linear System Theory

Chapter 4 Image Enhancement in the Frequency Domain

Lecture Notes 5: Multiresolution Analysis

Chapter 16. Local Operations

Computer Vision & Digital Image Processing

Recap of Monday. Linear filtering. Be aware of details for filter size, extrapolation, cropping

Digital Image Processing

Image as a signal. Luc Brun. January 25, 2018

Fourier Transform and Frequency Domain

Linear Operators and Fourier Transform

Fourier Matching. CS 510 Lecture #7 February 8 th, 2013

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

Lecture 8: Interest Point Detection. Saad J Bedros

Laplacian Filters. Sobel Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters

MIT 2.71/2.710 Optics 10/31/05 wk9-a-1. The spatial frequency domain

Taking derivative by convolution

FILTERING IN THE FREQUENCY DOMAIN

9. Image filtering in the spatial and frequency domains

Edge Detection in Computer Vision Systems

Image Processing 1 (IP1) Bildverarbeitung 1

OSE801 Engineering System Identification. Lecture 09: Computing Impulse and Frequency Response Functions

Gaussian derivatives

Fourier transforms and convolution

Roadmap. Introduction to image analysis (computer vision) Theory of edge detection. Applications

FFTs in Graphics and Vision. Groups and Representations

Edge Detection. CS 650: Computer Vision

Over-enhancement Reduction in Local Histogram Equalization using its Degrees of Freedom. Alireza Avanaki

Digital Image Processing COSC 6380/4393

Extract useful building blocks: blobs. the same image like for the corners

ECG782: Multidimensional Digital Signal Processing

Feature extraction: Corners and blobs

CSE 160 Lecture 13. Numerical Linear Algebra

Lecture Outline. Basics of Spatial Filtering Smoothing Spatial Filters. Sharpening Spatial Filters

Computer Vision. Filtering in the Frequency Domain

Digital Image Processing. Lecture 6 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Correlation, discrete Fourier transforms and the power spectral density

Convolution and Linear Systems

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018

FFTs in Graphics and Vision. Homogenous Polynomials and Irreducible Representations

Visual features: From Fourier to Gabor

Vlad Estivill-Castro (2016) Robots for People --- A project for intelligent integrated systems

Signal Processing COS 323

Theory of signals and images I. Dr. Victor Castaneda

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Math 416, Spring 2010 Matrix multiplication; subspaces February 2, 2010 MATRIX MULTIPLICATION; SUBSPACES. 1. Announcements

Nonlinear Diffusion. 1 Introduction: Motivation for non-standard diffusion

NONLINEAR DIFFUSION PDES

Advanced Features. Advanced Features: Topics. Jana Kosecka. Slides from: S. Thurn, D. Lowe, Forsyth and Ponce. Advanced features and feature matching

Introduction to Linear Image Processing

Key Intuition: invertibility

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Transcription:

Announcements Filtering Homework 2 is due Apr 26, :59 PM eading: Chapter 4: Linear Filters CSE 52 Lecture 6 mage Filtering nput Output Filter (From Bill Freeman) Example: Smoothing by Averaging Linear Filters General process: Form new image whose pixels are a weighted sum of original pixel values, using the same set of weights at each point. Properties Output is a linear function of the input Output is a shift-invariant function of the input (i.e. shift the input image two pixels to the left, the output is shifted two pixels to the left) Example: smoothing by averaging form the average of pixels in a neighborhood Example: smoothing with a Gaussian form a weighted average of pixels in a neighborhood Example: finding a derivative form a difference of pixels in a neighborhood

Convolution * 2 - -2 - Kernel (K) (Freeman) mage () Note: Typically Kernel is relatively small in vision applications. Convolution: = K* Convolution: = K* is m+ by m+ ( h k ( i j is m+ by m+ ( h k ( i j Convolution: = K* Convolution: = K* is m+ by m+ ( h k ( i j is m+ by m+ ( h k ( i j 2

Convolution: = K* Convolution: = K* is m+ by m+ ( h k ( i j is m+ by m+ ( h k ( i j Convolution: = K* Convolution: = K* is m+ by m+ ( h k ( i j is m+ by m+ ( h k ( i j Convolution: = K* Convolution: = K* is m+ by m+ ( h k ( i j is m+ by m+ ( h k ( i j 3

Convolution: = K* is m+ by m+ ( h k ( i j (Bill Freeman) (Bill Freeman) (Bill Freeman) Shifted one Pixel to the left (Bill Freeman) (Bill Freeman) 4

(Bill Freeman) Practice with linear filters Practice with linear filters 2 -? 2 - Original Original Sharpening filter - Accentuates differences with local average Source: D. Lowe Source: D. Lowe 5

Filters are templates Applying a filter at some point can be seen as taking a dotproduct between the image and some vector Filtering the image is a set of dot products nsight filters look like the effects they are intended to find filters find effects they look like Properties of Continuous Convolution (Holds for discrete too) Let f,g,h be images and * denote convolution f * g( x, y) f ( x u, y v) g( u, v) dudv Commutative: f*g=g*f Associative: f*(g*h)=(f*g)*h Linear: for scalars a & b and images f,g,h (af+bg)*h=a(f*h)+b(g*h) Differentiation rule f g ( f * g) * g f * x x x Filtering to reduce noise Noise is what we re not interested in. We ll discuss simple, low-level noise today: Light fluctuations; Sensor noise; Quantization effects; Finite precision Not complex: shadows; extraneous objects. A pixel s neighborhood contains information about its intensity. Averaging noise reduces its effect. Additive noise = S + N. Noise doesn t depend on signal. We ll consider: s n with E( n ) i s deterministic. i n i i i a random variable. i Gaussian Noise: sigma= Gaussian Noise: sigma=6 Mask with positive entries, that sum. eplaces each pixel with an average of its neighborhood. f all weights are equal, it is called a Box filter. Averaging Filter /9 F (Camps) 6

Smoothing by Averaging Kernel: An sotropic Gaussian The picture shows a smoothing kernel proportional to e x 2 y 2 2 2 (which is a reasonable model of a circularly symmetric fuzzy blob) Smoothing with a Gaussian Kernel: Box filter Smoothing Gaussian filter Gaussian Smoothing The effects of smoothing Each row shows smoothing with gaussians of different width; each column shows different realizations of an image of gaussian noise. original 2 2.8 4 7

Gaussian Smoothing Gaussian Smoothing by Charles Allen Gillbert by Harmon & Julesz http://www.michaelbach.de/ot/cog_blureffects/index.html http://www.michaelbach.de/ot/cog_blureffects/index.html Efficient mplementation Bot the Box filter and the Gaussian filter are separable: First convolve each row with a D filter Then convolve each column with a D filter. Other Types of Noise mpulsive noise randomly pick a pixel and randomly set to a value saturated version is called salt and pepper noise Quantization effects Often called noise although it is not statistical Unanticipated image structures Also often called noise although it is a real repeatable signal. Some other useful filtering techniques Median filters : principle Median filter Anisotropic diffusion Method :. rank-order neighborhood intensities 2. take middle value non-linear filter no new gray levels emerge... 8

Median filters: Example for window size of 3 Median filters : example filters have width 5 :,,,7,,,,?,,,,,,,? The advantage of this type of filter is that it eliminates spikes (salt & pepper noise). Median filters : analysis Median filter : images 3 x 3 median filter : median completely discards the spike, linear filter always responds to all aspects median filter preserves discontinuities, linear filter produces rounding-off effects Do not become all too optimistic sharpens edges, destroys edge cusps and protrusions Median filters : Gauss revisited Comparison with Gaussian : Example of median times 3 X 3 median e.g. upper lip smoother, eye better preserved patchy effect important details lost (e.g. earring) 9

Fourier Transform -D transform (signal processing) 2-D transform (image processing) Consider -D Time domain Frequency Domain eal Complex Consider time domain signal to be expressed as weighted sum of sinusoid. A sinusoid cos(ut+) is characterized by its phase and its frequency u The Fourier transform of the signal is a function giving the weights (and phase) as a function of frequency u. Fourier Transform D example Sawtooth wave Combination of harmonics Fourier Transform Discrete Fourier Transform (DFT) of [x,y] nverse DFT Fourier basis element i2 ux vy e Transform is sum of orthogonal basis functions Vector (u,v) Magnitude gives frequency Direction gives orientation. x,y: spatial domain u,v: frequence domain mplemented via the Fast Fourier Transform algorithm (FFT) Here u and v are larger than in the previous slide. And larger still...

Using Fourier epresentations Dominant Orientation Phase and Magnitude e iθ = cosθ + i sin θ Limitations: not useful for local segmentation Fourier transform of a real function is complex difficult to plot, visualize instead, we can think of the phase and magnitude of the transform Phase is the phase of the complex transform Magnitude is the magnitude of the complex transform Curious fact all natural images have about the same magnitude transform hence, phase seems to matter, but magnitude largely doesn t Demonstration Take two pictures, swap the phase transforms, compute the inverse - what does the result look like? This is the magnitude transform of the cheetah pic This is the phase transform of the cheetah pic

This is the magnitude transform of the zebra pic This is the phase transform of the zebra pic econstruction with zebra phase, cheetah magnitude econstruction with cheetah phase, zebra magnitude The Fourier Transform and Convolution f H and G are images, and F(.) represents Fourier transform, then F(H*G) = F(H)F(G) Thus, one way of thinking about the properties of a convolution is by thinking of how it modifies the frequencies of the image to which it is applied. n particular, if we look at the power spectrum, then we see that convolving image H by G attenuates frequencies where G has low power, and amplifies those which have high power. This is referred to as the Convolution Theorem Various Fourier Transform Pairs mportant facts scale function down scale transform up i.e. high frequency = small details The Fourier transform of a Gaussian is a Gaussian. compare to box function transform 2

Next Lecture Early vision Edges and corners eading: Chapter 5: Local mage Features 3