Image segmentation method and device based on adaptive weighted mean filtering

The low-frequency components of the image are separated and high-frequency components are extracted through adaptive weighted mean filtering technology, and the data driver term is constructed for image segmentation, which solves the problem of missegment and poor stability of the active contour model under uneven light and noise, and improves the segmentation accuracy Spend.

CN118447032BActive Publication Date: 2024-11-01SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903051.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-11-01
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The existing active contour model is prone to missegment of non-target areas when segmenting images containing uneven light and noise, resulting in poor stability and low accuracy of segmentation results.

Method used

Using an image segmentation method based on adaptive weighted mean filtering, by obtaining the low-frequency components and high-frequency components of the image to be segmented, a data driver term is constructed to iteratively update the initial horizontal set function to obtain the final contour line to achieve accurate image segmentation.

Benefits of technology

It effectively reduces the impact of uneven illumination on segmentation accuracy, enhances image edge characteristics, improves segmentation accuracy and reduces the impact of noise on model robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447032B_ABST
    Figure CN118447032B_ABST
Patent Text Reader

Abstract

The present invention relates to an image segmentation method and device based on adaptive weighted mean filtering. The present invention relates to the field of image processing technology. The method described in the present application calculates the low-frequency component of the image to be segmented by a fitting function based on adaptive weighted mean filtering, separates the low-frequency component from the image to be segmented, and reduces the influence of intensity overlap caused by uneven illumination on the segmentation accuracy. Diffusion filtering is used to process the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component to obtain the high-frequency component of the image to be segmented, and a data-driven item is constructed based on the calculation result to enhance the edge features of the image, while effectively reducing the influence of noise in the high-frequency component on the robustness of the model, thereby extracting the target edge features from the image with uneven grayscale, thereby improving the segmentation accuracy of the present application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image segmentation method and device based on adaptive weighted mean filtering. Background Art

[0002] Image segmentation is an important branch in the fields of image analysis, pattern recognition and artificial intelligence, and is also the research basis of computer vision and image processing. Image segmentation technology divides the image into regions based on features such as grayscale, color or texture, and separates the specified target from the image background. As the underlying task of image processing, the accuracy of image segmentation will directly affect the quality of subsequent image processing.

[0003] The active contour model is a type of image segmentation method based on energy function and level set theory. Its basic principle is to use a continuous smooth curve to represent the edge of the target, and define an energy functional with the curve as the independent variable, transforming the segmentation process into a process of solving the minimum value of the energy functional, and taking the curve when the energy functional reaches the minimum value as the segmentation result. The active contour model provides a unified theoretical framework and solution for a series of visual problems such as contour extraction, target detection and tracking, and is still one of the research hotspots in image segmentation.

[0004] In actual scenes, uneven illumination and noise will cause uneven distribution of grayscale values ​​of the image to be segmented, resulting in intensity overlap between the foreground and background of the image to be segmented. The existing mainstream active contour model is prone to mis-segmenting non-target areas when segmenting images with uneven illumination and noise. In addition, since both noise and target edge features are high-frequency components, the active contour model is prone to identifying part of the noise as the target area when extracting edge features for such images, resulting in poor stability of the segmentation results. Summary of the invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problems of false target mis-segmentation, poor stability and low segmentation accuracy in the prior art when segmenting grayscale non-uniform images caused by non-uniform illumination and noise. In order to solve the above technical problems, the present application accurately extracts target edge features when segmenting grayscale non-uniform images containing illumination and noise, thereby obtaining high-precision segmentation results.

[0006] In order to achieve the above object, the main technical solutions adopted by the present invention include:

[0007] In a first aspect, the present invention provides an image segmentation method based on adaptive weighted mean filtering, comprising: obtaining an image to be segmented, and setting an initial contour line in the image to be segmented according to an initial level set function; calculating the low-frequency component of the image to be segmented using a fitting function based on adaptive weighted mean filtering; calculating the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component using a diffusion filter to determine the high-frequency component of the image to be segmented; constructing a data-driven item based on the high-frequency component of the image to be segmented, and using the data-driven item to iteratively update the initial level set function to obtain a final contour line; and using the final contour line to segment the image to be segmented to obtain an image segmentation result.

[0008] In one embodiment of the present invention, the data driven item is represented as:

[0009] ,

