CS 556: Computer Vision. Lecture 3

Similar documents
CS 556: Computer Vision. Lecture 3

CS 556: Computer Vision. Lecture 2

Computer Vision for HCI. Topics of This Lecture

Outline 7/2/201011/6/

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Feature Detection and Matching

Local invariant features

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

Edge and corner detection

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

Image features. Image Features

Feature Based Registration - Image Alignment

CAP 5415 Computer Vision Fall 2012

Obtaining Feature Correspondences

School of Computing University of Utah

SCALE INVARIANT FEATURE TRANSFORM (SIFT)

Local features: detection and description. Local invariant features

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

Motion Estimation and Optical Flow Tracking

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

SIFT - scale-invariant feature transform Konrad Schindler

Feature Detection. Raul Queiroz Feitosa. 3/30/2017 Feature Detection 1

SIFT: Scale Invariant Feature Transform

CS 558: Computer Vision 4 th Set of Notes

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Local Feature Detectors

Building a Panorama. Matching features. Matching with Features. How do we build a panorama? Computational Photography, 6.882

Local Image preprocessing (cont d)

Scale Invariant Feature Transform

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Scale Invariant Feature Transform

Implementing the Scale Invariant Feature Transform(SIFT) Method

3D from Photographs: Automatic Matching of Images. Dr Francesco Banterle

Local Features Tutorial: Nov. 8, 04

Scale Invariant Feature Transform by David Lowe

Local features and image matching. Prof. Xin Yang HUST

Keypoint detection. (image registration, panorama stitching, motion estimation + tracking, recognition )

Prof. Feng Liu. Spring /26/2017

