Image Enhancement II: Neighborhood Operations

Similar documents
Motivation: Image denoising. How can we reduce noise in a photograph?

Motivation: Image denoising. How can we reduce noise in a photograph?

Numerical Derivatives See also T&V, Appendix A.2 Gradient = vector of partial derivatives of image I(x,y) = [di(x,y)/dx, di(x,y)/dy]

Image filtering, image operations. Jana Kosecka

Motion illusion, rotating snakes

Midterm is on Thursday!

Image Enhancement. Image Enhancement

Digital Image Processing Chapter 3: Image Enhancement in the Spatial Domain

Digital Image Processing

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

Prof. Feng Liu. Winter /10/2019

>>> from numpy import random as r >>> I = r.rand(256,256);

Digital Image Processing

Topic 3 - Image Enhancement. (Part 2) Spatial Filtering

CS6670: Computer Vision Noah Snavely. Administrivia. Administrivia. Reading. Last time: Convolution. Last time: Cross correlation 9/8/2009

Images and Filters. EE/CSE 576 Linda Shapiro

>>> from numpy import random as r >>> I = r.rand(256,256);

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

Practical Image and Video Processing Using MATLAB

Digital Image Processing

Fourier analysis of images

Vision Review: Image Processing. Course web page:

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

Sampling and Reconstruction

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

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

Image Filtering. Median Filtering

Matlab (see Homework 1: Intro to Matlab) Linear Filters (Reading: 7.1, ) Correlation. Convolution. Linear Filtering (warm-up slide) R ij

Chapter 3 Image Enhancement in the Spatial Domain. Chapter 3 Image Enhancement in the Spatial Domain

Image Filtering and Gaussian Pyramids

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

Filip Malmberg 1TD396 fall 2018 Today s lecture

Last Lecture. photomatix.com

Filtering in the spatial domain (Spatial Filtering)

Measuring the Speed of Light

Robert Collins CSE486, Penn State. Lecture 3: Linear Operators

Sharpening Spatial Filters ( high pass)

CSCI 1290: Comp Photo

Linear Filters Tues Sept 1 Kristen Grauman UT Austin. Announcements. Plan for today 8/31/2015. Image noise Linear filters. Convolution / correlation

EE482: Digital Signal Processing Applications

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

Last Lecture. photomatix.com

Lecture 2: Color, Filtering & Edges. Slides: S. Lazebnik, S. Seitz, W. Freeman, F. Durand, D. Forsyth, D. Lowe, B. Wandell, S.Palmer, K.

TDI2131 Digital Image Processing (Week 4) Tutorial 3

CHAPTER 3 EDGE DETECTION USING CLASICAL EDGE DETECTORS

CSE 564: Visualization. Image Operations. Motivation. Provide the user (scientist, t doctor, ) with some means to: Global operations:

Lec 04: Image Filtering and Edge Features

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

Color Space 1: RGB Color Space. Color Space 2: HSV. RGB Cube Easy for devices But not perceptual Where do the grays live? Where is hue and saturation?

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

Image preprocessing in spatial domain

Signals and Systems II

Image Processing for feature extraction

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Preprint. This is the submitted version of a paper published in Electronic environment.

Edge Width Estimation for Defocus Map from a Single Image

Circular averaging filter (pillbox) Approximates the two-dimensional Laplacian operator. Laplacian of Gaussian filter

Homogeneous Representation Representation of points & vectors. Properties. Homogeneous Transformations

Midterm Examination CS 534: Computational Photography

Finding Loop Gain in Circuits with Embedded Loops

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

TIRF, geometric operators

Wireless Channel Modeling (Modeling, Simulation, and Mitigation)

Chapter 2 Image Enhancement in the Spatial Domain

ECE5984 Orthogonal Frequency Division Multiplexing and Related Technologies Fall Mohamed Essam Khedr. Channel Estimation

Sinusoidal signal. Arbitrary signal. Periodic rectangular pulse. Sampling function. Sampled sinusoidal signal. Sampled arbitrary signal

1.Discuss the frequency domain techniques of image enhancement in detail.

Experiment 7: Frequency Modulation and Phase Locked Loops Fall 2009

Lec 05 - Linear Filtering & Edge Detection

Templates and Image Pyramids

