Feature matching,face detection, object recognition and camera Flashcards
Matching strategy
-Strategy 1: Max distance
Match against all features withing a geometric distance.
Difficult to set thressholds.BruteForce
-Strategy 2: Nearest Neigbor
In feature space
Threshold again
-Strategy 3: Nearest Neighbor distance ration.
Nearest distance to second nearest
Matching performance
precision: tp/tp+fp
recall:tp/tp+fn
Face detection Challenges
-Huge nr of pixels
-Multiple locations and scales
-Faces unlikely event
-key elements (fast processing of nonface candidates and low false positive rate is required)
Viola Jones 1. Haar Features
Fast feature evaluation based on integral images.
Adv: Fast + efficient at calculations
Dis:Memoriy + preprocessing
Uses Rectangle filters.
Local Features->substract sum of pixels in white areas from sum of pixels in black areas.
2,3,4 rectangle features -> huge number.
Coarse Features
Sensitive to edges,bars,other simple structures.
Efficient computationally->compesates coarseness
Huge number of combinations
Viola Jones 2. Weak learners on harr features. 3 BOOSTING
4 Cascading
2Works on number evaluated by Haar feature. Sets threshold on a single feature and separates positive and negative examples.
- Boosting. Build a strong classifier vombining several weak vlassifiers. Weighted sum of simple weak learners. weight~accuarcy of this classsifier
ADABOOST(init equal weights. Selects best thresholds foreach filter reweight)At each round best weak classifier found OMNK
4.Cascading
Weak learners divided in different stages applied in cascade
Each stage acts as a filter.
First stage discards a sample, prevents work.
False negative = failure
False positive = acceptale
Reweight classifiers after each stage. From simple to more xomplex on each stage,from hight to low positive rate.
Types of segmentation
Semantic: class to each pixel
Instance: detect object instances separately
Template matching
Template is:
-designed to serve as a model
-formed after a model
-example instance
Template matching: Finds instances of templates in the image.
Similarity measure should be chosen.
Weak points:
1-Illumination changes: use edge maps instead and use ZNCC
2.Scale changes:match in several scale, HOugh, Scale Space
3.Rotation:
Match in rotated version
Hough
Types of template matching:
1.Rigid
a.Correlation:
Template placed in every possible position w/out rotation and scaling.
compares.
Sliding window
b. Generalized Hough Transform.
Bag Of Words
Image and object classification
Decomposes complex patterns into (semi)
independent features
Words can be represented using features
– Exploit discriminative properties
– Exploit invariance properties
– Re-use an efficient description
- Extract features – keypoints and descriptors
- Clustering in the feature space (e.g., K-means)
- Codebook generation: each cluster generates
a representative sample (e.g., centroid)
Image classification:
– Evaluate the occurrence of each word in the
codeword
– Classify based on histogram
Pinhole Camera Model
We get a perfect definition if only one ray per
point reaches the sensor.
Focal length
* Distance between optical center
and image plane
Camera Projection
[I|0] core of projection process
We need to map points projected onto the
image plane in the coordinates used for pixels From 𝑥, 𝑦 to 𝑢, 𝑣.
Metric distances are converted
to pixels using the pixel width 𝑤
and ℎ height
Conversion factors are usually
defined as
– 𝑘𝑢 =1/𝑤
– 𝑘𝑣 =1/ℎ
Mapping from 𝑥, 𝑦 to 𝑢, 𝑣
is obtained by translation and
scaling:
𝑢 = 𝑢0 + 𝑥𝑝/𝑤= 𝑢0 + 𝑘𝑢𝑥𝑝
𝑣 = 𝑣0 +𝑦𝑝/ℎ = 𝑣0 + 𝑘𝑣𝑦𝑝
Summarizing and applying a similar conversion for 𝑣
yields:
𝑢 = 𝑢0 + 𝑓𝑢 𝑋𝑝/𝑍𝑝
𝑣 = 𝑣0 + 𝑓𝑣 𝑌𝑝/𝑍𝑝.
Camera matrix: K[i|0]
5 Intrinsic parameters : ku kv u0 v0 f.
Rototranslation T = [R t 0 1] rotation + translation. Extrensic parameters. 3 parameters for translation and 3 for rotation.
Camera and lenses
- Adding a lense
sharp image vs light intensity.
Dont need pinhole.
Thin Lens model - in pinhole.
Point at a given distance in focus, others circle of confusion.
Adding a barrier reduces Circle of confusion
Focal length:
1-Thin lense distance which parallel rays intersect.
2-Pinhole model: distance between pinhoe and sensor.
Field of View: Angle Percieved by camera.
2 * Alpha that is a point P is seen.
Depends on sensor size + focal length.
Lense Distortion
Derivation from ideal behaviour.
1-Radial
Entity depends on distance of disorted point from image center.
Pincusshion and Barrel.
Radial can be analyzed analitycally. Polynomial approx.
2-Tangential
Nonideal alignment between lens and sensor.
Similar tp perspective
Chromatic Aberration
Dsipersion:refractive index depend on wavelength
Real Cameras
We lose:
Angels
Distance
Parallel Lines.
Role of lense: Gather more light. Need to be focused.
Large Field of View, Small Focal length, camera close.
Small Field of view, Large focal length, camera far.
CCD AND CMOS: Measure total energy.
Greyscale sensors.
Color sensed by
a)3chip color -> separate RGB color images
b)Single Chip-1 image with filters
c)Chip penetration
Bayer Pattern-interpolation to provide complete color info at each pixel
FOVEON-no need interpolate. no info lost
Real Camera incoming light.
Apreature
-fraction of focal length.
f/2 on 50m = aperrature 25 mm.
Small f means large apperature.
Small apperature = more depth of field.
Shutter speed.
Almos closed and much time = almost opened and less time.
Shorter exposure time: freeze motion