flexible shape matching
TRANSCRIPT
May 1, 20232
Index• Template Matching Overview• Deformable Template• Active Contour (Snake)• Greedy Algorithm for Snake
May 1, 20233
Index• Template Matching Overview• Deformable Template• Active Contour (Snake)• Greedy Algorithm for Snake
Template Matching - Problems
• Large number of comparisons.• Exact match of multiple parameters.
May 1, 20234
May 1, 20235
Template Matching - Solution
• Reduce number of matched points.
Still fixed and not adaptable
May 1, 20236
Index• Template Matching Overview• Deformable Template• Active Contour (Snake)• Greedy Algorithm for Snake
May 1, 20237
Deformable Template –
Exact Match Solution• Rather than using a fixed template with fixed
parameters, more flexible template is used.
May 1, 20238
Deformable Template – Many Comparisons
Solution• Use only key edge points to detect object.• These points are discriminant points of the object
which are edge points.
=
May 1, 20239
Deformable Template – Dynamic Templates
Generation• The set of parameter values that makes the
template best matches the edge points is the best parameters to use.
{, r}• Deformable templates may not be completely
autonomous.
May 1, 202312
Template Energy• Good template parameters is what maximizes the
energy.• The goal is to find parameters that maximize
May 1, 202313
More Parameters• More parameters can be used to make results
more accurate.• By a little eye analysis, it is apparent that usually
sclera is white and iris is darker than it.• Adding these parameters can enhance results.
Sclera
Iris
May 1, 202314
Combine Parameters• Combining all parameters, result in this final
energy.
• Where, are weighting parameters that control the influence of this parameter over the resultant energy.
• Goal is to maximize E.
May 1, 202315
Many Parameters – Problem
• For each parameter, there are a number of values that needs to be tested until maximum energy reached.
• Say 11 parameters selected and each parameter can have 100 values, so there are more than combinations of parameter values needed to be tested.
May 1, 202316
Many Parameters – Solution
• This problem can be solved in two ways:o Optimization techniques that not reduce
number of combinations but try to make calculations quickly.
o Techniques to reduce number of parameters such as snakes.
May 1, 202317
Index• Template Matching Overview• Deformable Template• Active Contour (Snake)• Greedy Algorithm for Snake
May 1, 202318
• An active contour is a set of points that aims to enclose a target object.
Active Contour : Snake
May 1, 202319
Active Contour : Snake• Contour is a bounding region of a target object.• It is active because it is a self-learning process to
modify itself until closely bound the target object.• Contour changes like a snake.• Goal of snakes is to find salient image contours
that surround target object.
May 1, 202320
Snake Spline• Snake draws a contour surrounding the target
object.• There are many complex objects with complex
boundaries and multiple inflection points. • Snake uses spline to be able to draw complex
shapes using simple shapes.• Spline divides complex shapes into small
segments that are easier to graph.
May 1, 202321
Spline• Spline is a polynomial or a set of polynomials to
approximates complex shapes.• Complex shapes has many inflection points
that can be divided into simple segments with fewer inflection points.
• Because cubic polynomial has a maximum of only two inflection points, it will be used to approximate complex shapes.
x(u)=+++y(u)=+++
May 1, 202322
Spline• Complex shapes are divided into segments of at
most two inflection points.• These segments are approximated using the
cubic polynomial.• Collection of segments are then connected
together in a smooth manner.
May 1, 202323
Contour• Contour is defined in terms of x and y of all spline
cubic polynomial inflection points used to approximate complex shape.
May 1, 202324
Snake Process• Snake is similar to deformable templates in which
they may be semiautomatic.• They rely on other mechanisms to place them
near the desired contour.• User specify the initial contour and snake tries to
modify it to find optimal contour.
May 1, 202325
Snake Energy Minimization
• Snake changes its contour using different forces:o Internal forceso Image forceso External forces
• To judge contour optimality, snake uses energy minimization techniques.
May 1, 202326
Internal Forces – Internal Energy
• Internal forces is used to modify the spline shape.• Internal energy of spline is symbolized that just
depends on spline shape.
• It consists of first- and second-order terms of contour points.
Internal Forces Energy
• Internal energy has two parameters that control snake shape:o α controls amount of snake spline stretching.o β controls amount of snake spline
flexing/smoothing.• The larger α, the more stretch snake contour is.• The larger β, the smoother snake contour.
May 1, 202327
May 1, 202328
Image Forces• How a snake can know we need to detect eye?• Image forces guides the snake to a selected
image portion with certain features.• Examples is to depend on:
o Lineso Edges
May 1, 202329
Image Forces Energy• To measure image force optimality, image energy
is calculated.• If only line and edge are the features to guide the
snake, thus line energy and edge energy are calculated.
• There are two parameters used to control image forces:o guides snake to align itself to dark regions.o guides snake to align itself to sharp edges.
May 1, 202331
Index• Template Matching Overview• Deformable Template• Active Contour (Snake)• Greedy Algorithm for Snake
May 1, 202332
Greedy Algorithm for Snakes
• Greedy algorithm implements the snake energy minimization.
Define snake parameters α,β, and
Select snake point
Check neighborhood points for lower energy
Set new snake point to new minimum
May 1, 202333
Greedy Algorithm - Initialization
• Snake parameters are initialized externally and initial contour is found.
• Say there are 10 points in the initial contour, then Greedy algorithm will be applied on all10 points.
Define snake parameters α,β, and