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

Similar documents
Image Scaling. This image is too big to fit on the screen. How can we reduce it? How to generate a halfsized

Image Pyramids. Sanja Fidler CSC420: Intro to Image Understanding 1 / 35

Last Lecture. photomatix.com

Image Interpolation. Image Processing

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

Last Lecture. photomatix.com

Sampling and Pyramids

Image Sampling. Moire patterns. - Source: F. Durand

Sampling and Reconstruction

Images and Filters. EE/CSE 576 Linda Shapiro

Image Filtering and Gaussian Pyramids

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

Image filtering, image operations. Jana Kosecka

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Thinking in Frequency

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

CSCI 1290: Comp Photo

Vision Review: Image Processing. Course web page:

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

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

Lec 04: Image Filtering and Edge Features

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

Filters. Materials from Prof. Klaus Mueller

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

Prof. Feng Liu. Winter /10/2019

Overview. Neighborhood Filters. Dithering

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

Image Enhancement II: Neighborhood Operations

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

CSC 320 H1S CSC320 Exam Study Guide (Last updated: April 2, 2015) Winter 2015

Fourier analysis of images

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

Motion illusion, rotating snakes

Image Filtering. Median Filtering

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

Digital Image Processing

Computer Graphics (Fall 2011) Outline. CS 184 Guest Lecture: Sampling and Reconstruction Ravi Ramamoorthi

Removal of Gaussian noise on the image edges using the Prewitt operator and threshold function technical

Midterm is on Thursday!

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

Templates and Image Pyramids

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Next Classes. Spatial frequency Fourier transform and frequency domain. Reminder: Textbook. Frequency view of filtering Hybrid images Sampling

Templates and Image Pyramids

Sampling and reconstruction

Image Processing for feature extraction

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

Sampling and reconstruction. CS 4620 Lecture 13

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

CS4495/6495 Introduction to Computer Vision. 2C-L3 Aliasing

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

Image features: Histograms, Aliasing, Filters, Orientation and HOG. D.A. Forsyth

Sampling and reconstruction

Efficient Construction of SIFT Multi-Scale Image Pyramids for Embedded Robot Vision

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

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

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

Thinking in Frequency

Midterm Review. Image Processing CSE 166 Lecture 10

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror

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

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

Multimedia Systems Giorgio Leonardi A.A Lectures 14-16: Raster images processing and filters

A Comparative Analysis of Different Edge Based Algorithms for Mobile/Camera Captured Images

Sampling and Reconstruction

Midterm Examination CS 534: Computational Photography

A Proficient Roi Segmentation with Denoising and Resolution Enhancement

Area Extraction of beads in Membrane filter using Image Segmentation Techniques

ADAPTIVE ADDER-BASED STEPWISE LINEAR INTERPOLATION

CSE 564: Scientific Visualization

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

EE482: Digital Signal Processing Applications

Comparative Study of Different Wavelet Based Interpolation Techniques

XXXX - ANTI-ALIASING AND RESAMPLING 1 N/08/08

Digital Image Processing

Design of an Efficient Edge Enhanced Image Scalar for Image Processing Applications

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

Carmen Alonso Montes 23rd-27th November 2015

Image preprocessing in spatial domain

Image Forgery. Forgery Detection Using Wavelets

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

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

Convolution Pyramids. Zeev Farbman, Raanan Fattal and Dani Lischinski SIGGRAPH Asia Conference (2011) Julian Steil. Prof. Dr.

Computing for Engineers in Python

Practical Image and Video Processing Using MATLAB

Interpolation of CFA Color Images with Hybrid Image Denoising

A survey of Super resolution Techniques

Computer Graphics Fundamentals

Denoising and Effective Contrast Enhancement for Dynamic Range Mapping

Analysis of the Interpolation Error Between Multiresolution Images

Feature Extraction of Human Lip Prints

An Adaptive Kernel-Growing Median Filter for High Noise Images. Jacob Laurel. Birmingham, AL, USA. Birmingham, AL, USA

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

Image Processing (EA C443)

International Journal of Pharma and Bio Sciences PERFORMANCE ANALYSIS OF BONE IMAGES USING VARIOUS EDGE DETECTION ALGORITHMS AND DENOISING FILTERS

CS6670: Computer Vision

Image Denoising Using Statistical and Non Statistical Method

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

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

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Transcription:

CS667: Computer Vision Noah Snavely Administrivia New room starting Thursday: HLS B Lecture 2: Edge detection and resampling From Sandlot Science Administrivia Assignment (feature detection and matching) will be out Thursday Turning via CMS: https://cms.csuglab.cornell.edu/ Mailing list: please let me know if you aren t on it Szeliski: 3.4., 3.4.2 Reading Last time: Cross correlation Let be the image, be the kernel (of size 2k+ x 2k+), and be the output image Last time: Convolution Same as cross correlation, except that the kernel is flipped (horizontally and vertically) This is called a cross correlation operation: This is called a convolution operation:

Linear filters: examples Linear filters: examples = * = * Original Identical image Original Shifted left By pixel Source: D. Lowe Source: D. Lowe Linear filters: examples Linear filters: examples Original = * Blur (with a mean filter) Original * 2 - = Sharpening filter (accentuates edges) Source: D. Lowe Source: D. Lowe Image noise Gaussian noise Original image Gaussian noise Salt and pepper noise (each pixel has some chance of being switched to zero or one) = pixel = 2 pixels = 5 pixels http://theory.uchicago.edu/~ejm/pix/2d/tests/noise/index.html Smoothing with larger standard deviations suppresses noise, but also blurs the image 2

