Computer Vision Hough Transform PDM ASM and AAM

  • Slides: 26
Download presentation
Computer Vision Hough Transform, PDM, ASM and AAM David Pycock D. Pycock@bham. ac. uk

Computer Vision Hough Transform, PDM, ASM and AAM David Pycock D. Pycock@bham. ac. uk www. bham. ac. uk/pycockd

Hough Transform To detect lines, circles, ellipses and other forms of curve Use a

Hough Transform To detect lines, circles, ellipses and other forms of curve Use a parametric representation to determine how edges can be combined into a curve Image Edge detected image 2

y=mx+c Dq C r q O B A r=OB + BC OB=OA/cosq BC=DB sinq

y=mx+c Dq C r q O B A r=OB + BC OB=OA/cosq BC=DB sinq DB=y-AB=y-OA tanq OA=x Thus r=x/cosq +(y-xtanq)sinq Re-arranging: r cosq = x(1 -sin 2 q) + ysinq cosq Since 1= cos 2 q + sin 2 q r cosq = xcos 2 q + ysinq cosq i. e. r = xcosq + ysinq 3

A single point in x-y coordinate space transforms into a sine wave in r-q

A single point in x-y coordinate space transforms into a sine wave in r-q or Hough space The intersection of the sine waves represents a line r q 4

The Hough space is an accumulator The dimensions is equal to the number of

The Hough space is an accumulator The dimensions is equal to the number of parameters in the parametric equation The number of bins in r and q is critical Too few and the resolution is poor Too many and the accumulator is large and peaks difficult to detect 1. Clear accumulator 2. For each point (x, y) in image increment corresponding counts in accumulator 3. Locate maxima in accumulator 5

