Introduction to the Snake Model Based on the Active Contour Model of image segmentation (5)
Zouxy09@qq.com
Http://blog.csdn.net/zouxy09
In "image segmentation (I) Overview", we have briefly understood the mainstream image segmentation methods. Next we will mainly learn the energy functional-based segmentation method. Here we will learn the simple knowledge of the Snake Model, Level
The Set (Level Set) model will be discussed in the following blog.
Energy Functional-based segmentation:
This method mainly refers to the Active Contour Model and the algorithms developed based on it. Its basic idea is to use continuous curves to express the target edge, define an Energy Functional function so that its independent variables include the edge curve. Therefore, the segmentation process is transformed into the process of solving the minimum value of the energy functional. the curve where the energy reaches the hour is the target contour.
The Active Contour Model is a top-down image feature locating mechanism. users or other automatic processing processes place an initial contour line near the target of interest in advance, and internal energy (Internal Force) and external energy (External Force) deformation of external energy to attract the active contour moving toward the edge of the object, while the internal energy to maintain the smooth and topology of the active contour, when the energy reached the minimum, the active contour converges to the edge of the object to be detected.
I. curve evolution theory
The curve evolution theory is applied horizontally, but I feel that this knowledge is common in the segmentation method of the Active Contour Model. So here we will briefly understand it.
Curves can be divided into several types:
There is curvature in the curve, and there is a positive and negative curvature. Therefore, under the force of the normal curvature, the movement direction of the curve is different: some parts expand outward, while some parts move inward. This situation is shown in. In the figure, the curvature at the Blue Arrow is negative, and the curvature at the Green Arrow is positive.
The evolution of a simple curve driven by the curvature force (that is, the quadratic derivative of the curve) has a very special mathematical nature: All simple curves, no matter how seriously distorted, as long as it is still a simple curve, the curvature force will eventually degrade into a circle, and then disappear (as you can imagine, the curvature force of all points of the circle is toward the center of the circle, so it will gradually narrow down and eventually disappear ).
Two important parameters used to describe the geometric features of a curve are the vector and curvature of the unit method. The vector of the unit method describes the direction of the curve, and the curvature indicates the degree of curve bending. The curve evolution theory only uses geometric parameters such as the unit method vector and curvature of the curve to study the deformation of the curve over time. The evolution process of the curve can be considered to indicate that the curve is at the force F
To the normal direction N at the speed V
Evolution. The velocity is divided into positive and negative values. Therefore, if the velocity V symbol is negative, it indicates that the evolution process of the active contour is in the external direction. If the velocity V symbol is positive, it indicates evolution in the internal direction, the active curve evolves in a single direction and cannot evolve in two directions at the same time.
Therefore, the curve evolution process is the process of different forces acting on the curve, and the force can also be expressed as energy. All things in the world tend to have the least energy. Because at this time it is the most balanced and consumes the least (I do not understand it, right ?). In image segmentation, the goal is to find the target contour. In the target profile, the energy of the entire contour is the smallest, so the curve is located anywhere in the image, because the force can evolve towards the contour of the smallest energy, when it evolves to the contour of the target, because the energy is the smallest, the force is balanced, and the speed is 0, it will not move, at this time, the goal is separated by us.
Now the key lies in: 1) How do we express this Contour; 2) How do we construct these forces and what forces can we construct to minimize the energy of the target contour?
The description and solution of these two problems lead to many segmentation methods based on the Active Contour Model. The answer to the first question forms two major genres: If the contour is represented by a parameter, It is the parameter Active Contour Model (parametric Active Contour Model), which is typically a snake model, if the contour is geometric, It is the Geometric Active Contour Model (geometric
Active Contour Model), that is, Level Set (Level Set), which embedding a two-dimensional contour to a zero-Plane Surface of a three-dimensional surface for expression (it can be understood as a contour line of a mountain, A contour line splits the mountain, and the horizontal shape of the high mountain comes out, that is, the contour), so the low-dimensional evolution curve or surface, indirect expression of a zero-Level Set expressed as a high-dimensional functional surface (this Contour changes, intuitively we can adjust the shape of the mountain or adjust the height of the climbing line ).
The second problem is a problem encountered by both schools and the most critical issue they need to solve. What force can achieve the goal of division? This will be discussed later.
Ii. Snake Model
Since Kass proposed the Snake Model in 1987, various image segmentation comprehension and Recognition Methods Based on Active Contour have sprung up. The basic idea of the Snake model is very simple. It uses some control points that constitute a certain shape as the template (contour), through the elastic deformation of the template itself, and matches with the local features of the image to reconcile, that is, an energy function is minimized to complete image segmentation. Then, we can further analyze the template to understand and recognize the image.
To put it simply, the snake model is a modifiable parameter curve and corresponding energy functions. The objective is to minimize the energy target function and control the deformation of the parameter curve, A closed curve with minimum energy is the target contour.
The purpose of constructing the snake model is to reconcile the contradiction between upper-layer knowledge and bottom-layer image features. All image features are local, regardless of the brightness, gradient, angle, texture, or optical flow. The so-called locality means that the features of a certain point in an image only depend on the neighborhood of the point, and are irrelevant to the shape of the object. However, people's understanding of objects mainly comes from their contour. How to effectively integrate the two is just the strength of the Snake model. The contour line of the Snake model carries the upper layer knowledge, while the matching between the contour line and the image integrates the underlying features. These two items represent the internal force and image force of the energy function in the snkes model, respectively.
The deformation of a model is controlled by many different forces simultaneously acting on the model. Each force generates part of the energy, this part of energy represents an independent energy item of the energy function of the Active Contour Model.
The snake model first needs to provide an initial curve near the region of interest. Then, the energy function is minimized to make the curve deform in the image and keep approaching the target contour.
Kass and other original models are composed of a group of control points: V (S) = [x (s), y (s)] s ε [0, 1]
The beginning and end of these points are connected in a straight line to form a contour line. X (s) and Y (s) represent the coordinates of each control point in the image. S
The independent variable that describes the boundary in the form of Fourier transformation. Define an energy function (reflecting the relationship between energy and the contour) at the control point of the snake ):
Among them, 1st items are called the modulus of the first derivative of V, 2nd items are called the Bending energy, the model of the second derivative of V, and 3rd items are the external energy (external force ), in the basic model, only the control point or the local feature of the image where the link is located, for example, gradient:
Also called image power. (When contour C is close to the edge of the target image, the gray gradient of contour C will increase, and the above formula will have the minimum energy, and the curve evolution formula will know that the speed of this point will change to 0, that is, stop the exercise. In this way, C stops at the edge of the image and completes the segmentation. The premise is that the target has obvious edges in the image, otherwise it will easily cross the edge .)
Elastic energy and Bending energy are collectively referred to as internal energy (Internal Force), which is used to control the elastic deformation of the contour and maintain the continuity and smoothness of the contour. The third item represents the external energy, also known as the image energy, indicating that the deformation curve is consistent with the local features of the image. The internal energy is only related to the shape of the snake, but not the image data. External energy is only related to image data. The α and β values at a certain point determine the degree to which the curve can stretch and bend.
Finally, image segmentation is transformed into solving the energy function etotal (v) minimization (minimizing the energy of the contour ). In the process of minimization of energy functions, elastic energy quickly compresses the contour line into a smooth circle, and the curved energy drives the contour line into a smooth curve or a straight line, the image force draws the contour line closer to the position of the image's high gradient. The basic snake model works under the combination of the three forces.
Because vertices on images are discrete, algorithms used to optimize energy functions must be defined in discrete domains. Therefore, solving the energy function etotal (v) minimization is a typical Variational Problem (in a differential operation, the independent variable is generally a coordinate variable, and the dependent variable is a function; in a variational operation, the independent variable is a function, the dependent variable is a function of a function, which is a mathematical function. The variational method is used to calculate the Extreme Value of a functional ).
Under the discretization condition (digital image), the Euler's equation shows that the answer to the final question is equivalent to solving a set of difference equations: (Euler's equation is a differential expression of the extreme functional condition, after solving the Euler's equation of the functional, we can obtain the resident function for the functional to take the Extreme Value and convert the variational problem into a differential problem .)
Note that the external force F = −0000p, Kass, etc. After the above formula is discretization, the linear equations of the five diagonal arrays x (s) and Y (s) are constructed respectively, it is solved through Iterative Computing. In practical application, you can manually point out the control point around the object as the starting position of the Snake model, and then iteratively solve the energy function.
The above is just a simple understanding of Snake. For more information, see other professional documents. The level is limited, and errors are inevitable.
Reference:
Li tianqing and others, Snake Model summary, computer engineering, 2005, 31st
Issue 1