Templates, Image Pyramids, and Filter Banks

Similar documents
Taking derivative by convolution

ECE Digital Image Processing and Introduction to Computer Vision

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

Computer Vision Lecture 3

Lecture 3: Linear Filters

Lecture 3: Linear Filters

CITS 4402 Computer Vision

Computational Photography

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

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

Subsampling and image pyramids

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

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

Recap: edge detection. Source: D. Lowe, L. Fei-Fei

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Outline. Convolution. Filtering

Achieving scale covariance

LoG Blob Finding and Scale. Scale Selection. Blobs (and scale selection) Achieving scale covariance. Blob detection in 2D. Blob detection in 2D

Corners, Blobs & Descriptors. With slides from S. Lazebnik & S. Seitz, D. Lowe, A. Efros

Introduction to Computer Vision

Lecture 8: Interest Point Detection. Saad J Bedros

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

Slow mo guys Saccades.

Lecture 7: Edge Detection

Lecture 04 Image Filtering

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

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

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

Feature extraction: Corners and blobs

Image Alignment and Mosaicing

Thinking in Frequency

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

Computer Vision Lecture 3

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

Blobs & Scale Invariance

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

Frequency Filtering CSC 767

Blob Detection CSC 767

Image matching. by Diva Sian. by swashford

Filtering and Edge Detection

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

CS5670: Computer Vision

Lecture 8: Interest Point Detection. Saad J Bedros

Introduction to Linear Image Processing

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

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

Motion Estimation (I) Ce Liu Microsoft Research New England

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

Edge Detection. Computer Vision P. Schrater Spring 2003

Computer Vision & Digital Image Processing

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

Detectors part II Descriptors

PCA FACE RECOGNITION

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

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

6.869 Advances in Computer Vision. Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018

Motion Estimation (I)

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

Lecture 6: Finding Features (part 1/2)

Reconnaissance d objetsd et vision artificielle

SIFT: Scale Invariant Feature Transform

Edge Detection. CS 650: Computer Vision

SIFT: SCALE INVARIANT FEATURE TRANSFORM BY DAVID LOWE

Optical Flow, Motion Segmentation, Feature Tracking

Filtering, Frequency, and Edges

The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall Many slides borrowed from Steve Seitz

Introduction to Computer Vision. 2D Linear Systems

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

Harris Corner Detector

TRACKING and DETECTION in COMPUTER VISION Filtering and edge detection

INTEREST POINTS AT DIFFERENT SCALES

Properties of detectors Edge detectors Harris DoG Properties of descriptors SIFT HOG Shape context

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

Machine vision, spring 2018 Summary 4

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

EECS150 - Digital Design Lecture 15 SIFT2 + FSM. Recap and Outline

Fourier Transform and Frequency Domain

A new class of morphological pyramids for multiresolution image analysis

Colorado School of Mines Image and Multidimensional Signal Processing

COMP344 Digital Image Processing Fall 2007 Final Examination

Image Filtering, Edges and Image Representation

Overview. Harris interest points. Comparing interest points (SSD, ZNCC, SIFT) Scale & affine invariant interest points

Gradient-domain image processing

Feature detectors and descriptors. Fei-Fei Li

Satellite image deconvolution using complex wavelet packets

Image Analysis. Feature extraction: corners and blobs

Local Enhancement. Local enhancement

Multiscale Image Transforms

Image Noise: Detection, Measurement and Removal Techniques. Zhifei Zhang

Image pyramids and frequency domain

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

Multimedia Databases. Previous Lecture. 4.1 Multiresolution Analysis. 4 Shape-based Features. 4.1 Multiresolution Analysis

Advanced Edge Detection 1

Artificial Neural Networks D B M G. Data Base and Data Mining Group of Politecnico di Torino. Elena Baralis. Politecnico di Torino

Multimedia Databases. Wolf-Tilo Balke Philipp Wille Institut für Informationssysteme Technische Universität Braunschweig

Multimedia Databases. 4 Shape-based Features. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis

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

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

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

Transcription:

Templates, Image Pyramids, and Filter Banks 09/9/ Computer Vision James Hays, Brown Slides: Hoiem and others

Review. Match the spatial domain image to the Fourier magnitude image 2 3 4 5 B A C D E Slide: Hoiem

Reminder Project due in one week

Today s class Template matching Image Pyramids Filter banks and texture Denoising, Compression

Template matching Goal: find in image Main challenge: What is a good similarity or distance measure between two patches? Correlation Zero-mean correlation Sum Square Difference Normalized Cross Correlation Slide: Hoiem

Matching with filters Goal: find in image Method 0: filter the image with eye patch h[ m, n] g[ k, l] k, l f [ m k, n l] f = image g = filter What went wrong? Input Filtered Image Slide: Hoiem

Matching with filters Goal: find in image Method : filter the image with zero-mean eye h[ m, n] ( k, l f [ k, l] f ) ( g[ m k, n l]) mean of f True detections False detections Input Filtered Image (scaled) Thresholded Image Slide: Hoiem

Matching with filters Goal: find in image Method 2: SSD h[ m, n] ( g[ k, l] f [ m k, n l]) k, l 2 True detections Input - sqrt(ssd) Thresholded Image Slide: Hoiem

