Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction.

Slides:



Advertisements
Similar presentations
Distinctive Image Features from Scale-Invariant Keypoints
Advertisements

Feature Detection. Description Localization More Points Robust to occlusion Works with less texture More Repeatable Robust detection Precise localization.
Distinctive Image Features from Scale-Invariant Keypoints David Lowe.
Object Recognition from Local Scale-Invariant Features David G. Lowe Presented by Ashley L. Kapron.
Interest points CSE P 576 Ali Farhadi Many slides from Steve Seitz, Larry Zitnick.
Computer vision: models, learning and inference Chapter 8 Regression.
CSE 473/573 Computer Vision and Image Processing (CVIP)
Computer vision: models, learning and inference
Instructor: Mircea Nicolescu Lecture 15 CS 485 / 685 Computer Vision.
Instructor: Mircea Nicolescu Lecture 13 CS 485 / 685 Computer Vision.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Distinctive Image Feature from Scale-Invariant KeyPoints
Feature extraction: Corners and blobs
Distinctive image features from scale-invariant keypoints. David G. Lowe, Int. Journal of Computer Vision, 60, 2 (2004), pp Presented by: Shalomi.
Scale Invariant Feature Transform (SIFT)
Lecture 3a: Feature detection and matching CS6670: Computer Vision Noah Snavely.
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Distinctive Image Features from Scale-Invariant Keypoints David G. Lowe – IJCV 2004 Brien Flewelling CPSC 643 Presentation 1.
Scale-Invariant Feature Transform (SIFT) Jinxiang Chai.
CS 485/685 Computer Vision Face Recognition Using Principal Components Analysis (PCA) M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
Face Recognition Using Neural Networks Presented By: Hadis Mohseni Leila Taghavi Atefeh Mirsafian.
SVD(Singular Value Decomposition) and Its Applications
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
Computer vision.
Summarized by Soo-Jin Kim
Final Exam Review CS485/685 Computer Vision Prof. Bebis.
Bag of Visual Words for Image Representation & Visual Search Jianping Fan Dept of Computer Science UNC-Charlotte.
Overview Harris interest points Comparing interest points (SSD, ZNCC, SIFT) Scale & affine invariant interest points Evaluation and comparison of different.
Local invariant features Cordelia Schmid INRIA, Grenoble.
Segmentation Course web page: vision.cis.udel.edu/~cv May 7, 2003  Lecture 31.
CSE 185 Introduction to Computer Vision Local Invariant Features.
CSCE 643 Computer Vision: Extractions of Image Features Jinxiang Chai.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
ECE 8443 – Pattern Recognition LECTURE 08: DIMENSIONALITY, PRINCIPAL COMPONENTS ANALYSIS Objectives: Data Considerations Computational Complexity Overfitting.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
Kylie Gorman WEEK 1-2 REVIEW. CONVERTING AN IMAGE FROM RGB TO HSV AND DISPLAY CHANNELS.
Distinctive Image Features from Scale-Invariant Keypoints David Lowe Presented by Tony X. Han March 11, 2008.
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
A Tutorial on using SIFT Presented by Jimmy Huff (Slightly modified by Josiah Yoder for Winter )
Lecture 10: Lines from Edges, Interest Points, Binary Operations CAP 5415: Computer Vision Fall 2006.
Instructor: Mircea Nicolescu Lecture 10 CS 485 / 685 Computer Vision.
CSE 185 Introduction to Computer Vision Local Invariant Features.
Recognizing specific objects Matching with SIFT Original suggestion Lowe, 1999,2004.
Lecture 10: Harris Corner Detector CS4670/5670: Computer Vision Kavita Bala.
Keypoint extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Another Example: Circle Detection
Lecture 16: Image alignment
Visual homing using PCA-SIFT
SIFT Scale-Invariant Feature Transform David Lowe
CS262: Computer Vision Lect 09: SIFT Descriptors
Interest Points EE/CSE 576 Linda Shapiro.
Distinctive Image Features from Scale-Invariant Keypoints
LECTURE 09: BAYESIAN ESTIMATION (Cont.)
Scale Invariant Feature Transform (SIFT)
SIFT paper.
Scale and interest point descriptors
Feature description and matching
CAP 5415 Computer Vision Fall 2012 Dr. Mubarak Shah Lecture-5
Computer Vision Lecture 16: Texture II
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
Feature space tansformation methods
Edge detection f(x,y) viewed as a smooth function
Lecture VI: Corner and Blob Detection
Feature descriptors and matching
SIFT SIFT is an carefully designed procedure with empirically determined parameters for the invariant and distinctive features.
Presented by Xu Miao April 20, 2005
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Presentation transcript:

Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction

Preprocessing The goal of pre-processing is – to try to reduce unwanted variation in image due to lighting, scale, deformation etc. – to reduce data to a manageable size Give the subsequent model a chance Preprocessing definition: deterministic transformation of pixels p to create data vector x Usually heuristics based on experience 2Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Structure 33Computer vision: models, learning and inference. ©2011 Simon J.D. Prince Per-pixel transformations Edges, corners, and interest points Descriptors Dimensionality reduction

