Background
The contour captured from the image sequence has a rich spatial structure, and has been widely applied to video monitoring, medical analysis, motion recognition and the like. Features of interest in an image, whether rigid or non-rigid, are typically associated with complex motion and deformation. To accomplish this challenging task, an Active Contour (AC) method initiates an evolution curve near the object boundary, then matches the evolution curve to the true contour, and finally resides on the contour. Geometric Active Contour (GAC) captures the position of a parametric contour by minimizing the combination of smooth and gradient-driven energies.
The curve evolution of the GAC model is essentially a Diffusion, e.g., a level set Function, considered as a spatial scalar model, and the non-uniform Diffusion is constrained by a Diffusion Coefficient Function (DCF) driven by the spatial data of the image. Many DCFs have been proposed to obtain the desired curve evolution behavior. The DCF of the original GAC is proposed based on a gradient-based stopping function that leads to curve shrinkage and boundary residuals. DCF has detailed spatial resolution, but the results are still sensitive to the initial level set, since the limited coordination range of DCF usually leads to local convergence. When dynamic segmentation of time series is involved, the disadvantages of DCF are very prominent, often confusing the true contours and the salient background.
Many models assume that evolving contour-aligned moving objects are time-smooth in sequence, so that the evolving contour at the current time can be initialized by the corresponding contour at the previous time. However, considering the sampling interval, even if diffusion by gaussian smoothing has been previously achieved to the original image, the global motion between neighboring images may be so significant that the DCF is discontinuous in time. To overcome this problem, predictive methods are embedded into the GAC model to initialize the level set, otherwise local convergence per discrete time will accumulate, eventually losing object boundaries.
Disclosure of Invention
The invention provides an improved image segmentation method of a geometric active contour, which is used for realizing the segmentation of an image by constructing the improved geometric active contour.
The technical scheme of the invention is as follows: an improved image segmentation method of geometric active contour, the method comprises the following steps:
step 1: inputting an image to be processed and a vector field;
step 2: sampling a vector field through a rectangular grid, obtaining an observation set after sampling, and embedding an iterative robust estimator to eliminate errors and noises of an observed value in the observation set; then inserting observation points, and utilizing the smoothed ridge regression and constraining the elastic net to construct an advection vector field;
step 3: embedding the advection vector field and the diffusion flow into a geometric active contour, so as to construct a uniform geometric active contour model based on advection vector field and diffusion flow improvement to guide the updating of an initial level set, and the updated level set evolves an active contour curve to an accurate target contour, thereby completing the segmentation of the image; wherein an internal contour of an image is captured from a sequence of images by means of a conventional geometric active contour model and an initial level set is generated.
Step2, establishing an energy equation E of a vector field according to a Lagrangian method and concisely writing the energy equation E into a matrix form:
in the formula:
is a column vector ordering a conventional grid matrix in dictionary order, L is a matrix smoothing each element of a vector field X by a Laplacian, D is 4 grid points inserted near an observation point and pointing to the position of the matrix in a bilinear manner, and lambda is
1And λ
2Is to satisfy lambda
1+λ
2A positive coefficient of 1;
obtaining a regular equation by solving partial derivatives in an energy equation
And solving by using ridge regression to obtain advection vector field
Comprises the following steps:
wherein U ═ DTD+λ1LTL)-1DT。
The Step3 is specifically as follows:
let the evolution of the curve be unlimited, the level set equation can be generalized by transferring spatial intensity through two processes inside the closed system: diffusion and advection; the geometric active contour model combines the divergence of diffusion vectors and advection vectors and can be decomposed into a divergence operation of the product of scalar and vector functions:
in the formula, the level set phi represents the image space
The variable of interest, g represents a function mapping the image intensity matrix to the corresponding diffusion coefficient, and the vector field X represents a finite vector space
The advection velocity in (1); on the right side of the equation, the first term
Denotes an unrestricted diffusion of phi; second item
Representing motion driven by gradients of the edge and advection vector fields, if significant in intensityActivating the motion; the third term preserves the conservation of the non-uniform force field; the last term compensates for the change in amount;
the level set formula is expanded to be embedded in the tangential direction of the flat flow field, and the tangential direction is
The divergence operation of (a) can also be decomposed into:
when a singular point having a large curvature is present near the vector field X,
represents the curvature of the vector field X and is typically small;
the curvature compensation C is used to enhance the detection performance of the evolution curve C driven by the level set:
in addition, the gradient direction of the curve C
At a speed value of
Tangential direction of the vector field X
At a speed value of
Then, the velocity vector is projected to the gradient direction
The evolution equation for the level set function is formulated as:
computing constraint functions
And
the level set φ of the elapsed time t is updated as:
the updated level set continues to guide the curve evolution of the geometric active contour to capture a dynamic contour with complex motion accuracy and complete the segmentation of the image.
The invention has the beneficial effects that: the invention provides a regression algorithm to construct an advection vector field, and utilizes the advection vector field and a diffusion flow to guide the update of a level set, an initial level set generated by a geometric active contour evolves towards an accurate dynamic contour under the guide of the advection vector field and the diffusion flow, the image segmentation is realized, the dynamic shape of the contour can be more accurately captured through the updated level set, and the problem that the traditional active contour model cannot accurately segment the dynamic complex image is solved; experimental results show that compared with the traditional scheme, the method provided by the invention has obvious advantages and obtains a better segmentation effect.
Detailed Description
Example 1: 1-2, an improved method for image segmentation of geometric active contours, the method comprising the steps of:
step 1: inputting an image to be processed and a vector field;
step 2: sampling a vector field through a rectangular grid, obtaining an observation set after sampling, and embedding an iterative robust estimator to eliminate errors and noises of an observed value in the observation set; then inserting observation points, and utilizing the smoothed ridge regression and constraining the elastic net to construct an advection vector field;
step 3: embedding the advection vector field and the diffusion flow into a geometric active contour, so as to construct a uniform geometric active contour model based on advection vector field and diffusion flow improvement to guide the updating of an initial level set, and the updated level set evolves an active contour curve to an accurate target contour, thereby completing the segmentation of the image; wherein an internal contour of an image is captured from a sequence of images by means of a conventional geometric active contour model and an initial level set is generated.
Further, Step1 can be set to refer to inputting the image to be processed, and simultaneously inputting a vector field X:
further, Step2 may be specifically configured as follows:
first, with a rectangular grid P of length-width dimension H, W ═ H × W versus continuous vector field X:
sampling is carried out; sampling to obtain an observation set
And N is less than P, an iterative robust estimator is embedded to eliminate errors and noises of observed values in an observation set; and (4) obtaining a horizontal vector field by realizing the ridge regression after smoothing and modifying the elastic net. Ridge regression tends to activate vectors at almost every location, as adversely affected by the smoothing term. In order to obtain accurate and significant results, the energy equation of the vector field is established according to the Lagrangian method and concisely written in the form of a matrix:
wherein
Is a column vector ordering a conventional grid matrix X in dictionary order, L is a matrix smoothing each element of X by the Laplacian, and D is a matrix inserting 4 grid points near the observation point pointing to its own position in a bilinear manner, λ
1And λ
2Is to satisfy lambda
1+λ
2A positive coefficient of 1. Obtaining a regular equation by solving partial derivatives in the equation
And solving by using ridge regression to obtain a advection vector field
Comprises the following steps:
U=(DTD+λ1LTL)-1DT
and finally, embedding the constructed advection vector field into a solution of a subsequent step.
Further, Step4 can be set, and the specific steps of constructing a unified geometric active contour model (AD-GAC) based on advection vector field and diffusion flow improvement are as follows:
let the evolution of the curve be unlimited, the level set equation can be generalized by transferring spatial intensity through two processes inside the closed system: diffusion and advection. AD-GAC combines the divergence of diffusion and advection vectors and can be decomposed into a divergence operation of the product of a scalar and a vector function:
in the formula, the level set phi represents the image space
The variable of interest, g represents a function mapping the image intensity matrix to the corresponding diffusion coefficient, and the vector field X represents a finite vector space
The advection velocity in (1). On the right side of the equation, the first term
Denotes an unrestricted diffusion of phi; second item
Representing a motion driven by the gradient of the edge and advection vector fields, which motion is activated if the intensity is significant; the third term preserves the conservation of the non-uniform force field; the last term compensates for the change in the amount.
The level set formula is expanded to be embedded in the tangential direction of the flat flow field, and the tangential direction is
The divergence operation of (d) can also be decomposed into:
when a singular point having a large curvature is present near the vector field X,
represents the curvature of the vector field X and is typically small.
The curvature compensation C is used to enhance the detection performance of the evolution curve C driven by the level set:
in addition, the gradient direction of the curve C
At a speed value of
Tangential direction of the vector field X
At a speed value of
Then, the velocity vector is projected to the gradient direction
The evolution equation of the function of the level set is formulated as
Computing constraint functions
We can update the level set φ of elapsed time t to
Wherein s represents a set tuning parameter;
the updated level set continues to guide the curve evolution of the geometric active contour to capture a dynamic contour with complex motion accuracy and complete the segmentation of the image.
By the method of the invention, the following experimental data are given:
as shown in fig. 2, the microbial sequence indicates that the microbes perform spontaneous activities in the nutrient solution, which involves overall rotation and detailed deformation. To initiate the segmentation, 3 individual sub-regions in the body of the microorganism are manually related to the representation. The light gray circle represents the initial frame of the current time t, the initial frame moves towards the segmentation contour, the dark gray circle represents the final segmentation result, and the initial frame is closer to the final segmentation result under the action of the advection vector field and the diffusion flow along with the increase of t.
In the experimental process of the invention, a system win10 is used, and a computer configured as an AMD R52600 processor, a 16G running memory and a GeForce RTX 1070(8GB) graphics card is adopted.
The working principle of the invention is as follows: in the invention, a uniform GAC model, namely an improved geometric active contour model (AD-GAC) based on advection vector field and diffusion flow, and an embedded algorithm for advection vector field regression between adjacent frames are provided. To segment dynamic objects between image sequences, the AD-GAC method extends the conventional diffusion scheme according to the generation advection diffusion equation. The advection term of the advection diffusion equation is represented by the transfer of the level set function of the time-varying vector field. Furthermore, a ridge regression of the constrained norm is implemented and the elastic mesh is modified to obtain the vector field. In addition, errors and noise of the observed values are eliminated by embedding an iterative robust estimator. Experimental results prove that the method is superior to the traditional method based on the Active Contour (AC), and particularly has advantages under the condition that the global motion is obvious.
While the present invention has been described in detail with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.