Matching with filters Goal: find Method 2: SSD in image h[ m, n] ( g[ k, l] f [ m k, n l]) k, l What s the potential downside of SSD? 2 Input - sqrt(ssd) Slide: Hoiem

Matching with filters Goal: find in image Method 3: Normalized cross-correlation 0.5, 2,, 2,, ) ], [ ( ) ], [ ( ) ], [ )( ], [ ( ], [ l k m n l k m n l k f l n k m f g l k g f l n k m f g l k g m n h Matlab: normxcorr2(template, im) mean image patch mean template Slide: Hoiem

Matching with filters Goal: find in image Method 3: Normalized cross-correlation True detections Input Normalized X-Correlation Thresholded Image Slide: Hoiem

Matching with filters Goal: find in image Method 3: Normalized cross-correlation True detections Input Normalized X-Correlation Thresholded Image Slide: Hoiem

Q: What is the best method to use? A: Depends SSD: faster, sensitive to overall intensity Normalized cross-correlation: slower, invariant to local average intensity and contrast

Q: What if we want to find larger or smaller eyes? A: Image Pyramid

Review of Sampling Image Gaussian Filter Low-Pass Filtered Image Sample Low-Res Image Slide: Hoiem

Gaussian pyramid Source: Forsyth

Template Matching with Image Pyramids Input: Image, Template. Match template at current scale 2. Downsample image 3. Repeat -2 until image is very small 4. Take responses above some threshold, perhaps with non-maxima suppression Slide: Hoiem

Coarse-to-fine Image Registration. Compute Gaussian pyramid 2. Align with coarse pyramid 3. Successively align with finer pyramids Search smaller range Why is this faster? Are we guaranteed to get the same result? Slide: Hoiem

Laplacian filter unit impulse Gaussian Laplacian of Gaussian Source: Lazebnik

2D edge detection filters Laplacian of Gaussian Gaussian derivative of Gaussian is the Laplacian operator:

Laplacian pyramid Source: Forsyth

Computing Gaussian/Laplacian Pyramid Can we reconstruct the original from the laplacian pyramid? http://sepwww.stanford.edu/~morgan/texturematch/paper_html/node3.html

Hybrid Image Slide: Hoiem

Hybrid Image in Laplacian Pyramid High frequency Low frequency Slide: Hoiem

Image representation Pixels: great for spatial resolution, poor access to frequency Fourier transform: great for frequency, not for spatial info Pyramids/filter banks: balance between spatial and frequency information Slide: Hoiem

Major uses of image pyramids Compression Object detection Scale search Features Detecting stable interest points Registration Course-to-fine Slide: Hoiem

Denoising Gaussian Filter Additive Gaussian Noise Slide: Hoiem

Reducing Gaussian noise Smoothing with larger standard deviations suppresses noise, but also blurs the image Source: S. Lazebnik

Reducing salt-and-pepper noise by Gaussian smoothing 3x3 5x5 7x7

Alternative idea: Median filtering A median filter operates over a window by selecting the median intensity in the window Is median filtering linear? Source: K. Grauman

Median filter What advantage does median filtering have over Gaussian filtering? Robustness to outliers Source: K. Grauman

Median filter Salt-and-pepper noise Median filtered MATLAB: medfilt2(image, [h w]) Source: M. Hebert

Median vs. Gaussian filtering 3x3 5x5 7x7 Gaussian Median

Other non-linear filters Weighted median (pixels further from center count less) Clipped mean (average, ignoring few brightest and darkest pixels) Bilateral filtering (weight by spatial distance and intensity difference) Bilateral filtering Image: http://vision.ai.uiuc.edu/?p=455

Review of last three days

Review: Image filtering g[, ] f [.,.] h[.,.] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 0 90 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 90 90 90 90 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h[ m, n] k, l f [ k, l] g[ m k, n l] Credit: S. Seitz

Image filtering g[, ] f [.,.] h[.,.] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 0 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h[ m, n] k, l f [ k, l] g[ m k, n l] Credit: S. Seitz

Image filtering g[, ] f [.,.] h[.,.] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 90 0 90 90 90 0 0 0 0 0 90 90 90 90 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h[ m, n] k, l f [ k, l] g[ m k, n l] Credit: S. Seitz

Filtering in spatial domain 2 0 0 - -2 0 - * =

Filtering in frequency domain FFT FFT = Inverse FFT Slide: Hoiem

Review of Last 3 Days Linear filters for basic processing Edge filter (high-pass) Gaussian filter (low-pass) [- ] Gaussian FFT of Gradient Filter FFT of Gaussian Slide: Hoiem

Review of Last 3 Days Derivative of Gaussian Slide: Hoiem

Review of Last 3 Days Applications of filters Template matching (SSD or Normxcorr2) SSD can be done with linear filters, is sensitive to overall intensity Gaussian pyramid Coarse-to-fine search, multi-scale detection Laplacian pyramid More compact image representation Can be used for compositing in graphics Downsampling Need to sufficiently low-pass before downsampling

Next Lectures Machine Learning Crash Course