An improved Chan-vese model and its infrared image segmentation method

By introducing edge energy terms, radial basis function and internal energy terms into the Chan-vese model, the traditional model is solved, which is insensitive to the initial curve position, large amount of calculation and long iteration time during infrared image segmentation, and a more efficient and accurate segmentation effect is achieved.

CN114022499BActive Publication Date: 2025-02-28INFORMATION & TELECOMM COMPANY SICHUAN ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111425679.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-02-28
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

The traditional Chan-vese model is insensitive to the initial curve position during infrared image segmentation, has a large amount of calculation and is too long to meet the power system's requirements for speed and accuracy.

Method used

The edge energy term, radial basis function and internal energy term are introduced to improve the Chan-vese model. The edge energy term enhances local control capability, the radial basis function replaces the length regular term to remove false blocks and reduces the calculation amount, and the internal energy term reduces the calculation amount and saves the algorithm running time.

Benefits of technology

The improved model overcomes the problem that the traditional model is insensitive to the initial curve position, significantly reduces the calculation amount and iteration time, improves segmentation efficiency and accuracy, and meets the speed and accuracy requirements of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022499B_ABST
    Figure CN114022499B_ABST
Patent Text Reader

Abstract

The present invention relates to image segmentation technology, and discloses an improved Chan-vese model, wherein the improved Chan-vese model introduces edge energy terms, radial basis functions, and internal energy terms based on the level set function of the original Chan-vese model, and the present invention also discloses an infrared image segmentation method based on the improved Chan-vese model. The present invention overcomes the problem that the original Chan-vese model is insensitive to the initial curve position and the segmentation is inaccurate when segmenting infrared images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to image segmentation technology in the field of computers, and in particular to an improved Chan-vese model and an infrared image segmentation method thereof. Background Art

[0002] At present, the mainstream infrared image segmentation methods are still mainly visible light image segmentation methods or improved visible light image segmentation methods. The more commonly used infrared image segmentation algorithms are based on threshold algorithms, clustering segmentation methods, edge detection algorithms, etc. In recent years, new methods have been introduced and combined, mainly by combining with artificial intelligence theories such as neural networks and genetic algorithms to improve the degree of automation of the algorithm. The segmentation results cannot meet the requirements of "speed" and "accuracy" of the power system. Because the results of image segmentation will directly affect the subsequent fault diagnosis process, it is necessary to use specific methods to make the segmentation algorithm closer to the characteristics of infrared images.

[0003] Since the application of level set theory in the field of image segmentation, many new research results have emerged. Aldísio et al. proposed a fast Geodesic contour model, and Hu Biao et al. proposed a geodesic region model for infrared image segmentation, and flexibly applied the model to video moving target tracking. Based on the Mumford-Shah model, Chan and Vese avoided relying on the image gradient properties and proposed a boundless active contour model, which achieved the segmentation of boundless images and had a significant segmentation effect on images with blurred or discontinuous edges such as infrared images.

[0004] The traditional Chan-vese model is not sensitive to the position of the initial curve, and the addition of the initialization step increases the algorithm calculation and takes too long. To address the above problems, it is necessary to improve the model in terms of initialization and algorithm running time. Summary of the invention

[0005] The present invention provides an improved Chan-vese model and an infrared image segmentation method thereof, which overcomes the problems of insensitivity to the initial curve position, large amount of calculation and long iteration time existing in the traditional Chan-vese model for infrared image segmentation.

[0006] The present invention is achieved through the following technical solutions:

[0007] An improved Chan-vese model is disclosed. The improved Chan-vese model introduces edge energy terms, radial basis functions and internal energy terms based on the level set function defined by the original Chan-vese model for an image. The edge energy terms can enhance the local control capability of the original Chan-vese model, so that the original Chan-vese model can effectively suppress contour deviation. The radial basis function replaces the length regularization term in the original Chan-vese model, so that the original Chan-vese model can not only keep the contour smooth but also remove false small blocks, and overcomes the problem of increased calculation amount caused by the length regularization term in the original Chan-vese model. The internal energy term can reduce the calculation amount of the original Chan-vese model and save the running time of the algorithm.

