Presentation on theme: "Active Contours without Edges"— Presentation transcript:
1Active Contours without Edges Tony ChanLuminita VesePeter Horvath – University of Szeged 29/09/2006
2Introduction Variational approach The main problem is to minimise an integral functional (e.g.):In the case f:, f’=0 gives the extremum(s)In the case of functionals similary F’=0, where F’=(F/u) is the first variation.Most of the cases the solution is analyticly hard, in these cases we use gradient descent to optimise.
3Introduction Active Contour (Snake Model) + Fast evaluation Kass, Witkin and Terzopoulos [Kas88] - tension - rigidityEext – external energyProblem is: infxE+ Fast evaluation- But difficult to handle topological changes
4Introduction A typical external energy coming from the image: Positive on homogeneous regionsNear zero on the sharp edges
5Intoduction Level Set methods S.Osher and J. Sethian [Set89] Embed the contour into a higher dimensional space+Automatically handles the topological changes- Slower evaluation(., t) level set functionImplicit contour (=0)The contour is evolved implicitly by moving the surface
6Introduction The curve is moving with an F speed: The geometric active contour, based on a mean curvature (length) motion:
7Chan and Vese model position Energy functionals for image segmentationImportant to distinguish the model and the representationModel: describing problems from the real world with equationsRepresentation: type of the descriptionOptimization: solving the equationsChan and Vese modelRepresentation/optimizationContour based gradient descentLevel set based gradient descent
8Chan and Vese modelThe model is based on trying to separate the image into regions based on intensitiesThe minimization problem:
9Chan and Vese modelc1 and c2 are the average intensity levels inside and outside of the contourExperiments:
10Relation with the Mumford-Shah functional The Chan and Vese model is a special case of the Mumford Shah model (minimal partition problem)=0 and 1=2=u=average(u0 in/out)C is the CV active contour“Cartoon” model
11Level set formulationConsidering the disadvantages of the active contour representation the model is solved using level set formulationlevel set form -> no explicit contour
12Replacing C with ΦIntroducing the Heaviside (sign) and Dirac (PSF) functions
14Average intensitiesWe can calculate the average intensities using the step function
15Level set formulation of the model Combining the above presented energy terms we can write the Chan and Vese functional as a function of Φ.Minimization F wrt. Φ -> gradient descentThe corresponding Euler-Lagrange equation:
17The algorithm Initialization n=0 repeat Computing c1 and c2Evolving the level-set functionuntil the solution is stationary, or n>nmax
18Initialization We set the values of the level set function outside = -1inside = 1Any shape can be the initialization shapeinit()for all (x, y) in Phiif (x, y) is insidePhi(x, y)=1;elsePhi(x, y)=-1;fi;end for
19Computing c1 and c2The mean intensity of the image pixels inside and outsidecolors()out = find(Phi < 0);in = find(Phi > 0);c1 = sum(Img(in)) / size(in);c2 = sum(Img(out)) / size(out);
20Finite differences for all (x, y) fx(x, y) = (Phi(x+1, y)-Phi(x-1, y))/(2*delta_s);fy(x, y) =…fxx(x, y) =…fyy(x, y) =…fxy(x, y) =…delta_s recommended between 0.1 and 1.0
21Curvature Be careful! Grad can be 0! grad = (fx.^2.+fy.^2); curvature = (fx.^2.*fyy + fy.^2.*fxx - 2.*fx.*fy.*fxy) ./ (grad.^1.5);Be careful! Grad can be 0!
22Force We should normalize the force. abs(force) <= 1! Main step: gradient_m = (fx.^2.+fy.^2).^0.5;force = mu * curvature .* gradient_m - nu – lambda1 * (image - c1).^2 + lambda2 * (image - c2).^2;We should normalize the force. abs(force) <= 1!Main step:Phi=Phi+deltaT*force;deltaT is recommended between 0.01 and 0.9. Be careful deltaT<1!
23Narrow bandIt is useful to compute the level set function not on the whole image domain but in a narrow band near to the contour. Abs()<dDecreasing the computational complexity.
24Narrow band Initialization n=0 repeat Determination of the narrow bandComputing c1 and c2Evolving the level-set function on the narrow bandRe-initializationuntil the solution is stationary, or n>nmax
25Re-initialization Optional step H is a normalizing term recommended between 0.1 and 2.deltaT time step see above!
26Stop criteria Stop the iterations if: The maximum iteration number were reachedStationary solution:The energy is not changingThe contour is not moving…
27Demonstration of the program Thanks for your attention