Adaptive variational level set image segmentation method and system
Through the adaptive variational level set image segmentation method, adaptive scaling function and energy function are constructed, and the global and local terms are combined to overcome the influence of image inhomogeneity and noise, thereby improving the accuracy and robustness of image segmentation.
Patent Information
- Application Number
- CN202410138739.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-02-01
AI Technical Summary
Existing technologies are difficult to effectively overcome the impact of image unevenness and noise on image segmentation, resulting in low segmentation accuracy.
An adaptive variational level set image segmentation method is adopted. By constructing an energy function of adaptive scaling function, global term, local term, denoising term and regularization term, and combining iterative optimization with the gradient descent method, the local region size and denoising are adaptively adjusted to improve the segmentation accuracy.
In the presence of intensity inhomogeneity and noise in the image, the accuracy of image segmentation is significantly improved, and the robustness to initial contours and noise is enhanced.
Smart Images

Figure CN117788479B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an adaptive variational level set image segmentation method and system. Background Art
[0002] In early level set methods, the design concept of the energy function is to diffuse the contour line toward the local strong edge of the edge. However, most level set methods based on edge mapping rely on image gradients, which are easily affected by imaging conditions and cannot effectively point out the true edge of the target. To overcome this defect, region-based level set methods have been proposed. These level set methods can be divided into parametric statistical models and non-parametric statistical models. Parametric statistical models use statistical properties such as mean and variance to construct energy functions. For example, the CV model assumes that the image to be segmented has uniform grayscale, and can minimize the variance of the area inside and outside the contour line to make the evolving contour close to the boundary of the real object to be segmented. Non-parametric statistical models directly estimate the distribution inside and outside the contour line, and design corresponding energy functions to maximize the difference in distribution inside and outside the evolving contour line to complete segmentation. This research mainly focuses on the criteria for measuring distribution differences.
[0003] Some use mutual information as a measure of distribution differences, while others employ the Bhattacharyya distance. Others have proposed a metric based on minimizing the average pixel misclassification probability. Some have introduced the concept of fuzzy sets into nonparametric statistical models and proposed using fuzzy set overlap to measure the distance differences between distributions. A new method for surface deformation has been proposed. This method first introduces a first-order energy function and then, by minimizing it, induces a second-order geometric partial differential equation in the form of a level set, thereby transforming the surface deformation process into the evolution of an implicit model on a three-dimensional volume.
[0004] With the continuous development of level set models, some hybrid models have been proposed. They combine the advantages of region-based and edge-based models. A scalable hybrid level set framework has been proposed that can blend many existing region and edge models. These hybrid level set models show better performance than single level set models when dealing with challenges such as intensity inhomogeneity and noise. Summary of the Invention
[0005] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide an adaptive variational level set image segmentation method and system that can overcome the effects of image inhomogeneity and noise on image segmentation and improve the accuracy of image segmentation.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] An adaptive variational level set image segmentation method comprises the following steps:
[0008] Convert the image to be segmented into a grayscale image;
[0009] Based on the grayscale image, an adaptive scaling function is constructed, which combines the global term and the local term, introduces the denoising term and the regularization term, and establishes the energy function of the grayscale image.
[0010] The energy function of the grayscale image is solved by the gradient descent method to obtain the iterative function;
[0011] The initial contour of the grayscale image is iterated using an iterative function, and when the energy function reaches a minimum value, the boundary of the target object in the grayscale image is obtained.
[0012] Furthermore, in order to overcome the limitation of the level set model in using a fixed scale for feature segmentation, an adaptive scale truncation function based on feature entropy is adopted. The adaptive scale truncation function adaptively adjusts the size of the local area according to the unevenness of the feature intensity.
[0013] The adaptive scaling cutoff function is defined as:
[0014]
[0015] Where, F x represents the feature x in the high-level feature domain Ω; F y represents the feature y in the local area centered on feature x; σ represents the standard deviation of the Gaussian cutoff function; ρ represents the radius of the local area centered on feature x;
[0016] ρ is defined as:
[0017]
[0018] Where a1 and a2 are two constants related to the feature size; f En represents the characteristic entropy.
[0019] Furthermore, in order to improve the segmentation effect of weak boundary features, the global term is used as the active contour model defined by the initial contour curve to divide the high-level feature F(x) into internal and external parts; the global statistical information of the feature, namely the global grayscale density distribution function, is used to construct a new global term with signed pressure function;
[0020] The grayscale density distribution function inside and outside the contour curve is defined as:
[0021]
[0022]
[0023] Where, u1 represents the grayscale mean within the characteristic curve contour; u2 represents the grayscale mean outside the characteristic curve contour; Represents the grayscale variance within the characteristic curve profile; Represents the grayscale variance outside the characteristic curve contour; P in (·) represents the grayscale density distribution function within the contour curve; P out (·) represents the grayscale density distribution function outside the contour curve;
[0024] u1, u2, and Defined as:
[0025]
[0026]
[0027]
[0028]
[0029] Where Ω represents the high-level feature domain; φ(·) represents the level set function; H ε (·) represents the approximate value of the Heaviside function;
[0030] The signed pressure function containing global information, that is, the global term is defined as:
[0031]
[0032] Furthermore, in order to solve the segmentation problem of grayscale uneven features, the local term considers a signed pressure function with local information, specifically:
[0033]
[0034] Where, Ω x represents a rectangular window with x as the center and radius ρ; Ω s Indicates that the image intensity is less than Ω x The area of Ω l Indicates that the image intensity is greater than Ω x The area of f m (x) represents Ω x The average gray intensity of s (x) represents the area Ω s The average gray intensity of l (x) represents the area Ω l The average gray intensity of
[0035] Ω s and Ω l Defined as:
[0036]
[0037] f m (x) is calculated as:
[0038]
[0039] Where * represents convolution operation;
[0040] Then the local item SPF with local information L (F(x)) is defined as:
[0041]
[0042] Furthermore, the denoising term is used to ensure that a good segmentation level can be achieved under different degrees of noise interference. The specific formula of the denoising term is:
[0043]
[0044] Where β, γ and η are positive numbers greater than 0, indicating the contribution of the first three items in the denoising term to the energy function during denoising; F c (x) represents the recovered clean high-level features; e represents the edge detection operator used to extract feature boundaries; represents the gradient operator;
[0045] e and F c (x) is defined as:
[0046]
[0047] F c (x)=f1(x)H(φ(x))+f2(x)(1-H(φ(x))))
[0048] Where f1(x) represents the local intensity mean within the initial contour; f2(x) represents the local intensity mean outside the initial contour;
[0049] The formulas for calculating f1(x) and f2(x) are:
[0050]
[0051] Furthermore, in order to avoid the complex and time-consuming reinitialization during the curve evolution, the regularization term E R (x) is defined as:
[0052]
[0053] Where μ represents a constant and p(·) represents the energy density function;
[0054] The energy density function p(·) is defined as:
[0055]
[0056] Furthermore, the energy function of the grayscale image is solved by the gradient descent method, and the iterative function is obtained as follows:
[0057]
[0058] Where λ, ω, and α represent weight factors. λ is used to adjust the weights of the global term and the denoising term, ω is used to adjust the weights of the global term and the local term, and α is used to control the weight of the penalty term in the energy function. ε (φ) represents the approximation of the Dirac function; div represents the divergence operator;
[0059] d p (·) is expressed as:
[0060]
[0061] Furthermore, the iterative function uses approximations of the Heaviside function and the Dirac function, which are specifically:
[0062]
[0063]
[0064] Where, ε represents the control H ε (φ) and δ ε The smoothness parameter of (φ), the smaller ε is, the better the H ε (φ) and δ ε (φ) is closer to the Heaviside function and the Dirac function.
[0065] Furthermore, the restored clean high-level features F c (x) The calculation formula using the iterative method is:
[0066]
[0067] An adaptive variational level set image segmentation system, applied to any of the above-mentioned adaptive variational level set image segmentation methods, comprising:
[0068] A conversion module, used for converting the image to be segmented into a grayscale image;
[0069] Function module, used to establish the energy function of grayscale image based on grayscale image;
[0070] An iterative module is used to solve the energy function of the grayscale image by a gradient descent flow method to obtain an iterative function;
[0071] The result module is used to iterate the initial contour of the grayscale image using an iterative function, and when the energy function reaches a minimum value, the boundary of the target object in the grayscale image is obtained.
[0072] Compared to existing technologies, this method automatically selects the most appropriate local size for each local segment by constructing an adaptive function. This allows accurate segmentation even in images with severe intensity non-uniformity, overcoming the effects of image intensity non-uniformity. By combining global and local terms, this method leverages both the global term's fast segmentation speed and the local term's ability to overcome intensity non-uniformity. The introduced denoising term overcomes the effects of noise on image segmentation, significantly improving segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 Flowchart of the adaptive variational level set image segmentation method.
[0074] Figure 2 This is an experimental diagram showing the robustness of the adaptive variational level set image segmentation method to the initial contour.
[0075] Figure 3 Experimental diagram of the adaptive variational level set image segmentation method's robustness to noise.
[0076] Figure 4 A comparison chart of the adaptive variational level set image segmentation method and other methods on synthetic images.
[0077] Figure 5 A comparison chart of the adaptive variational level set image segmentation method and other methods on natural images. DETAILED DESCRIPTION
[0078] The adaptive variational level set image segmentation method and system of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0079] See also Figure 1 The present invention discloses an adaptive variational level set image segmentation method, comprising the following steps:
[0080] Convert the image to be segmented into a grayscale image;
[0081] Based on the grayscale image, an adaptive scaling function is constructed, which combines the global term and the local term, introduces the denoising term and the regularization term, and establishes the energy function of the grayscale image.
[0082] The energy function of the grayscale image is solved by the gradient descent method to obtain the iterative function;
[0083] The initial contour of the grayscale image is iterated using an iterative function, and when the energy function reaches a minimum value, the boundary of the target object in the grayscale image is obtained.
[0084] Specifically, in order to overcome the limitation of the level set model in using a fixed scale for feature segmentation, the adaptive scale truncation function based on feature entropy is adopted. The adaptive scale truncation function adaptively adjusts the size of the local area according to the unevenness of the feature intensity.
[0085] The adaptive scaling cutoff function is defined as:
[0086]
[0087] Where, F x represents the feature x in the high-level feature domain Ω; F y represents the feature y in the local area centered on feature x; σ represents the standard deviation of the Gaussian cutoff function; ρ represents the radius of the local area centered on feature x;
[0088] ρ is defined as:
[0089]
[0090] Where a1 and a2 are two constants related to the feature size; F En represents the characteristic entropy.
[0091] Specifically, the global term is used to improve the segmentation effect of weak boundary features. The active contour model defined as the initial contour curve is used to divide the high-level feature F(x) into internal and external parts. The global statistical information of the feature, namely the global grayscale density distribution function, is used to construct a new global term with a signed pressure function.
[0092] The grayscale density distribution function inside and outside the contour curve is defined as:
[0093]
[0094]
[0095] Where, u1 represents the grayscale mean within the characteristic curve contour; u2 represents the grayscale mean outside the characteristic curve contour; Represents the grayscale variance within the characteristic curve profile; Represents the grayscale variance outside the characteristic curve contour; P in (·) represents the grayscale density distribution function within the contour curve; P out (·) represents the grayscale density distribution function outside the contour curve;
[0096] u1, u2, and Defined as:
[0097]
[0098]
[0099]
[0100]
[0101] Where Ω represents the high-level feature domain; φ(·) represents the level set function; H ε (·) represents the approximate value of the Heaviside function;
[0102] The signed pressure function containing global information, that is, the global term is defined as:
[0103]
[0104] Specifically, the local term is used to solve the segmentation problem of grayscale uneven features, and a signed pressure function with local information is considered, specifically:
[0105]
[0106] Where, Ω x represents a rectangular window with x as the center and radius ρ; Ω s Indicates that the image intensity is less than Ω x The area of Ω l Indicates that the image intensity is greater than Ω x The area of f m (x) represents Ω x The average gray intensity of s (x) represents the area Ω s The average gray intensity of l (x) represents the area Ω l The average gray intensity of
[0107] Ω s and Ω l Defined as:
[0108]
[0109] f m (x) is calculated as:
[0110]
[0111] Where * represents convolution operation;
[0112] Then the local item SPF with local information L (F(x)) is defined as:
[0113]
[0114] Specifically, the denoising term is used to ensure that a good segmentation level can be achieved under different degrees of noise interference. The specific formula of the denoising term is:
[0115]
[0116] Where β, γ and η are positive numbers greater than 0, indicating the contribution of the first three items in the denoising term to the energy function during denoising; F c (x) represents the recovered clean high-level features; e represents the edge detection operator used to extract feature boundaries; represents the gradient operator;
[0117] b and F c (x) is defined as:
[0118]
[0119] F c (x)=f1(x)H(φ(x))+f2(x)(1-H(φ(x))))
[0120] Where f1(x) represents the local intensity mean within the initial contour; f2(x) represents the local intensity mean outside the initial contour;
[0121] The formulas for calculating f1(x) and f2(x) are:
[0122]
[0123] Specifically, in order to avoid the complex and time-consuming reinitialization during the curve evolution, the regularization term E R (x) is defined as:
[0124]
[0125] Where μ represents a constant and p(·) represents the energy density function;
[0126] The energy density function p(·) is defined as:
[0127]
[0128] Specifically, the energy function of the grayscale image is solved by the gradient descent method, and the iterative function is obtained as follows:
[0129]
[0130] Where λ, ω, and α represent weight factors. λ is used to adjust the weights of the global term and the denoising term, ω is used to adjust the weights of the global term and the local term, and α is used to control the weight of the penalty term in the energy function. ε(φ) represents the approximation of the Dirac function; div represents the divergence operator;
[0131] d p (·) is expressed as:
[0132]
[0133] The iterative function uses approximations of the Heaviside function and the Dirac function. The approximations of the Heaviside function and the Dirac function are specifically:
[0134]
[0135]
[0136] Where, ε represents the control H ε (φ) and δ ε The smoothness parameter of (φ), the smaller ε is, the better the H ε (φ) and δ ε (φ) is closer to the Heaviside function and the Dirac function.
[0137] The restored clean high-level features F c (x) The calculation formula using the iterative method is:
[0138]
[0139] The parameters in the present invention are set as follows: fixed parameters are λ = 1, μ = 1, α = 1, β = 0.1, Δt = 0.1, h = 1, and ε = 1. The variable parameter is ω, where ω is a positive number less than 1 and needs to be adjusted according to the degree of intensity non-uniformity of the image. For images with severe intensity non-uniformity, the value of ω needs to be reduced to increase the influence of the global term, while for other images, the value of ω needs to be increased. This step can reduce the impact of intensity non-uniformity on image segmentation.
[0140] The robustness of the invention to the initial contour
[0141] See also Figure 2 , the robustness to the initial contour is an important indicator of the level set method, Figure 2 The first row shows the experimental results of the method of the present invention for the initial contours at different positions. Figure 2 The second row shows the experimental results of the method of the present invention for initial contours of different shapes. Figure 2 The experimental results shown show that the proposed method has good robustness to the initial contour.
[0142] The robustness of the present invention to noise
[0143] See also Figure 3 , Figure 3 The experimental results show the robustness of the method of the present invention to noise. Figure 3 The first row represents images contaminated by speckle noise, with mean zero and varying variances (σ1 = 0.03, 0.05, 0.07, 0.09). The second row represents images contaminated by Gaussian noise, with mean zero and varying variances (σ2 = 0.001, 0.003, 0.005, 0.007). The experimental results demonstrate that the proposed method exhibits good robustness against various types of noise.
[0144] Comparison of the present invention with other methods on synthetic images
[0145] See also Figure 4 , Figure 4 Comparisons of different methods and the proposed method on synthetic images are shown. The first five columns show the experimental segmentation results using the CV model, LCV model, LSF model, LIF model, and RELEP model, respectively, and the last column shows the experimental segmentation results of the proposed method. The experimental results show that the proposed method achieves superior segmentation accuracy to other methods on synthetic images with uneven intensity and noise.
[0146] Comparison of the present invention with other methods on natural images
[0147] See also Figure 5 , Figure 5 Comparisons of different methods and the present invention on synthetic images are shown. The first five columns show experimental segmentation results using the CV, LCV, LSF, LIF, and RELEP models, respectively, while the last column shows the experimental segmentation results using the present invention. The experimental results demonstrate that the present invention's method achieves superior segmentation accuracy to other models in natural images with uneven intensity.
[0148] In summary, the present invention constructs an adaptive function to automatically select the most appropriate local size for each local segment. This allows accurate segmentation of the image even in the presence of severe intensity non-uniformity, overcoming the effects of image intensity non-uniformity. By combining global and local terms, the present invention can simultaneously leverage the advantages of the global term's fast segmentation speed and the local term's ability to overcome intensity non-uniformity. The introduced denoising term can overcome the effects of noise on image segmentation, significantly improving segmentation accuracy.
[0149] The present invention also discloses an adaptive variational level set image segmentation system, comprising: a conversion module for converting an image to be segmented into a grayscale image; a function module for establishing an energy function of the grayscale image based on the grayscale image; an iteration module for solving the energy function of the grayscale image by a gradient descent flow method to obtain an iterative function; and a result module for iterating the initial contour of the grayscale image using the iterative function, and obtaining the boundary of the target object of the grayscale image when the energy function reaches a minimum value.
[0150] The adaptive variational level set image segmentation system of the present invention can implement the adaptive variational level set image segmentation method of the present invention, and can perform any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method. Although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules.
[0151] The above description is a detailed description of the preferred embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. Any equivalent changes or modifications made under the technical spirit disclosed by the present invention should fall within the patent scope covered by the present invention.
Claims
1. An adaptive variational level set image segmentation method, characterized in that: The following steps are involved: Convert the image to be segmented into a grayscale image; Based on the grayscale image, an adaptive scaling function is constructed, which combines the global term and the local term, introduces the denoising term and the regularization term, and establishes the energy function of the grayscale image. The energy function of the grayscale image is solved by the gradient descent method to obtain the iterative function; The initial contour of the grayscale image is iterated using an iterative function. When the energy function reaches the minimum value, the boundary of the target object in the grayscale image is obtained. In order to overcome the limitation of the level set model in using a fixed scale for feature segmentation, an adaptive scale truncation function based on feature entropy is used. The adaptive scale truncation function adaptively adjusts the size of the local area according to the unevenness of the feature intensity. The adaptive scaling cutoff function is defined as: Where, F x represents the feature x in the high-level feature domain Ω; F y represents the feature y in the local area centered on feature x; σ represents the standard deviation of the Gaussian cutoff function; ρ represents the radius of the local area centered on feature x; ρ is defined as: Where a1 and a2 represent two constants related to the feature size; F En represents the characteristic entropy; To improve the segmentation effect of weak boundary features, the global term is used as the active contour model defined by the initial contour curve to divide the high-level feature F(x) into internal and external parts. The global statistical information of the feature, namely the global grayscale density distribution function, is used to construct a new global term with a signed pressure function. The grayscale density distribution function inside and outside the contour curve is defined as: Where, u1 represents the grayscale mean within the characteristic curve contour; u2 represents the grayscale mean outside the characteristic curve contour; Represents the grayscale variance within the characteristic curve profile; Represents the grayscale variance outside the characteristic curve contour; P in (·) represents the grayscale density distribution function within the contour curve; P out (·) represents the grayscale density distribution function outside the contour curve; u1, u2, and Defined as: Where Ω represents the high-level feature domain; Φ(·) represents the level set function; H ε (·) represents the approximate value of the Heaviside function; The signed pressure function containing global information, that is, the global term is defined as:
2. The adaptive variational level set image segmentation method according to claim 1, characterized in that: In order to solve the segmentation problem of grayscale uneven features, the local term considers a signed pressure function with local information, specifically: Where, Ω x represents a rectangular window with x as the center and radius ρ; Ω s Indicates that the image intensity is less than Ω x The area of Ω l Indicates that the image intensity is greater than Ω x The area of f m (x) represents Ω x The average gray intensity of s (x) represents the area Ω s The average gray intensity of f l (x) represents the area Ω l The average gray intensity of Ω s and Ω l Defined as: f m (x) is calculated as: Where * represents convolution operation; Then the local item SPF with local information L (F(x)) is defined as:
3. The adaptive variational level set image segmentation method according to claim 2, characterized in that: The denoising term is used to ensure that a good segmentation level can be achieved under different levels of noise interference. The specific formula of the denoising term is: Where β, γ and η are positive numbers greater than 0, indicating the contribution of the first three items in the denoising term to the energy function during denoising; F c (x) represents the recovered clean high-level features; e represents the edge detection operator used to extract feature boundaries; represents the gradient operator; δ ε (φ) represents the approximate value of the Dirac function; e and F c (x) is defined as: F c (x)=f1(x)H(φ(x))+f2(x)(1-H(φ(x)))) Where f1(x) represents the local intensity mean within the initial contour; f2(x) represents the local intensity mean outside the initial contour; The formulas for calculating f1(x) and f2(x) are:
4. The adaptive variational level set image segmentation method according to claim 3, characterized in that: In order to avoid complex and time-consuming reinitialization during the curve evolution, the regularization term E R (x) is defined as: Where μ represents a constant and p(·) represents the energy density function; The energy density function p(·) is defined as:
5. The adaptive variational level set image segmentation method according to claim 4, characterized in that: The energy function of the grayscale image is solved by the gradient descent method, and the iterative function is obtained as follows: Where λ, ω, and α represent weight factors. λ is used to adjust the weights of the global term and the denoising term, ω is used to adjust the weights of the global term and the local term, and α is used to control the weight of the penalty term in the energy function. div represents the divergence operator. d p (·) is expressed as:
6. The adaptive variational level set image segmentation method according to claim 5, characterized in that: The iterative function uses approximations of the Heaviside function and the Dirac function. The approximations of the Heaviside function and the Dirac function are specifically: Where, ε represents the control H ε (φ) and δ ε The smoothness parameter of (φ), the smaller ε is, the better the H ε (φ) and δ ε (φ) is closer to the Heaviside function and the Dirac function.
7. The adaptive variational level set image segmentation method according to claim 5, characterized in that: The restored clean high-level features F c (x) The calculation formula using the iterative method is:
8. An adaptive variational level set image segmentation system, applied to the adaptive variational level set image segmentation method according to any one of claims 1 to 7, characterized in that: include: A conversion module, used for converting the image to be segmented into a grayscale image; Function module, used to establish the energy function of grayscale image based on grayscale image; An iterative module is used to solve the energy function of the grayscale image by a gradient descent flow method to obtain an iterative function; The result module is used to iterate the initial contour of the grayscale image using an iterative function, and when the energy function reaches a minimum value, the boundary of the target object in the grayscale image is obtained.
Citation Information
Patent Citations
Active contour segmentation model based on global and local symbolic energy type pressure driving
CN111161302A
Lung field image segmentation method and device based on level set
CN114882060A