[0010] in, is the data driven item, is a vector pixel point in the image to be segmented, To adjust the weight parameter of the data-driven item value range; is a constant that assists the level set function in determining the evolution direction. When the average grayscale value of the vector pixels inside the initial contour is less than or equal to the average grayscale value of the vector pixels outside the initial contour, The value of is 1; when the average gray value of the vector pixels inside the initial contour line is greater than the average gray value of the vector pixels outside the initial contour line, The value of is -1; is the sigmoid function, is the high frequency component of the image to be segmented; is the standard deviation of the image to be segmented, is the total number of pixels of the image to be segmented, is the image domain of the image to be segmented, The image to be segmented is at the vector pixel point The gray value at is the average grayscale value of all vector pixels in the image to be segmented.

[0011] In one embodiment of the present invention, the fitting function based on adaptive weighted mean filtering is expressed as:

[0012] ,

[0013] in, is the fitting function based on adaptive weighted mean filtering, is a vector pixel point in the image to be segmented; The image to be segmented is at the vector pixel point The logarithmic gray value at is the natural logarithm operation, The image to be segmented is at the vector pixel point The gray value at ; Vector pixel point Centered at The set of all vector pixels within the window, Vector pixel point Centered at The variance of the logarithmic grayscale value of the image to be segmented within the window, is the variance of the logarithmic grayscale value of the image to be segmented, Vector pixel point Centered at The average value of the logarithmic grayscale value of the image to be segmented within the window, is a constant greater than zero;

[0014] The difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component is expressed as:

[0015] ,

[0016] in, is the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component.

[0017] In one embodiment of the present invention, the high-frequency component of the image to be segmented is expressed as:

[0018] ,

[0019] in, is the high frequency component of the image to be segmented, is a vector pixel point in the image to be segmented, is the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component, Vector pixel point The horizontal axis of Vector pixel point The vertical coordinate of For coordinates Where value, For coordinates Where value, For coordinates Where value, For coordinates Where value, For coordinates Where value, Represents the L2 norm calculation symbol, is the entropy of the image to be segmented, is the gray level of the image to be segmented, The image to be segmented is The number of gray-level vector pixels, is the logarithm with base 2, is the total number of pixels of the image to be segmented.

[0020] In one embodiment of the present invention, the initial level set function is iteratively updated using the following formula:

[0021] ,

[0022] in, is the vector pixel point in the image to be segmented, the positive integer n is the number of iterations, The initial level set function is The level set function after iterations is: is the level set function after the n-1th iteration of the initial level set function, The window size is The mean filter, Represents a constant greater than zero; softsign() is the softsign function, is a constant greater than zero, is the time step, is the data driven item.

[0023] In one embodiment of the present invention, the method further comprises:

[0024] when When , the initial level set function stops iterating, and the level set function obtained by the last iteration is used as the final contour line; wherein, is the vector pixel point in the image to be segmented, the positive integer n is the number of iterations, The initial level set function is The level set function after iterations is: is the level set function after the n-1th iteration of the initial level set function, is a constant greater than zero.

[0025] In one embodiment of the present invention, setting the initial contour line in the image to be segmented according to the initial level set function specifically includes: when the vector pixel points of the image to be segmented are on the initial contour line or inside the initial contour line, the value of the initial level set function is -1; when the vector pixel points of the image to be segmented are outside the initial contour line, the value of the initial level set function is 1.

[0026] In a second aspect, the present invention provides an image segmentation device based on adaptive weighted mean filtering, comprising:

[0027] An initial contour line setting module is used to obtain an image to be segmented and set an initial contour line in the image to be segmented according to an initial level set function;

[0028] A first calculation module, used for calculating the low-frequency component of the image to be segmented by using a fitting function based on adaptive weighted mean filtering;

[0029] A second calculation module, used for calculating the difference between the logarithmic gray value of the image to be segmented and the calculation result of the low-frequency component by using diffusion filtering to determine the high-frequency component of the image to be segmented;

[0030] A final contour line generation module is used to construct a data-driven item according to the high-frequency component of the image to be segmented, and iteratively update the initial level set function using the data-driven item to obtain a final contour line;

[0031] The image segmentation module is used to segment the image to be segmented using the final contour line to obtain an image segmentation result.

[0032] The above technical solution of the present invention has the following beneficial effects compared with the prior art:

[0033] The image segmentation method and device based on adaptive weighted mean filtering of the present invention calculates the low-frequency component of the image to be segmented by a fitting function based on adaptive weighted mean filtering, separates the low-frequency component from the image to be segmented, and reduces the influence of intensity overlap caused by uneven illumination on the segmentation accuracy. Diffusion filtering is used to process the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component to obtain the high-frequency component of the image to be segmented, and a data-driven item is constructed based on the calculation result to enhance the edge features of the image, while effectively reducing the influence of noise in the high-frequency component on the robustness of the model, thereby extracting the target edge features from the image with uneven grayscale, and improving the segmentation accuracy of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein

[0035] Figure 1 A schematic diagram of a flow chart of an image segmentation method based on adaptive weighted mean filtering provided by a preferred embodiment of the present invention;

[0036] Figure 2 A block diagram of an image segmentation device based on adaptive weighted mean filtering provided by an embodiment of the present invention;

[0037] Figure 3 A schematic diagram for comparing the results of image segmentation using different models provided in an embodiment of the present invention.

[0038] Description of the accompanying drawings in the specification: 300, image segmentation device based on adaptive weighted mean filtering; 301, initial contour setting module; 302, first calculation module; 303, second calculation module; 304, final contour generation module; 305, image segmentation module. DETAILED DESCRIPTION

[0039] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0040] First, refer to Figure 1 As shown, a preferred embodiment of the present invention provides an image segmentation method based on adaptive weighted mean filtering, comprising:

[0041] S101, obtaining an image to be segmented, and setting an initial contour line in the image to be segmented according to an initial level set function.

[0042] Further, as a refinement and extension of the specific implementation methods of the above-mentioned embodiment, in order to fully illustrate the specific implementation process of this embodiment, step S101, that is, the step of setting the initial contour line in the image to be segmented according to the initial level set function, specifically includes: when the vector pixel point of the image to be segmented is on the initial contour line or inside the initial contour line, the value of the initial level set function is -1; when the vector pixel point of the image to be segmented is outside the initial contour line, the value of the initial level set function is 1.

[0043] For example, the initial level set function It is expressed as:

[0044] . (1)

[0045] in, is the vector pixel point in the image to be segmented, is the initial level set function.

[0046] S102, calculating the low-frequency component of the image to be segmented using a fitting function based on adaptive weighted mean filtering.

[0047] In this embodiment, a fitting function based on adaptive weighted mean filtering is used to calculate the low-frequency components of the image to be segmented, so as to separate the low-frequency components from the image to be segmented and reduce the influence of intensity overlap caused by uneven illumination on the segmentation accuracy.

[0048] Exemplarily, a fitting function based on adaptive weighted mean filtering is set for calculating the low-frequency component of the image to be segmented. for:

[0049] . (2)

[0050] in, The vector pixel point of the image to be segmented The logarithmic gray value at is the natural logarithm operation, The image to be segmented is at the vector pixel point The gray value at Vector pixel point Centered at The set of all vector pixels within the window, is a constant greater than zero, Vector pixel point Centered at The variance of the logarithmic grayscale value of the image to be segmented within the window, is the variance of the logarithmic grayscale value of the image to be segmented, Vector pixel point Centered at The average logarithmic grayscale value of the image to be segmented within the window.

[0051] S103, using diffusion filtering to calculate the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component, to determine the high-frequency component of the image to be segmented.

[0052] In this embodiment, diffusion filtering is used to process the difference between the logarithmic grayscale value of the image to be segmented and the calculated result of the low-frequency component to obtain the high-frequency component of the image to be segmented, which can enhance the edge features of the image and effectively reduce the impact of noise in the high-frequency component on the stability of the model.

[0053] Exemplarily, the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component is expressed as:

[0054] . (3)

[0055] Furthermore, the entropy of the image to be segmented is set for:

[0056] . (4)

[0057] in, Represents the total number of pixels in the image to be segmented. is the gray level of the image to be segmented, The image to be segmented is The number of gray-level vector pixels, This is the logarithm with base 2.

[0058] Thus, the high-frequency components of the image to be segmented after diffusion filtering are determined for:

[0059] . (5)

[0060] in, Vector pixel point The horizontal axis of Vector pixel point The vertical coordinate of For coordinates Where value, For coordinates Where value, For coordinates Where value, For coordinates Where value, For coordinates Where value, Represents the L2 norm calculation symbol.

