Image entropy threshold segmentation method, device, electronic device and storage medium

By combining Bayesian posterior estimation and Tsallis-BE entropy, the balance problem of segmentation accuracy and efficiency in medical image segmentation is solved, and high-precision and efficient image segmentation are achieved.

CN115423834BActive Publication Date: 2025-08-15SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211039468.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-08-15
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

The prior art is difficult to balance the accuracy and efficiency of segmentation in medical image segmentation. The two-dimensional entropy threshold method requires searching for optimal thresholds in two-dimensional space, which is easy to fall into local optimal and takes time.

Method used

Bayesian posterior estimation combined with Tsallis-BE entropy is used to calculate the posterior probability of the target class and background class of the image to be segmented under each threshold, and the optimal threshold is determined, and searched only in one-dimensional space.

Benefits of technology

High-precision image segmentation is realized, and the time of the segmentation algorithm is greatly shortened and the performance of the entropy threshold method is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423834B_ABST
    Figure CN115423834B_ABST
Patent Text Reader

Abstract

The present application provides an image entropy threshold segmentation method, apparatus, electronic device, and storage medium. The method comprises: using Bayesian posterior estimation to determine the posterior probability of each pixel belonging to the target class and the background class under different segmentation thresholds based on the target class probability and the background class probability of the image to be segmented under each threshold; calculating the Tsallis-BE entropy value of all pixels in the image to be segmented under each threshold, where the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy; finding the maximum entropy value from all Tsallis-BE entropy values, and determining the threshold corresponding to the maximum entropy value as the optimal threshold. This solution reduces the algorithm time consumption while achieving high-precision segmentation, thereby improving the performance of the entropy threshold method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of optimization scheduling, and in particular relates to an image entropy threshold segmentation method, device, electronic equipment and storage medium. Background Art

[0002] Image segmentation is a key process in medical image analysis. It is useful in many medical applications, including lesion quantification, surgical simulation, surgical decision support, and the diagnosis of multiple sclerosis. Thresholding is a popular image segmentation technique, particularly in medical image processing. The primary challenge in image thresholding is determining the optimal threshold based on the intensity distribution of objects and background within the image, which is used to classify pixels in the image into two categories: target and background. Based on the imaging principles of magnetic resonance imaging, different tissues exhibit different intensities and distribution patterns within an image. Therefore, the entropy thresholding method seeks the optimal segmentation threshold by maximizing or minimizing a cost function constructed based on grayscale.

[0003] Prior art proposes the use of classic Tsallis entropy for image segmentation, demonstrating its superiority for image segmentation, particularly for medical image segmentation. Furthermore, prior art extends Tsallis entropy to two dimensions, considering not only the pixel's grayscale but also the correlation between a pixel and its neighbors, further improving the accuracy of Tsallis entropy threshold segmentation.

[0004] However, the above existing technologies are difficult to balance the accuracy and efficiency of segmentation. In order to improve the accuracy, the two-dimensional entropy threshold method needs to search for the optimal threshold in the two-dimensional space, which is prone to falling into the local optimum and is time-consuming. Summary of the Invention

[0005] The purpose of the embodiments of this specification is to provide a method, device, electronic device and storage medium for image entropy threshold segmentation.

[0006] To solve the above technical problems, the embodiments of the present application are implemented in the following ways:

[0007] In a first aspect, the present application provides an image entropy threshold segmentation method, the method comprising:

[0008] Using Bayesian posterior estimation, according to the target class probability and background class probability of the image to be segmented at each threshold, the posterior probability of each pixel belonging to the target class and the background class under different threshold segmentation is determined;

[0009] Calculate the value of Tsallis-BE entropy of all pixels of the image to be segmented under each threshold, where Tsallis-BE entropy is composed of the posterior probability and Tsallis entropy;

[0010] The maximum entropy value is found from all Tsallis-BE entropy values, and the threshold corresponding to the maximum entropy value is determined as the optimal threshold.

[0011] In one embodiment, the method further comprises:

[0012] The image to be segmented is divided into target area and background area according to different thresholds;

