Download Recognition - Introduction to Computer Vision - Lecture Slides and more Slides Computer Vision in PDF only on Docsity!
CSE152, Spr 12 Intro Computer Vision
Recognition I
Introduction to Computer Vision
CSE 152
Lecture 17
CSE152, Spr 12 Intro Computer Vision
CSE152, Spr 12 Intro Computer Vision
Three Source Photometric stereo:
Offline: Using source directions & BRDF, construct reflectance map for each light source direction. R 1 (p,q), R 2 (p,q), R 3 (p,q) Online:
- Acquire three images with known light source directions. E 1 (x,y), E 2 (x,y), E 3 (x,y) Orthographic projection, distant light sources.
- For each pixel location (x,y), find (p,q) as the intersection of the three curves R 1 (p,q)=E 1 (x,y) R 2 (p,q)=E 2 (x,y) R 3 (p,q)=E 3 (x,y) 3This is the surface normal at pixel (x,y). Over image, the normal field is estimated 4 Integrate normal field to get depth. (^) CSE152, Spr 12 Intro Computer Vision
Gradient Space (p,q)
x
y
f(x,y)
Gradient Space : (p,q) Normal vector
n
CSE152, Spr 12 Intro Computer Vision
What is the reflectance map?
• Reflectance map is a function R(p,q) –
which gives the image irradiance as a
function of the surface gradient (p,q) or
equivalently the surface normal.
• For a fixed viewing direction, and light
source strength and direction
• Can be computed from known BRDF.
• Can be measured using a probect of the
same material
CSE152, Spr 12 Intro Computer Vision
Reflectance Map of Lambertian Surface
0 0.1 0.2^ 0.^
What does the intensity (Irradiance) of one pixel in one image tell us?
i=0.
E.g., Normal lies on this curve
It constrains the surface normal projecting to that pont to a curve
p
q
CSE152, Spr 12 Intro Computer Vision
Two Light Sources
Two reflectance maps
A third image would disambiguate match
E.g., Normal lies on this curve
i=0.
0 0.1^ 0.2^ 0.^
i=0.
p
q
CSE152, Spr 12 Intro Computer Vision
Plastic Baby Doll: Normal Field
CSE152, Spr 12 Intro Computer Vision
Next step:
Go from normal field to surface
CSE152, Spr 12 Intro Computer Vision
Lambertian Photometric stereo
• If the light sources s 1 , s 2 , and s 3 are known , then
we can recover b from as few as three images.
(Photometric Stereo: Silver 80, Woodham81).
[e 1 e 2 e 3 ] = b T[ s 1 s 2 s 3 ]
• i.e., we measure e 1 , e 2 , and e 3 for each pixel
location and we know s 1 , s 2 , and s 3. We can then
solve for b by solving a linear system.
• Normal is: n = b /| b |, albedo is: | b |
bT^ = [ e 1 e 2 e 3 ] [ s 1 s 2 s 3 ]
− 1
^
CSE152, Spr 12 Intro Computer Vision
Uncalibrated photometric stereo
1. Take n images as input without knowledge of
light directions or strengths
2. Perform SVD to compute B*.
3. Find some A such that B*A is close to
integrable.
4. Integrate resulting gradient field to obtain height
function f*(x,y).
Comments:
- f*(x,y) differs from f(x,y) by a GBR.
- Can use specularities to resolve GBR for non- Lambertian surface.
CSE152, Spr 12 Intro Computer Vision
Generalized Bas-Relief Transformations
f: true depth
f: GBR transform of depth
_
CSE152, Spr 12 Intro Computer Vision
Recognition Challenges
- Within-class variability
- Different objects within the class have different shapes or different material characteristics
- Deformable
- Articulated
- Compositional
- Pose variability:
- 2-D Image transformation (translation, rotation, scale)
- 3-D Pose Variability (perspective, orthographic projection)
- Lighting
- Direction (multiple sources & type)
- Color
- Shadows
- Occlusion – partial
- Clutter in background -> false positives
CSE152, Spr 12 Intro Computer Vision
Futher Recognition Issues
- How general is the problem?
- 2D vs. 3D
- range of viewing conditions
- available context
- segmentation cues
- What sort of data is best suited to the problem?
- Whole images
- Local 2D features (color, texture,
- 3D (range) data
- What information do we have in the database?
- Collection of images?
- 3-D models?
- Learned representation?
- Learned classifiers?
- How many objects are involved?
- small: brute force search
- large: ??
CSE152, Spr 12 Intro Computer Vision
A Rough Recognition Spectrum
Appearance-Based Recognition (Eigenface, Fisherface)
Local Features + Spatial Relations
3-D Model-Based Recognition
Geometric Invariants
Image Abstractions/ Shape Volumetric Primitives Contexts
Function Bags of Features
Increasing Generality
CSE152, Spr 12 Intro Computer Vision
Appearance-Based Vision:
A Pattern Classification Viewpoint
1. Feature Space + Nearest Neighbor
2. Dimensionality Reduction
3. Bayesian Classification
4. Appearance Manifolds
CSE152, Spr 12 Intro Computer Vision
Sketch of a Pattern Recognition
Architecture
Feature Extraction
Classification Image (window)
Object Feature Identity Vector
CSE152, Spr 12 Intro Computer Vision
Example: Face Detection
• Scan window over image.
• Search over position & scale.
• Classify window as either:
Window Classifier
Face Non-face
CSE152, Spr 12 Intro Computer Vision
• So, what are the features?
• So, what is the classifier
CSE152, Spr 12 Intro Computer Vision
Pattern Classification Summary
• Supervised vs. Unsupervised: Do we have labels?
• Supervised
- Nearest Neighbor
- Bayesian
- Plug in classifier
- Distribution-based
- Projection Methods (Fisher’s, LDA)
- Neural Network
- Support Vector Machine
- Kernel methods
• Unsupervised
- Clustering
- Reinforcement learning
The Space of Images
- Consider an n-pixel image to be a point in an n- dimensional space, x ∈ R n.
- Each pixel value is a coordinate of x.
x 1
x 2
xn
x 1
xn
x 2
CSE152 Computer Vision I
Appearance-based (View-based)
- Face Space:
- A set of face images construct a face space in R n
- Appearance-based methods analyze the distributions of individual faces in face space
Some questions:
- How are images of an individual, under all conditions, distributed in this space?
- How are the images of all individuals distributed in this space?
CSE152 Computer Vision I
More features
• Filtered image
• Filter with multiple filters (bank of filters
• Histogram of colors
• Histogram of Gradients (HOG)
• Haar wavelets
• Scale Invariant Feature Transform (SIFT)
• Speeded Up Robust Feature (SURF)
CSE152 Computer Vision I
• So, what are the features?
• So, what is the classifier
CSE152, Spr 12 Intro Computer Vision
Eigenfaces: Principal Component Analysis (PCA)
CSE152, Spr 12 Intro Computer Vision
PCA Example
First Principal Component Direction of Maximum Variance
v 1
v 2
Mean
CSE152, Spr 12 Intro Computer Vision
Eigenfaces
• Modeling
- Given a collection of n labeled k by l training images, represent each one as k*l dimensional column vector
- Compute mean image and covariance matrix.
- Compute k Eigenvectors (note that these are images) of covariance matrix corresponding to k largest Eigenvalues. (Or perform using SVD!!)
- Project the training images to the k-dimensional Eigenspace.
• Recognition
- Given a test image, project vectorized image to Eigenspace.
- Perform classification to the projected training images. CSE152, Spr 12 Intro Computer Vision
Eigenfaces: Training Images
[ Turk, Pentland 91]
CSE152, Spr 12 Intro Computer Vision
Eigenfaces
Mean Image Basis Images
CSE152, Spr 12 Intro Computer Vision
Basis Images for Variable Lighting