Computer Vision – Image Representation (Histograms)

Slides:



Advertisements
Similar presentations
Face Recognition Sumitha Balasuriya.
Advertisements

EigenFaces and EigenPatches Useful model of variation in a region –Region must be fixed shape (eg rectangle) Developed for face recognition Generalised.
Covariance Matrix Applications
EigenFaces.
Surface normals and principal component analysis (PCA)
Interest points CSE P 576 Ali Farhadi Many slides from Steve Seitz, Larry Zitnick.
Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction.
CLUSTERING PROXIMITY MEASURES
Computer Vision CS 143, Brown James Hays
Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem
Chapter 15 (Ch. 13 in 2nd Can.) Association Between Variables Measured at the Interval-Ratio Level: Bivariate Correlation and Regression.
Image Similarity and the Earth Mover’s Distance Empirical Evaluation of Dissimilarity Measures for Color and Texture Y. Rubner, J. Puzicha, C. Tomasi and.
Interest points CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
© 2003 by Davi GeigerComputer Vision September 2003 L1.1 Face Recognition Recognized Person Face Recognition.
1 Image Recognition - I. Global appearance patterns Slides by K. Grauman, B. Leibe.
Dimensional reduction, PCA
Project 4 out today –help session today –photo session today Project 2 winners Announcements.
Face Recognition Jeremy Wyatt.
Face Recognition Using Eigenfaces
Computer Vision I Instructor: Prof. Ko Nishino. Today How do we recognize objects in images?
Regression Chapter 10 Understandable Statistics Ninth Edition By Brase and Brase Prepared by Yixun Shi Bloomsburg University of Pennsylvania.
MACHINE LEARNING 6. Multivariate Methods 1. Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2 Motivating Example  Loan.
Multiple Object Class Detection with a Generative Model K. Mikolajczyk, B. Leibe and B. Schiele Carolina Galleguillos.
Comparing Images Adopted from Frederic Heger : Computational Photography Alexei Efros, CMU, Fall 2008.
Statistical Shape Models Eigenpatches model regions –Assume shape is fixed –What if it isn’t? Faces with expression changes, organs in medical images etc.
CS 485/685 Computer Vision Face Recognition Using Principal Components Analysis (PCA) M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
Computer vision.
Summarized by Soo-Jin Kim
Dimensionality Reduction: Principal Components Analysis Optional Reading: Smith, A Tutorial on Principal Components Analysis (linked to class webpage)
Principal Components Analysis BMTRY 726 3/27/14. Uses Goal: Explain the variability of a set of variables using a “small” set of linear combinations of.
Introduction to Quantitative Data Analysis (continued) Reading on Quantitative Data Analysis: Baxter and Babbie, 2004, Chapter 12.
BACKGROUND LEARNING AND LETTER DETECTION USING TEXTURE WITH PRINCIPAL COMPONENT ANALYSIS (PCA) CIS 601 PROJECT SUMIT BASU FALL 2004.
Wednesday, October 12 Correlation and Linear Regression.
Texture. Texture is an innate property of all surfaces (clouds, trees, bricks, hair etc…). It refers to visual patterns of homogeneity and does not result.
Principal Component Analysis Bamshad Mobasher DePaul University Bamshad Mobasher DePaul University.
Ch4 Describing Relationships Between Variables. Section 4.1: Fitting a Line by Least Squares Often we want to fit a straight line to data. For example.
Classifying Images with Visual/Textual Cues By Steven Kappes and Yan Cao.
Image Categorization Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/15/11.
TYPES OF STATISTICAL METHODS USED IN PSYCHOLOGY Statistics.
Statistical analysis Outline that error bars are a graphical representation of the variability of data. The knowledge that any individual measurement.
Principal Component Analysis (PCA). Data Reduction summarization of data with many (p) variables by a smaller set of (k) derived (synthetic, composite)
CSE 185 Introduction to Computer Vision Face Recognition.
11/23/2015Slide 1 Using a combination of tables and plots from SPSS plus spreadsheets from Excel, we will show the linkage between correlation and linear.
Visual Data on the Internet With slides from Alexei Efros, James Hays, Antonio Torralba, and Frederic Heger : Computational Photography Jean-Francois.
1 Psych 5500/6500 Measures of Variability Fall, 2008.
Local Predictability of the Performance of an Ensemble Forecast System Liz Satterfield and Istvan Szunyogh Texas A&M University, College Station, TX Third.
Presented by: Muhammad Wasif Laeeq (BSIT07-1) Muhammad Aatif Aneeq (BSIT07-15) Shah Rukh (BSIT07-22) Mudasir Abbas (BSIT07-34) Ahmad Mushtaq (BSIT07-45)
Multivariate statistical methods. Multivariate methods multivariate dataset – group of n objects, m variables (as a rule n>m, if possible). confirmation.
CS262: Computer Vision Lect 09: SIFT Descriptors
Dimensionality Reduction
Interest Points EE/CSE 576 Linda Shapiro.
Lecture 13: Feature Descriptors and Matching
University of Ioannina
Principal Component Analysis (PCA)
Dimension Reduction via PCA (Principal Component Analysis)
Feature description and matching
Principal Component Analysis
CS 1674: Intro to Computer Vision Scene Recognition
Computer Vision Lecture 16: Texture II
CS4670: Intro to Computer Vision
Feature space tansformation methods
CS4670: Intro to Computer Vision
Announcements Project 4 out today Project 2 winners help session today
Where are we? We have covered: Project 1b was due today
Feature descriptors and matching
Principal Component Analysis (PCA)
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