[0013] Calculate the number of target pixels in the target area and the number of background pixels in the background area segmented under each threshold;

[0014] According to the number of target pixels and background pixels under different thresholds, the target class probability and background class probability of the image to be segmented under each threshold are determined.

[0015] In one embodiment, determining the target class probability and the background class probability of the image to be segmented at each threshold value based on the number of target pixels and the number of background pixels at different threshold values includes:

[0016] p o,t (i) = P[f(s) = i | s∈S o,t ]

[0017] p b,t (i) = P[f(s) = i | s∈S b,t ]

[0018] S=S o,t ∪S b,t

[0019] Among them, p o,t (i) is the target class probability when the target pixel value is i at threshold t, p b,t (i) is the background class probability when the background pixel value is i at the threshold t; S is the set of all pixels of the image to be segmented; S o,t is the target pixel set at threshold t; S b,t is the background pixel set when the threshold is t.

[0020] In one embodiment, assuming that the minimum and maximum grayscale values of pixels in the image to be segmented are t_min and t_max respectively, the interval traversed by the threshold is set to [t_min+2, t_max+2].

[0021] In one embodiment, Bayesian posterior estimation is used to determine the posterior probability of each pixel belonging to the target class and the background class under different segmentation thresholds based on the target class probability and the background class probability of the image to be segmented under each threshold, including:

[0022] Assuming that γ(t) represents the prior probability that a pixel belongs to the target at threshold t, then 1-γ(t) represents the prior probability that a pixel belongs to the background at threshold t, p o,t (i) is the target class probability when the target pixel value is i at threshold t, p b,t (i) is the background class probability when the background pixel value is i at threshold t;

[0023] The posterior probability that a pixel with a pixel value of i belongs to the target class and the background class can be expressed by the Bayesian rule as follows:

[0024]

[0025]

[0026] Among them, p t (i) can be calculated by the following formula:

[0027] p t (i) = γ(t)p o,t (i)+(1-γ(t))p b,t (i).

[0028] In one embodiment, the expressions of the Tsallis-BE entropy of the target class and the background class are respectively:

[0029]

[0030]

[0031] Among them, L is the highest grayscale value of the pixel in the image to be segmented.

[0032] In one embodiment, the maximum entropy value t is found from all Tsallis-BE entropy values. opt ,include:

[0033]

[0034] In a second aspect, the present application provides an image entropy threshold segmentation device, the device comprising:

[0035] The probability determination module is used to use Bayesian posterior estimation to determine the posterior probability of each pixel belonging to the target class and the background class under different segmentation thresholds based on the target class probability and the background class probability of the image to be segmented under each threshold;

[0036] The entropy value determination module is used to calculate the value of the Tsallis-BE entropy of the pixels of the entire image to be segmented under each threshold, where the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy;

[0037] The search module is used to find the maximum entropy value from all Tsallis-BE entropy values and determine the threshold corresponding to the maximum entropy value as the optimal threshold.

[0038] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the image entropy threshold segmentation method according to the first aspect is implemented.

[0039] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image entropy threshold segmentation method as described in the first aspect.

[0040] It can be seen from the technical solution provided in the above embodiments of this specification that this solution: uses Bayesian posterior probability to give the uncertainty of each pixel belonging to the target and the background, improves the shortcoming of Tsallis entropy that the image information itself is not fully utilized, while avoiding the problem of increased dimensionality brought about by the introduction of more image feature information. It still only needs to solve the optimal threshold in one-dimensional space, achieving high-precision segmentation while reducing the time consumption of the algorithm and improving the performance of the entropy threshold method. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 A schematic diagram of the process of the entropy threshold segmentation method for images provided in this application;

[0043] Figure 2 The original image to be segmented and the segmentation result image provided in this application;

[0044] Figure 3 This is a schematic diagram of the structure of the image entropy threshold segmentation device provided by this application;

[0045] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0046] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0047] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0048] It will be apparent to those skilled in the art that various modifications and variations may be made to the specific embodiments described herein without departing from the scope or spirit of the present application. Other embodiments will be apparent to those skilled in the art from the present description. The present description and examples are intended to be illustrative only.