[0008] As an optimization, the level set function defined for the image using the original Chan-vese model is specifically:

[0009]

[0010] Among them, φ is the initial level set function, and the smooth term and is the fitting term, c1 and c2 represent the inner grayscale average and outer grayscale average of the contour line of the curve respectively. When c1 and c2 change continuously and finally have the smallest difference with the value of the original image, the contour line is the target contour line. represents the length of the curve boundary, is the area of ​​the inner part of the contour line, λ1,λ2 are weight coefficients, μ,ν represent the extreme value of target homogeneity and background homogeneity respectively, The value of is always positive, indicating the extreme value of the target contour contribution to the fitting energy and the extreme value of the target area contribution to the fitting energy. H(φ(x)) represents the result of solving the level set function using the Heaviside function.

[0011] As an optimization, the edge energy term is specifically:

[0012]

[0013] Among them, μ is the extreme value of target homogeneity, φ(x,y) is the initial level set function, g j (x,y) is the edge detection function;

[0014] The edge detection function g i (x,y) is specifically:

[0015]

[0016] Among them, kj represents the threshold of edge detection, u j (x, y) represents the reference value of the edge pixel. When the pixel is located inside the homogeneous area of ​​the image, g j (x,y)→1; when the pixel is at the edge of the image, g j (x,y)→0, I0(x,y) is the initial contour line, is the pixel position, j is the label value of the edge variable, and (x, y) is the pixel coordinate.

[0017] As an optimization, the radial basis function replaces the length regularization term in the level set function defined by the original Chan-Vese model for the image. The radial basis function is specifically:

[0018]

[0019] Among them, x c is the center of the radial function, k is the width parameter that limits the radial range of the radial function, and x represents the horizontal coordinate of the position of the current pixel.

[0020] As an optimization, the radial basis function is used to replace the original Chan-vese model to define the level set function of the image, and the improved level set function is convolved with the radial basis function to obtain the inner grayscale average c1 of the contour line and the outer grayscale average c2 of the contour line;

[0021]

[0022] Among them, I(y) represents the contour line of the curve, G k is the radial basis function, u i represents the convolution result of the level set function φ(x,y) and the radial basis function, and H(φ(x)) represents the result of solving the level set function using the Heaviside function.

[0023] As an optimization, the internal energy term is specifically:

[0024]

[0025] Among them, φ(x,y) is the initial level set function.

[0026] As an optimization, the improved Chan-vese model is specifically:

[0027]

[0028] Among them, G k is the radial basis function, E j edge (φ) is the edge energy term, is the area of ​​the inner part of the contour line, is the fitting term.

[0029] An infrared image segmentation method based on an improved Chan-vese model comprises the following steps:

[0030] Step 1: Based on the improved Chan-vese model, a grayscale image of the target image is obtained and an initial contour line is defined to obtain an initial level set function defined by the improved Chan-vese model for the image;

[0031] Step 2, calculating the width parameter k of the radial range of the limit radial basis function of the level set function, the inner grayscale average c1 of the contour line, and the outer grayscale average c2 of the contour line;

[0032] Step 3, iterating the level set function and updating the contour line according to the iterated level set function;

[0033] Step 4: Determine whether the iterated level set function converges. If so, jump to step 5; otherwise, jump to step 2.

[0034] Step 5: The iteration is terminated and the contour line at the time of iteration termination is output to obtain the segmentation result.

[0035] As an optimization, judging whether the level set function after iteration converges is specifically as follows: judging whether the difference between the value of the level set function and the global extreme value of the target image evolution is less than a given threshold. If it is less than the given threshold, the level set function converges; otherwise, the level set function does not converge.

[0036] As an optimization, the global extremum is the global minimum.

[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0038] 1. The present invention overcomes the problem of insensitivity to the initial curve position and inaccurate segmentation in the original Chan-vese model for infrared image segmentation.