Hough Transform for Circles Equation of a circle radius r and centre 2 (a,

Hough Transform for Circles Equation of a circle radius r and centre 2 (a, b) is: r 2 = (x-a)2 + (y-b) Accumulator is 3 dimensional in (a, b, r) 6

Model-Based Interpretation: Finding the Boundary of Skin Cells 16 grey-levels A robust and adaptable

Model-Based Interpretation: Finding the Boundary of Skin Cells 16 grey-levels A robust and adaptable model based scheme: normalised features multiple boundary models statistical interpretation process 7

Definition of Boundary Similarity Features bi-1 Feature measures for: vi roundness bi I curvature

Definition of Boundary Similarity Features bi-1 Feature measures for: vi roundness bi I curvature ext ri Ii grey-level pattern near boundary vi+ 1 bi+1 edge strength and direction Similarity features a with invariance properties, e. g. : int i Radial similarity: Grey level similarity , and Assuming. The set of normalised features for each boundary point is where is the feature index. 8

Overview of Interpretation Strategy Boundary cue generation process Boundary selection process start: i=1 j

Overview of Interpretation Strategy Boundary cue generation process Boundary selection process start: i=1 j j i features associated with i Compute candidate point features and interpret using models Select candidate points to form boundary Match detected boundaries to models 9

Results Cell Segmentation 10

Results Cell Segmentation 10

Point Distribution Model (Hlavac, Soka & Boyle p 464 ff) Select as landmarks points

Point Distribution Model (Hlavac, Soka & Boyle p 464 ff) Select as landmarks points that can readily be identified and that are always in the same place E. g. Finger tips, bottom of fingers and midway between Need to align the data so that shape variation is characterised Align all examples by rotating translating and scaling to mean squared error between landmarks 11

Alignment algorithm Rotate, scale and translate each vector (xi) with the first vector (x

Alignment algorithm Rotate, scale and translate each vector (xi) with the first vector (x 1) to give the set: Repeat Calculate the mean and covariance of the transformed shapes Rotate, scale and translate the mean shape to align with (x 1) Rotate, scale, translate to match the adjusted mean Until mean converges This process avoids an arbitrary bias due to the selection of the first vector 12

The model is the means shape vector: The variance about this mean is characterised

The model is the means shape vector: The variance about this mean is characterised by the covariance matrix, S: Characterise the variations of the covariance matrix in reduced dimensionality Identify the Principal Components of this covariance matrix to find the i of: Spi= i pi Where S is the covariance matrix i the eigenvalues and pi the eigenvectors 13

The eigenvectors of S are a basis that can be combined to explain the

The eigenvectors of S are a basis that can be combined to explain the variation represented by S. Thus individual variations modelled by S can be computed using: Not all the eigenvectors will be needed Most of the population will be within 3 s of the population mean thus: 14

Fitting Models to Data This is done to obtain an interpretation inn which the

Fitting Models to Data This is done to obtain an interpretation inn which the model projects a boundary interpretation onto a set of landmarks from an image Using the PDM model instances are translated rotated and scaled and the instance with the best match to the data is selected. This is can be a slow process. 15

Active Shape Model This is a variation to the way that a model is

Active Shape Model This is a variation to the way that a model is matched to the data The process is: Find an approximate match of model to data Repeat At each landmark search normal to the boundary and make point with greatest gradient new landmark Adjust pose of the model to better fit data Compute the displacement vector for each landmark to this new model instantiation Find the best model perturbation using: Until change of model is small 16

17

17

Active Appearance Models Adds grey-level modelling to geometric modelling Grey-level and geometric models are

Active Appearance Models Adds grey-level modelling to geometric modelling Grey-level and geometric models are separated to reduce the search space Normalise grey-levels around each landmark Common to sample grey levels in a spiral around a 5 x 5 region. 18

Active Appearance Modelling Compute ASM & approximate each shape using: Warp each image to

Active Appearance Modelling Compute ASM & approximate each shape using: Warp each image to the mean shape (linear or non-linear) Normalize each image to the average grey-level and unit variance Perform PCA to extract grey-level eigenvectors Represent each intensity sample as a linear combination of grey-level eigenvectors: Apply PCA and compute overall eigenvector model: 19

Active Appearance Model Interpretation Require a similarity or affine transform for: Global intensity parameters

Active Appearance Model Interpretation Require a similarity or affine transform for: Global intensity parameters Appearance coefficients Match in image space Early approach used reduced rank multivariate analysis Current approach uses a Taylor series expansion, which is: Easier to implement Faster to calculate Requires less memory Produces comparable or better results 20

Let: t c u be the parameters of the geometric transformation, T, of the

Let: t c u be the parameters of the geometric transformation, T, of the model be the transformation coefficients for the grey level model be the global intensity coefficients for transformation of the model to an instance is an estimate of the parameter vector p and p* is the optimal value of Overview of technique The model parameters, t, c and u are randomly perturbed (with constraints) and the residual: r(p)=gs(p)-gm(p) computed, where p. T = (c. T|t. T|u. T). The first order Taylor expansion at is: 21

The Jacobian matrix is: Where M is the number of model parameters N is

The Jacobian matrix is: Where M is the number of model parameters N is the number of components The update parameter , The aim is to make the update parameter zero. A least squares solution of the Taylor series expansion gives: This is in effect the gradient of the image difference objective (or image match) function 22

A simplified approximation, possible because AAM’s work in a standardized reference frame, is: The

A simplified approximation, possible because AAM’s work in a standardized reference frame, is: The rhs of the above can be considered a constant and calculated once per match process. The kth perturbation of parameter ej, the jth column of the Jacobian can be estimated as: The kernel w(. ) can be Gaussian 23

AAM Matching Algorithm Place an appearance model approximately on the object using the parameters

AAM Matching Algorithm Place an appearance model approximately on the object using the parameters c, t, y and compute the difference image gs-gm Repeat Compute the RMS of the difference image, E(r) = ||r||2 Repeat Compute the model corrections dp = -R(gs-gm) Set k=1 Repeat » » Recompute model parameters: c=c-kdc, t=t-kdt and u=u-kdu Recompute the image difference: gs-gm Recompute the RMS of the difference E(r) = ||r||2 If (E(r) ≥ E) update k /1. 5, 0. 5. 0. 25/ While ((E(r) ≥ E) AND (E(r) has not converged)) If (E(r) < E) accept c, t and u While (E(r) ≥ E) 24

Extensions Time Series Volume Data AAM Demo Download from: www 2. imm. dtu. dk/~aam

Extensions Time Series Volume Data AAM Demo Download from: www 2. imm. dtu. dk/~aam 25

Key References PDM Cootes TF and Taylor CJ, Active shape models – “smart snakes”,

Key References PDM Cootes TF and Taylor CJ, Active shape models – “smart snakes”, In Proceedings of the British Machine Vision Conference, (Ed. Hogg, DC), Leeds, UK, pp 266 -275, 1992 AAM Cootes TF, Edwards GJ and Taylor CJ, Active appearance models, IEEE Trans. Patt. Anal. Mach. Intell. , 23, pp 681685, 2001 26