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

Similar documents
Lecture 04 Image Filtering

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

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

Edge Detection. CS 650: Computer Vision

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

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

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

Templates, Image Pyramids, and Filter Banks

TRACKING and DETECTION in COMPUTER VISION Filtering and edge detection

Introduction to Computer Vision

Computer Vision Lecture 3

Computer Vision & Digital Image Processing

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Lecture 7: Edge Detection

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

Machine vision, spring 2018 Summary 4

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

Local Enhancement. Local enhancement

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

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

Filtering and Edge Detection

Image Gradients and Gradient Filtering Computer Vision

Introduction to Computer Vision. 2D Linear Systems

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

Edge Detection in Computer Vision Systems

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

Image preprocessing in spatial domain

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

Histogram Processing

Edge Detection. Computer Vision P. Schrater Spring 2003

Edge Detection. Image Processing - Computer Vision

Basics on 2-D 2 D Random Signal

Empirical Mean and Variance!

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

Lecture 3: Linear Filters

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

Image Enhancement: Methods. Digital Image Processing. No Explicit definition. Spatial Domain: Frequency Domain:

Image Enhancement (Spatial Filtering 2)

Lecture 3: Linear Filters

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

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

Fourier Transforms 1D

Digital Image Processing COSC 6380/4393

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

Digital Image Processing ERRATA. Wilhelm Burger Mark J. Burge. An algorithmic introduction using Java. Second Edition. Springer

Colorado School of Mines Image and Multidimensional Signal Processing

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

COMP344 Digital Image Processing Fall 2007 Final Examination

Case Studies of Logical Computation on Stochastic Bit Streams

Outline. Convolution. Filtering

Prof. Mohd Zaid Abdullah Room No:

Advanced Edge Detection 1

FILTERING IN THE FREQUENCY DOMAIN

Erkut Erdem. Hacettepe University February 24 th, Linear Diffusion 1. 2 Appendix - The Calculus of Variations 5.

Medical Image Analysis

Digital Image Processing: Sharpening Filtering in Spatial Domain CSC Biomedical Imaging and Analysis Dr. Kazunori Okada

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

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

CITS 4402 Computer Vision

Medical Image Analysis

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

Chapter 16. Local Operations

CAP 5415 Computer Vision Fall 2011

Chapter 4: Filtering in the Frequency Domain. Fourier Analysis R. C. Gonzalez & R. E. Woods

CAP 5415 Computer Vision

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

Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER? Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER?

Taking derivative by convolution

Image Enhancement in the frequency domain. GZ Chapter 4

Computer Vision & Digital Image Processing. Periodicity of the Fourier transform

Lecture 8: Interest Point Detection. Saad J Bedros

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

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

Introduction to Image Processing #5/7

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

Gaussian derivatives

CS 534: Computer Vision Segmentation III Statistical Nonparametric Methods for Segmentation

Detectors part II Descriptors

ECE Digital Image Processing and Introduction to Computer Vision

3.8 Combining Spatial Enhancement Methods 137

Computational Photography

Recursive Gaussian filters

Locality function LOC(.) and loss function LOSS (.) and a priori knowledge on images inp

CS4495/6495 Introduction to Computer Vision. 2A-L6 Edge detection: 2D operators

Computer Vision Lecture 3

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

Theory of signals and images I. Dr. Victor Castaneda

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

Digital Image Processing COSC 6380/4393

The Frequency Domain, without tears. Many slides borrowed from Steve Seitz

Fourier transforms and convolution

FIR APPROXIMATION OF ND LOG FILTER IN FOURIER DOMAIN

SIFT: SCALE INVARIANT FEATURE TRANSFORM BY DAVID LOWE

EECS490: Digital Image Processing. Lecture #11

CSCI 250: Intro to Robotics. Spring Term 2017 Prof. Levy. Computer Vision: A Brief Survey

Using Entropy and 2-D Correlation Coefficient as Measuring Indices for Impulsive Noise Reduction Techniques

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

Linear Operators and Fourier Transform

Digital Image Processing

Detection of signal transitions by order statistics filtering

Transcription:

Reading Jain, Kasturi, Schunck, Machine Vision. McGraw-Hill, 1995. Sections 4.-4.4, 4.5(intro), 4.5.5, 4.5.6, 5.1-5.4. 3. Image processing 1 Image processing An image processing operation typically defines a new image g in terms of an existing image f. The simplest operations are those that transform each pixel in isolation. These pixel-to-pixel operations can be written: Pixel movement Some operations preserve intensities, but move pixels around in the image gxy (, ) f( xxy (, ), yxy (, )) Examples: many amusing warps of images g( x, y) t( f( x, y)) Examples: threshold, RGB grayscale Note: a typical choice for mapping to grayscale is to apply the YIQ television matrix and keep the Y. Y 0.99 0.587 0.114 R I 0.596 0.75 0.31 G Q 0.1 0.53 0.311 B [Show image sequence.] 3 4

