Ilovepdf Merged
Ilovepdf Merged
Ilovepdf Merged
FindingFeatures, Affine
Invariance, SIFT
1
Outline
• Concept of Scale
– Pyramids
– Scale-space approaches briefly
• Scale invariant region selection
• SIFT: an image regiondescriptor
2
Reminder: Motivation
• Image Matching
– Fundamentalaspect of many problems
• Object Recognition
• 3D Structures
• Stereo Correspondence
• Motion Tracking
• ….
3
Reminder: Motivation
• Image Matching
– Fundamental aspect of many problems
• Object Recognition
• 3D Structures
• Stereo Correspondence
• Motion Tracking
• ….
4
Review of the CornerDetection
Corners are invariant to
translation
rotation
scaling
5
SCALE
6
SCALE
7
SCALE
9
Scale-Space
• Any given image can
contain objects that exist
at scales different from
other objects in the same
image
• Or, that even existat
multiple scales
simultaneously
10
Scale-Space
• Any given image can
contain objects that exist
at scales different from
other objects in the same
image
• Or, that even existat
multiple scales
simultaneously
11
Multi-scale Representation
Small Scale Smaller Filter
Features Masks
Image
Large Scale Larger Filter
Features Masks
12
Multi-scale Representation
Small Scale Smaller Filter
Features Masks
Image
Large Scale Larger Filter
Features Masks
13
Multi-Scale Representation: Pyramid
14
Multi-Scale Representation: Pyramid
15
Pyramid can capture global and local
features
16
Gaussian Pyramids
17
Source: Forsyth
Laplacian Pyramids
18
Source: Forsyth
Laplacian Pyramids
1
-2 1 -2 1
1
Laplacian of Gaussian (LoG): Gaussian first to smooth images then perform Laplacian operation
19
Laplacian Pyramids
20
Laplacian Pyramids
Laplacian Pyramid Construction
22
Laplacian Pyramid Construction
23
Decimation and Interpolation
Lowpass filter
(i.e., Gaussian)
24
Difference of Gaussian(DoG)
• It is a common approximation of LoG (better run
time).
25
Scale Selection-Automated
• Find scale that gives local maxima of some function
f in both position and scale.
f f
Image 1 Image 2
27
Patch Size Corresponding toScale
28
Patch Size Corresponding toScale
29
Patch Size Corresponding toScale
30
Patch Size Corresponding toScale
31
Patch Size Corresponding toScale
42
Scale Invariant Feature Transform (SIFT)
4
3
Scale Invariant Feature Transform (SIFT)
38
Scale Invariant Feature Transform (SIFT)
• Image content is transformed into local feature
coordinates that are invariant to translation,
rotation, scale, and other imaging parameters
39
Overall Procedure at a High Level
Scale-Space Search over multiple scales and image
Extrema locations
Detection
0 2
angle histogram
41
SIFT Descriptor
16 histograms x 8 orientations
= 128 features
42
SIFT Descriptor
Full version
• Divide the 16x16 window into a 4x4 grid of cells (2x2 case shown below)
• Compute an orientation histogram for each cell
• 16 cells * 8 orientations = 128 dimensional descriptor
• Threshold normalize the descriptor:
such that:
0.2
43
Properties of SIFT
Extraordinarily robust matching technique
44
Revisit SIFT Steps
(1) Scale-space extrema detection
– Extract scale and rotation invariant interest points (i.e.,
keypoints).
(2) Keypoint localization
– Determine location and scale for each interest point.
– Eliminate “ weak ” keypoints
(3) Orientation assignment
– Assign one or more orientations to each keypoint.
(4) Keypoint descriptor
– Use local image gradients at the selected scale.
45
(1) Scale-Space ExtremaDetection
46
(1) Scale-Space ExtremaDetection
scale
• Harris-Laplace
LoG
Find local maximaof:
– Harris detector in space y
– LoG in scale
Harris → x
scale
• SIFT
DoG
Find local maximaof:
– Hessian in space y
– DoG in scale
Hessian x
47
(1) Scale-Space ExtremaDetection
48
(1) Scale-Space ExtremaDetection
• Extract local extrema
(i.e., minima or maxima)
( )
D k 2
in DoG pyramid.
-Compare each point to
its 8 neighbors at the
same level, 9 neighbors
in the level above, and 9
D(k ) neighbors in the level
below (i.e., 26 total).
D( )
49
(1) Scale-Space ExtremaDetection
50
(2) Keypoint Localization
• There are still a lot of points, some of them are
not good enough.
• The locations of keypoints may be not
accurate.
• Eliminating edge points.
51
(2) Keypoint Localization
—Reject (1) points with low contrast(flat)
(2) poorly localized along an edge (edge)
(2) Keypoint Localization
—Reject (1) points with low contrast(flat)
(2) poorly localized along an edge (edge)
Inaccurate KeypointLocalization
Poor contrast
True Extrema
Detected Extrema
Sampling x
61
Inaccurate KeypointLocalization
The Solution:
Taylor expansion:
56
Local extremas Remove low contrast features
57
Local extremas Remove low edges
58
SIFT Descriptor
59
(3) Orientation Assignment
Create histogram of gradient directions, within a region around the
keypoint, at selected scale:
0 2
•Histogram entries are weighted by (i) gradientmagnitude and (ii) a
Gaussian function with σ equal to 1.5 times the scale of the key point.
(3) Orientation Assignment
61
(3) Orientation Assignment
62
(3) Orientation Assignment
63
(3) Orientation Assignment
64
(3) Orientation Assignment
65
(4) KeypointDescriptor
• Partial Voting: distribute histogram entries into adjacent bins
(i.e., additional robustness to shifts)
– Each entry is added to all bins, multiplied by a weight of1-d,
where d is the distance from the bin it belongs.
66
(4) KeypointDescriptor
• Descriptordepends on two main parameters:
– (1) number of orientations
– n x n array of orientation histograms
67
Evaluating Results
How can we measure the performance of a feature matcher?
true
# true positives matched positive
# true positives rate
68
Evaluating Results
How can we measure the performance of a feature matcher?
ROC curve (“Receiver Operator Characteristic”)
1
true
# true positives matched positive
# true positives rate
69
Change of Illumination
Change of brightness => doesn’t effect gradients
(difference of pixels value).
Change of contrast => doesn’t effect gradients
(up to normalization).
Saturation (non-linear change of illumination) =>
affects magnitudes much more than orientation.
=> Threshold gradient magnitudes to 0.2 and
renormalize.
70
Illumination invariance?
71
72
• Extract features
73
• Extract features
• Compute putative matches
74
• Extract features
• Compute putative matches
• Loop:
– HypothesizetransformationT (small group of
putative matches that are related by T)
75
• Extract features
• Compute putativematches
• Loop:
– Hypothesize transformation T (small groupof
putative matches that are related by T)
– Verify transformation (search for other matches
consistent with T) 83
• Extract features
• Compute putativematches
• Loop:
– Hypothesize transformation T (small groupof
putative matches that are related by T)
– Verify transformation (search for other matches
consistent with T) 84
Object Recognition
For training images:
Extracting keypoints by SIFT. Creating
descriptors database.
For query images:
Extracting keypoints by SIFT.
For each descriptor - finding nearest neighbor in DB.
78
Recognition/Matching
79
Image Registration
80
THE END
Slide Credits: Ulas Bagci
INTRODUCTION
• Recognition of object deals with labelling of
an object present in an image in the same
way as a human will understand it.
• For computers to identify/recognize an
object there should be prior knowledge
database.
• Machine learning deals with training of
computers by giving them to prior
knowledge about the object shape, size,
color etc. which leads to recognise the
object.
Like human understanding , object recognition includes:
sky
tree
people
Scene and context categorization
The whole image says a scene where people come to visit Taj mahal
Instance level recognition:
All of the images contain a common object i.e. a building like structure
Object categorization problem
Collect data
Prior knowledge
Choose features
Choose model
Train classifier
Evaluate classifier
End
Challenges in object recognition
Ped
meters
Ped
Car
meters
• Google net
Training data
Physical environment
Pre processing
Data acquisition
Feature extraction
Pre processing
Feature selection
Feature extraction
Features
Features
Classification Model learning and
estimation
Post processing
Decision
Pattern representation
Feature vector
• A vector of observations (measurements).
Pattern • Feature vector (𝑥 ∈ 𝑋)
𝑥1 • 𝑥 is a point in feature
𝑥2
. =𝑥
space 𝑋
. • Feature vector is the set
𝑦 𝑥𝑑 of observations.
• Pattern (𝑦 ∈ 𝑌)
Task
• Our task is to develop a classifier(or decision rule) which can
map the features with respective patterns.
𝑞: 𝑋 → 𝑌
Feature extraction
Task: to extract features which are good for classification.
Good features:
what we want
normalization term
(posterior)
• The prior: P(skin)
• P(skin) may be larger if we know the image contains a
person
• For a portrait, P(skin) may be higher for pixels in the center
• P(skin) may be proportion of skin pixels in training set
𝑎1 𝑏1
𝑎2 𝑏2
𝑥 = . −→ reduce dimensionality −→ y = . (K ≪ N)
. .
𝑎𝑁 𝑏𝑁
44
• Principle Component Analysis is all about finding the direction
in a feature space along which all the points have the greatest
variance.
Uses:
• Data Visualization
• Data Reduction
• Data Classification
• Trend Analysis
• Factor Analysis
• Noise Reduction
• Suppose we have a population measured on p random variables
X1,…,Xp.
• Note that these random variables represent the p-axes of the
Cartesian coordinate system in which the population resides.
• Our goal is to develop a new set of p axes (linear combinations of the
original p axes) in the directions of greatest variability.
X2
X1
• Choose a line that fits the data so the points are spread out
well along the line
Algebraic Interpretation – 1D
• Formally, minimize sum of squares of distances to the line.
𝑥Ԧ 𝑇 𝑃
Origin
Point 1
P P P… P Point 2 L
Line * t t t … t *
Point 3 * i = (𝑥Ԧ 𝑇 𝑃𝑖 )2
1 2 3… m : n 𝑖
Point m e
xT BT B x
• 𝑥 is an eigen vector of 𝐵 𝑇 𝐵
𝑻
How to calculate 𝑩 𝑩?
2
σ𝑛𝑖=1 𝑥𝑖 σ𝑛𝑖=1 𝑥𝑖 𝑦𝑖
𝐵𝑇 𝐵= 2
σ𝑛𝑖=1 𝑥𝑖 𝑦𝑖 σ𝑛𝑖=1 𝑦𝑖
= vT (x − x)(x − x)T v
x
= vT (x − x)(x − x)T
x
= vT Av
• v1 is eigenvector of A with largest eigenvalue
• v2 is eigenvector of A with smallest eigenvalue
Test:
• Generate candidates in new image
• Score the candidate
Discriminative methods(window method)
• Object detection and recognition is formulated as a classification
problem.
• The image is partitioned into a set of overlapping windows
Computer screen
Bag of image patches In some feature space
Generative vs. Discriminative
Mercers Theorem
where x and y be any two point in the image plane and Φ(x) and
Φ (y) are the corresponding points in the feature plane
respectively. ” ・ ” is the dot product in the kernel space and
k (x, y) represents kernel function.
Standard Kernels
9/15/16
Computer Vision
Optical Flow
1
Readings
• Szeliski, R.
• Slide Credits : Ulas Bagci
2
Motion
3
Reasons
• the patterns only move when you blink or
move your eyes
• the arrangement of the backgrounds of the
‘rabbits’ determines which way the patterns
rotate.
4
Motion
Perception of change in the outside world is of the
highest importance for all living beings.
5
Why Estimate Visual Motion?
• Visual Motion can be due to problems
– Camera instabilities, jitter
6
Why Estimate Visual Motion?
• Visual Motion can be due to problems
– Camera instabilities, jitter
• Visual Motion Indicates dynamics in the scene
– Moving objects, behavior, tracking objects,
analyze trajectories
7
Why Estimate Visual Motion?
• Visual Motion can be due to problems
– Camera instabilities, jitter
• Visual Motion Indicates dynamics in the scene
– Moving objects, behavior, tracking objects,
analyze trajectories
• Visual Motion reveals spatial layout
– Motion parallax
8
Motion Analysis
• Motion Analysis is connected with real-time
analysis; Ex: for robot navigation, gesture
identification etc.
• Motion Models
12
Applications
Motion
based
segmentation
Deformation Structure
Analysis from motion
Alignment
Tumor
(e.g., UAV
Tracking analysis)
Video
Compression
13
Video
• A video is a sequence of frames captured over
time
– Image data is a function of space (x,y) and time (t)
I(x,y,t)
Temporal
change t 15
Apparent Motion
15
Describing Motion
16
Describing Motion
• Simplest way: Image Differencing (intensity values)
t
t+1
17
Optical Flow
• Refers to the problem of estimating a vector
field of local displacement in a sequence of
images.
18
Optical Flow
• Refers to the problem of estimating a vector
field of local displacement in a sequence of
images.
• When we fix our attention to a single point
and measure velocities flowing through that
location, then the problem is called optical
flow.
19
Optical Flow
• Refers to the problem of estimating a vector
field of local displacement in a sequence of
images.
• When we fix our attention to a single point
and measure velocities flowing through that
location, then the problem is called optical
flow.
– Stereo matching, image matching, tracking,…
20
Optical Flow
• Optical flow refers the image changes due to
motion during a time interval dt.
• The optical flow field is the velocity field that
represents the 3-D motion of object points across
a 2-D image. It represents only motion-related
intensity changes in the image.
• Optical flow should not be sensitive to
illumination changes and motion of unimportant
objects (shadows)
21
Estimating Optical Flow
• Assume the image intensity I is constant
Assumption:
23
Estimating Optical Flow
24
Estimating Optical Flow
25
Estimating Optical Flow
I (x, y,t ) ≅ I (x + dx, y + dy,t + dt)
I (x ( t ) + u.∆t, y(t) + v.∆t) — I ( x ( t ) , y(t), t) ≈ 0
Assuming I is differentiable function, and expand the first term using Taylor’s series:
26
Estimating Optical Flow
I (x, y,t ) ≅ I (x + dx, y + dy,t + dt )
I(x(t ) + u.∆t, y(t) + v.∆t) — I(x(t ), y(t), t) ≈ 0
Assuming I is differentiable function, and expand the first term using Taylor’s series:
28
Assumption: The Brightness Constraint
29
Assumption: The Brightness Constraint
30
Assumption: The Brightness Constraint
32
Second Assumption: Gradient Constraint
Velocity vector is constant within a small
neighborhood (LUCAS AND KANADE)
E(u, v) @E(u, v)
= = 0
@u @v
2(I x u + I y v + I t ) I x = 0
2(I x u + I y v + I t )I y = 0
36
Lucas-Kanade
Type2 P Σ Σ
Minimum least square solution:
P
I
equation
x I x I y u I x I t
P P 2 = — P
I x
here. I y I y v Iy I t
37
Lucas-Kanade
P 2 P Σ Σ P
I I xIy u I x I t
P x P 2 = — P
IxIy Iy v Iy I t
Σ Σ
T xx Txy u T xt
Structural
= —
Tensor
representation Txy Tyy v Tyt
38
40
How does Lucas-Kanade behave?
At edges, matrix T becomes singular!
Textured region
Homog.
region
Eigenvalues of
Eigenvalues of
matrix T are high
matrix T are very small
41
Pisalls & Alternatives
• Brightness constancy is not satisfied
– Correlation based method could be used
42
Pisalls & Alternatives
• Brightness constancy is not satisfied
– Correlation based method could be used
• A point may not move like its neighbors
– Regularization based methods
43
Pisalls & Alternatives
• Brightness constancy is not satisfied
– Correlation based method could be used
• A point may not move like its neighbors
– Regularization based methods
• The motion may not be small (Taylor does not
hold!)
– Multi-scale estimation could be used
44
Multi-Scale Flow Estimation
u=1.25 pixels
u=2.5 pixels
u=5 pixels
u=10 pixels
image It-1 image It+1
I(x,t) I(x,t + 1)
→
v?
p
46
Example: Optical Flow in 1D
I(x,t) I(x,t + 1)
It
Temporal derivative
p →
v
x
Ix
Spatial derivative
Assumptions:
I →
I t = I
I
Ix = V − t • Brightness constancy
x t t x= p
Ix • Small motion
47
Example: Optical Flow in 1D
Iterating helps refining the velocity vector
I(x,t) I(x,t + 1)
Temporal derivative at 2nd iteration
It
p
x
Ix
→ → − It
vv previous
Converges in about 5 iterations
Ix 48
Lukas-Kanade without Pyramid
49
Lukas-Kanade with Pyramid
50
Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
51
Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
• Minimize a global energy function
52
Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
• Minimize a global energy function
53
Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
• Minimize a global energy function
54
Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
• Minimize a global energy function
I y (I xu k + I y v k + I t )
v k +1 = v k −
2 +I 2x+I 2y u
57
Applications: Target Tracking
58
Applications: Action Recognition
− + − +
Fx , Fy Fx , Fx , Fy , Fy blurred F −, F +, F −, F +
x x y y
59
Recognition actions at a distance, Efros et al.
Applications: Motion Modeling
Flipping between image 1 and 2. Estimated flow field Second image is warped!
(hue indicates orientation
and saturation indicates magnitude)
60
Applications: Motion Segmentation
61
Global Motion Models (Parametric)
All pixels are considered to summarize global
motion!
• 2D Models
– Affine
– Quadratic
– Planar projective (homography)
• 3D Models
– Inst. Camera motion models
– Homography+epipole
– Plane+parallalx
62
Motion Models
63
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
64
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
I x u + Iy v + I t ≈ 0
65
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
I x (a 1 + a 2 x + a 3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
66
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
I x (a 1 + a 2 x + a 3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
67
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
I x ( a 1 + a 2 x + a 3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
68
Computer Vision
1
Readings
• Szeliski, R.
• Slide Credits : Ulas Bagci
2
Recap: Estimating Optical Flow
4
Second Assumption: Gradient Constraint
2(I x u + I y v + I t )I x = 0
2(I x u + I y v + I t )I y = 0
5
Recap: Lucas-Kanade
T yt T xy —T xt T yy T xt T xy —T yt T xx
u= 2 and v = 2
T x x T y y —T x y T x x T y y —T x y
6
Recap: Horn & Schunck
• Global method with smoothness constraint to
solve aperture problem
• Minimize a global energy function
7
Global Motion Models(Parametric)
All pixels are considered to summarize global
motion!
• 2D Models
– Affine
– Quadratic
– Planar projective (homography)
• 3D Models
– Inst. Camera motion models
– Homography+epipole
– Plane+parallalx
8
Motion Models
9
Example: Affine
Motion u(x, y) = a1 +
a 2 x + a 3 y v(x, y) = a 4 +
a 5 x + a6y
10
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
v(x, y) = a 4 + a 5 x + a 6 y
I x u + Iy v + I t ≈ 0
11
Example: Affine Motion
u(x, y) = a 1 + a 2 x + a 3 y
I x (a 1 + a 2 x + a 3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
v(x, y) = a 4 + a 5 x + a 6 y
12
Example: Affine
Motion u(x, y) = a1 +
a 2 x + a 3 y v(x, y) = a 4 +
a 5 x + a6y
I x (a 1 + a 2 x + a 3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
13
Example: Affine
Motion u(x, y) = a1 +
a 2 x + a 3 y v(x, y) = a 4 +
I x ( aa1 5+xa 2+x +a a6 y
3 y) + I y (a 4 + a 5 x + a 6 y) + I t ≈ 0
14
Example: Affine Motion
u(x, y) = a1 + a2 x + a3y
v(x, y) = a4 + a5 x + a6y
I x (a 1 + a2 x + a3 y) + I y (a4 + a5 x + a6 y) + I t 0
15
Locally Affine MotionModel
13
Locally Affine MotionModel
17
Locally Affine MotionModel
• E(A) should be computed within a small
neighborhood (i.e. locally affine term, let say
D)
• From Taylor’s expansion
18
Locally Affine MotionModel
19
Locally Affine MotionModel
20
Locally Affine MotionModel
18
Locally Affine MotionModel
22
Locally Affine MotionModel
23
Locally Affine MotionModel
24
Locally Affine MotionModel
25
Locally Affine MotionModel
26
Locally Affine MotionModel
27
Smoothness Constraint on Locally
Affine Motion Model
28
Smoothness Constraint on
Locally Affine Motion Model
29
Smoothness Constraint on Locally
Affine Motion Model
30
Smoothness Constraint on Locally
Affine Motion Model
31
Minimizing ErrorFunction
dE(A) dE b (A) dE s (A)
= +
da da da
32
Minimizing ErrorFunction
dE(A) dE b (A) dE s (A)
= +
da da da
33
Minimizing ErrorFunction
34
Minimizing Error Function-Solution Vector
36
Global Motion
37
Global Motion
Global Motion can be
Estimate motion using all used to
pixels in the image • Remove camera motion
• Object-based
segmentation
• generate mosaics
38
Global Motion
39
Recap: Object Tracking
40
Challenges in ObjectTracking
41
Challenges in ObjectTracking
42
Shi-Tomasi FeatureTracker
43
Shi-Tomasi FeatureTracker
44
Shi-Tomasi FeatureTracker
45
Shi-Tomasi FeatureTracker
46
Shi-Tomasi FeatureTracker
48
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
49
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
• Object tracking (car, airplane, person)
50
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
• Object tracking (car, airplane, person)
• Feature tracking (Harris corners)
51
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
• Object tracking (car, airplane, person)
• Feature tracking (Harris corners)
• Multiple object tracking
52
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
• Object tracking (car, airplane, person)
• Feature tracking (Harris corners)
• Multiple object tracking
• Tracking in single/multiple camera(s)
53
KLT Tracking
• KLT: Kanade-Lucas-Tomasi
• Tracking deals with estimating the trajectory
of an object in the image plane as it moves
around a scene
• Object tracking (car, airplane, person)
• Feature tracking (Harris corners)
• Multiple object tracking
• Tracking in single/multiple camera(s)
• Tracking in fixed/moving camera 54
KLT Tracking Algorithm
• Find GoodFeaturesToTrack
– Harris Corners (thresholdedon smallest
eigenvalues)
• Use LK algorithm to find optical flows
• Use Coarse-to-Fine strategy to deal with large
movements
• When creating long tracks, check appearance
of registered patch against appearance of
initial patch to find points that have drifted
55
Recent Developments at Optical Flow
57
9/22/16
DeepFlow (Large Displacement Optical Flow)
59
Practice: Horn-SchunckAlgorithm
60
Practice: Horn-SchunckAlgorithm
61
Practice: Horn-SchunckAlgorithm
62
Optical Flow - Quantitative Evaluation
63
Interpretation of Optical Flow Fields
64
Interpretation of Optical Flow Fields
65
Interpretation of Optical Flow Fields
66
Interpretation of Optical Flow Fields
67
Interpretation of Optical Flow Fields
68
Interpretation of Optical Flow Fields
69
Interpretation of Optical Flow Fields
70
Interpretation of Optical Flow Fields
Object is moving
Directly toward the camera
that is stationary
71
Interpretation of Optical Flow Fields
72
Interpretation of Optical Flow Fields
73
Interpretation of Optical Flow Fields
74
Interpretation of Optical Flow Fields
75
Application in ImageAlignment
• Motion can be used for image alignment
73
Practice: HomogenousCoordinates
Q: How can we represent translation as a 3x3 matrix?
x' = x + t x
y' = y + t y
77
Practice: HomogenousCoordinates
Q: How can we represent translation as a 3x3 matrix?
x' = x + t x
y' = y + t y
78
Practice: Homogenous Coordinates
Practice: Homogenous Coordinates
Affine Transformation
Affine Transformation
Face Recognition and
Detection
4/22/2024 1
Eigenfaces for recognition
The Space of Faces
4/22/2024 5
Eigenfaces
Dimensionality reduction
• We can represent the orange points with only their v1 coordinates
(since v2 coordinates are all essentially 0)
• This makes it much cheaper to store and compare points
• A bigger deal for higher dimensional problems
4/22/2024 8
Linear subspaces
Consider the variation along direction v
among all of the orange points:
4/22/2024 9
Principal component analysis
Suppose each data point is N-dimensional
• Same procedure applies:
4/22/2024 10
Higher Dimensions
Suppose each data point is N-dimensional
• Same procedure applies:
(BBT) y = e y
=> BT(BBT) y = e (BTy)
=> (BTB)(BTy) = e (BTy)
=> BTy is the eigenvector of BTB
Eigenfaces – summary in words
Eigenfaces are
the eigenvectors of
the covariance matrix of
the probability distribution of
the vector space of
human faces
• Suppose it is K dimensional
Any face:
Eigenfaces
PCA extracts the eigenvectors of A
• Gives a set of vectors v1, v2, v3, ...
• Each one of these vectors is a direction in face space
– what do these look like?
Projecting onto the Eigenfaces
eigenvalues
i= K NM
3. Detect if x is a face
Given
• Why?
Avoids modeling geometry, complex interactions
between geometry, lighting and reflectance.
• Why not?
Too many possible appearances!
m “visual degrees of freedom” (eg., pose, lighting, etc)
R discrete samples for each DOF
= {xˆ } P
RL
• Image as a point in high dimensional space:
4/22/2024 35
Bayesian Face Recognition
4/22/2024 36
Bayesian Face Recognition
4/22/2024 37
Robust real-time face detection
Scan classifier over locs. & scales
4/22/2024 39
“Learn” classifier from data
Training Data
• 5000 faces (frontal)
• 108 non faces
• Faces are normalized
• Scale, translation
Many variations
• Across individuals
• Illumination
• Pose (rotation both in plane and out)
4/22/2024 40
Characteristics of algorithm
• Feature set (…is huge about 16M features)
• Efficient feature selection using AdaBoost
• New image representation: Integral Image
• Cascaded Classifier for rapid detection
4/22/2024 41
Image features
• “Rectangle filters”
• Similar to Haar wavelets
• Differences between
sums of pixels in
adjacent rectangles
4/22/2024 42
Integral Image
Partial sum
Any rectangle is
D = 1+4-(2+3)
4/22/2024 43
Huge library of filters
4/22/2024 44
Constructing the classifier
Perceptron yields a sufficiently powerful classifier
4/22/2024 45
Constructing the classifier
For each round of boosting:
• Evaluate each rectangle filter on each example
• Sort examples by filter values
• Select best threshold for each filter (min error)
• Use sorting to quickly scan for optimal threshold
• Select best filter/threshold combination
• Weight is a simple function of error rate
• Reweight examples
• (There are many tricks to make this more efficient.)
4/22/2024 46
Good reference on boosting
Friedman, J., Hastie, T. and Tibshirani, R.
Additive Logistic Regression: a Statistical
View of Boosting
http://www-stat.stanford.edu/~hastie/Papers/boost.ps
“We show that boosting fits an additive logistic
regression model by stagewise optimization of a
criterion very similar to the log-likelihood, and present
likelihood based alternatives. We also propose a
multi-logit boosting procedure which appears to have
advantages over other methods proposed so far.”
4/22/2024 47
Trading speed for accuracy
Given a nested set of classifier hypothesis
classes
4/22/2024 48
Sample results
4/22/2024 49
Summary (Viola-Jones)
• Fastest known face detector for gray images
• Three contributions with broad applicability:
❖Cascaded classifier yields rapid
classification
❖AdaBoost as an extremely efficient feature
selector
❖Rectangle Features + Integral Image can
be used for rapid image analysis
4/22/2024 50
Schneiderman
Viola Kanade
Jones
4/22/2024 51
Hematological Image Analysis for
Acute Lymphoblastic Leukemia
Diagnosis and Classification
• As per FAB classification, there are three subtypes of ALL i.e. L1,
L2 and L3, and each has a distinct blast morphology.
• Techniques
• Light microscopic examination
• Cytochemistry
• Immunophenotyping
Blood Analysis
Report by
Pathologist
• Time consuming
Peripheral
Blood Smear
Image
Sample Blood Digital
Smear Staining Microscope with a
Collection Computer
Hematological
Image Analysis and
Decision
(Computer)
• Histology
• Sub Imaging
• Preprocessing
∀i with dik= ||Xk− vi||2, subject to σ𝑐𝑖=1 μ𝑖𝑘 = 1, ∀k, and 0<σ𝑐𝑖=1 μ𝑖𝑘 <N, ∀i.
where x and y be any two point in the image plane and Φ(x) and
Φ (y) are the corresponding points in the feature plane
respectively. ” ・ ” is the dot product in the kernel space and
k (x, y) represents kernel function.
Y=X+N
1
P(Z=z|ϴ)= 𝑒 −𝑈(𝑧,Φ)
𝑍
82
Histology
• The total data set used for the development of the model,
comprises of peripheral blood smear (PBS) samples, and were
collected from 63 patients diagnosed with ALL and 55 control
subjects.
• 150 stained subimages of lymphocyte were obtained by the
image acquisition and sub imaging process.
87
Computed texture and color features
88
Shape measurements
log N
Df =
log N (s )
where (x, y) are the coordinates of the pixels along the contour
and M is the total no of pixels on the nucleus contour.
Wavelet texture feature: A texture feature vector for each gray scale
version of lymphocyte nucleus image consists of wavelet coefficients
obtained by taking mean and variance of An, Hn and Vn components.
• The research findings made out of this work has opened several
auxiliary research directions, which can be further investigated.
• The segmentation scheme can be enhanced by including
techniques that can lead to segmentation of overlapping cells as
well.
• The proposed schemes, which mostly deal with computer aided
diagnosis and sub classification of ALL, can be extended to AML.
• In ensemble learning classifier system, there exists multiple
classifier processes which can be executed in parallel for better
response time.
• Promising research direction to pursue is to develop an
automated prognostic scoring system for ALL.