ECEN 5014, Spring 2013 Special Topics: Active Microwave Circuits and MMICs Zoya Popovic, University of Colorado, Boulder

Lecture 3: Linear Filters

CAP 5415 Computer Vision. Marshall Tappen Fall Lecture 1

Templates and Image Pyramids

Announcements. Image Processing. What s an image? Images as functions. Image processing. What s a digital image?

Computer Vision Lecture 3

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Optimized Color Transforms for Image Demosaicing

CSE 564: Scientific Visualization

Image Enhancement using Histogram Equalization and Spatial Filtering

Spatial Domain Processing and Image Enhancement

Computer Graphics Fundamentals

DARK CURRENT ELIMINATION IN CHARGED COUPLE DEVICES

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

Bode Plot based Auto-Tuning Enhanced Solution for High Performance Servo Drives

Chapter 3. Study and Analysis of Different Noise Reduction Filters

Frequency Domain Enhancement

A Physical Sine-to-Square Converter Noise Model

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Fourier Transforms and the Frequency Domain

Overview. Neighborhood Filters. Dithering

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

3.6 Intersymbol interference. 1 Your site here

CS/ECE 545 (Digital Image Processing) Midterm Review

Complex RF Mixers, Zero-IF Architecture, and Advanced Algorithms: The Black Magic in Next-Generation SDR Transceivers

Image Enhancement in the Spatial Domain

Transcription:

Image Enhancement II: Neighborhood Operations Image Enhancement:Spatial Filtering Operation Idea: Use a mask to alter piel values according to local operation Aim: De)-Emphasize some spatial requencies in the image.

3 Overview o Spatial Filtering Local linear oprations on an image Input:,), Output: g,) g, ) w, ) w w, ) w 8, ) 9, ) Moving average We replace each piel with a weighted average o its neighborhood The weights are called the ilter kernel What are the weights or the average o a 33 neighborhood? bo ilter Source: D. Lowe

5 Spatial Filtering: Blurring Eample Averaging Mask: /9 6 Image Enhancement:Spatial Filtering Operation Local linear oprations on an image Input:,), Output: g,): Input Image g, ) w Mask 8, ) w w, ) w 9 Output Image, ), ) Usuall odd 3

Deining convolution Let be the image and g be the kernel. The output o convolving with g is denoted * g. g)[ m, n] k, l [ m k, n l] g[ k, l] Convention: kernel is lipped MATLAB: conv vs. ilter also imilter) Source: F. Durand Ke properties Linearit: ilter + ) = ilter ) + ilter ) Shit invariance: same behavior regardless o piel location: iltershit)) = shitilter)) Theoretical result: an linear shit-invariant operator can be represented as a convolution 4

g Important details What is the size o the output? MATLAB: ilterg,, shape) shape = ull : output size is sum o sizes o and g shape = same : output size is same as shape = valid : output size is dierence o sizes o and g ull same valid g g g g g g g g g g g Image Enhancement:Spatial Filtering Operation An important point: Edge Eects To compute all piel values in the output image, we need to ill in a border Mask dimension = M+ Border dimension = M 5

Image Enhancement:Spatial Filtering Operation An important point: Edge Eects E.: 55 Mask) How to ill in a border Zeros Ringing) Replication Better) d b c a c a a d b b Relection Best ) b a a b d c c d Procedure: Replicate row-wise Replicate column-wise Appl iltering Remove borders Implementation What about near the edge? the ilter window alls o the edge o the image need to etrapolate methods MATLAB): clip ilter black): imilter, g, ) wrap around: imilter, g, circular ) cop edge: imilter, g, replicate ) relect across edge: imilter, g, smmetric ) Source: S. Marschner 6

What about near the edge? the ilter window alls o the edge o the image need to etrapolate methods: clip ilter black) wrap around cop edge relect across edge Source: S. Marschner 4 Image Enhancement:Spatial Filtering Operation 55 Blurring with -padding 55 Blurring with relected padding 7

Eamples o linear ilters? Original Source: D. Lowe Practice with linear ilters Original Filtered no change) Source: D. Lowe 8

Practice with linear ilters? Original Source: D. Lowe Practice with linear ilters Original Shited let B piel Source: D. Lowe 9

Practice with linear ilters? Original Source: D. Lowe Practice with linear ilters Original Blur with a bo ilter) Source: D. Lowe