Noise Ideal noise reduction Image processing is also useful for noise reduction and edge enhancement. We will focus on these applications for the remainder of the lecture Common types of noise: Salt and pepper noise: contains random occurrences of black and white pixels Impulse noise: contains random occurrences of white pixels Gaussian noise: variations in intensity drawn from a Gaussian normal distribution 5 6 Ideal noise reduction Practical noise reduction How can we smooth away noise in a single image? Is there a more abstract way to represent this sort of operation? Of course there is! 7 8

Discrete convolution Discrete convolution in D For a digital signal, we define discrete convolution as: where hi [ ] h[ i]. gi [] f[] i hi [] f['][ i h ii'] i ' i ' f['][' i h ii] Similarly, discrete convolution in D becomes: gi [, j] f[, i j] hi [, j] f[ i', j'] h[ ii', j j'] j' i' f[', i j'][' h ii, j' j] j' i' where hi [, j] h[ i, j]. 9 10 Convolution representation Mean filters Since f and h are defined over finite regions, we can write them out in two-dimensional arrays: How can we represent our noise-reducing averaging filter as a convolution diagram (know as a mean filter)? 6 79 3 119 10 105 4 0 10 10 9 6 1 78 34 0 10 58 197 46 46 0 0 48 176 135 5 188 191 68 0 49 1 1 9 6 37 0 77 0 89 144 147 187 10 6 08 55 5 0 166 13 6 0 31 166 63 17 17 1 0 99 30 X. X 0 X. X 0 X. X 0 X. X 0 X. Note: This is not matrix multiplication! Q: What happens at the edges? 11 1

Effect of mean filters Gaussian filters Gaussian filters weigh pixels based on their distance from the center of the convolution filter. In particular: h[i, j ] e (i j ) /(V ) C This does a decent job of blurring noise while preserving features of the image. What parameter controls the width of the Gaussian? What happens to the image as the Gaussian filter kernel gets wider? What is the constant C? What should we set it to? 13 Effect of Gaussian filters 14 Median filters A median filter operates over an mxm region by selecting the median intensity in the region. What advantage does a median filter have over a mean filter? Is a median filter a kind of convolution? 15 16

Effect of median filters Comparison: Gaussian noise 17 Comparison: salt and pepper noise 18 Edge detection One of the most important uses of image processing is edge detection: Really easy for humans Really difficult for computers Fundamental in computer vision Important in many graphics applications 19 0

What is an edge? Gradients The gradient is the D equivalent of the derivative: Properties of the gradient f f f( x, y), x y It s a vector Points in the direction of maximum increase of f Magnitude is rate of increase How can we approximate the gradient in a discrete image? Q: How might you detect an edge in 1D? 1 Less than ideal edges Steps in edge detection Edge detection algorithms typically proceed in three or four steps: Filtering: cut down on noise Enhancement: amplify the difference between edges and non-edges Detection: use a threshold operation Localization (optional): estimate geometry of edges beyond pixels 3 4

Edge enhancement Results of Sobel edge detection A popular gradient magnitude computation is the Sobel operator: 1 0 1 sx 0 1 0 1 s y 1 1 0 0 0 1 1 We can then compute the magnitude of the vector (s x, s y ). 5 6 Second derivative operators Localization with the Laplacian An equivalent measure of the second derivative in D is the Laplacian: f x f y f( x, y) Using the same arguments we used to compute the gradient filters, we can derive a Laplacian filter to be: The Sobel operator can produce thick edges. Ideally, we re looking for infinitely thin boundaries. An alternative approach is to look for local extrema in the first derivative: places where the change in the gradient is highest. Q: A peak in the first derivative corresponds to what in the second derivative? 0 1 0 1 4 1 0 1 0 Zero crossings of this filter correspond to positions of maximum gradient. These zero crossings can be used to localize edges. Q: How might we write this as a convolution filter? 7 8

Localization with the Laplacian Marching squares We can convert these signed values into edge contours using a marching squares technique: Original Smoothed Laplacian (+18) 9 30 Sharpening with the Laplacian Spectral impact of sharpening We can look at the impact of sharpening on the Fourier spectrum: Spatial domain Frequency domain Original Laplacian (+18) 0 1 0 1 5 1 0 1 0 Original + Laplacian Original - Laplacian Why does the sign make a difference? How can you write each filter that makes each bottom image? 31 3

Summary What you should take away from this lecture: The meanings of all the boldfaced terms. How noise reduction is done How discrete convolution filtering works The effect of mean, Gaussian, and median filters What an image gradient is and how it can be computed How edge detection is done What the Laplacian image is and how it is used in either edge detection or image sharpening 33