430 likes | 584 Views
Region labelling. Giving a region a name. Introduction. Region detection isolated regions Region description properties of regions Region labelling identity of regions. Contents. Template matching Rigid Non-rigid templates Graphical methods Eigenimages Statistical matching
E N D
Region labelling Giving a region a name
Introduction • Region detection • isolated regions • Region description • properties of regions • Region labelling • identity of regions Image Processing and Computer Vision: 6
Contents • Template matching • Rigid • Non-rigid templates • Graphical methods • Eigenimages • Statistical matching • Syntactical matching Image Processing and Computer Vision: 6
Template matching • Define a template • a model of the object to be recognised • Define a measure of similarity • between template and similar sized image region Image Processing and Computer Vision: 6
Similarity Measure dissimilarity between image f[i,j] and template g[i,j] Place template on image and compare corresponding intensities Need a measure of dissimilarity Last is best.... Image Processing and Computer Vision: 6
Expanding If f and g fixed -fg a good measure of mismatch fg a good measure of match Compute match between template and image with cross-correlation Image Processing and Computer Vision: 6
g is constant, f varies and so influences M Normalisation C is maximum where f and g are same. Limitations • number of templates required • rotation and size changes • partial views Image Processing and Computer Vision: 6
Input Output Template Image Processing and Computer Vision: 6
Flexible Templates • Shapes are seldom constant • Variation • in shape itself • in image of same shape • viewpoint • Non-rigid representations capture variability Image Processing and Computer Vision: 6
Structure • Flexible image structures • Linked by virtual springs Image Processing and Computer Vision: 6
Recognition • Deform image structure • To equate model and image • Move image structures • To colocate model and image • Matching Image Processing and Computer Vision: 6
Learning the model • Accuracy of model determines success • Model • For each control point • average, variance of location • To be learnt with minimum external variation • size, orientation, inconsistency of location Image Processing and Computer Vision: 6
Parametric Models • Parametrically define the shape • straight line, circle, parabola, … • Update parameters to match model and object Image Processing and Computer Vision: 6
Example – Face tracking • Eyes and mouth • circles and parabolas • locations, sizes, orientations • Templates define image structures Image Processing and Computer Vision: 6
Flexible templates, EigenImages • Attempt to capture intrinsic variability of data • Mathematical representation of variation Image Processing and Computer Vision: 6
Mathematical Foundation • Take samples from a population • plot values of parameters on a scatter diagram Image Processing and Computer Vision: 6
Rotate axes: • one axis encodes most of information • other axis encodes remainder • Generalise to multiple dimensions Image Processing and Computer Vision: 6
Images • Use • outline co-ordinates • image values • As the variables • Normalise as much variability Image Processing and Computer Vision: 6
Hand Eigenimages Image Processing and Computer Vision: 6
Hand Gestures Image Processing and Computer Vision: 6
Range of Eigenimages Image Processing and Computer Vision: 6
Face Eigenimages Image Processing and Computer Vision: 6
Recognition • Retain n eigenvectors with largest eigenvalues • Form dot product of these with image data • Find nearest neighbour from training set Image Processing and Computer Vision: 6
Statistical Classification Methods • Derive characteristic feature measurements from image • Form a feature vector that identifies object as belonging to a predefined class • Need decision rules to make classification Image Processing and Computer Vision: 6
Linear Discriminant Analysis • Samples from different classes occupy different regions of feature space • Can define a line separating them Image Processing and Computer Vision: 6
Class A Feature 2 Class B Feature 1 Image Processing and Computer Vision: 6
Decision d(X) = F2 - mF1 - c d(X) > 0 for points in class A d(X) = 0 for points on line d(X) < 0 for points in class B Image Processing and Computer Vision: 6
height ? basketball players jockeys weight Nearest Neighbour Classifier • Assign the new sample to the population whose centroid is closest. Image Processing and Computer Vision: 6
Most Likely • Incorporate range of possible class values Image Processing and Computer Vision: 6
height ? basketball players jockeys weight Bayesian Classifiers • Take population variation into account • Assume prior probability of observing class j is P(j) • e.g. 10% of population are jockeys • Assume a conditional probability distribution for each feature, x, of each population p(x|j). Image Processing and Computer Vision: 6
p(x|w1) p p(x|w2) x • Multiply these curves by P(j) to give probability of a measurement belonging to each class. • Divide by total probability of measuring x, to normalise. • This gives the probability of the sample being from each class. Image Processing and Computer Vision: 6
Syntactic Recognition • Objects’ structure (outline) can be described linguistically • Primitive shape elements = words • Grammatically correct sentences = a valid shape Image Processing and Computer Vision: 6
Shape Grammar • A set of pattern primitives • terminal symbols • A set of rules that define combinations of primitives (sentences) • the grammar • A start symbol • represents a valid object • Non-terminal symbols • represent substructures in the shape Image Processing and Computer Vision: 6
Recognition • Grammar is generative • Recognition is degenerative • Recognition uses rules in reverse • Terminal symbols are rewritten until a valid start symbol is attained Image Processing and Computer Vision: 6
Chromosome Grammar Image Processing and Computer Vision: 6
Chromosome Grammar Image Processing and Computer Vision: 6
The Primitives Image Processing and Computer Vision: 6
Example Image Processing and Computer Vision: 6
Evaluation • Classification rate • Confusion matrix Image Processing and Computer Vision: 6
Classification Rate • How often does the classifier get the correct answer? • Selection of training and test data must be carefully done. Image Processing and Computer Vision: 6
Confusion matrix • C(i,j) = number of times pattern i was recognised as class j. • Want off-diagonal elements to be zero. Image Processing and Computer Vision: 6
Summary • Template matching • Deformable templates • Flexible templates • Statistical classification Image Processing and Computer Vision: 6