[0049] The words “include,” “including,” “have,” “contain,” etc. used in this document are open-ended terms, meaning including but not limited to.

[0050] Existing technologies find it difficult to balance segmentation accuracy and efficiency. In order to improve accuracy, the two-dimensional entropy threshold method needs to search for the optimal threshold in two-dimensional space, which is prone to falling into local optimality and time-consuming.

[0051] Based on the above defects, this application proposes an entropy threshold segmentation method for images, which introduces the grayscale probability distribution based on Bayesian posterior estimation into the Tsallis structure, so that this method can achieve high-accuracy and high-efficiency segmentation by only searching in one-dimensional space.

[0052] The image entropy threshold segmentation method proposed in this application is an entropy threshold segmentation method that is targeted at the imaging characteristics and specific grayscale distribution of brain magnetic resonance images and can effectively segment different tissues such as white matter (WM), gray matter (GM) and cerebrospinal fluid (CSF) in brain images.

[0053] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0054] Reference Figure 1, which shows a flow chart of an entropy threshold segmentation method applicable to an image provided by an embodiment of the present application. The main task of the entropy threshold segmentation method for the image is to determine an optimal threshold t to distinguish target pixels from background pixels.

[0055] like Figure 1 As shown, an entropy threshold segmentation method for an image may include:

[0056] S110 , using Bayesian posterior estimation, according to the target class probability and the background class probability of the image to be segmented at each threshold, determine the posterior probability of each pixel belonging to the target class and the background class under different segmentation thresholds.

[0057] Specifically, the image to be segmented can be a magnetic resonance image. For example, the image to be segmented is a magnetic resonance slice image of a typical human brain. In this example, white matter (WM) and gray matter (GM) are regarded as target areas, and cerebrospinal fluid (CSF) is regarded as a background area.

[0058] The target class probability and background class probability of the image to be segmented under each threshold can be determined in the following manner.

[0059] In one embodiment, the method further comprises:

[0060] The image to be segmented is divided into target area and background area according to different thresholds;

[0061] Calculate the number of target pixels in the target area and the number of background pixels in the background area segmented under each threshold;

[0062] According to the number of target pixels and background pixels under different thresholds, the target class probability and background class probability of the image to be segmented under each threshold are determined, including:

[0063] p o,t (i) = P[f(s) = i | s∈S o,t ]

[0064] p b,t (i) = P[f(s) = i | s∈S b,t ]

[0065] S=S o,t ∪S b,t

[0066] Among them, p o,t (i) is the target class probability (or probability density function of target pixel) when the target pixel value is i at threshold t, p b,t (i) is the background class probability (or called the probability density function of background pixels) when the background pixel value is i at the threshold t; S is the set of all pixels of the image to be segmented; S o,tis the target pixel set at threshold t; S b,t is the background pixel set when the threshold is t.

[0067] Assuming that the distribution of target and background is Gaussian, we use and Among them, m o (t), m b (t), are the mean and standard deviation of target pixels and background pixels respectively, then p o,t (i) and p b,t (i) can be expressed as:

[0068]

[0069]

[0070] Specifically, the MRI image is segmented into target area and background area according to different thresholds. The number of pixels in the target area and the number of pixels in the background area segmented at each threshold are calculated to obtain the probabilities of the target class and the background class, which are used to measure the uncertainty of each pixel belonging to different categories.

[0071] It can be understood that the grayscale range of the image is 0 to 255. In order to prevent the boundary overflow problem, the area is reduced by 2 as the search area for determining the optimal threshold.

[0072] In one embodiment, assuming that the minimum and maximum grayscale values of pixels in the image to be segmented are t_min and t_max respectively, the interval traversed by the threshold is set to [t_min+2, t_max+2].

[0073] The above method is used to determine the target class probability and background class probability of the image to be segmented at each threshold, and then Bayesian posterior estimation is used to determine the probability distribution of each pixel belonging to the target class and the background class under different segmentation thresholds.

[0074] Specifically, assuming that γ(t) represents the prior probability that a pixel belongs to the target at threshold t, then 1-γ(t) represents the prior probability that a pixel belongs to the background at threshold t. γ(t) is estimated by the following formula:

[0075]

[0076] Therefore, the posterior probability that a pixel with a pixel value of i belongs to the target class and the background class can be expressed by the Bayesian rule as follows:

[0077]

[0078]

[0079] Among them, p t (i) can be calculated by the following formula:

[0080] p t (i) = γ(t)p o,t (i)+(1-γ(t))p b,t (i)

[0081] S120. Calculate the Tsallis-BE entropy value of the pixels of the entire image to be segmented at each threshold, where the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy.

[0082] Specifically, at present, the Tsaliis entropy of the target class and background class can be expressed as:

[0083]

[0084]

[0085] Among them, q is the entropy index that characterizes the degree of non-additivity, p i is the probability of pixel i; where, given a threshold t, the image is divided into background area and target area, where the grayscale intervals are {0,1,…,t} and {t+1,…,L-1} respectively,

[0086] After combining the posterior probability and Tsallis entropy, the expressions of the Tsallis-BE entropy of the target class and the background class are:

[0087]

[0088]

[0089] Among them, L is the highest grayscale value of the pixel in the image to be segmented, which means that the grayscale values of all pixels in the entire image are between 0 and L.

[0090] According to the expression of Tsallis-BE entropy of target class and background class, the value of Tsallis-BE entropy of the pixels of the whole image to be segmented under each threshold is calculated respectively.

[0091] S130 , finding a maximum entropy value from all Tsallis-BE entropy values, and determining a threshold value corresponding to the maximum entropy value as an optimal threshold value.

[0092] Specifically, the threshold corresponding to the maximum entropy value is found, which is considered to be the optimal threshold for dividing the entire image into the target area and the background area.

[0093] Optionally, find the maximum entropy value t from all Tsallis-BE entropy valuesopt ,include:

[0094]

[0095] like Figure 2 As shown, the left side is the original image to be segmented, and the right side is the segmentation result image after the optimal threshold is calculated using the entropy threshold segmentation method of the image of this application and segmented according to the optimal threshold.

[0096] In the embodiment of the present application, the Bayesian posterior probability is used to replace the probability of each grayscale value in the classic Tsallis entropy, and a new Tsallis-BE entropy for image segmentation is proposed. Using the form of one-dimensional entropy, the accuracy comparable to the two-dimensional entropy threshold segmentation is achieved, and compared with the two-dimensional entropy, the time required for the segmentation algorithm is greatly shortened. In addition, the present application uses the form of Bayesian posterior probability to take into account the class uncertainty of the pixel, which deepens the utilization of the information of the image itself compared to other one-dimensional entropy threshold methods.

[0097] The Tsallis-BE entropy structure proposed in this application is different from the classic Tsallis entropy, which assumes that the target class and background class segmented by each threshold are independently distributed. This application considers the mutual influence of pixels at the boundary of the two types of materials, and uses Bayesian posterior probability to give the uncertainty of each pixel belonging to the target and background. It improves the shortcoming of Tsallis entropy that does not fully utilize the information of the image itself, while avoiding the problem of increased dimensionality brought about by the introduction of more image feature information. It still only needs to solve the optimal threshold in one-dimensional space, achieving high-precision segmentation while reducing the time consumption of the algorithm and improving the performance of the entropy threshold method.

[0098] Experimental verification

[0099] Comparative experiments were conducted on two benchmark medical image segmentation datasets, Brainweb and MRBS13, comparing the proposed method with classic methods (including Method 1 and Method 2). The quantitative results are shown in Table 1. We used three common evaluation metrics for evaluating segmentation performance: DSC (Dice Similarity Coefficient), JC (Jaccard Similarity Coefficient), and Accuracy for evaluation and verification. As can be seen, thanks to the proposed new entropy structure, this application achieved better results than Method 1 and Method 2 on both benchmark datasets. Note that method 1 corresponds to the method described in the literature Albuquerque MPD, Esquef IA, Mello ARG, et al. Image thresholding using Tsallis entropy [J]. Pattern Recognition Letters, 2004, 25(9): 1059-1065, and method 2 corresponds to the method described in the literature Ostu NA threshold selection method from gray-histogram [J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9(1): 62-66.

[0100] Table 1 Quantitative results on medical image segmentation datasets (%)

[0101] Method 1 Method 2 This application DSC 93.56 95.27 99.67 JC 93.09 94.84 98.02 Accuracy 90.79 93.88 98.97

[0102] Reference Figure 3 , which shows a structural diagram of an image entropy threshold segmentation device described according to an embodiment of the present application.

[0103] like Figure 3 As shown, the image entropy threshold segmentation device 300 may include:

[0104] The probability determination module 310 is used to determine the posterior probability of each pixel belonging to the target class and the background class under different segmentation thresholds based on the target class probability and the background class probability of the image to be segmented under each threshold using Bayesian posterior estimation;

[0105] The entropy value determination module 320 is used to calculate the value of the Tsallis-BE entropy of the pixels of the full image to be segmented at each threshold, wherein the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy;

[0106] The search module 330 is configured to find a maximum entropy value from all Tsallis-BE entropy values and determine a threshold value corresponding to the maximum entropy value as an optimal threshold value.

[0107] Optionally, the image entropy threshold segmentation device 300 is further configured to:

[0108] The image to be segmented is divided into target area and background area according to different thresholds;

[0109] Calculate the number of target pixels in the target area and the number of background pixels in the background area segmented under each threshold;

[0110] According to the number of target pixels and background pixels under different thresholds, the target class probability and background class probability of the image to be segmented under each threshold are determined.

[0111] Optionally, the image entropy threshold segmentation device 300 is further configured to:

[0112] p o,t (i) = P[f(s) = i | s∈S o,t ]

[0113] p b,t (i) = P[f(s) = i | s∈S b,t ]

[0114] S=S o,t ∪S b,t

[0115] Among them, p o,t (i) is the target class probability when the target pixel value is i at threshold t, p b,t (i) is the background class probability when the background pixel value is i at the threshold t; S is the set of all pixels of the image to be segmented; S o,t is the target pixel set at threshold t; S b,t is the background pixel set when the threshold is t.

[0116] Optionally, assuming that the minimum and maximum grayscale values of pixels in the image to be segmented are t_min and t_max respectively, the interval traversed by the threshold is set to [t_min+2, t_max+2].

[0117] Optionally, the probability determination module 310 is further configured to:

[0118] Assuming that γ(t) represents the prior probability that a pixel belongs to the target at threshold t, then 1-γ(t) represents the prior probability that a pixel belongs to the background at threshold t, p o,t (i) is the target class probability when the target pixel value is i at threshold t, p b,t (i) is the background class probability when the background pixel value is i at threshold t;

[0119] The posterior probability that a pixel with a pixel value of i belongs to the target class and the background class can be expressed by the Bayesian rule as follows:

[0120]

[0121]

[0122] Among them, p t (i) can be calculated by the following formula:

[0123] p t (i) = γ(t)p o,t (i)+(1-γ(t))p b,t (i).

[0124] Optionally, the expressions of Tsallis-BE entropy of target class and background class are:

[0125]

[0126]

[0127] Among them, L is the highest grayscale value of the pixel in the image to be segmented.

[0128] Optionally, the search module 330 is further configured to:

[0129]

[0130] This embodiment provides an image entropy threshold segmentation device that can execute the embodiment of the above method. Its implementation principle and technical effects are similar and will not be described in detail here.

[0131] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 , which shows a structural diagram of an electronic device 400 suitable for implementing an embodiment of the present application.

[0132] like Figure 4 As shown, electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage portion 408 into a random access memory (RAM) 403. Various programs and data required for the operation of device 400 are also stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.

[0133] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 406 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.

[0134] In particular, according to the embodiments of the present disclosure, the above reference Figure 1 The described process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the above-described entropy threshold segmentation method for an image. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 409 and / or installed from the removable medium 411.

[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the aforementioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units or modules involved in the embodiments described in this application may be implemented by software or hardware. The units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves.

[0137] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or physical devices, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a mobile phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0138] As another aspect, the present application further provides a storage medium, which may be the storage medium included in the aforementioned apparatus in the above-mentioned embodiment; or a storage medium existing independently and not incorporated into the device. The storage medium stores one or more programs, which are used by one or more processors to execute the image entropy threshold segmentation method described in the present application.

[0139] Storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0140] It should be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0141] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

Claims

1. An image entropy threshold segmentation method, characterized in that: The method comprises: Using Bayesian posterior estimation, according to the target class probability and background class probability of the image to be segmented at each threshold, the posterior probability of each pixel belonging to the target class and the background class under different threshold segmentation is determined, including: Assumptions Represents the prior probability that the pixel belongs to the target at the threshold t, then represents the prior probability that the pixel belongs to the background at the threshold t, For the threshold t When the target pixel value is i The target class probability, For the threshold t When the background pixel value is i The background class probability; A pixel value is i The posterior probability of the pixel belonging to the target class and the background class can be expressed by Bayes' rule as follows: in, is the target pixel set; is the background pixel set; s is the pixel of the image to be segmented; It can be calculated by the following formula: Calculate the value of the Tsallis-BE entropy of the pixels of the entire image to be segmented at each threshold, wherein the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy; A maximum entropy value is found from all the Tsallis-BE entropy values, and a threshold corresponding to the maximum entropy value is determined as an optimal threshold.

2. The method according to claim 1, characterized in that The method further comprises: Segmenting the image to be segmented into a target area and a background area according to different thresholds; Calculating the number of target pixels in the target area and the number of background pixels in the background area segmented under each threshold; According to the number of target pixels and the number of background pixels at different thresholds, the target class probability and the background class probability of the image to be segmented at each threshold are determined.

3. The method according to claim 2, characterized in that Determining the target class probability and the background class probability of the image to be segmented at each threshold value according to the number of target pixels and the number of background pixels at different threshold values includes: in, For the threshold t When the target pixel value is i The target class probability, For the threshold t When the background pixel value is i The background class probability; is a set of all pixels of the image to be segmented; is the threshold t The target pixel set when ; is the threshold t The background pixel collection at that time.

4. The method according to claim 2 or 3, characterized in that Assuming that the minimum and maximum grayscale values of pixels in the image to be segmented are t_min and t_max respectively, the interval traversed by the threshold is set to [t_min+2, t_max+2].

5. The method according to claim 1, wherein The expressions of Tsallis-BE entropy of target class and background class are: in, L is the highest grayscale value of the pixel in the image to be segmented; q is the entropy index that characterizes the degree of non-additivity.

6. The method according to claim 5, characterized in that The maximum entropy value is found from all the Tsallis-BE entropy values. ,include: 。 7. An image entropy threshold segmentation device, characterized in that: The device comprises: The probability determination module is used to use Bayesian posterior estimation to determine the posterior probability of each pixel belonging to the target class and the background class under different threshold segmentation according to the target class probability and the background class probability of the image to be segmented under each threshold, including: assuming Represents the prior probability that the pixel belongs to the target at the threshold t, then represents the prior probability that the pixel belongs to the background at the threshold t, For the threshold t When the target pixel value is i The target class probability, For the threshold t When the background pixel value is i The background class probability of a pixel is i The posterior probability of the pixel belonging to the target class and the background class can be expressed by Bayes' rule as follows: in, is the target pixel set; is the background pixel set; s is the pixel of the image to be segmented; It can be calculated by the following formula: An entropy value determination module is used to calculate the value of the Tsallis-BE entropy of the pixels of the full image to be segmented at each threshold, wherein the Tsallis-BE entropy is composed of the posterior probability and the Tsallis entropy; The search module is used to find a maximum entropy value from all the Tsallis-BE entropy values, and determine a threshold corresponding to the maximum entropy value as an optimal threshold.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the image entropy threshold segmentation method according to any one of claims 1 to 6 is implemented.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image entropy threshold segmentation method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Threshold segmentation method based on quick iteration of two-dimensional Tsallis gray entropy

    CN111553926A

  • Secondary image segmentation method based on Otsu and Tsallis entropy

    CN112102350A