[0039] 2. The present invention solves the problems of large computational complexity and long iteration time of the original Chan-vese model, and improves the operating efficiency of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0041] Figure 1 Schematic diagram of the contour offset defined by the original Chan-vese model for the image;

[0042] Figure 2 A method flow chart of an infrared image segmentation method based on an improved Chan-vese model according to the present invention;

[0043] Figure 3 This is a comparison chart of die resistance segmentation;

[0044] Figure 4 This is a comparison chart of AC and DC contactor segmentation. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0046] Example 1

[0047] An improved Chan-vese model is disclosed. The improved Chan-vese model introduces edge energy terms, radial basis functions and internal energy terms based on the level set function defined by the original Chan-vese model for an image. The edge energy terms can enhance the local control capability of the original Chan-vese model, so that the original Chan-vese model can effectively suppress contour deviation. The radial basis function replaces the length regularization term in the original Chan-vese model, so that the original Chan-vese model can not only keep the contour smooth but also remove false small blocks, and overcomes the problem of increased calculation amount caused by the length regularization term in the original Chan-vese model. The internal energy term can reduce the calculation amount of the original Chan-vese model and save the running time of the algorithm.

[0048] Specifically, the original Chan-vese model has global optimization characteristics, which is not restricted by the position of the initial closed curve (contour line) during the image segmentation process, and has a certain robustness to images disturbed by noise. However, the original Chan-vese model lacks edge information of the image, resulting in weak local control ability of the image, and the initial contour line offset often leads to slower segmentation efficiency, such as Figure 1 As shown, Figure 1 In the figure, the left figure is the convergence function graph of an image, and the right figure is the segmentation result corresponding to the image. Figure 1 The segmentation result of the infrared image of the tube core resistor when the contour line is offset after 400 iterations. To obtain a more accurate segmentation result, further iterative calculation is required, which will also increase the time consumption. Therefore, in order to solve the problem of weak local control ability of the original Chan-vese model, the present invention proposes to introduce an edge energy term and adopt edge information weighted correction energy function. The edge energy term is specifically shown in formula (1):

[0049]

[0050] Among them, μ is the extreme value of target homogeneity, φ(x,y) is the initial level set function; g j (x,y)→1 is the edge detection function;

[0051] The edge detection function g j (x,y)→1 is:

[0052]

[0053] In formula (2), k j represents the threshold of edge detection. When the pixel is located inside the homogeneous region of the image, g j (x,y)→1; when the pixel is at the edge of the image, g j (x,y)→0, I0(x,y) is the initial contour line, is the pixel position, j is the label value of the edge variable, and (x, y) is the pixel coordinate.

[0054] Therefore, after the edge energy term is corrected, the local control ability of the original Chan-vese model is enhanced, so that the original Chan-vese model can effectively suppress the deviation of the contour line.

[0055] The level set function defined by the original Chan-vese model for the image is specifically:

[0056]

[0057] Among them, φ is the initial level set function (here φ(x,y) is actually the level set function, omitting x and y), and the smooth term and is the fitting term, c1 and c2 represent the inner grayscale average and outer grayscale average of the contour line of the curve respectively. When c1 and c2 change continuously and finally reach the minimum difference with the value of the original image, the contour line is the target contour line; represents the length of the curve boundary, is the area of ​​the inner part of the contour line, λ1,λ2 are weight coefficients, μ,ν represent the extreme value of target homogeneity and background homogeneity respectively, The values ​​of are always positive, representing the extreme value of the target contour's contribution to the fitting energy (the values ​​of the above two fitting items) and the extreme value of the target area's contribution to the fitting energy. H(φ(x)) represents the result of solving the level set function using the Heaviside function. In an image, adjacent pixels have certain correlation and similarity. The grayscale difference between pixels in the same area is small, and the degree of similarity is high, which is homogeneity. Target homogeneity is the maximum value of the target area, and background homogeneity is the maximum value of the corresponding background area. The purpose of setting the fitting item is to connect the points on the plane with a curve.

