Image segmentation method based on distance regularization of level set using p-norm
By constructing an energy functional and an Euler-Lagrange equation using a p-norm-based distance regularization level set method, and solving them using an alternating direction multiplier algorithm, we solve the problems of inaccurate and inefficient segmentation in complex backgrounds of traditional image segmentation algorithms, and achieve efficient and accurate image segmentation.
Patent Information
- Application Number
- CN202510015874.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-01-06
AI Technical Summary
Traditional image segmentation algorithms perform poorly when faced with uneven lighting, noise interference, and shadow effects. They also struggle to preserve image structural features, and the re-initialization process is time-consuming and has limited effectiveness.
A p-norm-based distance regularization level set method is adopted. By constructing an external data fidelity energy functional and a regularization energy functional, the Euler-Lagrange equation is constructed using variational method and gradient descent flow. The Euler-Lagrange equation is then solved using the alternating direction multiplier algorithm to obtain the final level set function.
It improves the accuracy and efficiency of image segmentation, eliminates redundant iterations, reduces the number of re-initializations, and enhances the smoothness and precision of image segmentation.
Smart Images

Figure CN119579628B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image segmentation technology, in particular to a level set image segmentation method based on distance regularization of p-norm. BACKGROUND
[0002] Image segmentation technology is an important research direction in the field of computer vision, and has been widely used in medical image processing, pattern recognition and target tracking fields. However, in practical applications, the multi-scale, multi-pose characteristics of the target object, and the complex and variable lighting conditions, bring great challenges to image segmentation. Especially for infrared imaging pictures, synthetic aperture radar (SAR) images, and medical images such as magnetic resonance imaging (MRI) images and ultrasound images, the traditional level set segmentation algorithm has the following problems:
[0003] (1) The segmentation effect of the traditional image segmentation algorithm is often unsatisfactory when facing uneven lighting, noise interference and shadow influence, and segmentation errors are prone to occur.
[0004] (2) In the evolution process of the general level set function, it is difficult to effectively maintain the structural characteristics of the image, and the smoothness of the function may also change. In order to deal with this problem, the traditional method usually needs to be reinitialized after curve evolution, but this process not only takes a long time, but also has limited effect, and is difficult to be widely promoted. SUMMARY
[0005] In order to solve the above technical problems, the present application provides a level set image segmentation method based on distance regularization of p-norm, which comprises the following steps:
[0006] S1: obtaining a target image, providing a level set function;
[0007] S2: constructing an external data fidelity region energy functional using Lp norm, and constructing a regularization energy functional based on the level set function using a potential function;
[0008] S3: constructing a total energy functional model based on the region energy functional and the regularization energy functional;
[0009] S4: constructing the Euler-Lagrange equation of the total energy functional model using the variational method and the gradient descent flow;
[0010] S5: solving the Euler-Lagrange equation using the alternating direction multiplier algorithm to obtain the final level set function to obtain the boundary of the target image;
[0011] Wherein, in step S2, the region energy functional of the external data fidelity is constructed using L p norm, as follows:
[0012] ,
[0013] wherein, is an external data fidelity energy functional, the first term represents the image boundary position, the second term represents a region term for partitioning the inner region and the outer region; is the region where the target image is located; , are both normal numbers; is an edge detection function, , is a Gaussian kernel function, is a standard deviation, is a given image, is a gradient operator, is a level set function, is a step function, the step function is approximately expressed as:
[0014] ,
[0015] wherein, is an adjustment parameter, represents an approximate function of the step function .
[0016] In an embodiment of the present application, in step S2, a regularization energy functional based on the level set function is constructed by using a potential function, as follows:
[0017] ,
[0018] wherein, is the regularization energy functional of the level set function, is a penalty function.
[0019] In an embodiment of the present application, in step S3, a total energy functional model is constructed, as follows:
[0020] ,
[0021] wherein, , , , , represents the norm of a matrix , represents a variable norm, M is the number of rows of a matrix , N is the number of columns, and iteration is performed by variables i, j; the parameter is a positive constant.
[0022] In an embodiment of the present application, the Euler-Lagrange equation of the total energy functional model is constructed by using the variational method and the gradient descent flow as follows:
[0023] ,
[0024] wherein, is a level set function, , , p is a norm, is a Lagrange multiplier, is used to constrain and such that ; is used to constrain and such that ; is used to constrain and such that ; is used to constrain and such that , , are all positive parameters.
[0025] In an embodiment of the present application, in step S5, the Euler-Lagrange equation is solved by using the alternating direction multiplier algorithm to obtain the method of the final level set function as follows:
[0026] S51: set the initial value of the sub-variable and the initial value of the Lagrange multiplier ; ;
[0027] S52: fix the value of k and the Lagrange multiplier obtained when the iteration number is , and obtain the sub-problem of based on the Euler-Lagrange equation;
[0028] solve the sub-problem of to obtain the value of k after the iteration is updated ;
[0029] S53: based on the value of , the value of and the Lagrange multiplier is unchanged, based on the Euler-Lagrange equation, the sub-problem of is obtained;
[0030] Solving the sub-problem of , the value of k after the iteration update is obtained ;
[0031] S54: based on the and the , the value of k and the Lagrange multiplier obtained when the iteration number is fixed to , based on the Euler-Lagrange equation, the sub-problem of is obtained;
[0032] Solving the sub-problem of , the value of after the iteration update is obtained ;
[0033] S55: based on the , the and the , the value of and the Lagrange multiplier obtained when the iteration number is fixed to , based on the Euler-Lagrange equation, the sub-problem of is obtained;
[0034] Solving the sub-problem of , the value of after the iteration update is obtained
[0035] ; S56: based on the , the , based on the Euler-Lagrange equation, the sub-problem of is obtained;
[0036] Solving the sub-problem of , the value of after the iteration update is obtained ;
[0037] S57: based on the value of obtained when the iteration number is k, updating the Lagrange multiplier , obtainingk +1)th iteration :
[0038] ,
[0039] S58: determining whether the maximum iteration number is reached or the error between the updated value of the variable and the last iteration value is less than the preset threshold value:
[0040] If not, returning to step S52;
[0041] If yes, outputting the level set function obtained in the current iteration, i.e., the final level set function.
[0042] In an embodiment of the present application, the sub-problem of the equation (1) is as follows:
[0043] ,
[0044] The sub-problem of the equation (1) is solved by using Fourier transform, and the following equation is obtained:
[0045] ,
[0046] Further, the following equation is obtained: ;
[0047] wherein, Δ and Δ2 represent first-order and second-order difference operators, respectively, and and . In an embodiment of the present application, the sub-problem of the equation (1) is as follows:
[0048]
[0049] ,
[0050] The sub-problem of the equation (1) is solved by using Fourier transform, and the following equation is obtained:
[0051] ;
[0052] wherein, Δ and Δ2 represent first-order and second-order difference operators, respectively, and and . In an embodiment of the present application, the sub-problem of the equation (1) is as follows:
[0053]
[0054] ,
[0055] make , , ,when At that time, the result was obtained using Newton's method. ;
[0056] in, ,
[0057] , and Let represent the Dirichlet function and its derivative, respectively.
[0058] In one embodiment of the present invention, the The subproblems are as follows:
[0059] ,
[0060] Using the nearest point optimization equation, we obtain:
[0061] ,
[0062] in, Indicates the (k+1)th step gradient, p is the norm. and These are all weight adjustment parameters, dependent on p, and the function is defined. Used for optimization. As an optimization variable, the solution is obtained using the ADM algorithm. ,
[0063] in, The compressibility constant is , for No. k The value obtained from the next iteration.
[0064] In one embodiment of the present invention, the The subproblems are as follows:
[0065] ,
[0066] Regarding the The subproblems were solved to obtain iteration value .
[0067] The technical solution of the present invention has the following advantages compared with the prior art:
[0068] First, using L pThe norm constructs an energy function of external data fidelity, can accurately find the boundary of the target in a complex background, and improves the image segmentation accuracy.
[0069] Secondly, the DRLSE equation is used to keep the smoothness of the level set function during evolution, can eliminate redundant iterations, reduce the calculation amount, and improve the image segmentation efficiency.
[0070] Thirdly, the alternating direction multiplier algorithm is used for solving, eliminating the re-initialization problem in the level set evolution process, reducing the iteration number, and improving the image segmentation efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0071] In order to make the content of the application more easily understood, the application will be further described in detail below according to specific embodiments of the application and in conjunction with the drawings, wherein,
[0072] Figure 1 is a flow chart of the image segmentation method of the level set based on distance regularization of p norm provided in the preferred embodiment of the application;
[0073] Figure 2 is the segmentation result of the image segmentation method of the level set based on distance regularization of p norm for natural scene images in the preferred embodiment of the application;
[0074] Figure 3 is the segmentation result of the image segmentation method of the level set based on distance regularization of p norm for medical CT images in the preferred embodiment of the application;
[0075] Figure 4 is the segmentation result of the image segmentation method of the level set based on distance regularization of p norm for artificial synthetic images in the preferred embodiment of the application. DETAILED DESCRIPTION
[0076] The application will be further described below in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the application and implement it, but the embodiments are not limiting the application.
[0077] Referring to Figure 1 The application provides an image segmentation method of level set based on distance regularization of p norm, which comprises the following steps:
[0078] S1: obtaining a target image, providing a level set function;
[0079] S2: using L p The norm constructs a region energy function of external data fidelity, and a regularization energy function based on the level set function is constructed by using a potential function;
[0080] S3: constructing a total energy functional model based on the region energy functional and the regularization energy functional;
[0081] S4: constructing Euler-Lagrange equation of the total energy functional model by using variational method and gradient descent flow;
[0082] S5: solving the Euler-Lagrange equation by using alternating direction multiplier method to obtain a final level set function to obtain a boundary of the target image;
[0083] In step S2, the L p norm is used to construct a region energy functional of external data fidelity as follows:
[0084] ,
[0085] wherein, is an external data fidelity energy functional, the first term represents a position of an image boundary, the second term represents a region term for segmenting an internal region and an external region; is a region where the target image is located; , are both normal numbers; is an edge detection function, , is a Gaussian kernel function, is a standard deviation, is a given image, is a gradient operator, is a level set function, is a step function, and the step function is approximately expressed as:
[0086] ,
[0087] wherein, is an infinitesimal adjusting parameter, represents an approximate function of the step function .
[0088] Further, in step S2, a regularization energy functional based on the level set function is constructed by using a potential function as follows:
[0089] ,
[0090] wherein, is the regularization energy functional of the level set function, is a penalty function.
[0091] Further, in step S3, a total energy functional model is constructed as follows:
[0092] ,
[0093] wherein, , , , , denotes the norm of the matrix , denotes a variable norm, M is the number of rows and N is the number of columns of the matrix , the iteration is performed by the variables i, j; the parameter is a positive constant.
[0094] Further, the Euler-Lagrange equation of the total energy functional model is constructed by using the variational method and the gradient descent flow as follows:
[0095] ,
[0096] wherein, is a level set function, , , , p is a norm, is a Lagrange multiplier, is used to constrain the relationship between and , so that ; is used to constrain the relationship between and , so that ; is used to constrain the relationship between and , so that ; is used to constrain the relationship between and , so that , , are all positive parameters.
[0097] Further, in step S5, the Euler-Lagrange equation is solved by using the alternating direction multiplier algorithm to obtain the final level set function. The method is as follows:
[0098] S51: set the initial value of the sub-variable and the initial value of the Lagrange multiplier ;
[0099] S52: fix the iteration number to k times to obtain and the Lagrange multiplier , based on the Euler-Lagrange equation, the sub-problem of is obtained as follows:
[0100] ;
[0101] The sub-problem of is solved by using Fourier transform, and the following equation is obtained:
[0102] ,
[0103] Further, the following equation is obtained: The value of k after the (n+1)th iteration is calculated by using the above equation ; ;
[0104] wherein, and represent first-order and second-order difference operators respectively, and ;
[0105] S53: Based on the , the values of and the Lagrange multiplier obtained when the iteration number is fixed as k are unchanged, based on the Euler-Lagrange equation, the sub-problem of is obtained as follows:
[0106] ;
[0107] The sub-problem of is solved by using Fourier transform, and the following equation is obtained:
[0108] ;
[0109] The value of after the (k+1)th iteration is calculated by using the above equation ;
[0110] S54: Based on the and the , the values of k and the Lagrange multiplier obtained when the iteration number is fixed as k are unchanged, based on the Euler-Lagrange equation, the sub-problem of is obtained as follows:
[0111] ,
[0112] make , , ,when At that time, the result was obtained using Newton's method. The formula is used to calculate ( k +1) iteration update value ;
[0113] in, ,
[0114] , and Let represent the Dirichlet function and its derivative, respectively;
[0115] S55: Based on the above The above and stated The result obtained when the number of iterations is fixed at k and Lagrange multipliers The value remains unchanged. Based on the Euler-Lagrange equation, we obtain... The subproblems are as follows:
[0116] ,
[0117] Using the nearest point optimization equation, we obtain:
[0118] ,
[0119] in, Indicates the (k+1)th step gradient, p is the norm. and These are all weight adjustment parameters, dependent on p, and the function is defined. Used for optimization. As an optimization variable, the solution is obtained using the ADM algorithm. The formula is used to calculate ( k +1) iteration update value ;
[0120] in, The compressibility constant is , for No. k The value obtained from the next iteration;
[0121] Solve the above The subproblem is obtained after (k+1) iterations. value ;
[0122] S56: based on the , the , the and the , based on the Euler-Lagrange equation, the sub-problem of is obtained as follows:
[0123] ,
[0124] The sub-problem of is solved by using Fourier transform to obtain , and the value of after the (k+1)th iteration is calculated by using the formula ;
[0125] wherein, and , represents a complex field, is a unit complex number, when the numerical calculation is unstable or the special value is undefined, the is used;
[0126] S57: based on the value of obtained when the iteration number is k, the Lagrange multiplier is updated to obtain the value of k after the (k+1)th iteration:
[0127] ,
[0128] S58: it is judged whether the maximum iteration number is reached or the error between the updated value of the variable and the value of the last iteration is less than a preset threshold:
[0129] If not, return to step S52;
[0130] If yes, the obtained in the current iteration is output, that is, the final level set function.
[0131] In an embodiment of the present application, the sub-problem of is as follows:
[0132] ,
[0133] The sub-problem of is solved by using Fourier transform to obtain:
[0134] ;
[0135] wherein, and represent first and second order differential operators, respectively, and .
[0136] To comprehensively evaluate the performance of the proposed image segmentation method in practical applications, comparative experiments were conducted with four existing image segmentation models. These models include: the traditional threshold segmentation method (CV), the regionally variable energy fitting method (RSF), the distance regularized level set evolution method (DRLSE), and the fractional order guided level set evolution method (FGLSE).
[0137] Natural scene images, medical CT images, and artificially synthesized images were selected as test objects, respectively, and the above five methods (including the method proposed in the present application) were applied to process the test images to obtain their respective segmentation results. The segmentation results obtained by the method of the present application for different types of images are shown in Figures 2-4 To quantify the segmentation effect, four evaluation indicators were selected, namely the Dice similarity coefficient (Dice), the Jaccard similarity coefficient (Jaccard), and the specificity coefficient (Specificity). Tables 1-3 are the segmentation index data results calculated by the method of the present application based on different types of images, and Table 4 is the comparison of the segmentation index results of the method of the present application and the above four existing image segmentation models.
[0138] Table 1: Segmentation index results for natural scene images
[0139]
[0140] Table 2: Segmentation index results for medical CT images
[0141]
[0142] Table 3: Segmentation index results for artificially synthesized images
[0143]
[0144] Table 4
[0145]
[0146] From Figures 2-4The segmentation result and the experimental data in Tables 1-3 show that the method has wider applicability, and is suitable for different types of image segmentation tasks such as medical image segmentation and natural scene segmentation. As shown by the data in Table 4, the method has high values of the Dice similarity coefficient (Dice) and the Jaccard similarity coefficient (Jaccard), which means that the overlap between the segmentation result and the true label is high, that is, the segmented target region is very close to the true target region, indicating that the image segmentation method has high segmentation accuracy.
[0147] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0148] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the flow Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more blocks or flows.
[0149] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the flow Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more blocks or flows.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a device for implementing the flow Figure 1 one or more flows and / or blocks Figure 1steps of the functions specified in the one or more blocks.
[0151] Obviously, the above-mentioned embodiments are only examples for clearly illustrating the present application, and are not intended to limit the present application. Based on the above-mentioned embodiments, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary or possible to enumerate all the embodiments. The obvious changes or variations derived therefrom are still within the protection scope of the present application.
Claims
1. A method of image segmentation based on distance regularized level set with p-norm, characterized in that, The method comprises the following steps: S1: obtaining a target image and a level set function of the target image; S2: using L p an external data fidelity energy functional is constructed using the norm, and a regularization energy functional based on the level set function is constructed using the potential function; S3: constructing a total energy functional model based on the fidelity energy functional and the regularization energy functional; S4: constructing an Euler-Lagrange equation of the total energy functional model by using a variational method and a gradient descent flow; S5: solving the Euler-Lagrange equation by using an alternating direction multiplier method to obtain a final level set function, so as to obtain a boundary of the target image; wherein, in step S2, the L p The external data fidelity energy functional is constructed in terms of norms as follows: , wherein, is an external data fidelity energy functional, the first term denotes the image boundary position, the second term denotes a region term for segmenting the inner region and the outer region; is the region where the target image is located; , are both normal numbers; is an edge detection function, , is a Gaussian kernel function, is a standard deviation, is a given image, is a gradient operator, is a level set function, is a step function, the step function is approximately expressed as: , wherein is an adjustment parameter, denotes an approximation function of the step function .
2. The p-norm based distance regularized level set method of image segmentation according to claim 1, characterized in that, In step S2, the regularization energy functional based on the level set function is constructed by using a potential function, as follows: , wherein, is a regularization energy functional for the level set function, is a penalty function.
3. The p-norm based distance regularized level set method of image segmentation according to claim 1, characterized in that, In step S3, the total energy functional model is constructed, as follows: , wherein , , , , denotes the matrix norm of the matrix , denotes a variable norm, M is the number of rows and N is the number of columns of the matrix , which is iterated by the variables i, j; the parameter is a positive constant.
4. The p-norm based distance regularized level set method of image segmentation according to claim 1, characterized in that, The Euler-Lagrange equation of the total energy functional model is constructed by using a variational method and a gradient descent flow, as follows: , wherein is a level set function, , , p is a norm, is a Lagrange multiplier, is used to constrain and such that ; is used to constrain and such that ; is used to constrain and such that ; is used to constrain and such that , , are all positive parameters.
5. The p-norm based distance regularized level set method of image segmentation according to claim 4, characterized in that, In step S5, the Euler-Lagrange equation is solved by using an alternating direction multiplier method, and the method for obtaining the final level set function is as follows: S51: set sub-variables initial values of the variables and Lagrange multipliers initial values of the variables ; S52: the fixed number of iterations is k the values of the Lagrange multipliers and the Lagrange multipliers are unchanged, based on the Euler-Lagrange equation, the subproblem is obtained; solving the sub-problems of the , obtaining the value of the k of the (k+1)th iteration updated value of the ; S53: based on the , the values of the fixed iteration number k, the and the Lagrange multiplier are unchanged, based on the Euler-Lagrange equation, the sub-problem is obtained; solving the sub-problems of the , obtaining the value of the k of the (k+1)th iteration updated value of the S54: based on the and the , the fixed iteration number is k , the value of and the Lagrange multiplier is unchanged, based on the Euler-Lagrange equation, the sub-problem of is obtained; solving the sub-problem of the , obtaining the value of the after the (k+1)th iteration update ; S55: based on the , the , and the , the values of the and the Lagrange multiplier obtained when the fixed number of iterations is k remain unchanged, based on the Euler-Lagrange equation, a sub-problem of is obtained; solving the sub-problem of the , obtaining the value of the after the (k+1)th iteration update ; S56: based on the , the , the , and the , based on the Euler-Lagrange equation, obtain sub-problems; solving the sub-problem of the , obtaining the value of the of the (k+1)th iteration updated value ; S57: update the Lagrange multiplier based on the value of the kth iteration S58: obtain the updated value of the kth iteration S59: update the Lagrange multiplier based on the value of the kth iteration k S60: obtain the updated value of the kth iteration S61: update the Lagrange multiplier based on the value of the kth iteration , S58: determining whether a maximum number of iterations or a variation of the variable an error between the updated value of the variable and a value of the variable from a previous iteration is less than a predetermined threshold: If no, return to step S52; If so, output the current iteration's i.e. the final level set function.
6. The p-norm based distance regularized level set method of image segmentation according to claim 5, characterized in that, The Sub-problems of the above are as follows: , The sub-problem is solved using Fourier transform to obtain: , Further, we obtain ; wherein and represent first and second order difference operators, respectively, and .
7. The p-norm based distance regularized level set method of image segmentation according to claim 5, characterized in that, The sub-problems as follows: , The sub-problem is solved using Fourier transform to obtain: where ; wherein and represent first and second order difference operators, respectively, and .
8. The p-norm based distance regularized level set method of image segmentation according to claim 5, characterized in that, The sub-problems as follows: , Let , , When , the Newton method is used to calculate ; wherein , , and denote the Dirichlet function and its derivative, respectively.
9. The p-norm based distance regularized level set method of image segmentation according to claim 5, wherein, The sub-problems as follows: , The near point optimization equation is obtained as follows: , wherein, denotes the gradient of the k+1 step , p is a norm, and are weight adjustment parameters, dependent on p, defining the function used for optimization, is an optimization variable, solved using the ADM algorithm to obtain , wherein is the compression constant, is The k value obtained in the second iteration.
10. The p-norm based distance regularized level set method of image segmentation according to claim 5, wherein, The sub-problems as follows: , solving the sub-problem of the .
Citation Information
Patent Citations
Total variation and euler elastic rod-based supervised mode identification method
CN102663424A
Image segmentation method and device based on ALSLCV model
CN114596320A