Fluorescence image classification method and device, storage medium and electronic equipment

By converting fluorescence images to HSV space and using chromaticity information to determine initial cluster centers, the problem of low classification accuracy caused by randomly selecting cluster centers is solved, and rapid segmentation and high-accuracy classification of fluorescence images are achieved.

CN116563644BActive Publication Date: 2025-12-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310672045.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-12-16
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

Existing technologies use random selection of cluster centers to cluster and segment fluorescence images, resulting in low classification accuracy.

Method used

The fluorescence image is converted to the HSV color space, and C first cluster centers are determined using hue information. Then, the target cluster centers are determined by performing clustering processing using the FCM algorithm, thus achieving rapid segmentation of the fluorescence image.

Benefits of technology

The classification accuracy of fluorescence images is improved by using chromaticity value information instead of pixel points for iterative calculation in HSV space, ensuring that the initial cluster centers are distributed near chromaticity values ​​with more pixels, thus improving the rationality and accuracy of the cluster centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563644B_ABST
    Figure CN116563644B_ABST
Patent Text Reader

Abstract

The application discloses a fluorescence image classification method and device, a storage medium and an electronic equipment, relates to the technical field of artificial intelligence, and comprises the following steps: acquiring a target fluorescence image to be classified, and mapping each pixel point in the target fluorescence image to an HSV color space; acquiring hue information of each pixel point in the HSV color space, obtaining a plurality of hue information, and determining C first clustering centers according to the plurality of hue information; performing clustering processing on the plurality of hue information according to the C first clustering centers, obtaining C target clustering centers, and performing segmentation processing on the target fluorescence image according to the C target clustering centers to obtain an image segmentation result; and determining category information of the target fluorescence image according to the image segmentation result. Through the application, the problem that the accuracy of fluorescence image classification is low due to the random selection of clustering centers in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method and apparatus for classifying fluorescence images, a storage medium, and an electronic device. Background Technology

[0002] In petroleum geology, polarized light microscopy and fluorescence microscopy are commonly used as analytical tools to provide technical services for petroleum exploration. Fluorescence microscopy involves adding a fluorescence generator to a polarized light microscope. By exciting petroleum bitumen substances in rocks to produce visible fluorescence, and analyzing the color, intensity, area, and occurrence state of these luminescent substances, the type and content of bitumen substances in the rocks, as well as their oil-water relationships, can be determined, providing digital and visual information for evaluating the oil and gas content of the rocks.

[0003] Fluorescence component classification is essentially a process of first clustering and segmenting an image by color, and then determining the category. The FCM clustering algorithm is a fuzzy clustering algorithm based on an objective function. This algorithm is quite sensitive to initial parameters, and its results are greatly affected by the initial values. Because the initial values ​​of the cluster centers or membership matrix are randomly selected, inappropriate values ​​may cause the algorithm to converge locally, resulting in incorrect classification results. Furthermore, the results of each clustering segmentation may differ, affecting the final component classification result.

[0004] There is currently no effective solution to the problem that the method of randomly selecting cluster centers to cluster and segment fluorescence images in related technologies results in low accuracy of fluorescence image classification. Summary of the Invention

[0005] The main objective of this application is to provide a method, apparatus, storage medium, and electronic device for classifying fluorescence images, in order to solve the problem that the accuracy of fluorescence image classification is low when using random selection of cluster centers to cluster and segment fluorescence images in related technologies.

[0006] To achieve the above objectives, according to one aspect of this application, a method for classifying fluorescence images is provided. The method includes: acquiring a target fluorescence image to be classified, and mapping each pixel in the target fluorescence image to an HSV color space; acquiring hue information for each pixel in the HSV color space to obtain multiple hue information points, and determining C first cluster centers based on the multiple hue information points, where C is a positive integer greater than 1; performing clustering processing on the multiple hue information points based on the C first cluster centers to obtain C target cluster centers, and performing segmentation processing on the target fluorescence image based on the C target cluster centers to obtain an image segmentation result; and determining the category information of the target fluorescence image based on the image segmentation result.

[0007] Further, determining C first cluster centers based on the plurality of hue information includes: sorting the plurality of hue information and determining the first hue information with the first position as the first first cluster center; determining C-1 first cluster centers based on the distance between the plurality of hue information and the first first cluster center; and determining C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0008] Further, determining C-1 first cluster centers based on the distance between the plurality of hue information and the first first cluster center includes: determining an interval threshold based on the distance between the plurality of hue information and the first first cluster center; and determining the C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0009] Further, determining the interval threshold based on the distance between the plurality of hue information and the first cluster center includes: calculating the distance between the plurality of hue information and the first cluster center to obtain a maximum distance value; and calculating the interval threshold based on the maximum distance value and the total number of the first cluster centers.