[0058] In formula (3), the first term is the length regularization term, which can maintain the contour smoothness of the curve evolution, but in actual calculation, it will make the calculation more complicated. The present invention uses the radial basis function to replace the traditional length regularization term, which can not only keep the contour smooth but also remove false small blocks, and overcome the increase in calculation amount caused by the traditional length regularization term. The mathematical expression of the radial basis function is shown in formula (4);

[0059] The radial basis function is specifically:

[0060]

[0061] Among them, x c is the center of the radial function, k is the width parameter that limits the radial range of the radial function, and x represents the horizontal coordinate of the position of the current pixel.

[0062] The convolution result can be obtained by convolving the level set function φ in formula (3) with the radial basis function G. Here, u is used to represent the convolution result of the level set function φ. Here, u is used to represent the inner grayscale average c1 of the contour line and the outer grayscale average c2 of the contour line, as shown in formula (5) and formula (6);

[0063]

[0064] Among them, I(y) represents the contour line of the curve, G k is the radial basis function, u irepresents the convolution result of the level set function φ(x,y) and the radial basis function, and H(φ(x)) represents the result of solving the level set function φ(x,y) using the Heaviside function.

[0065] Since the radial basis function G k Instead of removing the length regularization term, μ = 0 in the first term of formula (3), λ1 = λ2 = 1 is taken for the convenience of calculation, and the gradient descent flow is obtained, as shown in formula (7):

[0066]

[0067] Among them, u represents the convolution result of the level set function φ(x, y) and the radial basis function, and c1 and c2 represent the inner grayscale average and the outer grayscale average of the contour line of the curve respectively.

[0068] In order to improve the stability of the gradient value (gradient descent flow), the data of the gradient descent flow is normalized after simplification, as shown in formula (8);

[0069]

[0070] In the above formula The results are obtained by using the weighted algorithm, see formula (9), formula (10)

[0071]

[0072] Among them, λ is the weight coefficient, u represents the convolution result of the level set function and the radial basis function, and i and j are the marks of the time and have no special meaning.

[0073] The above method uses 8-neighborhood weighted calculation of gradient values ​​and has good robustness.

[0074] In the process of solving the original Chan-vese model, since the Heaviside function is used, in the level set function, only when the solution φ of the level set function changes its sign, will it affect the minimization of the energy function of the original Chan-vese model, and the algorithm will not terminate until φ does not change. However, after each update of φ, it needs to be reinitialized to the signed distance function to ensure the stability of the calculation, but this step increases the amount of calculation.

[0075] The signed distance function (SDF), also known as the oriented distance function, determines the distance from a point to the boundary of a finite region in space and defines the sign of the distance: the point is positive inside the boundary of the region, negative outside, and 0 when it is on the boundary.

[0076] Among them, the original Chan-vese model uses an iterative method to initialize the signed distance function, and the process is shown in equations (11) and (12).

[0077]

[0078] ψ(0,.)=φ(t,.) (12)

[0079] In formula (11) and (12), φ(t,.) represents the solution of the energy function of the original Chan-vese model at time t. After reinitialization by φ(t,.), it should be the steady-state solution of formula (11). In formula (11) and (12), the symbols on the left side of the equal sign represent the expression of the signed distance function, which can be understood as the initialized signed distance function. It takes a large amount of calculation to obtain a steady-state solution. Therefore, it is necessary to omit the reinitialization step of the original Chan-vese model. Specifically, the internal energy term is introduced to constrain the level set function to infinitely approach the signed distance function during the evolution of the contour curve, thereby abandoning the reinitialization process.

[0080] The internal energy term is specifically:

[0081]

[0082] Among them, φ(x,y) is the level set function of the original Chan-vese model.

[0083] The energy function of the Chan-vese model after adding the internal energy term is shown in formula (14).

[0084]