[0061] S104, constructing a data-driven term according to the high-frequency components of the image to be segmented, and using the data-driven term to iteratively update the initial level set function to obtain a final contour line.

[0062] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, step S104, i.e. constructing a data-driven term according to the high-frequency component of the image to be segmented, and iteratively updating the initial level set function using the data-driven term to obtain the final contour line, specifically includes:

[0063] S104-1, set the constant of the auxiliary level set function to determine the evolution direction .

[0064] Exemplarily, when the average grayscale value of the vector pixel points inside the initial contour line is less than or equal to the average grayscale value of the vector pixel points outside the initial contour line, The value of is 1; when the average gray value of the vector pixels inside the initial contour line is greater than the average gray value of the vector pixels outside the initial contour line, The value of is -1.

[0065] S104-2: Set the sigmoid function to:

[0066] . (6)

[0067] in, represents a natural constant, Represents the calculation variable of the sigmoid function.

[0068] S104-3: Set the softsign function to:

[0069] . (7)

[0070] in, Indicates the absolute value calculation symbol, It is the calculation variable of the softsign function.

[0071] S104-4: Setting the standard deviation of the image to be segmented for:

[0072] . (8)

[0073] in, represents the image domain of the image to be segmented, Indicates the vector pixel point of the image to be segmented The gray value at Represents the average gray value of all vector pixels in the image to be segmented.

[0074] S104-5: Based on the standard deviation of the image to be segmented and the high-frequency components of the image to be segmented Building data-driven items for:

[0075] . (9)

[0076] in, To adjust the weight parameter of the data-driven item value range, in this embodiment, The value range is .

[0077] S104-6: Set the update iteration formula of the initial level set function to:

[0078] . (10)

[0079] Among them, positive integer is the number of iterations, It means that the initial level set function passes through The level set function after iterations is: It means that the initial level set function passes through The level set function after iterations is: The window size is The mean filter, represents a constant greater than zero. In this embodiment, The value range is ; is a constant greater than zero. In this embodiment, The value range is ; is the time step. In this embodiment, The value range is .

[0080] S104-7: Set the iteration stop condition of the level set function, and use the level set function obtained from the last iteration as the final contour line.

[0081] For example, when When , the level set function stops iterating; is a constant greater than zero. In this embodiment, The value range is .

[0082] S105, using the final contour line to segment the image to be segmented to obtain an image segmentation result.

[0083] The present application calculates the low-frequency components of the image to be segmented by a fitting function based on adaptive weighted mean filtering, separates the low-frequency components from the image to be segmented, and reduces the influence of intensity overlap caused by uneven illumination on the segmentation accuracy. The diffusion filter is used to process the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component to obtain the high-frequency component of the image to be segmented, and a data-driven term is constructed based on the calculation result to enhance the edge features of the image, while effectively reducing the influence of noise in the high-frequency component on the robustness of the model, thereby extracting the target edge features from the image with uneven grayscale, and improving the segmentation accuracy of the present application.

[0084] To give a specific example, in this embodiment, the method described in this application and the existing APFJDACM (adaptive pre-fitting function Jeffreys divergence active contour model), LPPFACM (local pre-piecewise fitting active contour model), and SIREACM (shadow image and reflection edge active contour model) three active contour models are used to perform image segmentation simulation experiments, and the experimental results are compared.

[0085] All experiments were implemented in MATLAB 2017b on a 2.3 GHz Intel Core i7 personal computer. In this example, two evaluation indicators, DSC (Dice Similarity Coefficient) and IoU (Intersection of Union), were used to quantitatively compare the segmentation accuracy of each model. DSC is defined as , IoU is defined as ,in, is the target area segmented by each model in the experiment, is the standard target area provided in the SEDB library. The closer the DSC and IOU values ​​are to 1, the higher the segmentation accuracy is. For example, in this embodiment, the parameters are set as: , , , , , , and set the maximum number of iterations N.

[0086] Reference Figure 3 As shown, this embodiment selects 6 images from the SEDB library as images to be segmented, respectively. Figure 3 The 6 images in the first column of . Among them, Figure 3 The first and second images in the first column of the image are simulated in MATLAB2017b using a function to generate uneven illumination caused by a point light source located in the upper right corner of the image, and speckle noise with a variance of 0.04 is added. Figure 3 The third and fourth images in the first column of the figure are simulated in MATLAB 2017b using the function to generate the uneven illumination caused by the line light source on the left side of the image, and Rayleigh noise with a scaling parameter of 20 is added. Figure 3The fifth and sixth images in the first column are simulated in MATLAB 2017b using the function to generate uneven illumination caused by a line light source in the middle of the image, adding gamma noise with a window parameter of 10 and a shape parameter of 2.

[0087] Furthermore, APFJDACM, LPPFACM, SIREACM and the method described in this application are used to segment the six images to be segmented. Figure 3 The second column is the segmentation result of APFJDACM, the third column is the segmentation result of LPPFACM, the fourth column is the segmentation result of SIREACM, and the fifth column is the segmentation result of the method described in this application. The solid lines in the first column of images are the initial contour lines, and the solid lines in the second to fifth columns of images are the final contour lines of their corresponding methods.

[0088] Reference Figure 3 As shown, in the segmentation Figure 3 In the first and third images in the first column, APFJDACM and LPPFACM have over-segmentation. Figure 3 For the sixth image in the first column, APFJDACM, LPPFACM and SIREACM all have the phenomenon of mis-segmenting the non-target area or incomplete segmentation of the target area. However, the segmentation results obtained by the method described in the present application for these six images are all ideal.

[0089] Furthermore, the DSC and IoU of the six images segmented using APFJDACM, LPPFACM, SIREACM and the method described in this application are compared, and the comparison results are shown in Table 1. As can be seen from Table 1, for grayscale non-uniform images containing non-uniform illumination and noise, the method described in this application has an advantage in segmentation accuracy.

[0090] Table 1

[0091]

[0092] Second, as Figure 2 As shown, this embodiment provides an image segmentation device 300 based on adaptive weighted mean filtering, comprising:

[0093] An initial contour line setting module 301 is used to obtain an image to be segmented and set an initial contour line in the image to be segmented according to an initial level set function;

[0094] A first calculation module 302 is used to calculate the low-frequency component of the image to be segmented by using a fitting function based on adaptive weighted mean filtering;

[0095] The second calculation module 303 is used to calculate the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component by using diffusion filtering to determine the high-frequency component of the image to be segmented;

[0096] The final contour line generation module 304 is used to construct a data-driven item according to the high-frequency component of the image to be segmented, and iteratively update the initial level set function using the data-driven item to obtain the final contour line;

[0097] The image segmentation module 305 is used to segment the image to be segmented using the final contour line to obtain an image segmentation result.

[0098] According to the image segmentation device 300 based on adaptive weighted mean filtering provided in this embodiment, since it is used to implement the steps of the image segmentation method based on adaptive weighted mean filtering provided in the first aspect of the embodiment of the present invention, the image segmentation device has all the technical effects of the image segmentation method based on adaptive weighted mean filtering, which will not be repeated here.

[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0103] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled 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 list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. An image segmentation method based on adaptive weighted mean filtering, characterized in that: The method comprises: Acquire an image to be segmented, and set an initial contour line in the image to be segmented according to an initial level set function; Calculating the low-frequency component of the image to be segmented by using a fitting function based on adaptive weighted mean filtering; Calculating the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component by using diffusion filtering to determine the high-frequency component of the image to be segmented; constructing a data-driven term according to the high-frequency component of the image to be segmented, and iteratively updating the initial level set function using the data-driven term to obtain a final contour line; Segmenting the image to be segmented using the final contour line to obtain an image segmentation result; The data driven item is represented as: Wherein, V(x) is the data-driven term, x is the vector pixel point in the image to be segmented, α is the weight parameter for adjusting the value range of the data-driven term; ζ is a constant for the auxiliary level set function to determine the evolution direction, when the average gray value of the vector pixel points inside the initial contour line is less than or equal to the average gray value of the vector pixel points outside the initial contour line, the value of ζ is 1; when the average gray value of the vector pixel points inside the initial contour line is greater than the average gray value of the vector pixel points outside the initial contour line, the value of ζ is -1; sigmoid() is the sigmoid function, is the high frequency component of the image to be segmented; is the standard deviation of the image to be segmented, I size is the total number of pixels of the image to be segmented, Ω is the image domain of the image to be segmented, I(x) is the grayscale value of the image to be segmented at the vector pixel point x, is the average grayscale value of all vector pixels in the image to be segmented; The fitting function based on adaptive weighted mean filtering is expressed as: in, is the fitting function based on adaptive weighted mean filtering, x is the vector pixel point in the image to be segmented; I′(x)=lnI(x) is the logarithmic grayscale value of the image to be segmented at the vector pixel point x, ln is the natural logarithm operation, I(x) is the grayscale value of the image to be segmented at the vector pixel point x; W(x) is the grayscale value of the image to be segmented at the vector pixel point x with a size of (2k+1) 2 The set of all vector pixels in the window, σ(W(x)) is centered on the vector pixel x and has a size of (2k+1) 2 The variance of the logarithmic grayscale value of the image to be segmented within the window, σ I is the variance of the logarithmic grayscale value of the image to be segmented, and I′(W(x)) is the vector pixel point x as the center and the size is (2k+1) 2 The average value of the logarithmic grayscale value of the image to be segmented in the window, k is a constant greater than zero; The difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component is expressed as: in, is the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component; in, is the high frequency component of the image to be segmented, x is the vector pixel point in the image to be segmented, is the difference between the logarithmic grayscale value of the image to be segmented and the calculation result of the low-frequency component, p is the horizontal coordinate of the vector pixel point x, q is the vertical coordinate of the vector pixel point x, is the coordinate (p,q) value, is the coordinate (p,q-1) value, is the coordinate (p,q+1) value, is the coordinate (p-1,q) value, is the coordinate (p+1,q) value, || || represents the L2 norm calculation symbol, is the entropy of the image to be segmented, d is the number of gray levels of the image to be segmented, A(d) is the number of vector pixels of the image to be segmented at the dth gray level, log2 is the logarithm operation with base 2, I size is the total number of pixels of the image to be segmented.

2. The image segmentation method based on adaptive weighted mean filtering according to claim 1, characterized in that: The initial level set function is iteratively updated using the following formula: φ(x,n)=M r (softsign(η(φ(x,n-1)-Δt·V(x)))), Wherein, x is the vector pixel point in the image to be segmented, the positive integer n is the number of iterations, φ(x,n) is the level set function after the nth iteration of the initial level set function, φ(x,n-1) is the level set function after the n-1th iteration of the initial level set function, M r The window size is (2r+1) 2 , r represents a constant greater than zero; softsign() is a softsign function, η is a constant greater than zero, Δt is the time step, and V(x) is the data-driven item.

3. The image segmentation method based on adaptive weighted mean filtering according to claim 1, characterized in that: The method further comprises: When |φ(x,n)-φ(x,n-1)|<ε, the initial level set function stops iterating, and the level set function obtained by the last iteration is used as the final contour line; Wherein, x is a vector pixel point in the image to be segmented, a positive integer n is the number of iterations, φ(x,n) is the level set function of the initial level set function after the nth iteration, φ(x,n-1) is the level set function of the initial level set function after the n-1th iteration, and ε is a constant greater than zero.

4. The image segmentation method based on adaptive weighted mean filtering according to claim 1, characterized in that: The step of setting an initial contour line in the image to be segmented according to the initial level set function specifically includes: When the vector pixel point of the image to be segmented is on the initial contour line or inside the initial contour line, the value of the initial level set function is -1; When the vector pixel point of the image to be segmented is outside the initial contour line, the value of the initial level set function is 1.

5. An image segmentation device based on adaptive weighted mean filtering, used to execute the image segmentation method according to any one of claims 1 to 4, characterized in that: include: An initial contour line setting module is used to obtain an image to be segmented and set an initial contour line in the image to be segmented according to an initial level set function; A first calculation module, used for calculating the low-frequency component of the image to be segmented by using a fitting function based on adaptive weighted mean filtering; A second calculation module, used for calculating the difference between the logarithmic gray value of the image to be segmented and the calculation result of the low-frequency component by using diffusion filtering to determine the high-frequency component of the image to be segmented; A final contour line generation module is used to construct a data-driven item according to the high-frequency component of the image to be segmented, and iteratively update the initial level set function using the data-driven item to obtain a final contour line; The image segmentation module is used to segment the image to be segmented using the final contour line to obtain an image segmentation result.