Computer Vision – Image Representation (Histograms) (Slides borrowed from various presentations)

Image representations Templates Intensity, gradients, etc. Histograms Color, texture, SIFT descriptors, etc.

Image Representations: Histograms Global histogram Represent distribution of features Color, texture, depth, … Space Shuttle Cargo Bay Images from Dave Kauchak

Image Representations: Histograms Histogram: Probability or count of data in each bin Joint histogram Requires lots of data Loss of resolution to avoid empty bins Marginal histogram Requires independent features More data/bin than joint histogram Images from Dave Kauchak

Image Representations: Histograms Clustering EASE Truss Assembly Use the same cluster centers for all images Space Shuttle Cargo Bay Images from Dave Kauchak

Computing histogram distance Histogram intersection (assuming normalized histograms) Chi-squared Histogram matching distance Cars found by color histogram matching using chi-squared

Histograms: Implementation issues Quantization Grids: fast but applicable only with few dimensions Clustering: slower but can quantize data in higher dimensions Matching Histogram intersection or Euclidean may be faster Chi-squared often works better Earth mover’s distance is good for when nearby bins represent similar values Few Bins Need less data Coarser representation Many Bins Need more data Finer representation

What kind of things do we compute histograms of? Color Texture (filter banks or HOG over regions) L*a*b* color space HSV color space

What kind of things do we compute histograms of? Histograms of oriented gradients SIFT – Lowe IJCV 2004

Orientation Normalization Compute orientation histogram Select dominant orientation Normalize: rotate to fixed orientation [Lowe, SIFT, 1999] 2 p T. Tuytelaars, B. Leibe

But what about layout? All of these images have the same color histogram

Spatial pyramid Compute histogram in each spatial bin

Spatial pyramid representation Extension of a bag of features Locally orderless representation at several levels of resolution level 0 Lazebnik, Schmid & Ponce (CVPR 2006)

Spatial pyramid representation Extension of a bag of features Locally orderless representation at several levels of resolution level 1 level 0 Lazebnik, Schmid & Ponce (CVPR 2006)

Spatial pyramid representation Extension of a bag of features Locally orderless representation at several levels of resolution level 2 level 0 level 1 Lazebnik, Schmid & Ponce (CVPR 2006)

Feature Vectors & Representation Power How to analyze the information content in my features? Is there a way to visualize the representation power of my features?

Mean, Variance, Covariance and Correlation

Covariance Explained

Covariance Cheat Sheet

Organize your data into a set of (x, y) First we need to calculate the means of both x and y independently.

Plug your variables into the formula Now, you have everything you need to find the covariance of x and y. Plug your value for n, your x and y averages, and your individual x and y values into the appropriate spaces to get the covariance of x and y -> Cov(x, y)

Covariance is unbounded Depending on the different units of x and y, the range of values that x and y take can be far away from each other. In order to normalize the covariance value, we can use the below formula: This is called Correlation.