[0010] Further, determining the C-1 first cluster centers based on the interval threshold and the first first cluster center includes: sequentially calculating the distance between the multiple hue information and the first first cluster center based on the number of times the multiple hue information is arranged, and determining the second hue information as the second first cluster center, wherein the second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; determining C-2 first cluster centers based on the interval threshold and the second first cluster center; and determining the C-1 first cluster centers based on the second first cluster center and the C-2 first cluster centers.

[0011] Further, clustering the multiple hue information based on the C first cluster centers to obtain C target cluster centers includes: calculating the membership degree of each hue information based on the C first cluster centers to obtain a first membership matrix; and determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix.

[0012] Further, determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix includes: calculating the function value of the objective function based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm; if the function value of the objective function is greater than a convergence threshold, iteratively updating the C first cluster centers based on the first membership matrix to obtain C second cluster centers; repeatedly performing the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain a second membership matrix until the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to a preset number of iterations; when the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to the preset number of iterations, determining the C target cluster centers based on the current membership matrix.

[0013] To achieve the above objectives, according to another aspect of this application, a fluorescence image classification apparatus is provided. The apparatus includes: a first acquisition unit, configured to acquire a target fluorescence image to be classified and map each pixel in the target fluorescence image to an HSV color space; a second acquisition unit, configured to acquire hue information of each pixel in the HSV color space, obtaining multiple hue information points, and determining C first cluster centers based on the multiple hue information points, where C is a positive integer greater than 1; a clustering unit, configured to perform clustering processing on the multiple hue information points based on the C first cluster centers, obtaining C target cluster centers, and performing segmentation processing on the target fluorescence image based on the C target cluster centers, obtaining an image segmentation result; and a determination unit, configured to determine the category information of the target fluorescence image based on the image segmentation result.

[0014] Further, the second acquisition unit includes: a sorting subunit, used to sort the plurality of hue information and determine the first hue information with the first order as the first first cluster center; a first determining subunit, used to determine C-1 first cluster centers based on the distance between the plurality of hue information and the first first cluster center; and a second determining subunit, used to determine C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0015] Further, the first determining subunit includes: a first determining module, used to determine an interval threshold based on the distance between the plurality of hue information and the first first cluster center; and a second determining module, used to determine the C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0016] Further, the first determining module includes: a first calculation submodule, used to calculate the distance between the plurality of hue information and the first first cluster center to obtain a maximum distance value; and a second calculation submodule, used to calculate based on the maximum distance value and the total number of the first cluster centers to obtain the interval threshold.

[0017] Further, the second determining module includes: a third calculation submodule, used to calculate the distance between the plurality of hue information and the first first cluster center sequentially according to the number of times the plurality of hue information is arranged, and to determine the second hue information as the second first cluster center, wherein the second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; a first determining submodule, used to determine C-2 first cluster centers according to the interval threshold and the second first cluster center; and a second determining submodule, used to determine C-1 first cluster centers according to the second first cluster center and the C-2 first cluster centers.

[0018] Furthermore, the clustering unit includes: a calculation subunit, used to calculate the membership degree of each hue information based on the C first cluster centers to obtain a first membership degree matrix; and a third determination subunit, used to determine the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership degree matrix.

[0019] Further, the third determining subunit includes: a first calculation module, used to calculate the function value of the objective function based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm; an update module, used to iteratively update the C first cluster centers based on the first membership matrix to obtain C second cluster centers if the function value of the objective function is greater than a convergence threshold; a second calculation module, used to repeatedly execute the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain a second membership matrix, until the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to a preset number of iterations; and a third determining module, used to determine the C target cluster centers based on the current membership matrix when the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to a preset number of iterations.

[0020] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is also provided, the storage medium storing a program, wherein, when the program is executed, the device on which the storage medium is located controls the execution of the fluorescence image classification method described in any one of the above claims.

[0021] To achieve the above objectives, according to one aspect of this application, an electronic device is provided, the electronic device including one or more processors and a memory, the memory being used to store the classification method of fluorescence images implemented by the one or more processors as described in any one of the above claims.

[0022] This application employs the following steps: acquiring a target fluorescence image to be classified, and mapping each pixel in the target fluorescence image to the HSV color space; acquiring the hue information of each pixel in the HSV color space, obtaining multiple hue information, and determining C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; performing clustering processing on the multiple hue information based on the C first cluster centers to obtain C target cluster centers, and performing segmentation processing on the target fluorescence image based on the C target cluster centers to obtain image segmentation results; determining the category information of the target fluorescence image based on the image segmentation results. This solves the problem in related technologies where randomly selecting cluster centers for clustering and segmenting fluorescence images leads to low accuracy in fluorescence image classification. In this scheme, the target fluorescence image is converted into HSV space and chromaticity value information is used to replace all pixels in the iterative calculation to achieve rapid segmentation of the target fluorescence image. Furthermore, the first cluster center is determined based on the chromaticity information, so that the initial cluster centers are distributed near the chromaticity values ​​with more pixels, thereby improving the rationality of the initial cluster centers and thus improving the accuracy of the classification of fluorescence images. Attached Figure Description

