All about convolution.

Slides:



Advertisements
Similar presentations
3-D Computer Vision CSc83020 / Ioannis Stamos  Revisit filtering (Gaussian and Median)  Introduction to edge detection 3-D Computater Vision CSc
Advertisements

Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 4: Image Processing 1 Ravi Ramamoorthi
Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Spatial Filtering (Chapter 3)
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Lecture 4 Linear Filters and Convolution
Lecture 2: Filtering CS4670/5670: Computer Vision Kavita Bala.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
1 Image filtering Hybrid Images, Oliva et al.,
Lecture 1: Images and image filtering
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
Announcements Kevin Matzen office hours – Tuesday 4-5pm, Thursday 2-3pm, Upson 317 TA: Yin Lou Course lab: Upson 317 – Card access will be setup soon Course.
Comp 665 Convolution. Questions? Ask here first. Likely someone else has the same question.
Linear filtering.
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Kavita Bala Hybrid Images, Oliva et al.,
Filtering Course web page: vision.cis.udel.edu/cv March 5, 2003  Lecture 9.
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
Filtering and Enhancing Images. Major operations 1. Matching an image neighborhood with a pattern or mask 2. Convolution (FIR filtering)
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Why is computer vision difficult?
Chapter 5: Neighborhood Processing
Linear filtering. Motivation: Noise reduction Given a camera and a still scene, how can you reduce noise? Take lots of images and average them! What’s.
CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 7 – Linear Filters 1.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
CS654: Digital Image Analysis
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
Fourier Transform.
CS 691B Computational Photography
Lecture 3: Filtering and Edge detection
Reconnaissance d’objets et vision artificielle
Linear filtering. Motivation: Image denoising How can we reduce noise in a photograph?
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Grauman Today: Image Filters Smooth/Sharpen Images... Find edges... Find waldo…
Images and Filters CSEP 576 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Non-linear filtering Example: Median filter Replaces pixel value by median value over neighborhood Generates no new gray levels.
Image Processing Goal –Start simple: look at small windows –Identify useful image structures (‘Clues’ useful for recognizing objects) –Eliminate irrelevant.
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.
Digital Image Processing Lecture 8: Image Enhancement in Frequency Domain II Naveed Ejaz.
Spatial Image Enhancement
Basic Principles Photogrammetry V: Image Convolution & Moving Window:
- photometric aspects of image formation gray level images
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Linear Filters T-11 Computer Vision University of Houston
All about convolution.
- photometric aspects of image formation gray level images
Lecture 1: Images and image filtering
Motion illusion, rotating snakes
Linear filtering.
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Lecture: Image manipulations (2) Filters and kernels
Basic Image Processing
Digital Image Processing Week IV
Most slides from Steve Seitz
Non-local Means Filtering
Fourier Transforms.
Lecture 2: Image filtering
Lecture 1: Images and image filtering
Intensity Transformation
Most slides from Steve Seitz
Lecture 7 Spatial filtering.
Lecture: Pixels and Filters
Lecture: Pixels and Filters
Presentation transcript:

All about convolution

Last time: Convolution and cross-correlation

Cross correlation 7 Local image data Kernel size = 2k+1 10 5 7 11 6 8 10 5 7 11 6 8 3 9 22 4 1 2 14 15 12 7 Local image data Kernel size = 2k+1

Properties: Linearity

Properties: Linearity

Shift equivariance f f’ Shift, then convolve = convolve, then shift Output of convolution does not depend on where the pixel is f f’

Boundary conditions What if m-i <0? What if m-i > image size Assume f is defined for [−∞,∞] in both directions, just 0 everywhere else Same for w

Boundary conditions 90 10 20 40 30

Boundary conditions 90 10 20 40 30

Boundary conditions 90 10 20 40 30

Boundary conditions 90 10 20 40 30

Boundary conditions 90 10 20 40 30

Boundary conditions in practice “Full convolution”: compute if any part of kernel intersects with image requires padding Output size = m+k-1 “Same convolution”: compute if center of kernel is in image output size = m “Valid convolution”: compute only if all of kernel is in image no padding output size = m-k+1

* = Filters: examples 1 Kernel (k) Blur (with a mean filter) (g) Original (f) Source: D. Lowe

* = Filters: examples 1 Kernel (k) Original (f) Identical image (g) 1 = Kernel (k) Original (f) Identical image (g) Source: D. Lowe

Sharpening Source: D. Lowe

Sharpening = = – + α What does blurring take away? Let’s add it back: original detail + α =

Sharpening

Sharpening = = – + α What does blurring take away? Let’s add it back: original detail + α =

Sharpening 1 1

Sharpening filter (accentuates edges) 1 2 - * = Original Source: D. Lowe

Another example -1 1

Another example

Another example

More properties of convolution

More properties of convolution Convolution is linear Convolution is shift-invariant Convolution is commutative (w*f = f*w) Convolution is associative ( v*(w*f) = (v*w)*f ) Every linear shift-invariant operation is a convolution

More convolution filters 1 Mean filter But nearby pixels are more correlated than far- away pixels Weigh nearby pixels more 1/25

Gaussian filter

Gaussian filter 0.003 0.013 0.022 0.060 0.098 0.162 Ignore factor in front, instead, normalize filter to sum to 1 5x5, 𝜎=1

Gaussian filter Ignore factor in front, instead, normalize filter to sum to 1 5x5, 𝜎=1

Gaussian filter 21x21, 𝜎=0.5 21x21, 𝜎=1 21x21, 𝜎=3

Difference of Gaussians 21x21, 𝜎=3 21x21, 𝜎=1

Time complexity of convolution Image is w x h Filter is k x k Every entry takes O(k2) operations Number of output entries: (w+k-1)(h+k-1) for full wh for same Total time complexity: O(whk2)

Optimization: separable filters basic alg. is O(r2): large filters get expensive fast! definition: w(x,y) is separable if it can be written as: Write u as a k x 1 filter, and v as a 1 x k filter Claim:

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters w u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2

Separable filters Time complexity of original : O(whk2) Time complexity of separable version : O(whk)

Images have structure at various scales