An Image Processing Method and Device Based on Morphology and Nonlinear Poisson Equation
By combining morphology and nonlinear Poisson equations, the problem of large image segmentation calculation, long time-consuming and difficult to select initial contour position is solved, and efficient and accurate image segmentation effect is achieved.
Patent Information
- Application Number
- CN202310065999.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-01-16
AI Technical Summary
In the prior art, the calculation amount during image segmentation is huge, the segmentation takes a long time, and the initial contour position selection is unreasonable and it is easy to fall into the local minimum dilemma.
The image processing method based on morphology and nonlinear Poisson equations is adopted, and the intensity differential fitting function of the contours on both sides of the image is fitted through corrosion and expansion operations of grayscale morphology, the energy function is defined, and the horizontal set function transformation solution process is used to minimize the energy equation, the gradient descent method is used to simplify the data terms, and nonlinear stretching is performed through the normative function.
It improves the accuracy and robustness of image segmentation, reduces the calculation amount and segmentation time, enhances the noise resistance, and has strong robustness of the initial contour line, reducing the computational operation overhead.
Smart Images

Figure CN116128901B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an image processing method, device and equipment based on morphology and non-linear Poisson equation. Background Art
[0002] Image segmentation is a key technology in image processing and a classic problem in computer vision research. Since the 1970s, it has been highly regarded by people. So far, scholars have proposed a large number of segmentation methods for different fields. The basic method of the RSF&LoG model [Ding K, Xiao L, Weng G. Active contours driven by region-scalable fitting and optimized Laplacian of Gaussian energy for image segmentation. Signal Processing, 134:224-233, 2017.] is to use an optimized second-order differential operator of the image combined with the fitting data in the RSF model, aiming to improve the segmentation accuracy and the robustness of system parameters, but at the same time increasing the computational cost. The LPF model [Ding K, Xiao L, Weng G. Active contours driven by local pre-fitting energy for fast image segmentation. Pattern Recognition Letters, 104:29-36, 2018.] is characterized by pre-using the average value method based on the local region to fit two central values inside and outside the contour line before iteration, so as to guide the adaptive movement of the contour line. The PBC model [Jin R, Weng G. A robust active contour model driven by pre-fitting bias correction and optimized fuzzy c-means algorithm for fast image segmentation. Neurocomputing, 359:408-419, 2019.] is a non-uniformity bias correction model, which uses the principle of fuzzy C-means clustering based on the local region to pre-calculate the fitting function of the non-uniformity bias field of the model. This model has high segmentation accuracy and system robustness.The LGJD model [Bin Han, Yiquan Wu. Active contour model for inhomogenous image segmentation based on Jeffreys divergence. Pattern Recognition, 107, 107520, 2020.] first uses the CV model for calculation and then converts it to the RSF model for calculation. It is a hybrid calculation method that uses the principle of Jeffreys divergence to measure the difference between the model fitting function and the image, and drives the zero level set function to reach the target boundary, finally completing the image segmentation. The ABC model [Guirong Weng, Bin Dong, Yu Lei. A Level Set Method Based on Additive Bias Correction for Image Segmentation. Expert Systems With Applications, 185(2021)115633] is an active contour model using additive bias correction, with strong theoretical derivation of the model, strong system robustness, less operation overhead and high accuracy of image segmentation.
[0003] The well-known Region-Scalable Fitting (RSF) model proposed by Professor Li Chunming et al., which is a model that uses the gray information of a locally controllable range to segment images with uneven gray levels. This model defines a local gray fitting energy to obtain the final energy functional, and then uses the steepest descent method and the standard gradient descent method respectively to minimize the energy functional, thereby segmenting the target in the image. The RSF model can effectively segment images with uneven gray levels, but it has a large amount of computation, a long segmentation time, and high requirements for the selection of the initial contour position. When the initial contour position is set unreasonably, the RSF model will fall into the local minimum dilemma because the energy functional of this model is non-convex.
[0004] In summary, how to improve the accuracy of image segmentation is an issue to be solved currently. Summary of the Invention
[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problems in the prior art, such as the large amount of computation and long segmentation time during image segmentation, and the high requirements for the selection of the initial contour position, and it is easy to fall into the local minimum dilemma when the selection is unreasonable.
[0006] To solve the above technical problems, the present invention provides an image processing method based on morphology and non-linear Poisson equation, including:
[0007] Input the image to be processed, perform erosion and dilation operations of gray-scale morphology on the image to be processed, and perform gray-scale erosion and dilation operations on the image to be processed using a structuring element based on the radius of a preset planar disk structuring element;
[0008] Fit the intensity differential fitting function of the two sides of the contour of the image to be processed according to the erosion and dilation operations of gray-scale morphology, and define an energy function including the contour line of the image to be processed; divide the image domain into an inner-image region and an outer-image region of the contour line by using the contour line of the image to be processed, introduce a level set function, and convert the solution of the contour line into the calculation of the level set function; obtain a new energy function expression according to the level set function, take the derivative of the new energy function expression, and use the gradient descent method to process the minimum energy equation of the level set function to obtain a gradient descent flow equation, where the gradient descent flow equation includes a preset energy coefficient;
[0009] Decompose the data term with second-order differential characteristics in the gradient descent flow equation into a high-value component and a low-value component, and introduce a nonlinear Poisson equation to simplify the representation of the decomposed data term; construct a canonical function for nonlinearly stretching the value range of the data term function;
[0010] Continuously update the level set function according to the preset energy coefficient and the canonical function to obtain a target level set function; perform regularization processing on the target level set function to obtain a de-parameterized regularization function, perform domain average filtering on the de-parameterized regularization function to obtain a length term function, and use the length term function as the final level set function;
[0011] Output the final level set function and the segmentation result of the image to be processed.
[0012] In an embodiment of the present invention, the performing erosion and dilation operations of gray-scale morphology on the image to be processed includes:
[0013] Perform gray-scale erosion and dilation operations on the input image I(x, y) to be processed using a structuring element b(x, y) based on the radius d of a preset planar disk structuring element;
[0014] Perform gray-scale morphological erosion operation on the image to be processed:
[0015] Perform gray-scale morphological dilation operation on the image to be processed: (I⊕b)(x, y) = max{I(x - x′, y - y′)|(x′, y′) ∈ D b};
[0016] where, denotes the erosion operation of gray-scale morphology, I⊕b denotes the dilation operation of gray-scale morphology, b denotes a planar disk-shaped structuring element, and D b denotes the domain of the planar disk-shaped structuring element b, (x,y) denotes coordinates, (x′,y′) denotes the coordinate change amount, and its coordinates are related to the structuring element b.
[0017] In an embodiment of the present invention, the intensity differential fitting function for fitting the two-side contours of the image to be processed according to the erosion and dilation operations of the gray-scale morphology is defined, and the energy function including the contour line of the image to be processed is defined as follows:
[0018] The intensity differential fitting function for fitting the two-side contours of the image to be processed according to the erosion and dilation operations of the gray-scale morphology is as follows: and |I(x) - I⊕b|, and the energy function including the contour line of the image to be processed is defined as:
[0019]
[0020] where E EDF denotes the defined energy function, t denotes the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1. denotes the intensity differential fitting function for fitting the two-side contours of the image to be processed according to the erosion operation of the gray-scale morphology, denotes the erosion operation of the gray-scale morphology; |I(x) - I⊕b| denotes the intensity differential fitting function for fitting the two-side contours of the image to be processed according to the dilation operation of the gray-scale morphology, I⊕b denotes the dilation operation of the gray-scale morphology; I(x) denotes the gray value of the local area centered on x and with the size controlled by the Gaussian kernel function; b denotes a planar disk-shaped structuring element with a radius of d; C denotes the contour line in the image domain Ω, i.e., a closed curve; outside(C) denotes the image area outside the contour line; inside(C) denotes the image area inside the contour line.
[0021] In an embodiment of the present invention, the image domain is divided into the image area inside the contour line and the image area outside the contour line by using the contour line of the image to be processed, a level set function is introduced, and the solution of the contour line is converted into the calculation of the level set function; a new energy function expression is obtained according to the level set function, the derivative of the new energy function expression is calculated, and the level set function is minimized by using the gradient descent method to process the energy equation, and the gradient descent flow equation is obtained, including:
[0022] The contour line C of the image to be processed divides the image into two areas, i.e., outside(C) and inside(C); for the convenience of calculation, the level set function of the Lipschitz function φ is introduced to replace the contour line C, where the level set function is defined as follows:
[0023]
[0024] Set the Heaviside function to represent the region outside the contour line C, and let M 1 (φ)=H(φ); According to the above formula, the region inside the contour line C is M 2 (φ)=H(-φ), thus converting the solution of the contour line into the calculation of the level set function φ(x). At this time, the energy function formula becomes:
[0025]
[0026] Among them, since the Heaviside function is theoretically a step function and its derivative does not exist, therefore, a smooth curve is defined to replace it, that is
[0027]
[0028] Among them, H ε (·) represents a smooth function approximating the Heaviside function, and δ ε (·) is the derivative function of H ε (·);
[0029] Use the gradient descent method to minimize the energy equation of the level set function φ Process to obtain the gradient descent flow equation, that is:
[0030]
[0031] Among them, E EDF represents the defined energy function, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1; represents minimizing the energy equation of the level set function φ, that is, the partial differential of the energy function with respect to the level set; represents the data term.
[0032] In an embodiment of the present invention, the data term with second-order differential characteristics in the gradient descent flow equation is decomposed into a high-value component and a low-value component, and a nonlinear Poisson equation is introduced to simplify the representation of the decomposed data term; a canonical function for nonlinearly stretching the value range of the data term function is constructed, including:
[0033] e(x) is the data term in the gradient descent flow equation, and its formula is
[0034]
[0035] Among them, Denote the erosion operation of gray-scale morphology as, and the dilation operation of gray-scale morphology as (I⊕b). e(x) has second-order differential characteristics and is decomposed into high-value component and low-value component, i.e., e(x)≈r(x)+p T (x);
[0036] where, p T (x) represents the low-value component composed of uniformity, non-uniformity and partial Gaussian noise, etc. Define the function by Poisson equation, then T represents the threshold; r(x) represents the reflected image of the edge structure of the image, and its formula is r(x)≈e(x)-p T (x). In order to calculate this formula, define the non-linear Poisson function, i.e., r(x)=e(x)·pois(x,T); pois(x,T) is defined as
[0037] Construct a canonical function for non-linearly stretching the value range, and its formula is
[0038]
[0039] where, r τ (x) represents the canonical function, r(x) represents the reflected image of the edge structure of the image, τ represents the standard deviation value of the image, and τ=std2(I(x)).
[0040] In an embodiment of the present invention, the continuously updating the level set function according to the preset energy coefficient and the canonical function to obtain the target level set function includes:
[0041] Update the level set function φ i The formula is
[0042]
[0043]
[0044] where, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1; α represents the energy coefficient, represents the canonical function, r(x) represents the reflected image of the edge structure of the image, τ represents the standard deviation value of the image, and τ=std2(I(x)); δ(φ) represents the derivative function of H(φ); φ i+1 represents the level set function of the latter term, and φ i represents the current level set function; i = 1, 2,..., N, N represents the maximum number of iterations; Δt represents the iteration step size;
[0045] When |φ i -φ i-1When |≤0.001, stop updating and iterating to obtain the target level set function; if the number of iterations reaches the maximum number of iterations and the above conditions are still not met, stop updating and iterating and obtain the corresponding target level set function.
[0046] In an embodiment of the present invention, the regularization process on the target level set function to obtain a de-parameterized regularization function, and the neighborhood average filtering on the de-parameterized regularization function to obtain a length term function includes:
[0047] Regularize the target level set function φ i The formula is as follows:
[0048] φ R = tanh(5·φ i+1 )
[0049] where φ R represents the de-parameterized regularization function, and φ i+1 represents the latter term of the target level set function;
[0050] Perform neighborhood average filtering on the de-parameterized regularization function to obtain a length term function. The formula is as follows:
[0051] φ L = A k * φ R
[0052] where φ L represents the length term function, and A k represents the mean kernel function, a mean filter template of size k×k, where k is an odd number.
[0053] In an embodiment of the present invention, the output of the final level set function and the segmentation result of the image to be processed includes:
[0054] After performing neighborhood average filtering on the de-parameterized regularization function to obtain a length term function, the final level set function φ = φ L , and output the level set function and the segmentation result of the image at this time.
[0055] In an embodiment of the present invention, an image processing apparatus based on morphology and nonlinear Poisson equation is provided, including:
[0056] An input module for inputting an image to be processed;
[0057] An erosion and dilation module for performing erosion and dilation operations of gray-scale morphology on the image to be processed, that is, based on the radius of a preset planar disk structural element, using the structural element to perform gray-scale erosion and dilation operations on the image to be processed;
[0058] An energy function construction module fits an intensity differential fitting function of the two-side contours of the image to be processed according to the erosion and dilation operations of the gray-scale morphology, and defines an energy function including the contour line of the image to be processed; divides the image domain into an in-contour image region and an out-of-contour image region by using the contour line of the image to be processed, introduces a level set function, and converts the solution of the contour line into the calculation of the level set function; obtains a new energy function expression according to the level set function, takes the derivative of the new energy function expression, and processes the minimum energy equation of the level set function by using the gradient descent method to obtain a gradient descent flow equation;
[0059] A data item processing module decomposes the data item with second-order differential characteristics in the gradient descent flow equation into a high-value component part and a low-value component part, and introduces a nonlinear Poisson equation to simplify the representation of the decomposed data item; constructs a canonical function for nonlinearly stretching the value range of the data item function;
[0060] A calculation and update module continuously updates the level set function according to a preset energy coefficient and the canonical function to obtain a target level set function; performs regularization processing on the target level set function to obtain a de-parameterized regularization function, performs domain average filtering on the de-parameterized regularization function to obtain a length term function, and uses the length term function as the final level set function;
[0061] An output module outputs the final level set function and the segmentation result of the image to be processed.
[0062] In an embodiment of the present invention, there is also provided an image processing device based on morphology and a nonlinear Poisson equation, including: a memory for storing a computer program; a processor for implementing the steps of any one of the image processing methods when executing the computer program.
[0063] The above technical solutions of the present invention have the following advantages compared with the prior art:
[0064] An image processing method based on morphology and nonlinear Poisson equation according to the present invention combines mathematical morphology and nonlinear Poisson equation to develop a new image segmentation method. By referring to the mathematical morphology method, erosion and dilation operations of gray-scale morphology are used to fit the intensity differential fitting function of the contours on both sides of the image, enhancing the anti-noise ability, effectively eliminating the influence of noise on image segmentation, improving the robustness, reducing the computational amount and the image segmentation time at the same time. A nonlinear Poisson equation is constructed to weaken the interference such as non-uniformity, and at the same time, a level set model is introduced to complete image segmentation, increasing the accuracy of image segmentation. Due to the large variation in the value range of the data term function caused by the difference in images, a normalization function is added to perform nonlinear stretching on the value range, and an adaptive function is defined to achieve an adaptive threshold, improving the robustness of the initial contour line. The normalization function is calculated before iteration, greatly reducing the computational cost. At the same time, only δ is updated during iteration, significantly reducing the computational running overhead. In addition, the data term of the present invention is completed before iteration, so that the robustness of the initial contour line is relatively strong, improving the segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to make the content of the present invention easier to be clearly understood, the following further describes the present invention in detail according to specific embodiments of the present invention in conjunction with the accompanying drawings, where
[0066] Figure 1 is a flowchart of an image processing method based on morphology and nonlinear Poisson equation provided by the present invention;
[0067] Figure 2 is a diagram of the iterative process and segmentation result of an image processing method based on morphology and nonlinear Poisson equation provided by the present invention;
[0068] Figure 3 is an experimental diagram of the initial contour line of an image processing method based on morphology and nonlinear Poisson equation provided by the present invention;
[0069] Figure 4 is a comparative experimental diagram of an image processing method based on morphology and nonlinear Poisson equation provided by the present invention;
[0070] Figure 5 is a diagram of an image processing device based on morphology and nonlinear Poisson equation provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0071] The following further describes the present invention in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited do not limit the present invention.
[0072] Refer to Figure 1As shown in the figure, the flowchart of an image processing method based on morphology and nonlinear Poisson equation provided by the present invention; specifically including:
[0073] Step S101: Input the image to be processed; set the maximum number of iterations N; initialize the level set function φ, where, c 0 = 1, Ω 0 is a subset of the image domain Ω, is the boundary of Ω 0 ;
[0074] Set the correlation coefficients including: the energy coefficient α, used to control the running speed of the model; the radius d of the planar disk structural element, used in the process of morphological erosion and dilation operations; the threshold T of the function defined by the Poisson equation, and the mean kernel function A k , a mean filter template of size k×k, where k is an odd number.
[0075] Step S102: Perform gray-scale morphological erosion and dilation operations on the image to be processed. Based on the preset radius d of the planar disk structural element, use the structural element b(x,y) to perform gray-scale erosion and dilation operations on the input image to be processed I(x,y);
[0076] Perform gray-scale morphological erosion operation on the image to be processed:
[0077] Perform gray-scale morphological dilation operation on the image to be processed: (I⊕b)(x, y) = max{I(x - x′, y - y′)|(x′, y′) ∈ D b};
[0078] Where, represents the gray-scale morphological erosion operation, I⊕b represents the gray-scale morphological dilation operation, b represents the planar disk structural element, D b represents the domain of definition of the planar disk structural element b, (x,y) represents coordinates, (x′, y′) represents the coordinate change amount, and its coordinates are related to the structural element b.
[0079] Step S103: Fit the intensity differential fitting function of the two-side contours of the image to be processed according to the gray-scale morphological erosion and dilation operations, that is: and |I(x) - I⊕b|, define the energy function including the contour line of the image to be processed:
[0080]
[0081] Where, E EDFLet \(E\) denote the defined energy function, and \(t\) denote the segmentation target coefficient. If the object to be segmented is white, then \(t = 1\); otherwise, \(t=-1\). Let \(f_1\) denote the intensity differential fitting function for fitting the two-side contours of the image to be processed according to the erosion operation of gray-scale morphology. Let \(E_1\) denote the erosion operation of gray-scale morphology; \(|I(x)-I\oplus b|\) denotes the intensity differential fitting function for fitting the two-side contours of the image to be processed according to the dilation operation of gray-scale morphology, and \(I\oplus b\) denotes the dilation operation of gray-scale morphology; \(I(x)\) denotes the gray value of the local region centered at \(x\) and with the size controlled by the Gaussian kernel function; \(b\) denotes the planar disk structuring element with the radius \(d\); \(C\) denotes the contour line in the image domain \(\Omega\), i.e., the closed curve; \(outside(C)\) denotes the image region outside the contour line; \(inside(C)\) denotes the image region inside the contour line.
[0082] The image domain is divided into the image region inside the contour line and the image region outside the contour line by the contour line of the image to be processed. By introducing the level set function, the solution of the contour line is converted into the calculation of the level set function, that is
[0083] The contour line \(C\) divides the image into two regions, i.e., \(outside(C)\) and \(inside(C)\); for the convenience of calculation, the level set function of the Lipschitz function \(\varphi\) is introduced to replace the contour line \(C\), where the level set function is defined as follows:
[0084]
[0085] The contour line \(C\) (the zero level set: \(\varphi(x)=0\)) divides the image domain \(\Omega\) into two regions, i.e., \(\varphi(x)<0\), \(x\in inside(C)\) and \(\varphi(x)>0\), \(x\in outside(C)\); the Heaviside function is set to represent the region outside the contour line \(C\), and let \(M\) 1 (\(\varphi\)) = \(H(\varphi)\); according to the above formula, the region inside the contour line \(C\) is \(M\) 2 (\(\varphi\)) = \(H(-\varphi)\), thus the solution of the contour line is converted into the calculation of the level set function \(\varphi(x)\), and at this time the energy function formula becomes:
[0086]
[0087] Among them, since the Heaviside function is theoretically a step function and its derivative does not exist, therefore, a smooth curve is defined to replace it, that is
[0088]
[0089] Among them, \(H\) ε (\(\cdot\)) represents a smooth function approximating the Heaviside function, and \(\delta\) ε (\(\cdot\)) is the derivative function of \(H\) ε (\(\cdot\)).
[0090] Minimize the energy equation of the level set function φ using the gradient descent method Process to obtain the gradient descent flow equation, i.e.:
[0091]
[0092] where E EDF represents the defined energy function, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1; represents minimizing the energy equation of the level set function φ, that is, the partial differential of the energy function with respect to the level set; represents the data term.
[0093] Step S104: e(x) is the data term in the gradient descent flow equation, and its calculation formula is
[0094]
[0095] where represents the erosion operation of gray-scale morphology, (I⊕b) represents the dilation operation of gray-scale morphology. e(x) has second-order differential characteristics and is decomposed into a high-value component and a low-value component, that is, e(x)≈r(x)+p T (x);
[0096] where p T (x) represents the low-value component composed of uniformity, non-uniformity, and partial Gaussian noise, etc. Define the function using the Poisson equation, then T represents the threshold; r(x) represents the reflected image of the image edge structure, and its formula is r(x)≈e(x)-p T (x). To be able to calculate this formula, define the non-linear Poisson function then r(x) = e(x)·pois(x,T);
[0097] Construct a normalization function for non-linearly stretching the value range of the data term function, and calculate the normalization function r τ (x) according to r(x), and its formula is
[0098]
[0099] where r τ (x) represents the normalization function, r(x) represents the reflected image of the image edge structure, τ represents the standard deviation value of the image, that is, τ = std2(I(x)).
[0100] Step S105: Continuously update the level set function according to the preset energy coefficient and the specification function, and update the level set function φ i The formula is
[0101]
[0102]
[0103] where t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1; α represents the energy coefficient, represents the specification function, r(x) represents the reflected image of the image edge structure, τ represents the standard deviation value of the image, τ = std2(I(x)); δ(φ) represents the derivative function of H(φ); φ i+1 represents the level set function of the latter term, and φ i represents the current level set function; i = 1, 2,..., N, where N represents the maximum number of iterations; Δt represents the iteration step size;
[0104] When |φ i - φ i-1 | ≤ 0.001, stop updating the iteration to obtain the target level set function; if the number of iterations reaches the maximum number of iterations and the above condition is still not satisfied, then still stop updating the iteration to obtain the corresponding target level set function;
[0105] Perform regularization processing on the target level set function φ i , and the formula is as follows:
[0106] φ R = tanh(5·φ i+1 )
[0107] where φ R represents the de - parameterized regularization function, and φ i+1 represents the latter term of the target level set function;
[0108] Perform neighborhood average filtering on the de - parameterized regularization function to obtain the length term function, and the formula is as follows:
[0109] φ L = A k * φ R
[0110] where φ L represents the length term function, and A k represents the mean kernel function, a mean filter template of size k×k, where k is an odd number.
[0111] Step S106: After performing neighborhood average filtering on the de-parameterized regularization function, a length term function is obtained, and the final level set function φ = φ L , and output the level set function and the image segmentation result at this time.
[0112] Based on the above embodiments, referring to Figure 2 as shown, the iterative process and segmentation result diagram of an image processing method based on morphology and non-linear Poisson equation provided by the present invention. In this embodiment, four images are used to display the iterative process and segmentation result of the present invention respectively. The relevant parameter settings in the experiment are: α = 1, k = 5, d = 9, T = 3. A cyan line is displayed every five iterations. The final experimental results show that during the iterative process, the zero level set always maintains a smooth curve and the segmentation is accurate.
[0113] Based on the above embodiments, referring to Figure 3 as shown, the initial contour line experimental diagram of an image processing method based on morphology and non-linear Poisson equation provided by the present invention; in this embodiment, the relevant parameter settings in the experiment are: α = 2, k = 7, d = 9, T = 3; the active contour model is often sensitive to the setting of the initial contour line. Since the data term of the present invention is completed before iteration, the robustness of the initial contour line is relatively strong. However, the position of the initial contour line will affect the number of iterations. Within the allowable range of the number of iterations, the larger the number of iterations, the more thorough the segmentation. When the number of iterations exceeds a certain value, it will only make the curve edge smoother without changing the contour shape of the curve.
[0114] Based on the above embodiments, referring to Figure 4 as shown, the comparative experimental diagram of an image processing method based on morphology and non-linear Poisson equation provided by the present invention; in this embodiment, the model provided by the present invention is compared with the other five active contour models (RSF&LOG, LPF, PBC, LGJD, ABC) published from 2017 to 2021 in terms of segmentation accuracy and time. The parameter settings refer to the literature of the other active contour models. The calculated accuracy uses the intersection over union (IOU), that is, IOU=(A s ∩B s ) / (A s ∪B s ), where represents the area segmented by the method and represents the area of the real region; the experimental results are shown in Table 1; in order to illustrate the speed and accuracy of the model in this paper, two standard image libraries, the segmentation evaluation database, are introduced.
[0115] Table 1. IOU results and calculation time of images
[0116] Image RSF&LOG LPF PBC LGJD ABC The present invention I1(300×203) 0.956 / 0.75 0.946 / 1.48 0.955 / 0.63 0.965 / 1.01 0.961 / 0.43 0.966 / 0.14 I2(300×225) 0.653 / 2.11 0.819 / 2.16 0.913 / 1.34 0.880 / 0.97 0.418 / 1.88 0.958 / 0.07 I3(481×321) 0.554 / 5.25 0.601 / 9.88 0.745 / 3.77 0.883 / 2.44 0.298 / 1.86 0.914 / 0.22 I4(300×225) 0.658 / 2.44 0.246 / 5.09 0.924 / 1.35 0.134 / 2.74 0.913 / 1.34 0.919 / 0.08 I5(300×225) 0.765 / 1.43 0.824 / 2.10 0.866 / 1.00 0.957 / 0.87 0.827 / 1.62 0.893 / 0.09 I6(300×225) 0.855 / 2.51 0.863 / 3.43 0.294 / 1.10 0.923 / 0.67 0.913 / 0.78 0.952 / 0.11 I7(300×225) 0.836 / 5.66 0.071 / 6.19 0.865 / 1.60 0.896 / 1.75 0.860 / 2.18 0.869 / 0.16 I8(300×225) 0.826 / 4.06 0.858 / 9.33 0.778 / 1.58 0.790 / 2.62 0.721 / 1.72 0.854 / 0.15 I9(300×225) 0.847 / 1.40 0.594 / 1.78 0.839 / 0.69 0.809 / 1.18 0.731 / 1.00 0.838 / 0.08 I10(300×225) 0.792 / 5.71 0.844 / 5.13 0.869 / 2.07 0.876 / 2.46 0.904 / 1.27 0.918 / 0.49 I11(300×225) 0.826 / 6.15 0.832 / 6.32 0.863 / 2.19 0.759 / 5.46 0.856 / 2.41 0.901 / 0.61
[0117] From the experimental results and by comparing the intersection over union, it can be seen that the segmentation result of the present invention is more accurate and the segmentation effect is better. By comparing the computation time of each model for image segmentation, it can be seen that the computation time of the present invention is the shortest among all models. Therefore, among the existing image segmentation methods, the image segmentation method of the present invention has the fastest segmentation speed and high accuracy in image segmentation.
[0118] The present invention is mainly related to the image segmentation method based on energy functional. This type of method mainly refers to the active contour model and the algorithms developed on its basis. Its basic idea is to use a continuous curve to represent the target edge and define an energy functional whose independent variable includes the edge curve. Therefore, the segmentation process is transformed into the process of solving the minimum value of the energy functional, which can generally be achieved by solving the corresponding Euler equation of the function. The position of the curve when the energy reaches the minimum is the contour of the target.
[0119] The present invention combines mathematical morphology and nonlinear Poisson equation to develop a new image segmentation method. By introducing the mathematical morphology method and using the erosion and dilation operations of gray-scale morphology to fit the intensity differential fitting function of the two-side contours of the image, the anti-noise ability is increased, the influence of noise on image segmentation is effectively eliminated, the robustness is improved, and the operation amount and the image segmentation time are reduced. A nonlinear Poisson equation is constructed to weaken the interference such as non-uniformity. At the same time, the level set model is introduced to complete the image segmentation, increasing the accuracy of image segmentation. Due to the large variation in the value range of the data term function caused by the difference in images, a normalization function is added to perform nonlinear stretching on the value range, and an adaptive function is defined to achieve an adaptive threshold, improving the robustness of the initial contour line. The normalization function is calculated before iteration, greatly reducing the calculation cost. At the same time, only δ is updated during iteration, significantly reducing the calculation and running overhead. In addition, the data term of the present invention is completed before iteration, so that the robustness of the initial contour line is relatively strong, improving the segmentation accuracy.
[0120] The present invention has high image segmentation accuracy and can be applied to the field of medical images. Medical images depict the internal tissue structure of the human body and are closely related to people's lives. However, due to individual differences, irregular shapes of tissue structures and organs, etc., the segmentation effect of ordinary image segmentation methods on medical images is not ideal, especially for brain images. At the same time, medical images are the main research field of image processing. However, there are a large number of non-uniformity interferences in medical images, which bring great difficulties to the actual image processing process. Since the present invention adopts the processing of the nonlinear Poisson equation, the model can better process medical images with strong non-uniformity interferences such as X-ray images, CT images, and fluorescence images, and can accurately locate the position of the target boundary. In addition, the data item e(x) in the model is used to detect the second-order differential features of the image target, so the method can accurately locate the position of the target boundary. Therefore, as long as the target image has obvious boundary features, the segmentation target can be flexibly selected under the condition of reducing the energy parameter α, but it will greatly consume the running overhead.
[0121] Referring to Figure 5 As shown, an image processing device based on morphology and nonlinear Poisson equation provided by the present invention specifically includes:
[0122] An input module for inputting an image to be processed;
[0123] An erosion and dilation module for performing erosion and dilation operations of gray-scale morphology on the image to be processed, that is, based on the radius of a preset planar disk structural element, using the structural element to perform gray-scale erosion and dilation operations on the image to be processed;
[0124] An energy function construction module for fitting the intensity differential fitting function of the two-side contours of the image to be processed according to the erosion and dilation operations of the gray-scale morphology, and defining an energy function including the contour line of the image to be processed; dividing the image domain into an inner-image region and an outer-image region of the contour line by using the contour line of the image to be processed, introducing a level set function, and converting the solution of the contour line into the calculation of the level set function; obtaining a new energy function expression according to the level set function, taking the derivative of the new energy function expression, and using the gradient descent method to minimize the energy equation of the level set function to obtain a gradient descent flow equation;
[0125] A data item processing module for decomposing the data item with second-order differential characteristics in the gradient descent flow equation into a high-value component and a low-value component, and introducing a nonlinear Poisson equation to simplify the representation of the decomposed data item; constructing a canonical function for nonlinearly stretching the value range of the data item function;
[0126] A calculation and update module continuously updates a level set function according to a preset energy coefficient and the specification function to obtain a target level set function; and performs regularization processing on the target level set function to obtain a de-parameterized regularization function, performs domain average filtering on the de-parameterized regularization function to obtain a length term function, and uses the length term function as the final level set function;
[0127] An output module outputs the final level set function and the segmentation result of the image to be processed.
[0128] The device in this embodiment is used to implement the foregoing image processing method. Therefore, the specific implementation manners in the image processing device can be seen in the embodiment part of the image processing method in the foregoing text. For example, the input module 100, the erosion and dilation module 200, the energy function construction module 300, the data item processing module 400, the calculation and update module 500, and the output module 600 are respectively used to implement steps S101, S102, S103, S104, S105, and S106 in the foregoing image processing method. Therefore, the specific implementation manners can refer to the descriptions of the corresponding individual part embodiments and will not be elaborated here.
[0129] A specific embodiment of the present invention further provides an image processing device based on morphology and a non-linear Poisson equation, including: a memory for storing a computer program; a processor for implementing the steps of the foregoing image processing method based on morphology and a non-linear Poisson equation when executing the computer program.
[0130] Those skilled in the art should 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 adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as 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 the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more flows or multiple flows and / or blocks Figure 1 one or more blocks or multiple blocks.
[0132] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 and / or blocks Figure 1 specified in one or more of the blocks.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 and / or blocks Figure 1 specified in one or more of the blocks.
[0134] Obviously, the above-described embodiments are merely examples for clear illustration and are not limitations on the implementation. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.
Claims
1. An image processing method based on morphology and nonlinear Poisson equation, characterized in that, it includes: Input the image to be processed, perform erosion and dilation operations of gray-scale morphology on the image to be processed, and perform gray-scale erosion and dilation operations on the image to be processed using the structural element based on the radius of the preset planar disk structural element; Fitting the intensity differential fitting functions of the two sides of the image to be processed according to the erosion and dilation operations of the gray-scale morphology, that is: and Defining an energy function that contains the contour line of the image to be processed: where E EDF represents the defined energy function, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1; represents the intensity differential fitting function of the two sides of the image to be processed fitted according to the erosion operation of the gray-scale morphology, represents the erosion operation of the gray-scale morphology; represents the intensity differential fitting function of the two sides of the image to be processed fitted according to the dilation operation of the gray-scale morphology, represents the dilation operation of the gray-scale morphology; I(x) represents the gray value of the local area centered on x and with the size controlled by the Gaussian kernel function; b represents the planar disk structuring element with a radius of d; C represents the contour line in the image domain Ω, that is, the closed curve; outside(C) represents the image area outside the contour line; inside(C) represents the image area inside the contour line; Use the contour line of the image to be processed to divide the image domain into an inner-image region and an outer-image region of the contour line, introduce a level set function, and convert the solution of the contour line into the calculation of the level set function; obtain a new energy function expression according to the level set function, take the derivative of the new energy function expression, and use the gradient descent method to process the minimum energy equation of the level set function to obtain a gradient descent flow equation, where the gradient descent flow equation contains a preset energy coefficient; Decompose the data term with second-order differential characteristics in the gradient descent flow equation into a high-value component and a low-value component, and introduce a nonlinear Poisson equation to simplify the representation of the decomposed data term; construct a normalization function for nonlinearly stretching the value range of the data term function; Continuously update the level set function according to the preset energy coefficient and the normalization function to obtain a target level set function; perform regularization processing on the target level set function to obtain a de-parameterized regularization function, perform domain average filtering on the de-parameterized regularization function to obtain a length term function, and use the length term function as the final level set function; Output the final level set function and the segmentation result of the image to be processed.
2. The image processing method according to claim 1, characterized in that, the performing erosion and dilation operations of gray-scale morphology on the image to be processed includes: Based on the radius d of the preset planar disk structural element, perform gray-scale erosion and dilation operations on the input image to be processed I(x, y) using the structural element b(x, y); Perform erosion operation of gray-scale morphology on the image to be processed: Perform dilation operation of gray-scale morphology on the image to be processed: Among them, represents the erosion operation of gray-scale morphology, represents the dilation operation of gray-scale morphology, b represents a planar disk structuring element, D b represents the domain of the planar disk structuring element b, (x, y) represents coordinates, (x', y') represents the coordinate change amount, and its coordinates are related to the structuring element b.
3. The image processing method according to claim 1, characterized in that, the using the contour line of the image to be processed to divide the image domain into an inner-image region and an outer-image region of the contour line, introduce a level set function, and convert the solution of the contour line into the calculation of the level set function; obtain a new energy function expression according to the level set function, take the derivative of the new energy function expression, and use the gradient descent method to process the minimum energy equation of the level set function to obtain a gradient descent flow equation, includes: The contour line C of the image to be processed divides the image into two regions, namely outside(C) and inside(C); for the convenience of calculation, introduce the level set function of the Lipschitz function φ to replace the contour line C, where the level set function is defined as follows: Set the Heaviside function to represent the region outside the contour line C, and let M 1 (φ) = H(φ); according to the above formula, the region inside the contour line C is M 2 (φ) = H(-φ), thus converting the solution of the contour line into the calculation of the level set function φ(x). At this time, the energy function formula becomes: Among them, since the Heaviside function is theoretically a step function and its derivative does not exist, therefore, define a smooth curve to replace it, that is Among them, H ε (·) represents a smooth function approximating the Heaviside function, and δ ε (·) is the derivative function of H ε (·); Minimize the energy equation of the level set function φ using the gradient descent method Process to obtain the gradient descent flow equation, i.e.: Among them, E EDF represents the defined energy function, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1. represents minimizing the energy equation for the level set function φ, that is, the partial derivative of the energy function with respect to the level set. represents the data term.
4. The image processing method according to claim 3, characterized in that, the decomposing the data term with second-order differential characteristics in the gradient descent flow equation into a high-value component and a low-value component, and introducing a nonlinear Poisson equation to simplify the representation of the decomposed data term; constructing a normalization function for nonlinearly stretching the value range of the data term function, includes: e(x) is the data term in the gradient descent flow equation, and its formula is Among them, represents the erosion operation of gray-scale morphology, represents the dilation operation of gray-scale morphology. e(x) has second-order differential characteristics and can be decomposed into high-value component and low-value component, that is, e(x)≈r(x)+p T (x); Among them, p T (x) represents a low-value component composed of uniformity, non-uniformity, and partial Gaussian noise. Using the Poisson equation to define a function, then T represents a threshold; r(x) represents the reflected image of the edge structure of the image, and its formula is r(x) ≈ e(x) - p T (x). In order to calculate this formula, a non-linear Poisson function is defined, that is, r(x) = e(x) · pois(x, T); pois(x, T) is defined as Construct a canonical function for nonlinearly stretching the value range, and its formula is where r τ (x) represents a normalization function, r(x) represents the reflected image of the edge structure of the image, τ represents the standard deviation value of the image, and τ = std2(I(x)).
5. The image processing method according to claim 4, characterized in that the continuously updating the level set function according to the preset energy coefficient and the canonical function to obtain the target level set function includes: Update the level set function φ i The formula for Among them, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1. α represents the energy coefficient. denotes the regularization function, r(x) represents the reflected image of the edge structure of the image, τ represents the standard deviation value of the image, τ = std2(I(x)); δ(φ) represents the derivative function of H(φ); φ i+1 represents the level set function of the latter term, φ i represents the current level set function; i = 1, 2,..., N, where N represents the maximum number of iterations; Δt represents the iteration step size. When |φ i - φ i-1 | ≤ 0.001, stop updating and iterating to obtain the target level set function; if the above condition is not satisfied when the number of iterations reaches the maximum number of iterations, still stop updating and iterating to obtain the corresponding target level set function.
6. The image processing method according to claim 5, characterized in that the regularizing the target level set function to obtain a de-parameterized regularized function, and performing neighborhood average filtering on the de-parameterized regularized function to obtain a length term function includes: Regularize the target level set function φ i as follows: φ R = tanh(5·φ i+1 ) Among them, φ R represents a de-parametrized regularization function, and φ i+1 represents the latter term of the target level set function; Performing neighborhood average filtering on the de-parameterized regularized function to obtain a length term function, and the formula is as follows: φ L = A k * φ R Among them, φ L represents the length term function, and A k represents the mean kernel function, a mean filter template of size k×k, where k is an odd number.
7. The image processing method according to claim 1, characterized in that the outputting the final level set function and the segmentation result of the image to be processed includes: After performing neighborhood average filtering on the de-parameterized regularization function, a length term function is obtained, and the final level set function φ = φ L , and the level set function and the segmentation result of the image at this time are output.
8. An image processing apparatus based on morphology and nonlinear Poisson equation, characterized in that it includes: An input module for inputting an image to be processed; An erosion and dilation module for performing erosion and dilation operations of gray-scale morphology on the image to be processed, that is, based on the radius of a preset planar disk structural element, using the structural element to perform gray-scale erosion and dilation operations on the image to be processed; An energy function construction module fits an intensity differential fitting function for the contours on both sides of the image to be processed according to the erosion and dilation operations of the grayscale morphology, that is: and Define an energy function that includes the contour line of the image to be processed: where E EDF represents the defined energy function, t represents the segmentation target coefficient. If the segmentation object is white, then t = 1; otherwise, t = -1. represents the intensity differential fitting function for fitting the contours on both sides of the image to be processed according to the erosion operation of the grayscale morphology, represents the erosion operation of the grayscale morphology; represents the intensity differential fitting function for fitting the contours on both sides of the image to be processed according to the dilation operation of the grayscale morphology, represents the dilation operation of the grayscale morphology; I(x) represents the grayscale value of the local area centered at x and with the size controlled by the Gaussian kernel function; b represents the planar disk structuring element with a radius of d; C represents the contour line within the image domain Ω, that is, a closed curve; outside(C) represents the image area outside the contour line; inside(C) represents the image area inside the contour line; the image domain is divided into the image area inside the contour line and the image area outside the contour line by using the contour line of the image to be processed, a level set function is introduced, and the problem of solving the contour line is converted into calculating the level set function; a new energy function expression is obtained according to the level set function, the derivative of the new energy function expression is taken, and the level set function is minimized for the energy equation by using the gradient descent method to obtain the gradient descent flow equation. A data term processing module for decomposing the data term with second-order differential characteristics in the gradient descent flow equation into a high-value component and a low-value component, and introducing a nonlinear Poisson equation to simplify the representation of the decomposed data term; constructing a canonical function for nonlinearly stretching the value range of the data term function; A calculation and update module for continuously updating the level set function according to the preset energy coefficient and the canonical function to obtain the target level set function; and regularizing the target level set function to obtain a de-parameterized regularized function, performing neighborhood average filtering on the de-parameterized regularized function to obtain a length term function, and taking the length term function as the final level set function; An output module for outputting the final level set function and the segmentation result of the image to be processed.
9. An image processing device based on morphology and nonlinear Poisson equation, characterized in that it includes: A memory for storing a computer program; A processor for implementing the steps of the image processing method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Image processing method and image processing system
CN104952089A
ACM (Active Contour Model) image rapid segmentation method based on gray scale morphological energy method
CN106570867A