The SIFT (Scale Invariant Feature

Performance Evaluation of Scale-Interpolated Hessian-Laplace and Haar Descriptors for Feature Matching

Lecture: RANSAC and feature detectors

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Local Features: Detection, Description & Matching

Motion illusion, rotating snakes

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Line, edge, blob and corner detection

Ulas Bagci

CS5670: Computer Vision

Multi-modal Registration of Visual Data. Massimiliano Corsini Visual Computing Lab, ISTI - CNR - Italy

Problems with template matching

Lecture 6: Finding Features (part 1/2)

EECS150 - Digital Design Lecture 14 FIFO 2 and SIFT. Recap and Outline

AK Computer Vision Feature Point Detectors and Descriptors

A Comparison of SIFT and SURF

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Local features: detection and description May 12 th, 2015

NOWADAYS, the computer vision is one of the top

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Scott Smith Advanced Image Processing March 15, Speeded-Up Robust Features SURF

Comparison of Feature Detection and Matching Approaches: SIFT and SURF

CS534: Introduction to Computer Vision Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Corner Detection. GV12/3072 Image Processing.

Image Features: Detection, Description, and Matching and their Applications

Computer Vision I - Filtering and Feature detection

Image Features Detection, Description and Matching

CS 1674: Intro to Computer Vision. Midterm Review. Prof. Adriana Kovashka University of Pittsburgh October 10, 2016

Local Image Features

Lecture 10 Detectors and descriptors

Filtering Images. Contents

Object Detection by Point Feature Matching using Matlab

Computer Vision I - Basics of Image Processing Part 2

3D Reconstruction From Multiple Views Based on Scale-Invariant Feature Transform. Wenqi Zhu

Automatic Image Alignment (feature-based)

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Key properties of local features

3D Object Recognition using Multiclass SVM-KNN

Features Points. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Computer Vision Feature Extraction

Stitching and Blending

Invariant Local Feature for Image Matching

Vision and Image Processing Lab., CRV Tutorial day- May 30, 2010 Ottawa, Canada

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Image Matching. AKA: Image registration, the correspondence problem, Tracking,

Automatic Image Alignment

Distinctive Image Features from Scale-Invariant Keypoints

Edge Detection. CSE 576 Ali Farhadi. Many slides from Steve Seitz and Larry Zitnick

Faster Image Feature Extraction Hardware

Distinctive Image Features from Scale-Invariant Keypoints

Distinctive Image Features from Scale-Invariant Keypoints

Evaluation and comparison of interest points/regions

A Comparison of SIFT, PCA-SIFT and SURF

Wikipedia - Mysid

Implementation and Comparison of Feature Detection Methods in Image Mosaicing

Digital Image Processing (CS/ECE 545) Lecture 5: Edge Detection (Part 2) & Corner Detection

FESID: Finite Element Scale Invariant Detector

Feature Matching and Robust Fitting

Edge Detection. CS664 Computer Vision. 3. Edges. Several Causes of Edges. Detecting Edges. Finite Differences. The Gradient

Localization Error Measurement in Features Extraction Algorithms

Transcription:

CS 556: Computer Vision Lecture 3 Prof. Sinisa Todorovic sinisa@eecs.oregonstate.edu 1

Outline Matlab Image features -- Interest points Point descriptors Homework 1 2

Basic MATLAB Commands 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg [x,y] = size(i) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg [x,y] = size(i) rgb2gray(i) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg [x,y] = size(i) rgb2gray(i) list = find(img == 0) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg [x,y] = size(i) rgb2gray(i) list = find(img == 0) w=fspecial(ʻgaussʼ, 3, 0.01) 3

Basic MATLAB Commands I= im2double(imread(ʻimage_nameʼ)) imwrite(uint8(i),ʼimage_nameʼ) imshow(i) print -djpeg Fig1.jpg [x,y] = size(i) rgb2gray(i) list = find(img == 0) w=fspecial(ʻgaussʼ, 3, 0.01) imfilter(i,w) 3

Image Features -- Interest Points Harris corners Hessian points SIFT, Difference-of-Gaussians Harris-Laplacian Harris-Difference-of-Gaussians Point descriptors -- DAISY 4

Properties of Interest Points Locality -- robustness to occlusion, noise Saliency -- rich visual cue Stable under affine transforms Distinctiveness -- differ across distinct objects Efficiency -- easy to compute 5

Harris Corner Detector homogeneous region no change in all directions edge no change along the edge corner change in all directions Source: Frolova, Simakov, Weizmann Institute 6

Harris Corner Detector E(x, y) = m,n w(m, n)[i(x + u + m, y + v + n) I(x, y)] 2 change weighting window shifted image original image Source: Frolova, Simakov, Weizmann Institute 7

Harris Corner Detector E(x, y) =w(x, y) [I(x + u, y + v) I(x, y)] 2 2D convolution Source: Frolova, Simakov, Weizmann Institute 8

2D Convolution or 2D Correlation 9

Harris Detector Example I(x, y) input image E(x, y) 2D map of changes 10

Harris Corner Detector Taylor series expansion For small shifts u 0 v 0 I(x + u, y + v) I(x, y)+ I x u + I y v I(x + u, y + v) I(x, y)+[i x I y ] u v image derivatives along x and y axes 11

Harris Corner Detector 2 E(x, y) =w(x, y) I(x, y)+[i x I y ] u v I(x, y) u 2 = w(x, y) [I x I y ] v u v T u v = w(x, y) [I x I y ] [I x I y ] 12

Harris Corner Detector Ix u v E(x, y) =w(x, y) [u v] I y [I x I y ] =[u v] I 2 x(x, y) I w(x, y) x (x, y)i y (x, y) I x (x, y)i y (x, y) Iy(x, 2 y) M(x,y) u v 13

Harris Corner Detector E(x, y) =[u v]m(x, y) u v M(x, y; σ) =w(x, y; σ) I 2 x(x, y) I x (x, y)i y (x, y) I x (x, y)i y (x, y) I 2 y(x, y) M(x, y; σ) = w(x, y; σ) I 2 x(x, y) w(x, y; σ) I x (x, y)i y (x, y) w(x, y; σ) I x (x, y)i y (x, y) w(x, y; σ) I 2 y(x, y) 14

Image Gradient I x (x, y) =I(x +1,y) I(x, y) = 0 0 0 0 1 1 0 0 0 D x (x,y) I(x, y) 15

Image Gradient I y (x, y) =I(x, y + 1) I(x, y) = 0 0 0 0 1 0 0 1 0 D y (x,y) I(x, y) 16

Weighted Image Gradient w(x, y; σ) I x (x, y) =w(x, y; σ) D x (x, y) I(x, y) =[w(x, y; σ) D x (x, y)] I(x, y) convolution is associative 17

Weighted Image Gradient w(x, y; σ) I x (x, y) =w(x, y; σ) D x (x, y) I(x, y) =[w(x, y; σ) D x (x, y)] I(x, y) =[D x (x, y) w(x, y; σ)] I(x, y) convolution is commutative 18

Weighted Image Gradient w(x, y; σ) I x (x, y) =w(x, y; σ) D x (x, y) I(x, y) =[w(x, y; σ) D x (x, y)] I(x, y) =[D x (x, y) w(x, y; σ)] I(x, y) = w x (x, y; σ) I(x, y) derivative of the filter 19

Weighted Image Gradient w(x, y; σ) I x (x, y) =w x (x, y; σ) I(x, y) w(x, y; σ) I y (x, y) =w y (x, y; σ) I(x, y) Image is discrete Gradient is approximate We always find the gradient of the kernel! 20

Harris Corner Detector E(x, y) =[u v]m(x, y) u v M(x, y; σ) =w(x, y; σ) I 2 x(x, y) I x (x, y)i y (x, y) I x (x, y)i y (x, y) I 2 y(x, y) M(x, y; σ) = w(x, y; σ) I 2 x(x, y) w(x, y; σ) I x (x, y)i y (x, y) w(x, y; σ) I x (x, y)i y (x, y) w(x, y; σ) I 2 y(x, y) 21

Eigenvalues and Eigenvectors of M λ1 λ2 E(x, y) =[u v]m(x, y) u v Eigenvectors of M -- directions of the largest change of E(x,y) Eigenvalues of M -- the amount of change along eigenvectors 22

Detection of Harris Corners using the Eigenvalues of M λ 1 λ 2 23

Harris Detector f(σ) = λ 1(σ)λ 2 (σ) λ 1 (σ)+λ 2 (σ) = det(m(σ)) trace(m(σ)) objective function 24

Harris Detector Example input image 25

Harris Detector Example f values color coded red = high values blue = low values 26

Harris Detector Example f values thresholded 27

Harris Detector Example Harris features = Spatial maxima of f values 28

Example of Detecting Harris Corners 29

Hessian detector (Beaudet, 1978) Hessian determinant I xx I yy Hessian ( I) = & I $ % I xx xy I I xy yy #! " I xy det( Hessian ( I )) = I xx I yy ' I 2 xy Source: Tuytelaars 30

Hessian Detector u v E(x, y) =[u v]m(x, y) Ixx (x, y) I xy (x, y) M(x, y; σ) =w(x, y; σ) I xy (x, y) I yy (x, y) wxx (x, y; σ) I(x, y) w xy (x, y; σ) I(x, y) M(x, y; σ) = w xy (x, y; σ) I(x, y) w yy (x, y; σ) I(x, y) 31

Hessian Detector f(σ) = λ 1(σ)λ 2 (σ) λ 1 (σ)+λ 2 (σ) = det(m(σ)) trace(m(σ)) objective function 32

Properties of Harris Corners Invariance to variations of imaging parameters: Illumination? Camera distance, i.e., scale? Camera viewpoint, i.e., affine transformation? 33

Harris/Hessian Detector is NOT Scale Invariant edge edge corner edge Source: L. Fei-Fei 34

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 35

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 36

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 37

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 38

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 39

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m Source: Tuytelaars 40

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 41

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 42

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 43

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 44

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 45

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x,! )) " i i! Source: Tuytelaars m 46

