Image Cutting (v) A brief introduction to the snake model of active contour model
[Email protected]
Http://blog.csdn.net/zouxy09
in the " Overview of Image Cutting (i.) "We have a simple understanding of the current mainstream image cutting methods." Below we mainly study the cutting method based on energy functional. Here we learn the simple knowledge of the Snake model, and the level set model will be mentioned in the post.
A cutting method based on energy functional:
The method mainly refers to the active contour model (activeContourmodel) and the algorithm developed on it, the basic idea is to use continuous curve to express the target edge, and define an energy function to make its independent variable contain the edge curve, Thus the cutting process is transformed into the process of solving the minimum value of the energy functional, which can be solved by solving the function of Euler (Euler). Lagrange) equation to achieve the curve position where the energy reaches the hour is the contour of the target.
The active contour model is a mechanism for locating image features from top to bottom, and the user or other self-active processing process by placing an initial contour line in advance near the target of interest, within the internal Energy (internal force) and external Energy (force) Under the action of the deformation of the external energy to attract the movement of the contour to the edge of the object, while the internal energy to maintain the smoothness of the active contour and topological, when the energy is minimized, the active contour converges to the object to be detected edge.
First, the Theory of curve evolution
The Curve evolution theory is applied in the horizontal concentration, but I feel that this knowledge is common in the cutting method of the active contour model, so here we have a simple understanding.
The curves can be easily divided into several types:
Curvature has a positive and negative curvature, so the normal curvature force, the direction of the curve is different: some parts of the outward expansion, while some parts are moving inward. Such situations are, for example, seen. The blue arrows in the figure have a negative curvature and a positive curvature at the green arrows.
A very special mathematical property of a simple curve that is driven by the curvature force (that is, the two derivative of the curve) is: All simple curves, no matter how badly twisted, are simply a simple curve, and then the force of curvature will eventually degenerate into a circle, and then fade away (to imagine, The curvature of all points of a circle is toward the center of the circle, so it will slowly shrink so that it eventually dies.
The two important parameters describing the geometric characteristics of narrative curve are the unit normal vector and curvature, the direction of the narrative curve described by the Unit method, and the degree of curvature of the curved curve. The theory of curve evolution is to study the deformation of curves over time by using only geometric parameters such as unit normal vector and curvature of the curve. The evolution of the curve can be thought to indicate that the curve is driven by the Force F , and N is evolved at Velocity v toward the normal direction. And the speed is positive and negative, so there is a hypothesis that the speed of the sign is negative, indicating that the active contour evolution process is facing the outside direction, such as positive, it is the direction of evolution in the interior, the activity curve is a single direction of evolution, it is not possible to evolve in two directions at the same time.
So the evolution of the curve is the process of the different forces on the curve, the force can also be expressed as energy. All things in the world tend to be of the least energy. Because at this time it is the most balanced, consumes the smallest (do not understand right? )。 So in the image cutting inside, our goal is to find the contour of the target, then in the outline of the target, the whole contour of the energy is the smallest, then the curve in the image no matter what one place, can because the force toward this energy of the smallest contour evolution, when the target contour, due to the smallest energy, force balance, The speed is 0 , also will not move, this time the target is cut out by us.
That's the key now:1. What do we mean by this contour,2) How these forces are constructed, and which forces are capable enough to minimize the energy of the target contour?
The description and solution of these two problems derive a lot of cutting methods based on active contour model. The answer to the first question forms two schools: assuming that the contour is a reference, then the reference activity Contour model (parametric active Contourmodel), typically snake , Assuming that the contour is a geometric representation, the geometric active contour model (geometric active contourmodel), the level set method, It is a two-dimensional contour embedded in the three-dimensional surface of the 0 horizontal plane to express (can be understood as a mountain contour, a high line to cut the peak, the height of the mountain's horizontal shape is out, that is, contour), so the low-dimensional evolution curve or surface, expressed as the indirect expression of the 0-level set of the high-dimensional function surface (this contour changes intuitively we can adjust the shape of the mountain or adjust the height of the ascending line to get it).
For the second problem, the two major schools are confronted with the problem, they all need to solve the most critical problem. What are the abilities to achieve the goal of cutting? This will be in the back of the chat.
Second,Snakes model
Since 1987 year Kass proposed Snakes model, various methods based on active contour line image cutting comprehension and recognition have sprung up vigorously. The basic idea of the Snakes model is very easy, it takes a certain shape of some control points as template (contour), through the template's own elastic deformation , and the local characteristics of the image to match to achieve a harmonic, that is, a certain energy function is minimized, Complete the cutting of the image. Then through the further analysis of the template to achieve the understanding and recognition of the image.
In simple terms, theSNAKE model is a deformable parameter curve and corresponding energy function, which aims at minimizing the energy objective function, controlling the parameter curve deformation, and the closed curve with the minimum energy is the target contour.
The purpose of constructing the Snakes model is to reconcile the contradiction between the upper knowledge and the underlying image features . Whether it is brightness, gradient, corner point, texture or light flow, all of the image features are local. The so-called locality means that the characteristic of a certain point in an image depends only on the neighborhood of the point, and is independent of the shape of the object. But people's understanding of objects is mainly from its contour. How to effectively blend the two together is the benefit of the Snakes model. Snakes The contour line of the model carries the upper level knowledge, and the matching of contour line and image is fused with the bottom feature. These two items are expressed as the internal force and the image force of the energy function in the Snakes model.
The deformation of the model is controlled by many different forces acting on the model at the same time, and each force produces a portion of the energy, which is expressed as an independent energy term for the energy function of the active contour model.
The Snake model first needs to give an initial curve near the area of interest, and then minimizes the energy functional, allowing the curve to deform in the image and keep approaching the target contour.
The original Snakes model proposed by Kass is composed of a set of control points:V (s) =[x (s), Y (s)] s∈[0, 1] , which are connected in a straight line to form a contour line. where x (s) and y (s) represent the coordinates of each control point in the image. S is an independent variable describing the boundary of the narrative in Fourier transform form. Define the energy function (reflecting the relationship between energy and contour) on the Snakes control point:
The first 1 is called the elastic Energy is the first derivative of the modulus of the v , the first 2 is called the bending energy , is the second derivative of v modulus, and section 3 is External Energy (external forces), in the basic Snakes model, generally only take the control point or the location of the image local features such as gradients:
Also known as Image force. ( when Contour C is near the edge of the target image , the gradient of C will increase, then the energy of the equation is minimal, and the curve Evolution Formula knows that the point will change to 0 .) , that is, to stop the movement. in this way,C stops at the edge of the image, and the cut is finished. Then the premise is that the target in the image of the edge is more obvious, or very easy to cross the edge. )
The elastic energy and the bending energy are collectively the internal energy (internal force), which is used to control the elastic deformation of the contour line , which plays a role in maintaining the continuity and smoothness of the contour. The third represents the external energy, also known as the image energy, which indicates that the deformation curve coincides with the local characteristics of the image. The internal energy is only related to the shape of the snake , not to the image data. And the external energy is only related to the image data. At a certain point the alpha and β values determine the degree to which the curve can stretch and bend at this point.
Finally, the cutting of the image is transformed into the solution energy function etotal (v) Minimization (minimizing the energy of the contour). in the process of minimizing the energy function, the elastic energy quickly compresses the contour line into a smooth circle, and the bending energy drives the contour line into a smooth curve or line, while the image force draws the contour line closer to the image's high gradient position. the basic Snakes model is working under the combined action of these 3 forces.
Since the points on the image are discrete, the algorithms we use to optimize the energy function must be defined in the discrete domain. So the solution of energy function Etotal (v) minimization is a typical variational problem (in differential operations, the independent variable is usually a coordinate variable, the dependent variable is a function, and the variable is a function, and the argument is the function, which is the mathematically called functional. The problem of finding the extremum of a functional function is mathematically called the variational method.
Under the condition of discretization (digital image), the answer of the last question by Euler equation is equivalent to solving a set of difference equations: ( Euler equation is the differential expression of the functional extremum condition, and the Euler equation of the functional is solved, then the stationary function of the extremum of the functional is obtained, and the variational problem is transformed into the differential problem.) )
Remember the external force F =?? P, Kass and so on are discretized, the x (s) and y (s) are constructed two five diagonal arrays of linear equations, by iterative calculation to solve. In the practical application, the control point is used as the starting position of the Snakes model, and then the energy function is iterated.
The above is only a simple understanding of snake , if you want to go deeper, please refer to many other professional literature. The level is limited, the mistake is unavoidable, still hope to correct.
Reference:
Li Tianqing,Snake model review, Computer project,2005, vol. 9
Image Cutting (v) A brief introduction to the snake model of active contour model