Salt & pepper noise Gaussian blur Alternative idea: Median filtering A median filter operates over a window by selecting the median intensity in the window p = % = pixel = 2 pixels = 5 pixels What s wrong with the results? Is median filtering linear? Source: K. Grauman Median filter What advantage does median filtering have over Gaussian filtering? Salt & pepper noise median filtering p = % = pixel = 2 pixels = 5 pixels 3x3 window 5x5 window 7x7 window Source: K. Grauman Questions? Edge detection Convert a 2D image into a set of curves Extracts salient features of the scene More compact than pixels 3

Origin of Edges surface normal discontinuity depth discontinuity surface color discontinuity Characterizing edges An edge is a place of rapid change in the image intensity function image intensity function (along horizontal scanline) first derivative illumination discontinuity Edges are caused by a variety of factors Source: L. Lazebnik edges correspond to extrema of derivative Image derivatives How can we differentiate a digital image F[x,y]? Option : reconstruct a continuous image, f, then compute the derivative Option 2: take discrete derivative (finite difference) The gradient of an image: Image gradient The gradient points in the direction of most rapid increase in intensity The edge strength is given by the gradient magnitude: How would you implement this as a linear filter? : - : - The gradient direction is given by: how does this relate to the direction of the edge? Source: Steve Seitz Image gradient Effects of noise Noisy input image Source: L. Lazebnik Where is the edge? 4

f h Solution: smooth first Associative property of convolution Differentiation is convolution, and convolution is associative: This saves us one operation: f * h f To find edges, look for peaks in 2D edge detection filters Derivative of Gaussian filter Gaussian derivative of Gaussian (x) x direction y direction The Sobel operator Common approximation of derivative of Gaussian Sobel operator: example - -2 2-2 - -2 - The standard defn. of the Sobel operator omits the /8 term doesn t make a difference for edge detection the /8 term is needed to get the right gradient value Source: Wikipedia 5

Example Finding edges original image (Lena) gradient magnitude Finding edges Non maximum supression where is the edge? thresholding Check if pixel is local maximum along gradient direction requires interpolating pixels p and r Finding edges Finding edges thresholding thinning (non maximum suppression) 6

Canny edge detector MATLAB: edge(image, canny ). Filter image with derivative of Gaussian 2. Find magnitude and orientation of gradient 3. Non maximum suppression 4. Linking and thresholding (hysteresis): Define two thresholds: low and high Use the high threshold to start edge curves and the low threshold to continue them Canny edge detector Still one of the most widely used edge detectors in computer vision J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679 74, 986. Depends on several parameters: : width of the Gaussian blur high threshold low threshold Source: D. Lowe, L. Fei Fei Canny edge detector Scale space (Witkin 83) first derivative peaks larger original Canny with The choice of depends on desired behavior large detects large scale edges small detects fine edges Canny with Gaussian filtered signal Properties of scale space (w/ Gaussian smoothing) edge position may shift with increasing scale (σ) two edges may merge with increasing scale an edge may not split into two with increasing scale Questions? Image Scaling This image is too big to fit on the screen. How can we generate a half sized version? 7

Image sub sampling Image sub sampling /8 /4 Throw away every other row and column to create a /2 size image called image sub sampling /2 /4 (2x zoom) /8 (4x zoom) Why does this look so crufty? Image sub sampling Even worse for synthetic images Source: F. Durand Source: L. Zhang Aliasing Wagon wheel effect Occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image an alias To do sampling right, need to understand the structure of your signal/image Enter Monsieur Fourier To avoid aliasing: sampling rate 2 * max frequency in the image said another way: two samples per cycle This minimum sampling rate is called the Nyquist rate Source: L. Zhang (See http://www.michaelbach.de/ot/mot_wagonwheel/index.html) Source: L. Zhang 8

Gaussian pre filtering Subsampling with Gaussian pre filtering G /8 G /4 Gaussian /2 Solution: filter the image, then subsample Gaussian /2 G /4 G /8 Solution: filter the image, then subsample Compare with... Gaussian pre filtering Solution: filter the image, then subsample F F F 2 blur subsample blur subsample F * H F * H /2 /4 (2x zoom) /8 (4x zoom) { Gaussian pyramid F F F 2 blur subsample blur subsample F * H F * H Gaussian pyramids [Burt and Adelson, 983] In computer graphics, a mip map [Williams, 983] A precursor to wavelet transform Gaussian Pyramids have all sorts of applications in computer vision 9

Gaussian pyramids [Burt and Adelson, 983] Questions? How much space does a Gaussian pyramid take compared to the original image? Upsampling This image is too small for this screen: How can we make it times as big? Simplest approach: repeat each row and column times ( Nearest neighbor interpolation ) 2 3 4 5 Recall how a digital image is formed d = in this example It is a discrete point sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz d = in this example d = in this example 2 3 4 5 Recall how a digital image is formed It is a discrete point sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz 2 2.5 3 4 5 What if we don t know? Guess an approximation: Can be done in a principled way: filtering Convert to a continuous function: Reconstruct by convolution with a reconstruction filter, h Adapted from: S. Seitz

Ideal reconstruction Reconstruction filters What does the 2D version of this hat function look like? Nearest neighbor interpolation performs linear interpolation (tent function) performs bilinear interpolation Linear interpolation Often implemented without cross correlation E.g., http://en.wikipedia.org/wiki/bilinear_interpolation Better filters give better resampled images Bicubic is common choice Gaussian reconstruction Source: B. Curless Cubic reconstruction filter Original image: x Also used for resampling Nearest neighbor interpolation Bilinear interpolation Bicubic interpolation Questions? Next time: image features