Normalization Fix first and second moments to standard values Remove contrast and constant additive luminance variations Before After 4Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Histogram Equalization Make all of the moments the same by forcing the histogram of intensities to be the same Before/ normalized/ Histogram Equalized 5Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Histogram Equalization 6Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Convolution Takes pixel image P and applies a filter F Computes weighted sum of pixel values, where weights given by filter. Easiest to see with a concrete example 7Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Blurring (convolve with Gaussian) 8Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Gradient Filters Rule of thumb: big response when image matches filter 9Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Gabor Filters 10Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Haar Filters 11Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Local binary patterns 12Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Textons An attempt to characterize texture Replace each pixel with integer representing the texture ‘type’ 13Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Computing Textons Take a bank of filters and apply to lots of images Cluster in filter space For new pixel, filter surrounding region with same bank, and assign to nearest cluster 14Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Structure 15 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince Per-pixel transformations Edges, corners, and interest points Descriptors Dimensionality reduction

Edges (from Elder and Goldberg 2000) 16Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Canny Edge Detector 17Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Canny Edge Detector Compute horizontal and vertical gradient images h and v 18Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Canny Edge Detector Quantize to 4 directions 19Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Canny Edge Detector Non-maximal suppression 20Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Canny Edge Detector Hysteresis Thresholding 21Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Harris Corner Detector Make decision based on image structure tensor 22Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

SIFT Detector Filter with difference of Gaussian filters at increasing scales Build image stack (scale space) Find extrema in this 3D volume 23Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

SIFT Detector Identified Corners Remove those on edges Remove those where contrast is low 24Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Assign Orientation Orientation assigned by looking at intensity gradients in region around point Form a histogram of these gradients by binning. Set orientation to peak of histogram. 25Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Structure 26 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince Per-pixel transformations Edges, corners, and interest points Descriptors Dimensionality reduction

Sift Descriptor Goal: produce a vector that describes the region around the interest point. All calculations are relative to the orientation and scale of the keypoint Makes descriptor invariant to rotation and scale 27Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Sift Descriptor 1. Compute image gradients 2. Pool into local histograms 3. Concatenate histograms 4. Normalize histograms 28Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

HoG Descriptor 29Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Bag of words descriptor Compute visual features in image Compute descriptor around each Find closest match in library and assign index Compute histogram of these indices over the region Dictionary computed using K-means 30Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Shape context descriptor 31Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Structure 32 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince Per-pixel transformations Edges, corners, and interest points Descriptors Dimensionality reduction

Dimensionality Reduction where is a function that takes the hidden variable and a set of parameters . Dimensionality reduction attempt to find a low dimensional (or hidden) representation h which can approximately explain the data x so that Typically, we choose the function family and then learn h and  from training data 33Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Least Squares Criterion Choose the parameters  and the hidden variables h so that they minimize the least squares approximation error (a measure of how well they can reconstruct the data x ). 34Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Simple Example Approximate each data example x with a scalar value h. Data is reconstructed by multiplying h by a parameter  and adding the mean vector .... or even better, lets subtract  from each data example to get mean-zero data 35Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Simple Example Approximate each data example x with a scalar value h. Data is reconstructed by multiplying h by a factor . Criterion: 36Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Criterion Problem: the problem is non-unique. If we multiply f by any constant  and divide each of the hidden variables h 1...I by the same constant we get the same cost. (i.e. (f  ) (h i /  ) = fh i ) Solution: We make the solution unique by constraining the length of f to be 1 using a Lagrange multiplier. 37Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Criterion Now we have the new cost function: To optimize this we take derivatives with respect to  and h i, equate the resulting expressions to zero and re-arrange. 38Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Solution To compute the hidden value, take dot product with the vector  39Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Solution To compute the hidden value, take dot product with the vector  or where To compute the vector , compute the first eigenvector of the scatter matrix. 40Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Computing h To compute the hidden value, take dot product with the vector  41Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Reconstruction To reconstruct, multiply the hidden variable h by vector . 42Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Principal Components Analysis Same idea, but not the hidden variable h is multi-dimensional. Each components weights one column of matrix F so that data is approximated as This leads to cost function: This has a non-unique optimum so we enforce the constraint that F should be a (truncated) rotation matrix and F T F=I 43Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

PCA Solution To compute the hidden vector, take dot product with each column of . To compute the matrix , compute the first eigenvectors of the scatter matrix. The basis functions in the columns of  are called principal components and the entries of h are called loadings 44Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Dual PCA Problem: PCA as described has a major drawback. We need to compute the eigenvectors of the scatter matrix But this has size D x x D x. Visual data tends to be very high dimensional, so this may be extremely large. Solution: Reparameterize the principal components as weighted sums of the data...and solve for the new variables . 45Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Geometric Interpretation Each column of  can be described as a weighted sum of the original datapoints. Weights given in the corresponding columns of the new variable . 46Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Motivation Solution: Reparameterize the principal components as weighted sums of the data...and solve for the new variables . Why? If the number of datapoints I is less than the number of observed dimension D x then the  will be smaller than  and the resulting optimization becomes easier. Intuition: we are not interested in principal components that are not in the subspace spanned by the data anyway. 47Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Cost functions...subject to  T  =I or  T X T X  =I....subject to  T  =I. Principal components analysis Dual principal components analysis 48Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Solution To compute the hidden vector, take dot product with each column of  =  X. 49Computer vision: models, learning and inference. ©2011 Simon J.D. Prince

Solution To compute the matrix , compute the first eigenvectors of the inner product matrix X T X. The inner product matrix has size I x I. If the number of examples I is less than the dimensionality of the data D x then this is a smaller eigenproblem. 50Computer vision: models, learning and inference. ©2011 Simon J.D. Prince To compute the hidden vector, take dot product with each column of  =  X.

K-Means algorithm Approximate data with a set of means 51Computer vision: models, learning and inference. ©2011 Simon J.D. Prince Least squares criterion Alternate minimization

52Computer vision: models, learning and inference. ©2011 Simon J.D. Prince