[0023] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 This is a flowchart of a fluorescence image classification method provided according to embodiments of this application;

[0025] Figure 2 This is a flowchart of a fluorescence image classification method provided in the embodiments of this application. Figure 1 ;

[0026] Figure 3 This is a schematic diagram of a fluorescence image classification device provided according to an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0028] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.

[0032] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a fluorescence image classification method provided according to embodiments of this application, such as... Figure 1 As shown, the method includes the following steps:

[0033] Step S101: Obtain the target fluorescence image to be classified, and map each pixel in the target fluorescence image to the HSV color space.

[0034] Optionally, to fully utilize the color information of the fluorescence image, after determining the target fluorescence image to be classified, each pixel in the target fluorescence image is mapped and converted to the HSV color space. It should be noted that the HSV (Hue, Saturation, Value) color space is a color space created based on the intuitive characteristics of color, also known as the Hexcone Model. The HSV color model refers to a subset of visible light in the H, S, V three-dimensional color space, containing all colors in each color gamut.

[0035] Step S102: Obtain the hue information of each pixel in the HSV color space, obtain multiple hue information, and determine C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1.

[0036] Optionally, after mapping and converting each pixel in the target fluorescence image to the HSV color space, hue information is used to replace the pixels, i.e., obtaining the hue information of each pixel in the HSV color space as described above, resulting in multiple hue information. To address the drawback of low image segmentation accuracy caused by random cluster centers, C first cluster centers are determined based on multiple hue information. Determining the initial cluster centers (i.e., the first cluster centers mentioned above) using hue information ensures that the initial cluster centers are distributed near hue values ​​with a larger number of pixels, effectively improving the accuracy of subsequent clustering and thus improving the accuracy of image segmentation.

[0037] Step S103: Cluster the multiple hue information based on the C first cluster centers to obtain C target cluster centers, and segment the target fluorescence image based on the C target cluster centers to obtain the image segmentation result.

[0038] Optionally, after determining C first cluster centers, the C first cluster centers are used to cluster multiple hue information to obtain C target cluster centers. It should be noted that, in an optional embodiment, the FCM algorithm and the C first cluster centers can be used to cluster multiple hue information to obtain the final C target cluster centers. The FCM algorithm is a data clustering method based on the optimization of the objective function; the clustering result is the degree of membership of each data point to a cluster center.

[0039] After obtaining the final C target cluster centers, the target fluorescence image is segmented according to the target cluster center to which each pixel in the target fluorescence image belongs, resulting in the image segmentation result described above.

[0040] Step S104: Determine the category information of the target fluorescence image based on the image segmentation results.

[0041] Optionally, the category information of each component in the target fluorescence image can be determined through image segmentation results.

[0042] In summary, by converting the target fluorescence image into the HSV space and using chromaticity values ​​to replace all pixels in the iterative calculation, rapid segmentation of the target fluorescence image can be achieved. Furthermore, by determining the first cluster center based on the chromaticity information, the initial cluster centers are distributed near chromaticity values ​​with a larger number of pixels, thus improving the rationality of the initial cluster centers and ultimately enhancing the accuracy of fluorescence image classification.

[0043] To improve the accuracy and rationality of determining C first cluster centers, in the fluorescence image classification method provided in this application embodiment, determining C first cluster centers based on multiple hue information includes: sorting the multiple hue information and determining the first hue information with the first position as the first first cluster center; determining C-1 first cluster centers based on the distance between the multiple hue information and the first first cluster center; and determining C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0044] Optionally, the number of pixels in the target fluorescence image at each chromaticity value is calculated, and then these pixel counts are used to sort the multiple chromaticity information to obtain sorted chromaticity information. For example, the sorted chromaticity information is Fn, F... n ={H1,H2,...,H n}, f(H1)≥f(H2)≥…f(H n ), where F(H n ) represents the number of pixels corresponding to the nth chromaticity information.

[0045] Then, H1 is selected as the first cluster center, ensuring that it is located at the center of the image chromaticity distribution space. Next, the distances between multiple hue information points and the first cluster center are used to determine the remaining C-1 cluster centers, ultimately resulting in the aforementioned C cluster centers.

[0046] In an optional embodiment, when determining the remaining C-1 first cluster centers using the distance between multiple hue information and the first first cluster center, the remaining C-1 first cluster centers can be selected by using the interval distance that the cluster centers need to satisfy.

[0047] In an optional embodiment, when determining the remaining C-1 first cluster centers using the distances between multiple hue information and the first first cluster center, the remaining C-1 first cluster centers can also be determined using the distance values ​​from the first first cluster center. For example, how much distance the second first cluster center needs to be from the first first cluster center, and how much distance the Cth first cluster center needs to be from the first first cluster center.

[0048] By distributing the first cluster centers near chroma values ​​with a larger number of pixels, the subsequent convergence speed and stability can be improved.

[0049] In an optional embodiment, in the fluorescence image classification method provided in this application, determining C-1 first cluster centers based on the distance between multiple hue information and the first first cluster center includes: determining an interval threshold based on the distance between multiple hue information and the first first cluster center; and determining C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0050] Determining the interval threshold based on the distance between multiple hue information and the first cluster center includes: calculating the distance between multiple hue information and the first cluster center to obtain the maximum distance value; and calculating the interval threshold based on the maximum distance value and the total number of first cluster centers.

[0051] Optionally, the distance between each hue information and the first cluster center is calculated to obtain multiple distance values. Then, the maximum distance value is determined from the multiple distance values. The maximum distance value and the preset total number of first cluster centers are then used to calculate the above-mentioned interval threshold.

[0052] In an alternative instance, the above-mentioned interval threshold can be calculated using formula (1):

[0053] D = dmax / (c+2) (1)

[0054] Where D is the aforementioned interval threshold, dmax is the maximum distance from all hue information in the dataset to the first initial cluster center, and c is the total number of the aforementioned first cluster centers.

[0055] After calculating the above-mentioned interval threshold, C-1 first cluster centers are determined using the interval threshold and the first first cluster center.

[0056] In summary, calculating the interval threshold through the above steps can effectively improve the accuracy and rationality of determining the C first cluster centers.

[0057] In an optional embodiment, in the fluorescence image classification method provided in this application, determining C-1 first cluster centers based on an interval threshold and a first first cluster center includes: sequentially calculating the distance between multiple hue information and the first first cluster center based on the number of times multiple hue information is arranged, and determining the second hue information as the second first cluster center, wherein the second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; determining C-2 first cluster centers based on the interval threshold and the second first cluster center; and determining C-1 first cluster centers based on the second first cluster center and C-2 first cluster centers.

[0058] Optionally, determining the C-1 first cluster centers includes: calculating the distance between the multiple hue information and the first first cluster center according to the number of times the multiple hue information is arranged, and then judging these distance values. If there is a hue information whose distance to the first first cluster center is greater than or equal to the interval threshold, then this hue information is determined as the second first cluster center. The remaining C-2 first cluster centers are determined in the same way until all the remaining C-1 first cluster centers are determined.

[0059] By following the steps above, we ensure that each pair of cluster centers maintains a certain interval, which can effectively improve the convergence speed and stability of subsequent clustering.

[0060] It is crucial to determine how to cluster multiple hue information using C first cluster centers to obtain C target cluster centers. Therefore, in the fluorescence image classification method provided in this application embodiment, clustering multiple hue information using C first cluster centers to obtain C target cluster centers includes: calculating the membership degree of each hue information based on the C first cluster centers to obtain a first membership degree matrix; and determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership degree matrix.

[0061] Determining the C target cluster centers based on the objective function of the target clustering algorithm, C first cluster centers, and the first membership matrix includes: calculating the function value of the objective function based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm; if the function value of the objective function is greater than the convergence threshold, iteratively updating the C first cluster centers based on the first membership matrix to obtain C second cluster centers; repeatedly performing the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain the second membership matrix, until the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations; when the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations, determining the C target cluster centers based on the current membership matrix.

[0062] Optionally, multiple hue information can be clustered using the FCM algorithm and C first cluster centers to obtain the final C target cluster centers. First, some initial parameters are determined, such as the objective function convergence threshold, the maximum number of algorithm iterations, and the fuzziness index. Then, the membership degree of each hue information is calculated based on the C first cluster centers to obtain the first membership matrix. The membership degree refers to the probability that the current hue information belongs to a first cluster center.

[0063] In an optional embodiment, the membership degree of each hue information can be calculated using formula (2):

[0064]

[0065] Where, μ ij Let x be the membership degree of the hue information corresponding to the j-th pixel to the i-th cluster center, and x be the membership degree of the hue information corresponding to the j-th pixel to the i-th cluster center. j For the hue information corresponding to the j-th pixel, ||x j -c i || represents x j To cluster center c i Euclidean distance, ||x j -c k || represents x j To cluster center c k The Euclidean distance; m is the fuzzy index, which is generally 2.

[0066] After calculating the first membership matrix, the first membership matrix, C first cluster centers, and the objective function of the target clustering algorithm are used to calculate the function value of the objective function.

[0067] In an alternative embodiment, formula (3) can be used as the objective function described above:

[0068]

[0069] Among them, J m The objective function described above is N, where N is the number of pixels, and d... ij 2 (x j ,c i ) represents the hue information corresponding to the j-th pixel and the cluster center c. i Euclidean distance.

[0070] After calculating the function value of the objective function, it is necessary to determine whether the function value of the objective function is less than or equal to the convergence threshold. If it is less than or equal to the convergence threshold, the iteration ends directly. However, if the function value of the objective function is greater than the convergence threshold, the C first cluster centers are iteratively updated according to the first membership matrix to obtain C second cluster centers.

[0071] In an optional embodiment, the C second cluster centers can be calculated using formula (4):

[0072]

[0073] After updating the cluster centers, the step of calculating the membership degree of each hue information based on the C second cluster centers is performed again to obtain the second membership matrix. This process continues until the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations. Finally, when the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations, the C target cluster centers are determined based on the current membership matrix. It should be noted that the cluster center to which each pixel belongs is generally determined according to the principle of maximum membership degree.

[0074] In an alternative embodiment, formula (5) can also be used as the objective function described above:

[0075]

[0076] Where f(h) represents the total number of pixels with a chromaticity value of h, h = 0, 1, 2, ..., l-1, l represents the number of chromaticity levels in the image, and μ ih * Let h represent the membership degree of the chromaticity value relative to the i-th cluster center, B be a newly introduced parameter representing the image factor of f(h), and c be the chromaticity value relative to the i-th cluster center. i * Let i represent the i-th cluster center.

[0077] In an optional embodiment, the membership degree of each hue information can also be calculated using formula (6):

[0078]

[0079] Where, d 2 (hc i * ) represents the Euclidean distance between the chromaticity value h and the i-th cluster center, d 2 (hc k * ) represents the Euclidean distance between the chromaticity value h and the k-th cluster center.

[0080] In an alternative embodiment, the C second cluster centers can also be calculated using formula (7):

[0081]

[0082] In an alternative embodiment, the following can be employed: Figure 2 The flowchart shown demonstrates the classification of fluorescence images:

[0083] Step S201: Set initial parameters, including the number of cluster centers c, fuzzy index, objective function convergence threshold, and maximum number of algorithm iterations, and set the current iteration number t = 0;

[0084] Step S202: Count the number of pixels for each chromaticity value in the image, and sort H and F according to the number of pixels. n ={H1,H2,...,H n}, f(H1)≥f(H2)≥…f(H n H1 is selected as the first cluster center point v1, ensuring that it is located at the center of the image chromaticity distribution space, i.e., v1 = H1;

[0085] Determine the required interval between cluster centers. Select H2, H3, ... in the sorted dataset one by one, calculate the distance between each H2 and the existing cluster centers, and determine whether the value is greater than or equal to the Interval. If it is satisfied, select it as a cluster center; otherwise, select the next Hj value and recalculate until all the remaining c-1 cluster centers are determined.

[0086] Step S203: Calculate the objective function value, and determine whether the objective function value has reached the convergence threshold or the maximum number of iterations. If so, the algorithm iteration ends and step S205 is executed; otherwise, let t = t + 1 and execute step S204.

[0087] Step S204: Update the cluster center or membership matrix, and repeat step S203;

[0088] Step S205: Based on the obtained membership matrix, determine the cluster center of each pixel according to the maximum membership principle to obtain the image segmentation result.

[0089] Step S206: Determine the component category to which the segmentation result belongs.

[0090] In summary, all initial cluster centers are obtained using a spatial distribution-based initial cluster center selection method. First, the distribution of the H components of the image is statistically analyzed. Then, the H components are sorted in descending order based on the number of pixels corresponding to each H value. The H value ranked first is selected as the first initial cluster center. The remaining cluster centers are determined based on the distance between the sorted H values ​​and existing cluster centers, ensuring a certain interval between each pair of cluster centers. Next, fast FCM clustering is performed on the H components of the image. Finally, the component categories of the clustering segmentation results are determined.

[0091] The fluorescence image classification method provided in this application involves acquiring a target fluorescence image to be classified and mapping each pixel in the target fluorescence image to the HSV color space; acquiring the hue information of each pixel in the HSV color space to obtain multiple hue information points; determining C first cluster centers based on the multiple hue information points, where C is a positive integer greater than 1; performing clustering processing on the multiple hue information points based on the C first cluster centers to obtain C target cluster centers; and performing segmentation processing on the target fluorescence image based on the C target cluster centers to obtain image segmentation results; and determining the category information of the target fluorescence image based on the image segmentation results. This method solves the problem in related technologies where randomly selecting cluster centers for clustering and segmenting fluorescence images leads to low accuracy in fluorescence image classification. In this scheme, the target fluorescence image is converted into HSV space and chromaticity value information is used to replace all pixels in the iterative calculation to achieve rapid segmentation of the target fluorescence image. Furthermore, the first cluster center is determined based on the chromaticity information, so that the initial cluster centers are distributed near the chromaticity values ​​with more pixels, thereby improving the rationality of the initial cluster centers and thus improving the accuracy of the classification of fluorescence images.

[0092] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0093] This application also provides a fluorescence image classification device. It should be noted that the fluorescence image classification device of this application can be used to execute the fluorescence image classification method provided in this application. The fluorescence image classification device provided in this application is described below.

[0094] Figure 3 This is a schematic diagram of a fluorescence image classification device according to an embodiment of this application. Figure 3 As shown, the device includes: a first acquisition unit 301, a second acquisition unit 302, a clustering unit 303, and a determination unit 304.

[0095] The first acquisition unit 301 is used to acquire the target fluorescence image to be classified and map each pixel in the target fluorescence image to the HSV color space;

[0096] The second acquisition unit 302 is used to acquire the hue information of each pixel in the HSV color space, obtain multiple hue information, and determine C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1;

[0097] Clustering unit 303 is used to cluster multiple hue information based on C first cluster centers to obtain C target cluster centers, and to segment the target fluorescence image based on the C target cluster centers to obtain image segmentation results;

[0098] The determining unit 304 is used to determine the category information of the target fluorescence image based on the image segmentation results.

[0099] The fluorescence image classification device provided in this application embodiment includes a first acquisition unit 301 for acquiring a target fluorescence image to be classified and mapping each pixel in the target fluorescence image to the HSV color space; a second acquisition unit 302 for acquiring the hue information of each pixel in the HSV color space, obtaining multiple hue information, and determining C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; a clustering unit 303 for clustering the multiple hue information based on the C first cluster centers, obtaining C target cluster centers, and segmenting the target fluorescence image based on the C target cluster centers to obtain an image segmentation result; and a determination unit 304 for determining the category information of the target fluorescence image based on the image segmentation result. This solves the problem in related technologies where randomly selecting cluster centers for clustering and segmenting fluorescence images leads to low accuracy in the classification of fluorescence images. In this scheme, the target fluorescence image is converted into HSV space and chromaticity value information is used to replace all pixels in the iterative calculation to achieve rapid segmentation of the target fluorescence image. Furthermore, the first cluster center is determined based on the chromaticity information, so that the initial cluster centers are distributed near the chromaticity values ​​with more pixels, thereby improving the rationality of the initial cluster centers and thus improving the accuracy of the classification of fluorescence images.

[0100] Optionally, in the fluorescence image classification device provided in the embodiments of this application, the second acquisition unit includes: a sorting subunit, used to sort multiple hue information and determine the first hue information with the first order as the first first cluster center; a first determining subunit, used to determine C-1 first cluster centers based on the distance between the multiple hue information and the first first cluster center; and a second determining subunit, used to determine C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0101] Optionally, in the fluorescence image classification device provided in the embodiments of this application, the first determining subunit includes: a first determining module, used to determine an interval threshold based on the distance between multiple hue information and the first first cluster center; and a second determining module, used to determine C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0102] Optionally, in the fluorescence image classification device provided in the embodiments of this application, the first determining module includes: a first calculation submodule, used to calculate the distance between multiple hue information and the first first cluster center to obtain a maximum distance value; and a second calculation submodule, used to calculate based on the maximum distance value and the total number of first cluster centers to obtain an interval threshold.

[0103] Optionally, in the fluorescence image classification device provided in this application embodiment, the second determining module includes: a third calculation submodule, used to sequentially calculate the distance between the multiple hue information and the first first cluster center based on the number of times the multiple hue information is arranged, and to determine the second hue information as the second first cluster center, wherein the second hue information is the hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; a first determining submodule, used to determine C-2 first cluster centers based on the interval threshold and the second first cluster center; and a second determining submodule, used to determine C-1 first cluster centers based on the second first cluster center and C-2 first cluster centers.

[0104] Optionally, in the fluorescence image classification device provided in the embodiments of this application, the clustering unit includes: a calculation subunit, used to calculate the membership degree of each hue information based on C first cluster centers to obtain a first membership degree matrix; and a third determination subunit, used to determine C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers and the first membership degree matrix.

[0105] Optionally, in the fluorescence image classification device provided in this application embodiment, the third determining subunit includes: a first calculation module, used to calculate the function value of the objective function based on the first membership matrix, C first cluster centers, and the objective function of the target clustering algorithm; an update module, used to iteratively update the C first cluster centers based on the first membership matrix to obtain C second cluster centers if the function value of the objective function is greater than the convergence threshold; a second calculation module, used to repeatedly execute the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain the second membership matrix, until the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to the preset number of iterations; and a third determining module, used to determine the C target cluster centers based on the current membership matrix when the function value of the objective function is less than or equal to the convergence threshold, or the number of repeated executions is greater than or equal to the preset number of iterations.

[0106] The fluorescence image classification device includes a processor and a memory. The first acquisition unit 301, the second acquisition unit 302, the clustering unit 303, and the determination unit 304 mentioned above are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.

[0107] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and the classification of fluorescence images can be achieved by adjusting the kernel parameters.

[0108] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0109] This invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements a method for classifying fluorescence images.

[0110] This invention provides a processor for running a program, wherein the program executes a method for classifying fluorescence images.

[0111] like Figure 4As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring a target fluorescence image to be classified, and mapping each pixel in the target fluorescence image to the HSV color space; acquiring the hue information of each pixel in the HSV color space to obtain multiple hue information, and determining C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; performing clustering processing on the multiple hue information based on the C first cluster centers to obtain C target cluster centers, and performing segmentation processing on the target fluorescence image based on the C target cluster centers to obtain an image segmentation result; and determining the category information of the target fluorescence image based on the image segmentation result.

[0112] Optionally, determining C first cluster centers based on multiple hue information includes: sorting the multiple hue information and determining the first hue information with the first position as the first first cluster center; determining C-1 first cluster centers based on the distance between the multiple hue information and the first first cluster center; and determining C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0113] Optionally, determining C-1 first cluster centers based on the distance between multiple hue information and the first first cluster center includes: determining an interval threshold based on the distance between multiple hue information and the first first cluster center; and determining C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0114] Optionally, determining the interval threshold based on the distance between multiple hue information and the first cluster center includes: calculating the distance between multiple hue information and the first cluster center to obtain the maximum distance value; and calculating the interval threshold based on the maximum distance value and the total number of first cluster centers.

[0115] Optionally, determining C-1 first cluster centers based on the interval threshold and the first first cluster center includes: calculating the distance between multiple hue information and the first first cluster center sequentially based on the number of times the multiple hue information is arranged, and determining the second hue information as the second first cluster center, wherein the second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; determining C-2 first cluster centers based on the interval threshold and the second first cluster center; and determining C-1 first cluster centers based on the second first cluster center and C-2 first cluster centers.

[0116] Optionally, clustering multiple hue information based on C first cluster centers to obtain C target cluster centers includes: calculating the membership degree of each hue information based on the C first cluster centers to obtain a first membership matrix; and determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix.

[0117] Optionally, determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix includes: calculating the function value of the objective function based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm; if the function value of the objective function is greater than the convergence threshold, iteratively updating the C first cluster centers based on the first membership matrix to obtain C second cluster centers; repeatedly executing the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain the second membership matrix until the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations; when the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations, determining the C target cluster centers based on the current membership matrix.

[0118] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0119] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: acquiring a target fluorescence image to be classified, and mapping each pixel in the target fluorescence image to the HSV color space; acquiring the hue information of each pixel in the HSV color space, obtaining multiple hue information, and determining C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; performing clustering processing on the multiple hue information based on the C first cluster centers to obtain C target cluster centers, and performing segmentation processing on the target fluorescence image based on the C target cluster centers to obtain an image segmentation result; and determining the category information of the target fluorescence image based on the image segmentation result.

[0120] Optionally, determining C first cluster centers based on multiple hue information includes: sorting the multiple hue information and determining the first hue information with the first position as the first first cluster center; determining C-1 first cluster centers based on the distance between the multiple hue information and the first first cluster center; and determining C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

[0121] Optionally, determining C-1 first cluster centers based on the distance between multiple hue information and the first first cluster center includes: determining an interval threshold based on the distance between multiple hue information and the first first cluster center; and determining C-1 first cluster centers based on the interval threshold and the first first cluster center.

[0122] Optionally, determining the interval threshold based on the distance between multiple hue information and the first cluster center includes: calculating the distance between multiple hue information and the first cluster center to obtain the maximum distance value; and calculating the interval threshold based on the maximum distance value and the total number of first cluster centers.

[0123] Optionally, determining C-1 first cluster centers based on the interval threshold and the first first cluster center includes: calculating the distance between multiple hue information and the first first cluster center sequentially based on the number of times the multiple hue information is arranged, and determining the second hue information as the second first cluster center, wherein the second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold; determining C-2 first cluster centers based on the interval threshold and the second first cluster center; and determining C-1 first cluster centers based on the second first cluster center and C-2 first cluster centers.

[0124] Optionally, clustering multiple hue information based on C first cluster centers to obtain C target cluster centers includes: calculating the membership degree of each hue information based on the C first cluster centers to obtain a first membership matrix; and determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix.

[0125] Optionally, determining the C target cluster centers based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix includes: calculating the function value of the objective function based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm; if the function value of the objective function is greater than the convergence threshold, iteratively updating the C first cluster centers based on the first membership matrix to obtain C second cluster centers; repeatedly executing the step of calculating the membership degree of each hue information based on the C second cluster centers to obtain the second membership matrix until the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations; when the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations, determining the C target cluster centers based on the current membership matrix.

[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0128] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0130] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0131] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0132] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0133] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0134] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0135] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for classifying fluorescence images, characterized in that, include: Acquire the target fluorescence image to be classified, and map each pixel in the target fluorescence image to the HSV color space; Obtain the hue information of each pixel in the HSV color space to obtain multiple hue information, and determine C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; The multiple hue information is clustered based on the C first cluster centers to obtain C target cluster centers, and the target fluorescence image is segmented based on the C target cluster centers to obtain image segmentation results; The category information of the target fluorescence image is determined based on the image segmentation results; Based on the aforementioned hue information, C first cluster centers are determined, including: The multiple hue information is sorted, and the first hue information with the first position is determined as the first cluster center. Based on the distance between the multiple hue information and the first cluster center, C-1 first cluster centers are determined; Based on the first first cluster center and the C-1 first cluster centers, C first cluster centers are determined.

2. The method according to claim 1, characterized in that, Based on the distances between the multiple hue information and the first cluster center, C-1 first cluster centers are determined, including: An interval threshold is determined based on the distance between the multiple hue information and the first cluster center; Based on the interval threshold and the first first cluster center, the C-1 first cluster centers are determined.

3. The method according to claim 2, characterized in that, Determining the interval threshold based on the distance between the multiple hue information and the first cluster center includes: Calculate the distance between the multiple hue information and the first cluster center to obtain the maximum distance value; The interval threshold is calculated based on the maximum distance value and the total number of the first cluster centers.

4. The method according to claim 2, characterized in that, Based on the interval threshold and the first cluster center, the C-1 first cluster centers are determined to include: The distance between the multiple hue information and the first first cluster center is calculated sequentially based on the number of times the multiple hue information is arranged, and the second hue information is determined as the second first cluster center. The second hue information is the first hue information whose distance from the first first cluster center is greater than or equal to the interval threshold. Based on the interval threshold and the second first cluster center, C-2 first cluster centers are determined; Based on the second first cluster center and the C-2 first cluster centers, the C-1 first cluster centers are determined.

5. The method according to claim 2, characterized in that, Based on the C first cluster centers, the multiple hue information is clustered to obtain C target cluster centers, including: The membership degree of each hue information is calculated based on the C first cluster centers to obtain the first membership degree matrix; Based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix, the C target cluster centers are determined.

6. The method according to claim 5, characterized in that, Based on the objective function of the target clustering algorithm, the C first cluster centers, and the first membership matrix, the C target cluster centers are determined as follows: The function value of the objective function is obtained by calculating based on the first membership matrix, the C first cluster centers, and the objective function of the target clustering algorithm. If the function value of the objective function is greater than the convergence threshold, then the C first cluster centers are iteratively updated according to the first membership matrix to obtain C second cluster centers; The step of calculating the membership degree of each hue information based on the C second cluster centers to obtain the second membership degree matrix is ​​repeated until the function value of the objective function is less than or equal to the convergence threshold, or the number of repetitions is greater than or equal to the preset number of iterations. When the function value of the objective function is less than or equal to the convergence threshold, or when the number of repeated executions is greater than or equal to the preset number of iterations, the C target cluster centers are determined based on the current membership matrix.

7. A fluorescence image classification device, characterized in that, include: The first acquisition unit is used to acquire the target fluorescence image to be classified and map each pixel in the target fluorescence image to the HSV color space; The second acquisition unit is used to acquire the hue information of each pixel in the HSV color space, obtain multiple hue information, and determine C first cluster centers based on the multiple hue information, where C is a positive integer greater than 1; A clustering unit is used to perform clustering processing on the multiple hue information based on the C first cluster centers to obtain C target cluster centers, and to perform segmentation processing on the target fluorescence image based on the C target cluster centers to obtain image segmentation results; A determining unit is used to determine the category information of the target fluorescence image based on the image segmentation result; The second acquisition unit includes: a sorting subunit, used to sort the plurality of hue information and determine the first hue information with the first position as the first first cluster center; a first determining subunit, used to determine C-1 first cluster centers based on the distance between the plurality of hue information and the first first cluster center; and a second determining subunit, used to determine C first cluster centers based on the first first cluster center and the C-1 first cluster centers.

8. A computer-readable storage medium, characterized in that, The storage medium stores a program, wherein the program executes the fluorescence image classification method according to any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the fluorescence image classification method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Color extraction method based on improved K-means algorithm

    CN107818341A

  • Object color identification method and device, electronic equipment and storage medium

    CN115705662A