[0085] Using Euler's formula to minimize equation (14), we get the level set function equation as shown in equation (15).

[0086]

[0087] In formula (15), φ(0,x,y) = φ0(x,y), which is the expression of the level set function at time zero. Since the Dirac function has the characteristic of suppressing the edge far away from the contour line (curve C), in order to overcome this problem, Substitute δ(φ) in equation (15).

[0088] because The edge suppression effect of the Dirac function is eliminated, and the obtained level set evolution equation is shown in equation (16).

[0089]

[0090] By introducing an internal energy term, the evolution of the constrained level set function can always approximate the signed distance function, avoiding the initialization of the level set function, thereby reducing the amount of model calculation and saving the running time of the algorithm.

[0091] In summary, the improved Chan-vese model is specifically as follows:

[0092]

[0093] Among them, G k is the radial basis function, E j edge (φ) is the edge energy term, is the fitting term.

[0094] The present invention also discloses an infrared image segmentation method based on an improved Chan-vese model. After preprocessing, the grayscale image of the infrared image is first obtained. The Chan-vese model improved from three aspects of edge energy term, radial basis function and internal energy term needs to first define the initial contour, then calculate the internal and external grayscale values ​​and parameters, and calculate the level set function at the next moment to update the contour line. Then, it is determined whether the function converges. If it converges, the calculation is terminated to obtain the segmentation result. If it does not converge, the relevant parameter values ​​are continued to be calculated until convergence.

[0095] The specific steps include:

[0096] Step 1: Based on the improved Chan-vese model, a grayscale image of the target image is obtained and an initial contour line is defined to obtain an initial level set function defined by the improved Chan-vese model for the image;

[0097] Step 2, calculating the width parameter k of the radial range of the limit radial basis function of the level set function, the inner grayscale average c1 of the contour line, and the outer grayscale average c2 of the contour line;

[0098] Step 3, iterating the level set function and updating the contour line according to the iterated level set function;

[0099] Step 4: Determine whether the iterated level set function converges. If so, jump to step 5; otherwise, jump to step 2.

[0100] Step 5: The iteration is terminated and the contour line at the time of iteration termination is output to obtain the segmentation result.

[0101] In step 4, judging whether the level set function after iteration converges is specifically as follows: judging whether the difference between the value of the level set function and the global extreme value of the target image evolution is less than a given threshold. If it is less than the given threshold, the level set function converges; otherwise, the level set function does not converge.

[0102] The global extremum is a global minimum.

[0103] The improved Chan-vese model is used to segment the infrared image. The infrared images are taken as the infrared images of the tube core resistor and the low-voltage cabinet. The segmentation results are compared with the GAC-CV model, CV-RSF model, Region-based model and Multiphase-CV model. The results are shown in Figure 3 , Figure 4 .

[0104] By comparing the segmentation results of the improved Chan-vese model with those of other models, the following conclusions are drawn: Figure 3 This is an image with a complex background, and the segmentation targets are relatively independent. To accurately segment the high-temperature area, the improved algorithm can obtain relatively accurate results after 300 iterations, while the CV-RSF and Region-based algorithms require 700 and 1200 iterations, respectively, to obtain accurate results. For the GAC-CV model and the Multiphase CV model, the results do not change after a certain degree of iteration, and the segmentation effect of the image is not good. Figure 4 The improved algorithm can obtain approximately accurate results after about 45 iterations. The GAC-CV model and Region-based model obtain segmentation results after 200 and 275 iterations respectively, after which the segmentation results do not change significantly. The CV-RSF model is seriously affected by redundant data blocks.

[0105] The Dice coincidence rate (DSC), error segmentation rate (RSE) and algorithm running time are used to compare the improved model with other models. The results are shown in Table 1, and the comparison of algorithm running time is shown in Table 2.

[0106] Table 1 Comparison of DSC and RSE

[0107]

[0108] Table 2 Comparison of segmentation time (s)

[0109]