Practice with linear ilters -? Original Note that ilter sums to ) Source: D. Lowe Practice with linear ilters - Original Sharpening ilter - Accentuates dierences with local average Source: D. Lowe

Sharpening Source: D. Lowe 4 Eamples o some other smoothing or low-pass ilters: 5 5 5 5

Gaussian Kernel.3.3..3.3.3.59.97.59.3..97.59.97..3.59.97.59.3.3.3..3.3 5 5, = special gauss,5,) Constant actor at ront makes volume sum to can be ignored, as we should re-normalize weights to sum to in an case) Source: C. Rasmussen Choosing kernel width Gaussian ilters have ininite support, but discrete ilters use inite kernels Source: K. Grauman 3

Choosing kernel width Rule o thumb: set ilter hal-width to about 3 σ Eample: Smoothing with a Gaussian 4

Mean vs. Gaussian iltering Gaussian ilters Remove high-requenc components rom the image low-pass ilter) Convolution with sel is another Gaussian So can smooth with small-width kernel, repeat, and get same result as larger-width kernel would have Convolving two times with Gaussian kernel o width σ is same as convolving once with kernel o width σ Separable kernel Factors into product o two D Gaussians 5

Separabilit o the Gaussian ilter Source: D. Lowe Sharpening revisited What does blurring take awa? = original smoothed 55) detail Let s add it back: + α = original detail sharpened 6

33 More on Linear Operations: Sharpening Filters Sharpening ilters use masks that tpicall have + and numbers in them. The are useul or highlighting or enhancing details and high-requenc inormation e.g. edges) The can and oten are) based on derivativetpe operations in the image whereas smoothing operations were based on integral tpe operations) Dierentiation and convolution Recall, or D unction,,): lim,, We could approimate this as n, n, This is linear and shit invariant, so must be the result o a convolution. which is obviousl a convolution with kernel - Source: D. Forsth, D. Lowe 7

8 35 Derivative-tpe Filters ), ), ), ), ), ), ), ), ), ), Laplacian: 4 36 Variations o the Laplacian Filter Laplacian: 4 Same response in row/column directions 4 Consider: Same response in diagonal directions Together: 8 4 4 Isotropic ilter

9 37 38 Sharpening Using the Laplacian Filter ), ), ), A g 8 A Boosting High Frequencies

Gaussian Unsharp Mask Filter g) ) g ) e g) image blurred image unit impulse identit) unit impulse Gaussian Laplacian o Gaussian Edge detection Goal: Identi sudden changes discontinuities) in an image Intuitivel, most semantic and shape inormation rom the image can be encoded in the edges More compact than piels Ideal: artist s line drawing but artist is also using object-level knowledge) Source: D. Lowe

Characterizing edges An edge is a place o rapid change in the image intensit intensit unction image along horizontal scanline) irst derivative edges correspond to etrema o derivative Image gradient The gradient o an image: The gradient points in the direction o most rapid increase in intensit How does this direction relate to the direction o the edge? The gradient direction is given b The edge strength is given b the gradient magnitude Source: Steve Seitz

43 Using the irst derivative or enhancement: / Sobel Edge Detector: Given image appl : Compute Magnitudes and Add Edge Image 44 Application o Sobel gradient: Man other edge detecting ilters eist. Which is best?

45 Order-statistics Filters Linear ilters o the tpe we have seen with all positive coeicients) will blur the image and reduce certain kinds o noise. Nonlinear smoothing ilters can also be considered Instead o computing a weighted average over the masked area, perorm an operation on the sorted list o piels in the area. Order statistic ilters are useul or removing certain impulsive tpes o noise. 46 Order-statistics Filters 8 9 w Linear Filter w w8 w9 Inner product T g wi i w i Nonlinear operator 8 9 z w Nonlinear OS) Filter sort z z8 z9 w w8 w9 Inner product T g wi zi w z i 3

47 Eamples o Order-statistics Filters Nonlinear OS) Filter Median Filter 8 9 z w sort z z8 z9 w w8 w9 Min Filter Ma Filter Trimmed Mean Filter Inner product T g wi zi w z i 4 4 48 For Gaussian noise removal: Use linear smoothing ilter For impulsive Salt+Pepper, heavtailed,..): Use order statistic ilter 4