Automatic scale selection Function responses for increasing scale Scale trace (signature) f ( I 1 ( x,! )) i!i m f ( I 1 ( x",! ")) i! i m Source: Tuytelaars 47

Issues with the Automatic Scale Selection f f bad bad region size region size f(σ) =Kernel(σ) I Often difficult to identify the global maximum 48

Popular Kernels for Scale Selection w(σ) I Gaussian G(x, y; σ) = 1 2πσ exp x2 + y 2 2σ 2 Laplacian of Gaussians L(σ) =σ 2 (G xx (x, y; σ)+g yy (x, y; σ)) 49

Hessian/Harris-Laplacian Detector scale y! Harris " x! Laplacian " Find a local maximum of Hessian/Harris function E(x, y; σ) =σ 2 (G xx (x, y; σ)+g yy (x, y; σ)) I(x, y) simultaneously in : 2D space of the image Scale 50

Mikolajczyk: Harris Laplace 1. Initialization: Multiscale Harris corner detection 2. Scale selection based on Laplacian Harris points Harris-Laplace points Source: Tuytelaars 51

Popular Kernels for Scale Selection w(σ) I Gaussian G(x, y; σ) = 1 2πσ exp x2 + y 2 2σ 2 Difference of Gaussians DoG(σ) =G(x, y; kσ) G(x, y; σ) 52

Source: Tuytelaars Lowe s DoG Difference of Gaussians as approximation of the Laplacian of Gaussian - = 53

Selected Scales = Extrema of DoG/Laplacian Convolve the image with Gaussians whose sigma increases Then, subsample, and repeat the convolutions Finally, find extrema in the 3D DoG or Laplacian space Source: D. Lowe 54

scale y SIFT Detector! DoG " x! DoG " Find a local maximum of E(x, y; σ) =DOG(x, y; σ) I(x, y) simultaneously in: 2D space of the image Scale 55

Source: Tuytelaars Mikolajczyk: Harris Laplace 1. Initialization: Multiscale Harris corner detection! 4! 3! 2! Computing Harris function Detecting local maxima 56

Next Class Other interest points Point descriptors 57