[0110] The improved Chan-vese model has a higher overlap rate and a lower mis-segmentation rate than other models. The average segmentation time for the infrared image of the tube core resistor and the infrared image of the AC / DC contactor is 7.0765s.

[0111] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An improved Chan-vese model, characterized in that: The improved Chan-vese model introduces edge energy terms, radial basis functions and internal energy terms based on the level set function defined by the original Chan-vese model for the image, where: The level set function defined for the image using the original Chan-vese model is specifically: Where φ is the initial level set function, and is a smooth term, is the fitting term, c1 and c2 represent the inner grayscale average and the outer grayscale average of the contour line of the curve respectively. represents the length of the curve boundary, is the area of ​​the inner part of the contour line, λ1,λ2 are weight coefficients, μ,ν represent the extreme value of target homogeneity and background homogeneity respectively, H(φ) represents the result of solving the level set function with Heaviside function, is the gradient of the level set function, indicating the degree of change of the boundary; δ is the Dirac function term, and δ(φ) is used to promote the evolution of the segmentation boundary; The edge energy term is specifically: Among them, μ is the extreme value of target homogeneity, φ(x,y) is the initial level set function, g j (x, y) is the edge detection function, δ0 represents the constraint on the zero level set of the level set function φ(x, y); The edge detection function g j (x,y) is specifically: Among them, k j represents the threshold of edge detection, u j (x, y) represents the reference value of the edge pixel. When the pixel is located inside the homogeneous area of ​​the image, g j (x,y)→1; when the pixel is at the edge of the image, g j (x,y)→0, I0(x,y) is the initial contour line, is the pixel position, j is the label value of the edge variable, (x, y) is the pixel coordinate, and k0 is the weighting constant used to adjust the weights of different items to affect the intensity of the edge energy item and make edge detection more accurate; The radial basis function replaces the length regularization term in the level set function defined by the original Chan-Vese model for the image. The radial basis function is specifically: Among them, x c is the center of the radial function, k is the width parameter that limits the radial range of the radial function, and x represents the horizontal coordinate of the current pixel position; The radial basis function is used to replace the original Chan-vese model to define the level set function of the image, and the improved level set function is convolved with the radial basis function to obtain the inner grayscale average c1 of the contour line and the outer grayscale average c2 of the contour line; Among them, I(y) represents the contour line of the curve, G k is the radial basis function, u i represents the convolution result of the level set function Φ(x,y) and the radial basis function, and H(φ(x)) represents the result of solving the level set function with the Heaviside function; The internal energy term is specifically: Among them, φ(x, y) is the initial level set function.

2. An improved Chan-vese model according to claim 1, characterized in that: The improved Chan-vese model is specifically: Among them, G k is the radial basis function, E j edge (φ) is the edge energy term.

3. An improved Chan-vese model infrared image segmentation method, characterized in that: Applied to the improved Chan-vese model according to any one of claims 1 to 2, the method comprises the following steps: Step 1: Based on the improved Chan-vese model, a grayscale image of the target image is obtained and an initial contour line is defined to obtain an initial level set function defined by the improved Chan-vese model for the image; Step 2, calculating the width parameter k of the radial range of the limit radial basis function of the level set function, the inner grayscale average c1 of the contour line, and the outer grayscale average c2 of the contour line; Step 3, iterating the level set function and updating the contour line according to the iterated level set function; Step 4: Determine whether the iterated level set function converges. If so, jump to step 5; otherwise, jump to step 2. Step 5: The iteration is terminated and the contour line at the time of iteration termination is output to obtain the segmentation result.

4. The infrared image segmentation method of the improved Chan-vese model according to claim 3 is characterized in that: In step 4, judging whether the level set function after iteration converges is specifically as follows: judging whether the difference between the value of the level set function and the global extreme value of the target image evolution is less than a given threshold. If it is less than the given threshold, the level set function converges; otherwise, the level set function does not converge.

5. The infrared image segmentation method of the improved Chan-vese model according to claim 4, characterized in that: The global extremum is a global minimum.