Know that a correlation of 1 indicates perfect positive correlation. When it comes to correlations, your answers will always be between 1 and -1. Any answer outside this range means that there has been some sort of error in the calculation. Based on how close your correlation is to 1 or -1, you can draw certain conclusions about your variables. For instance, if your covariance is exactly 1, this means that your variables have perfect positive correlation. In other words, when one variable increases, the second increases, and when one decreases the other decreases. This relationship is perfectly linear for variables with perfect positive correlation — no matter how high or low the variables get, they'll have the same relationship. As an example of this sort of covariance, let's consider the simple business model of a lemonade stand. If x represents the number of lemonades you sell and y represents the money you make, y will always increase with x. It doesn't matter how many lemonades you sell — you'll always make more money buy selling more lemonades. You won't, for instance, start losing money after you sell your thousandth lemonade. You'll earn the same amount of profit as you did for the very first sale.

Know that a correlation of -1 indicates perfect negative correlation. If your correlation is -1, this means that your variables are perfectly negatively correlated. In other words, an increase in one will cause a decrease in the other, and vice versa. As above, this relationship is linear. The rate at which the two variables grow apart from each other doesn't decrease with time. As an example of this sort of correlation, let's consider a very basic supply and demand scenario. In extremely simplified terms, if x equals the number of products a company makes and y equals the price it charges for these products, as x increases, y will decrease. In other words, the more common a product becomes, the less expensive it becomes.

Know that a correlation of 0 indicates no correlation. If your correlation is equal to zero, this means that there is no correlation at all between your variables. In other words, an increase or decrease in one will not necessarily cause an increase or decrease in the other with any predictability. There is no linear relationship between the two variables, but there might still be a non-linear relationship. As an example of this sort of correlation, let's consider the case of someone who is taking a homeopathic remedy for a viral illness. If x represents the dosage of the remedy taken and y represents the viral load in the person's bloodstream, we wouldn't necessarily expect y to increase or decrease as x increases. Rather, any fluctuation in y would be completely independent of x.

Know that another value between -1 and 1 indicates imperfect correlation. Most correlation values aren't exactly 1, -1, or 0. Usually, they are somewhere in between. Based on how close a given correlation value is to one of these benchmarks, you can say that it is more or less positively correlated or negatively correlated. For example, a covariance of 0.8 indicates that there is a high degree of positive correlation between the two variables, though not perfect correlation. In other words, as x increases, y will generally increase, and as x decreases, y will generally decrease, though this may not be universally true.

An Example

Do everything this time using matrices Data Means Deviations Covariance Matrix ??

Covariance Matrix We can interpret the variance and covariance statistics in matrix V to understand how the various test scores vary and covary. Shown in red along the diagonal, we see the variance of scores for each test. The art test has the biggest variance (720); and the English test, the smallest (360). So we can say that art test scores are more variable than English test scores. The covariance is displayed in black in the off-diagonal elements of matrix V. The covariance between math and English is positive (360), and the covariance between math and art is positive (180). This means the scores tend to covary in a positive way. As scores on math go up, scores on art and English also tend to go up; and vice versa. The covariance between English and art, however, is zero. This means there tends to be no predictable relationship between the movement of English and art scores.

How to use Covariance of Features Can we use this valuable covariance information among different features of our data for something valuable?

Principle Component Analysis Finds the principle components of the data

Projection onto Y axis The data isn’t very spread out here, therefore it doesn’t have a large variance. It is probably not the principal component.

Projection onto X axis On this line the data is way more spread out, it has a large variance.

Eigenvectors and Eigenvalues in PCA When we get a set of data points, we can deconstruct the set’s covariance matrix into eigenvectors and eigenvalues. Eigenvectors and values exist in pairs: every eigenvector has a corresponding eigenvalue. An eigenvector is a direction, in the example above the eigenvector was the direction of the line (vertical, horizontal, 45 degrees etc.) An eigenvalue is a number, telling you how much variance there is in the data in that direction, in the example above the eigenvalue is a number telling us how spread out the data is on the line. The eigenvector with the highest eigenvalue is therefore the principal component.

Example

Example: 1st Principle Component

Example: 2nd Principle Component

Dimensionality Reduction

Only 2 dimensions are enough ev3 is the third eigenvector, which has an eigenvalue of zero.

Reduce from 3D to 2D

How to select the reduced dimension? Can I automatically select the number of effective dimensions of my data? What is the extra information that I need to specify for doing this automatically? Does PCA consider your data’s labels?