CN115423834A - Entropy threshold segmentation method and device for image, electronic equipment and storage medium - Google Patents
Entropy threshold segmentation method and device for image, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115423834A CN115423834A CN202211039468.2A CN202211039468A CN115423834A CN 115423834 A CN115423834 A CN 115423834A CN 202211039468 A CN202211039468 A CN 202211039468A CN 115423834 A CN115423834 A CN 115423834A
- Authority
- CN
- China
- Prior art keywords
- threshold
- entropy
- image
- probability
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/84—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using probabilistic graphical models from image or video features, e.g. Markov models or Bayesian networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20076—Probabilistic image processing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The application provides an entropy threshold segmentation method and device for an image, an electronic device and a storage medium, wherein the method comprises the following steps: determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation; calculating the Tsallis-BE entropy value of the whole image pixel of the image to BE segmented under each threshold value, wherein the Tsallis-BE entropy is formed by combining posterior probability and Tsalis entropy; and finding out the maximum entropy value from all Tsallis-BE entropy values, and determining the threshold corresponding to the maximum entropy value as the optimal threshold. According to the scheme, the time consumption of an algorithm is reduced while high-precision segmentation is performed, and the performance of the entropy threshold method is improved.
Description
Technical Field
The invention belongs to the technical field of optimized scheduling, and particularly relates to an entropy threshold segmentation method and device for an image, electronic equipment and a storage medium.
Background
Image segmentation is one of the main processes of medical image analysis. It is useful in many applications in the medical field, including quantifying lesions, surgical simulation, assisting surgical decisions, assisting in diagnosing multiple sclerosis, etc. Thresholding is a popular image segmentation technique, particularly in the field of medical image processing. The main challenge of image thresholding is to determine the optimal threshold from the intensity distribution of objects and background in the image, by which the pixels of the full map are divided into two categories, target and background. According to the imaging principle of the nuclear magnetic resonance image, different tissues show different intensity and distribution rules in the image, so the entropy threshold method can search the optimal segmentation threshold value by maximizing or minimizing a cost function constructed based on gray scale.
In the prior art, the classic Tsallis entropy is proposed to be used for segmenting the image, and the superiority of the Tsallis entropy in image segmentation, particularly medical image segmentation, is proved. In addition, in the prior art, the Tsallis entropy is popularized to two dimensions, besides the gray level of a pixel, the correlation between the pixel and the adjacent pixel is also considered, and the accuracy of Tsallis entropy threshold segmentation is further improved.
However, in the prior art, it is difficult to balance the accuracy and efficiency of segmentation, and in order to improve the accuracy, the two-dimensional entropy threshold method needs to search for an optimal threshold in a two-dimensional space, which is prone to fall into local optimization and takes a long time.
Disclosure of Invention
An object of an embodiment of the present specification is to provide an entropy threshold segmentation method and apparatus for an image, an electronic device, and a storage medium.
In order to solve the above technical problem, the embodiments of the present application are implemented as follows:
in a first aspect, the present application provides a method for entropy threshold segmentation of an image, the method comprising:
determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation;
calculating the Tsallis-BE entropy value of the whole image pixel of the image to BE segmented under each threshold value, wherein the Tsallis-BE entropy is formed by combining posterior probability and Tsalis entropy;
and finding out the maximum entropy value from all Tsallis-BE entropy values, and determining the threshold corresponding to the maximum entropy value as the optimal threshold.
In one embodiment, the method further comprises:
segmenting an image to be segmented into a target region and a background region according to different thresholds;
calculating the number of target pixels of the segmented target area under each threshold value and the number of background pixels of the background area;
and determining the target class probability and the background class probability of the image to be segmented under each threshold value according to the target pixel quantity and the background pixel quantity under different threshold values.
In one embodiment, determining the target class probability and the background class probability of the image to be segmented under each threshold according to the target pixel number and the background pixel number under different thresholds includes:
p o,t (i)=P[f(s)=i|s∈S o,t ]
p b,t (i)=P[f(s)=i|s∈S b,t ]
S=S o,t ∪S b,t
wherein p is o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown; s is a set of all pixels of the image to be segmented; s o,t A target pixel set at a threshold t; s b,t The background pixel set at threshold t.
In one embodiment, assuming that the minimum value and the maximum value of the gray value of the pixel in the image to be segmented are t _ min and t _ max, respectively, the threshold traversal interval is set to [ t _ min +2, t _max +2].
In one embodiment, determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using bayesian posterior estimation comprises:
assuming that γ (t) represents the prior probability that a pixel belongs to the object at the threshold t, 1- γ (t) represents the prior probability that a pixel belongs to the background at the threshold t, p o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown;
the posterior probability that a pixel with a pixel value i belongs to the target class and the background class can be respectively expressed by a Bayesian rule as follows:
wherein p is t (i) Can be calculated by the following formula:
p t (i)=γ(t)p o,t (i)+(1-γ(t))p b,t (i)。
in one embodiment, the expressions of the tsalis-BE entropy of the target class and the background class are respectively:
wherein, L is the value with the highest pixel gray scale in the image to be segmented.
In one embodiment, the maximum entropy value is found from all Tsallis-BE entropy valuest opt The method comprises the following steps:
in a second aspect, the present application provides an entropy threshold segmentation apparatus for an image, the apparatus comprising:
the probability determination module is used for determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation;
the entropy value determining module is used for calculating the Tsallis-BE entropy value of the whole image pixel to BE segmented under each threshold value, wherein the Tsallis-BE entropy is formed by combining posterior probability and Tsalis entropy;
and the searching module is used for finding out the maximum entropy value from all Tsallis-BE entropy values and determining the threshold corresponding to the maximum entropy value as the optimal threshold.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the entropy threshold segmentation method for the image according to the first aspect.
In a fourth aspect, the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of entropy threshold segmentation of an image as in the first aspect.
As can be seen from the technical solutions provided in the embodiments of the present specification, the solution: the uncertainty that each pixel belongs to the target and the background is given by using the Bayesian posterior probability, the defect that the Tsallis entropy is insufficient in information utilization of the image is improved, the problem of dimension increase caused by introducing more image characteristic information is avoided, the optimal threshold value is still only required to be solved in a one-dimensional space, high-precision segmentation is achieved, the time consumption of the algorithm is reduced, and the performance of the entropy threshold value method is improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present specification, and for those skilled in the art, other drawings may be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of an entropy threshold segmentation method for an image provided by the present application;
fig. 2 is an original image to be segmented and a segmentation result graph provided by the present application;
FIG. 3 is a schematic structural diagram of an entropy threshold segmentation apparatus for images provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be apparent to those skilled in the art that various modifications and variations can be made in the specific embodiments described herein without departing from the scope or spirit of the application. Other embodiments will be apparent to the skilled person from the description of the present application. The specification and examples are exemplary only.
As used herein, the terms "comprising," "including," "having," "containing," and the like are open-ended terms that mean including but not limited to.
In the prior art, the accuracy and efficiency of segmentation are difficult to balance, and in order to improve the accuracy, the two-dimensional entropy threshold method needs to search an optimal threshold in a two-dimensional space, so that the method is easy to fall into local optimization and consumes long time.
Based on the defects, the application provides an entropy threshold segmentation method of an image, and the gray level probability distribution based on Bayesian posterior estimation is introduced into a Tsallis structure, so that the method can realize high-accuracy and high-efficiency segmentation only by searching in a one-dimensional space.
The entropy threshold segmentation method of the image is an entropy threshold segmentation method which can effectively segment different tissues such as White Matter (WM), gray Matter (GM) and cerebrospinal fluid (CSF) in a brain image according to imaging characteristics and specific gray distribution of a brain nuclear magnetic resonance image.
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Referring to fig. 1, a flow chart diagram of an entropy threshold segmentation method applied to an image provided by an embodiment of the present application is shown. The main task of the entropy threshold segmentation method of the image is to determine an optimal threshold t to distinguish a target pixel from a background pixel.
As shown in fig. 1, a method for entropy threshold segmentation of an image may include:
s110, determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation.
In particular, the image to be segmented may be a nuclear magnetic resonance image, which is exemplarily a nuclear magnetic resonance slice image of a typical human brain, in which case White Matter (WM) and Gray Matter (GM) are considered as target regions and cerebrospinal fluid (CSF) is considered as background regions.
The target class probability and the background class probability of the image to be segmented under each threshold value can be determined in the following manner.
In one embodiment, the method further comprises:
segmenting an image to be segmented into a target region and a background region according to different thresholds;
calculating the number of target pixels of the segmented target area under each threshold value and the number of background pixels of the background area;
determining the target class probability and the background class probability of the image to be segmented under each threshold according to the target pixel number and the background pixel number under different thresholds, wherein the method comprises the following steps:
p o,t (i)=P[f(s)=i|s∈S o,t ]
p b,t (i)=P[f(s)=i|s∈S b,t ]
S=S o,t ∪S b,t
wherein p is o,t (i) Is the probability of the target class (or called probability density function) with the target pixel value i at the threshold t, p b,t (i) The background class probability (or called the probability density function of the background pixel) that the background pixel value is i at the threshold t; s is a set of all pixels of the image to be segmented; s o,t A target pixel set at a threshold t; s. the b,t The background pixel set at threshold t.
Assuming that the distributions of the target and background are Gaussian distributions, respectivelyAndwherein m is o (t)、m b (t)、Mean and standard deviation of the target pixel and background pixel, respectively, then p o,t (i) And p b,t (i) Can be represented as:
specifically, the nuclear magnetic resonance image is divided into a target area and a background area according to different threshold values, the number of pixels of the target area and the number of pixels of the background area divided under each threshold value are calculated, the probability of a target class and the probability of a background class are obtained, and the probability is used for measuring the uncertainty of different classes of each pixel.
It can be understood that the gray scale interval of the image is 0 to 255, and in order to prevent the boundary overflow problem, the area is reduced by 2 as the search area for determining the optimal threshold.
In one embodiment, assuming that the minimum value and the maximum value of the gray value of the pixel in the image to be segmented are t _ min and t _ max, respectively, the threshold traversal interval is set to [ t _ min +2, t _max +2].
The target class probability and the background class probability of the image to be segmented under each threshold are determined through the method, and then the probability distribution that each pixel belongs to the target class and the background class under the segmentation of different thresholds is determined through Bayesian posterior estimation.
In particular, assuming that γ (t) represents the prior probability that a pixel belongs to the object at the threshold t, 1- γ (t) represents the prior probability that a pixel belongs to the background at the threshold t. Wherein γ (t) is estimated by:
therefore, the posterior probability that a pixel with a pixel value i belongs to the target class and the background class can be expressed by the bayesian rule as:
wherein p is t (i) Can be calculated by the following formula:
p t (i)=γ(t)p o,t (i)+(1-γ(t))p b,t (i)
and S120, calculating the Tsallis-BE entropy value of the whole image pixel of the image to BE segmented under each threshold, wherein the Tsallis-BE entropy is formed by combining posterior probability and Tsalis entropy.
Specifically, at present, the Tsaliis entropies of the target class and the background class can be respectively expressed as:
where q is an entropy index characterizing the degree of unavailability, p i Is the probability of pixel i; wherein, given a threshold value t, the image is divided into a background area and a target area, wherein the gray scale interval is {0,1, …, t } and { t +1, …, L-1},
after the posterior probability and the Tsaliis entropy are combined, the expressions of the Tsallis-BE entropy of the target class and the Tsallis entropy of the background class are respectively as follows:
wherein, L is the value with the highest pixel gray level in the image to be segmented, and represents that all pixel gray levels of the whole image are between 0 and L.
And respectively calculating the Tsallis-BE entropy value of the whole image pixel of the image to BE segmented under each threshold value according to the Tsallis-BE entropy expressions of the target class and the background class.
S130, finding out the maximum entropy value from all Tsallis-BE entropy values, and determining the threshold corresponding to the maximum entropy value as the optimal threshold.
Specifically, the threshold corresponding to the maximum entropy value is found, that is, the threshold is considered to be the optimal threshold for dividing the whole image into the target region and the background region.
Optionally, the maximum entropy value t is found from all Tsallis-BE entropy values opt The method comprises the following steps:
as shown in fig. 2, the left side is the original image of the image to be segmented, and the right side is the segmentation result graph obtained by calculating the optimal threshold value by the entropy threshold segmentation method of the image according to the present application and segmenting according to the optimal threshold value.
In the embodiment of the application, the Bayesian posterior probability is used for replacing the probability of each gray value in the classic Tsallis entropy, and a novel Tsallis-BE entropy for image segmentation is provided. The accuracy of two-dimensional entropy threshold segmentation is achieved by using a one-dimensional entropy form, and compared with the two-dimensional entropy, the time required by a segmentation algorithm is greatly shortened. In addition, the method considers the class uncertainty of the pixel by using the Bayesian posterior probability form, and deepens the utilization of the information of the image compared with other one-dimensional entropy threshold methods.
The Tsallis-BE entropy structure provided by the application is different from the target class and the background class which are divided by each threshold value under the assumption of classical Tsallis entropy and are mutually independently distributed, the mutual influence of the pixels at the boundaries of the two classes of substances is considered, the uncertainty of each pixel belonging to the target and the background is given by utilizing the Bayesian posterior probability, the defect that the Tsallis entropy is insufficient in utilization of the information of the image is improved, the problem of dimension increase caused by introducing more image characteristic information is avoided, the optimal threshold value is still only needed to BE solved in a one-dimensional space, the time consumed by an algorithm is reduced while high-precision division is achieved, and the performance of an entropy threshold value method is improved.
Experimental verification
Comparative experiments with classical methods (including method one and method two) were performed on two reference datasets, brainweb and MRBS13, of medical image segmentation. The quantitative results are shown in table 1, and we performed evaluation verification using three general evaluation indexes DSC (Dice Similarity Coefficient, dess Similarity Coefficient), JC (Jaccard Similarity Coefficient ), accuracy (Accuracy) for evaluating the segmentation effect. It can be seen that thanks to the proposed novel entropy structure, the present application achieves better results on two reference datasets than the method one and the method two. Methods described in the first corresponding document Albuquerque M P D, esquef I A, mello A R G, et al. Image threshold using Tsallis entry [ J ]. Pattern registration Letters,2004,25 (9): 1059-1065, and methods described in the second corresponding document Ostu N.A threshold selection method from hierarchy-history [ J ]. IEEE Transactions on Systems, man, and Cybernetics,1979,9 (1): 62-66.
TABLE 1 quantification results on medical image segmentation data set (%)
Method 1 | Method two | This application | |
DSC | 93.56 | 95.27 | 99.67 |
JC | 93.09 | 94.84 | 98.02 |
Accuracy | 90.79 | 93.88 | 98.97 |
Referring to fig. 3, a schematic structural diagram of an entropy threshold segmentation apparatus for an image according to an embodiment of the present application is shown.
As shown in fig. 3, the entropy threshold segmentation apparatus 300 for an image may include:
the probability determining module 310 is configured to determine, according to the target class probability and the background class probability of the image to be segmented under each threshold, posterior probabilities that each pixel belongs to the target class and the background class under segmentation of different thresholds by using bayesian posterior estimation;
the entropy value determining module 320 is configured to calculate a value of a tsalis-BE entropy of a whole pixel of the image to BE segmented under each threshold, where the tsalis-BE entropy is formed by combining a posterior probability and a tsalis entropy;
the searching module 330 is configured to find a maximum entropy value from all the values of the tsalis-BE entropy, and determine a threshold corresponding to the maximum entropy value as an optimal threshold.
Optionally, the entropy threshold segmentation apparatus 300 of the image is further configured to:
dividing an image to be divided into a target area and a background area according to different thresholds;
calculating the number of target pixels of the segmented target area under each threshold value and the number of background pixels of the background area;
and determining the target class probability and the background class probability of the image to be segmented under each threshold value according to the target pixel quantity and the background pixel quantity under different threshold values.
Optionally, the entropy threshold segmentation apparatus 300 of the image is further configured to:
p o,t (i)=P[f(s)=i|s∈S o,t ]
p b,t (i)=P[f(s)=i|s∈S b,t ]
S=S o,t ∪S b,t
wherein p is o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown; s is a set of all pixels of the image to be segmented; s o,t A target pixel set at a threshold t; s b,t The background pixel set at threshold t.
Optionally, assuming that the minimum value and the maximum value of the pixel gray value in the image to be segmented are t _ min and t _ max, respectively, the threshold traversal interval is set to [ t _ min +2, t _max +2].
Optionally, the probability determination module 310 is further configured to:
assuming that γ (t) represents the prior probability that a pixel belongs to the object at the threshold t, 1- γ (t) represents the prior probability that a pixel belongs to the background at the threshold t, p o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown;
the posterior probability that a pixel with a pixel value i belongs to the target class and the background class can be respectively expressed by a Bayesian rule as follows:
wherein p is t (i) Can be calculated by the following formula:
p t (i)=γ(t)p o,t (i)+(1-γ(t))p b,t (i)。
optionally, the expressions of the tsalis-BE entropy of the target class and the background class are respectively:
wherein, L is the value with the highest pixel gray level in the image to be segmented.
Optionally, the searching module 330 is further configured to:
the entropy threshold segmentation apparatus for an image provided in this embodiment may implement the embodiments of the method described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present application is shown.
As shown in fig. 4, the electronic apparatus 400 includes a Central Processing Unit (CPU) 401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the device 400 are also stored. The 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.
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 a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 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, a semiconductor memory, or the like is mounted on the drive 410 as needed, so that a computer program read out therefrom is mounted in the storage section 408 as needed.
In particular, the process described above with reference to fig. 1 may be implemented as a computer software program, according to an embodiment of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method of entropy threshold segmentation of images described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor. The names of these units or modules do not in some cases constitute a limitation of the unit or module itself.
The systems, apparatuses, modules or units described in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a mobile phone, a smart phone, 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.
As another aspect, the present application also provides a storage medium, which may be the storage medium contained in the foregoing device in the above embodiment; or may be a storage medium that exists separately and is not assembled into the device. The storage medium stores one or more programs for use by one or more processors in performing the entropy threshold segmentation method for images described herein.
Storage media, including persistent and non-persistent, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It is to be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Claims (10)
1. A method of entropy thresholding of an image, the method comprising:
determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation;
calculating the value of Tsallis-BE entropy of the whole image pixel of the image to BE segmented under each threshold value, wherein the Tsallis-BE entropy is formed by combining the posterior probability and the Tsalis entropy;
finding out the maximum entropy value from all the Tsallis-BE entropy values, and determining the threshold corresponding to the maximum entropy value as the optimal threshold.
2. The method of claim 1, further comprising:
segmenting the image to be segmented into a target region and a background region according to different thresholds;
calculating the number of target pixels of the target area and the number of background pixels of the background area which are segmented under each threshold;
and determining the target class probability and the background class probability of the image to be segmented under each threshold value according to the target pixel quantity and the background pixel quantity under different threshold values.
3. The method according to claim 2, wherein the determining the target class probability and the background class probability of the image to be segmented at each threshold according to the target pixel number and the background pixel number at different thresholds comprises:
p o,t (i)=P[f(s)=i|s∈S o,t ]
p b,t (i)=P[f(s)=i|s∈S b,t ]
S=S o,t ∪S b,t
wherein p is o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown; s is a set of all pixels of the image to be segmented; s. the o,t A target pixel set at a threshold t; s b,t The background pixel set at threshold t.
4. The method as claimed in claim 2 or 3, wherein the interval traversed by the threshold is set to [ t _ min +2, t _max +2] assuming that the minimum value and the maximum value of the gray value of the pixel in the image to be segmented are t _ min and t _ max, respectively.
5. The method according to claim 1, wherein the determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using bayesian posterior estimation comprises:
assuming that γ (t) represents the prior probability that a pixel belongs to the target at the threshold t, 1-Gamma (t) represents the prior probability that a pixel belongs to the background at a threshold t, p o,t (i) Is the probability of the target class with a target pixel value of i at a threshold t, p b,t (i) The background class probability that the background pixel value is i at the threshold value t is shown;
the posterior probability that a pixel with a pixel value i belongs to the target class and the background class can be respectively expressed by a Bayesian rule as follows:
wherein p is t (i) Can be calculated by the following formula:
p t (i)=γ(t)p o,t (i)+(1-γ(t))p b,t (i)。
8. an apparatus for entropy thresholding of an image, the apparatus comprising:
the probability determination module is used for determining the posterior probability of each pixel belonging to the target class and the background class under the segmentation of different thresholds according to the target class probability and the background class probability of the image to be segmented under each threshold by using Bayes posterior estimation;
the entropy value determining module is used for calculating the Tsallis-BE entropy value of the whole image pixel to BE segmented under each threshold value, wherein the Tsallis-BE entropy is formed by combining the posterior probability and the Tsalis entropy;
and the searching module is used for finding out the maximum entropy value from all the Tsallis-BE entropy values and determining the threshold corresponding to the maximum entropy value as the optimal threshold.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of entropy thresholding of an image as claimed in any of claims 1-7 when executing the program.
10. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for entropy threshold segmentation of an image according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211039468.2A CN115423834A (en) | 2022-08-29 | 2022-08-29 | Entropy threshold segmentation method and device for image, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211039468.2A CN115423834A (en) | 2022-08-29 | 2022-08-29 | Entropy threshold segmentation method and device for image, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115423834A true CN115423834A (en) | 2022-12-02 |
Family
ID=84199682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211039468.2A Pending CN115423834A (en) | 2022-08-29 | 2022-08-29 | Entropy threshold segmentation method and device for image, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115423834A (en) |
-
2022
- 2022-08-29 CN CN202211039468.2A patent/CN115423834A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11080306B2 (en) | Method and apparatus and electronic device for clustering | |
WO2023116632A1 (en) | Video instance segmentation method and apparatus based on spatio-temporal memory information | |
CN112016569A (en) | Target detection method, network, device and storage medium based on attention mechanism | |
CN115759148B (en) | Image processing method, device, computer equipment and computer readable storage medium | |
CN112581261A (en) | Wind control rule determination method and device | |
CN111475736A (en) | Community mining method, device and server | |
Thäle et al. | Asymptotic theory for statistics of the Poisson–Voronoi approximation | |
CN115239653A (en) | Multi-split-screen-supporting black screen detection method and device, electronic equipment and readable storage medium | |
KWAK et al. | Content‐Based Ultrasound Image Retrieval Using a Coarse to Fine Approach | |
Pan et al. | Optimal O (1) bilateral filter with arbitrary spatial and range kernels using sparse approximation | |
CN115423834A (en) | Entropy threshold segmentation method and device for image, electronic equipment and storage medium | |
CN116109907B (en) | Target detection method, target detection device, electronic equipment and storage medium | |
CN113821689B (en) | Pedestrian retrieval method and device based on video sequence and electronic equipment | |
Virmajoki et al. | Fast pairwise nearest neighbor based algorithm for multilevel thresholding | |
JP3636674B2 (en) | Image similarity evaluation method and apparatus | |
CN113792653B (en) | Method, system, equipment and storage medium for cloud detection of remote sensing image | |
US9679363B1 (en) | System and method for reducing image noise | |
US9116675B2 (en) | System and method to identify a median value | |
CN112800138B (en) | Big data classification method and system | |
CN114549833A (en) | Instance partitioning method and device, electronic equipment and storage medium | |
CN114332112A (en) | Cell image segmentation method and device, electronic equipment and storage medium | |
Chang et al. | CUDA‐based acceleration and BPN‐assisted automation of bilateral filtering for brain MR image restoration | |
Maruf et al. | Improved non-local means algorithm based on dimensionality reduction | |
CN112861874A (en) | Expert field denoising method and system based on multi-filter denoising result | |
Szabó et al. | Distributed high dimensional information theoretical image registration via random projections |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |