A method for detecting, identifying and counting cerebrospinal fluid cell images

By calculating the gradient value and local contrast change rate of cerebrospinal fluid cell images, and combining the region growing algorithm and cluster analysis, the problem of inaccurate cerebrospinal fluid cell image recognition in the existing technology is solved, the accurate counting of normal and abnormal cells is achieved, and the accuracy of the diagnostic report is improved.

CN119559455BActive Publication Date: 2025-09-23THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510132137.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-09-23
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

In the existing technology, the cerebrospinal fluid cell image recognition method based on machine learning cannot accurately identify the cell edges when identifying convexities or concavities in cerebrospinal fluid cell images, resulting in inaccurate cerebrospinal fluid cell counts and affecting the accuracy of cytological diagnosis reports.

Method used

By acquiring digital images of cerebrospinal fluid cell smears, the gradient value and local contrast change rate of each pixel are calculated. Combined with the degree of cell morphological abnormality, the region growing algorithm and cluster analysis are used to identify and count normal and abnormal cells.

Benefits of technology

It improves the accuracy of cerebrospinal fluid cell image recognition, can accurately distinguish normal and abnormal cells, provide more accurate cell counting results, and help medical staff identify the patient's condition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559455B_ABST
    Figure CN119559455B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting, identifying and counting cerebrospinal fluid cell images. First, a high-quality digital image of a cerebrospinal fluid cell smear is obtained through a microscope. Then, the edges and other areas that distinguish cells in the image are revealed by calculating the gradient value. Furthermore, the local contrast change rate is calculated to accurately capture the microscopic changes in the cell image and effectively distinguish normal cells from cells with abnormal morphology. Then, the normal cells and abnormal cells are counted to obtain a counting result, which can better help medical staff identify the patient's condition and provide powerful patient medical record information for subsequent medical assistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cell counting, and in particular to a method for detecting, identifying and counting cerebrospinal fluid cell images. Background Art

[0002] Cerebrospinal fluid cytology examination is the "gold standard" for the diagnosis of meningeal carcinomatosis and is of great significance for the early diagnosis of meningeal carcinomatosis.

[0003] Cytology report To issue a reliable cytology diagnosis report, it is necessary to understand the patient's clinical manifestations, diagnosis and treatment process and relevant laboratory test results. After comprehensive analysis, the cytology manifestations should be described and laboratory diagnosis opinions or suggestions should be given.

[0004] The laboratory test results are mainly based on the identification and counting of cerebrospinal fluid cells through image detection to obtain the laboratory test results.

[0005] Currently, image detection of cerebrospinal fluid (CSF) cells is primarily performed based on machine learning algorithms for image detection, identification, and counting. Automated image processing and analysis techniques are used to improve the efficiency and accuracy of cell counting. Currently, machine learning-based CSF cell image recognition methods generally employ deep learning algorithms, such as convolutional neural networks (CNNs), to detect and classify cells through trained models. These methods can improve the speed of cell recognition to a certain extent, but they still face some technical drawbacks. In particular, when individual CSF cells in a CSF cell image undergo mutations, resulting in protrusions or depressions, the machine learning algorithm cannot accurately identify the edges of these CSF cell images, and thus cannot accurately identify the complete CSF cell image. Consequently, accurate CSF cell counting is impossible, which greatly complicates the acquisition of cytological diagnostic reports. Summary of the Invention

[0006] The purpose of the present invention is to provide a method for detecting, identifying and counting cerebrospinal fluid cell images, which solves the above-mentioned technical problems pointed out in the prior art.

[0007] The present invention provides a method for detecting, identifying and counting cerebrospinal fluid cell images, comprising the following steps:

[0008] Acquire digital images of cerebrospinal fluid cell smears;

[0009] Obtaining a digital image pixel gradient value corresponding to each digital image pixel according to a grayscale value difference between adjacent digital image pixels in the digital image of the cerebrospinal fluid cell smear;

[0010] Analyze the local directional gradient in the preset neighborhood window of each digital image pixel to obtain the local contrast change rate of each digital image pixel;

[0011] Identifying and counting cell images in the digital image based on the local contrast change rate combined with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result;

[0012] The counting results include the number of normal cell types counted and the number of abnormal cell types counted.

[0013] Preferably, the identifying and counting of cell images in the digital image based on the local contrast change rate in combination with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result comprises the following steps:

[0014] Acquire a connection area of ​​digital image pixel points according to the local contrast change rate, and obtain the degree of cell morphological abnormality of the cerebrospinal fluid cell smear according to the distribution characteristics corresponding to the connection area;

[0015] According to the degree of abnormal cell morphology and the local contrast change rate corresponding to each digital image pixel, the value of the regional influence factor on the pixel change is analyzed and calculated;

[0016] Obtaining a cell characteristic value for each pixel point in the digital image according to the gradient value of the pixel point in the digital image and the value of the influence factor of the region on the pixel point change;

[0017] Clustering is performed based on the cell feature values ​​to obtain multiple clusters; based on the clusters and the connected areas and in combination with a region growing algorithm, the clusters and the connected areas are merged and supplemented to obtain multiple cell images; and based on the cell images and the degree of cell morphological abnormality, the cell images are counted to obtain counting results.

[0018] Preferably, the calculation method of the value of the influence factor of the region on the pixel change is: ;

[0019] Where, and is the weight coefficient; The degree of abnormal cell morphology; is the local contrast change rate;

[0020] The cell characteristic value is calculated as follows: ;

[0021] Where, is the gradient value of the digital image pixel; is the value of the influence factor of the region on the pixel change; and is the weight coefficient, and .

[0022] Preferably, the step of merging and supplementing the clusters and the connected regions based on the clusters and the connected regions in combination with a region growing algorithm to obtain a plurality of cell images comprises the following steps:

[0023] acquiring a first cell image based on each of the clusters;

[0024] performing region growing on edge pixel points corresponding to the first cell image to obtain a second cell image;

[0025] Constructing a boundary point set based on second edge pixel points of the second cell image;

[0026] Calculate and obtain the spatial fusion degree R of the boundary point set and the connection area;

[0027] The second cell image and the connection area are merged based on the spatial fusion degree R to obtain a cell image.

[0028] Preferably, performing region growing on edge pixels corresponding to the first cell image to obtain the second cell image comprises the following steps:

[0029] After labeling the first cell image and the digital image, the first evaluation value and the second evaluation value are obtained by analysis and calculation;

[0030] An iterative analysis region growing operation is performed based on the first evaluation value and the second evaluation value in combination with the edge pixel points to obtain a second cell image.

[0031] Preferably, the step of analyzing and calculating the first evaluation value and the second evaluation value based on the labeling of the first cell image and the digital image comprises the following steps:

[0032] labeling each of the first cell images to obtain a cell image label;

[0033] Obtaining cell image labels of first cell pixels corresponding to each of the first cell images based on the cell image labels;

[0034] Based on all digital pixels in the digital image, a plurality of unlabeled pixels are obtained by removing all first cell pixels;

[0035] Constructing an unlabeled pixel point set based on all the unlabeled pixel points;

[0036] A first influencing evaluation factor is obtained by calculating based on the brightness value of each of the first cell pixels in the first cell image. ; Calculate the second influencing factor based on the brightness value of the unlabeled pixel ;

[0037] The first influencing evaluation factor is based on the brightness value of each of the first cell pixels in the first cell image. Calculate the first judgment value Based on the brightness value of the unlabeled pixel and the second influencing factor Calculate the second judgment value .

[0038] Preferably, the first influencing factor The calculation method is:

[0039] ;

[0040] Where y is the brightness value of the first cell pixel; is the total number of pixels; The total number of pixels in the first cell;

[0041] The second influencing factor The calculation method is: ;

[0042] Where x is the brightness value of the unlabeled pixel; e is the total number of unlabeled pixels;

[0043] The calculation method of the first evaluation value is: ;

[0044] The second evaluation value is calculated as follows: .

[0045] Preferably, the iterative analysis region growing operation based on the first evaluation value and the second evaluation value combined with the edge pixel points to obtain the second cell image includes the following steps:

[0046] performing a multi-factor analysis based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain an edge pixel point sequence set; sequentially traversing each edge pixel point based on the order of each edge pixel point in the edge pixel point sequence set, and calculating a first local brightness contrast ratio based on each unlabeled pixel point in the eight neighboring pixel points corresponding to the ti-th edge pixel point;

[0047] Calculating a second local brightness contrast ratio between a neighboring pixel corresponding to the cth unlabeled pixel in the current neighborhood and the tith edge pixel; and screening a number of the unlabeled pixels having a brightness contrast ratio less than or equal to the first local brightness contrast ratio as candidate pixels based on the second local brightness contrast ratio;

[0048] Determine whether the number a of the candidate pixels is greater than or equal to a preset minimum number threshold of candidate pixels; if so, use the candidate pixels as supplementary pixels to be determined;

[0049] Obtain a new first cell image to be determined based on the supplementary pixel points to be determined and the first cell image; obtain a new unlabeled pixel point set to be determined based on the new first cell image pixel points to be determined corresponding to the new first cell image to be determined and the digital image;

[0050] Calculating a first evaluation value change rate based on the brightness value of each new first cell image pixel to be determined in the new first cell image to be determined and the first evaluation value; calculating a second evaluation value change rate based on the brightness value of each new unlabeled pixel in the new unlabeled pixel set to be determined and the second evaluation value;

[0051] Determine whether the rate of change of the first judgment value is less than the rate of change of the second judgment value; if so, determine the to-be-determined supplementary pixel point as a target supplementary pixel point, and merge the target supplementary pixel point into the first cell image to obtain a second cell image; and obtain a new unlabeled pixel point set based on the second cell image; update the second judgment value based on the brightness value of each second cell image pixel point in the second cell image or the brightness value of each new unlabeled pixel point in the new unlabeled pixel point set to obtain a new second judgment value;

[0052] Determine whether all edge pixels have been traversed; if so, stop the iteration and output each of the second cell images; if not, return to the above step to continue the traversal operation until all edge pixels have been traversed and multiple second cell images are output.

[0053] Preferably, the step of performing a multi-factor analysis based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain the edge pixel point sequence set comprises the following steps:

[0054] Traversing each of the edge pixels, and calculating the edge pixel contrast coefficient F based on the brightness value of the edge pixel and the brightness values ​​of the neighboring pixels of the edge pixel;

[0055] Calculating a regional connectivity feature C based on the number of first cell pixels in the neighborhood of the edge pixel, the number of window pixels within a preset window range of the edge pixel, and the number of first cell pixels in the window pixel;

[0056] Obtaining the coordinates of each first cell pixel point, and calculating the center point coordinates of each first cell image and the average radius R of the first cell image based on the coordinates of the first cell pixel points; calculating the center distance based on the coordinates of the edge pixel points and the center point coordinates of the first cell image corresponding to the edge pixel points; calculating the regional pixel density based on the number of first cell pixels within the preset window range; and calculating the distribution feature D based on the regional pixel density, the average radius R, the center distance, and a preset target density;

[0057] Calculating the edge pixel processing priority L based on the edge pixel contrast coefficient F, the region connectivity feature C, and the distribution feature D;

[0058] The edge pixel points are sorted from high to low based on the edge pixel point processing priority L to obtain an edge pixel point sequence set.

[0059] Preferably, the edge pixel contrast coefficient is calculated as follows: ;

[0060] Where, is the brightness value of the edge pixel; is the average brightness value of the neighboring pixels of the edge pixel; G is the gradient value of the edge pixel; is the maximum gradient value in the digital image;

[0061] The calculation method of the regional connectivity feature C is: ;

[0062] Where, is the number of first cell pixels in the neighborhood of the edge pixel; is the number of the first cell pixel in the window pixel; is the number of pixels in the window;

[0063] The distribution characteristic D is calculated as follows: ;

[0064] Where d is the center distance; is the mean radius; is the regional pixel density; is the target density;

[0065] The edge pixel processing priority L is calculated as follows:

[0066] ;

[0067] Where α1, β1 and γ1 are weight coefficients.

[0068] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:

[0069] Analysis of the above-mentioned method for detecting, identifying and counting cerebrospinal fluid cell images provided by the present invention shows that, in specific applications, a high-quality digital image of a cerebrospinal fluid cell smear is first obtained through a microscope, and then the edges and other areas that distinguish cells in the image are revealed by calculating the gradient value; further, by calculating the local contrast change rate, the microscopic changes in the cell image are accurately captured, and normal cells and morphologically abnormal cells are effectively distinguished; then, the normal cells and abnormal cells are counted to obtain the counting results, which can better help medical staff identify the patient's condition and provide powerful patient medical record information for subsequent medical assistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 A schematic diagram of the main process of a method for detecting, identifying and counting cerebrospinal fluid cell images;

[0071] Figure 2 A schematic diagram of the simulation of intracranial medulloblastoma cell morphology in a method for detecting, identifying and counting cerebrospinal fluid cell images;

[0072] Figure 3 A schematic diagram of an operation flow for obtaining a second cell image in a method for detecting, identifying and counting cerebrospinal fluid cell images;

[0073] Figure 4 A schematic diagram of a simulation of the edges of unrecognized cell images in a method for detecting, identifying and counting cerebrospinal fluid cell images. DETAILED DESCRIPTION

[0074] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0075] The present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0076] like Figure 1As shown, an embodiment of the present invention provides a method for detecting, identifying and counting cerebrospinal fluid cell images, comprising the following steps:

[0077] Step S10: obtaining a digital image of the cerebrospinal fluid cell smear;

[0078] It should be noted that the above-mentioned embodiment of the present application first obtains a high-resolution digital image of the cell smear through a microscope (the microscope can be an electronic cytometer or electron microscope with electronic high-definition image photography and recording functions). Through the high-quality image, the morphology, structure and other characteristics of the cell can be captured, providing clear basic data for subsequent analysis.

[0079] Step S20: obtaining a digital image pixel gradient value corresponding to each digital image pixel according to a grayscale value difference between adjacent digital image pixels of each digital image pixel in the digital image of the cerebrospinal fluid cell smear;

[0080] It should be noted that in the above embodiments of the present application, the gradient value is an important indicator for measuring the change in pixel brightness in an image. Generally, the edge or boundary area in an image has a large grayscale value change, and a large gradient value can help distinguish the edge of a cell from other areas.

[0081] Specifically, the embodiment of the present application quantifies the brightness change of each pixel by calculating the grayscale difference between adjacent pixels to obtain a gradient value. Areas with larger gradient values ​​usually indicate cell edges or areas with more obvious structural changes.

[0082] Step S30: Analyze the local directional gradient in the preset neighborhood window of each digital image pixel to obtain the local contrast change rate of each digital image pixel;

[0083] It should be noted that the above-mentioned embodiment of the present application further analyzes the local contrast change rate of each pixel in the image. By presetting a neighborhood window around each pixel and calculating the local directional gradient within the window, the local contrast changes in different areas of the cell image can be more accurately captured. This is an important feature of the analysis of cell morphological changes. The local contrast change rate reflects the texture changes in the local area of ​​the image and can be used to identify structural changes within the cell (i.e., the above-mentioned local contrast change rate, such as sharpening of cell boundaries, structural distortion, etc.); this information is very necessary for cell recognition and abnormal cell detection.

[0084] Step S40: identifying and counting the cell images in the digital image based on the local contrast change rate combined with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result;

[0085] The counting results include the number of normal cell types counted and the number of abnormal cell types counted;

[0086] It should be noted that the above-mentioned embodiment of the present application analyzes the local contrast change rate in the image and combines the gradient value in the image to identify and count cells, identify cell images from the image, and distinguish them into normal cells and abnormal cells (abnormal cells refer to tumor cells, such as intracranial germ cell tumor cells, intracranial medulloblastoma cells, metastatic rhabdomyosarcoma cells, atypical teratoid rhabdoid tumor cells, etc.);

[0087] Cell image counting is based on image features (such as morphological changes, boundary features, contrast changes, etc.). By combining these features, normal and abnormal cells can be effectively detected and counted. Abnormal cells usually have irregular morphology, deformation, or different local contrast change rates. These characteristics and features will be used to determine whether the cells are abnormal.

[0088] Specifically, if Figure 2 As shown, taking the morphology of intracranial medulloblastoma cells among abnormal cells as an example, it is manifested as tumor-like protrusions visible on some cell membranes. Conventional image segmentation processing operations are difficult to identify and segment these tumor-like protrusions. The technical solution adopted in the embodiment of the present application performs comprehensive recognition based on the morphological changes, boundary characteristics, and contrast changes of intracranial medulloblastoma cells, and more accurately identifies their edges, thereby accurately segmenting each intracranial medulloblastoma cell, thereby accurately and conveniently performing subsequent cell counting processing.

[0089] The above-mentioned embodiment of the present application first obtains a high-quality digital image of a cerebrospinal fluid cell smear through a microscope, and then reveals the edges and other areas of the image that distinguish cells by calculating the gradient value; further, by calculating the local contrast change rate, the microscopic changes in the cell image are accurately captured, and normal cells and morphologically abnormal cells are effectively distinguished; then, the normal cells and abnormal cells are counted to obtain the counting results, which can better help medical staff identify the patient's condition and provide powerful patient medical record information for subsequent medical assistance.

[0090] Specifically, in step S40, the cell images in the digital image are identified and counted based on the local contrast change rate combined with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result, including the following steps:

[0091] Step S41: obtaining a connection area of ​​digital image pixel points according to the local contrast change rate, and obtaining the degree of cell morphological abnormality of the cerebrospinal fluid cell smear according to the distribution characteristics corresponding to the connection area;

[0092] It should be noted that the aforementioned connected regions refer to the continuous curve obtained by fitting the cosine similarity between the local contrast change rates of the aforementioned adjacent digital image pixels in the image, and further, the connected regions obtained based on the continuous curve; each "connected region" represents a cell or a part of a cell;

[0093] The above-mentioned distribution characteristics refer to the geometric distribution of these connection areas in the digital image, including information such as cell shape, size, and position. Normal cells may present a symmetrical and regular morphology, while abnormal cells may exhibit irregular shapes, size changes, deformations, and other characteristics. The degree of cell morphological abnormality: Based on the distribution characteristics of these connection areas, the degree of cell morphological abnormality is calculated. If the cell morphology undergoes pathological changes, such as cell deformation, uneven size, and structural abnormalities, it indicates that the degree of cell morphological abnormality is high. The degree of morphological abnormality is quantified by comparing the morphological characteristics of normal cells with those of abnormal cells.

[0094] Step S42: Analyzing and calculating the influence factor value of the region on the pixel change based on the degree of cell morphological abnormality and the local contrast change rate corresponding to each digital image pixel (i.e., setting an influence factor value that can reflect the overall comprehensive change in the morphology of each cell pixel in the region);

[0095] It should be noted that the above-mentioned embodiment of the present application calculates the value of the regional influence factor on the pixel point change based on the local area where the pixel point is located (the local area is the local area corresponding to the degree of cell morphological abnormality of the connected area and the local contrast change rate of the local area). The pixels in each area jointly affect the cell morphological change in the area and reflect the degree of cell morphological abnormality as a whole. In layman's terms, the connected area obtained by fitting the continuous curve based on the local contrast change rate and cosine similarity can be understood as a local area of ​​the cell. The pixel points in this area can be used to comprehensively calculate the value of the regional influence factor on the pixel point change based on the local characteristics.

[0096] The calculation method of the influence factor of the above area on the pixel change is: ;

[0097] Where, and is the weight coefficient; The degree of abnormal cell morphology; is the local contrast change rate.

[0098] Step S43: obtaining a cell characteristic value of each pixel point in the digital image according to the gradient value of the pixel point in the digital image and the value of the influence factor of the region on the pixel point change;

[0099] The cell characteristic value is calculated as follows: ;

[0100] Where, is the gradient value of the digital image pixel; is the value of the influence factor of the region on the pixel change; and is the weight coefficient, and ;

[0101] It should be noted that the gradient value is an important parameter for measuring brightness changes in an image. In cell images, areas with larger gradient values ​​generally represent edges or contours in the image. By calculating the gradient value of each pixel, the location of the cell edge and its changes can be found. Cell eigenvalue: The cell eigenvalue of each pixel is calculated based on the gradient value of the pixel and the value of the region's influence factor on the pixel's changes. This eigenvalue represents a comprehensive feature of the cell region corresponding to the pixel, combining the morphological changes of the region (through the degree of abnormality), the edge characteristics of the cell (through the gradient value), and the importance of the cell in the image (through the value of the region's influence factor on the pixel's changes).

[0102] Step S44: clustering is performed based on the cell feature values ​​to obtain a plurality of clusters; based on the clusters and the connected regions and in combination with a region growing algorithm, the clusters and the connected regions are merged and supplemented to obtain a plurality of cell images; and the cell images are counted based on the cell images and the degree of abnormal cell morphology to obtain a counting result.

[0103] It should be noted that the above-mentioned embodiment of the present application can first effectively distinguish normal cells from abnormal cells and quantify the degree of morphological abnormality of cells through the division and morphological analysis of connected areas, thereby providing an important basis for subsequent cell counting and pathological analysis; further, by calculating the value of the influence factor of the region on the pixel change, each pixel has a different influence on the cell morphological analysis, thereby making the area with large cell morphological changes (such as abnormal cells) have a greater impact on the overall analysis results, thereby improving the accuracy of cell abnormality detection; further, in particular, by comprehensively considering multiple features (gradient value, local weight), a comprehensive feature value is provided for each pixel, and the accuracy of cell recognition is effectively improved, so that each pixel in the image is more accurately located in the cell morphological analysis; further, through cluster analysis, the cells in the image are effectively separated from the background and other non-cellular areas, providing a reliable basis for cell counting, and combined with the degree of cell morphological abnormality, further distinguishing normal cells from abnormal cells, and providing more accurate results for cell counting.

[0104] Specifically, in step S44, based on the clusters and the connected regions, the clusters and the connected regions are merged and supplemented in combination with a region growing algorithm to obtain a plurality of cell images, including the following steps:

[0105] Step S441: acquiring a first cell image based on each of the clusters;

[0106] It should be noted that the first cell image is constructed by the numerical image pixels corresponding to each cluster. That is to say, the digital image pixels corresponding to each cluster constitute a first cell image. However, in these first cell images, there are still some first cell images with missing edges due to the clustering of the clusters. Therefore, it is necessary to supplement their edges.

[0107] Step S442: performing region growing on edge pixel points corresponding to the first cell image to obtain a second cell image;

[0108] Step S443: constructing a boundary point set based on the second edge pixel points of the second cell image;

[0109] Step S444: Calculate and obtain the spatial fusion degree R of the boundary point set and the connection area;

[0110] The calculation method of the spatial fusion degree R is: ;

[0111] Where A represents the set of boundary points; B represents the connected area;

[0112] Step S445: merging the second cell image and the connection region based on the spatial fusion degree R to obtain a cell image.

[0113] It should be noted that the above-mentioned embodiment of the present application first obtains a first cell image by clustering the pixel points in the bounding box of the cluster, and then, based on the presence of edge missing conditions in the first cell image, performs region growing processing on the edge pixel points to obtain a second cell image, so that the cell contour is clearer; further, by extracting and constructing a set of boundary points, the boundary of the cell is clearly defined, providing accurate input for the subsequent spatial fusion calculation; then, by calculating the spatial fusion degree R between the boundary point set and the connected area (the clustered area in the first cell image), that is, measuring the similarity or consistency between the two, the degree of overlap between the boundary point set and the connected area is determined, thereby judging whether the boundary accurately matches the cell area; finally, according to the calculated spatial fusion degree R, the degree of fusion of the second cell image and the connected area is judged, and the images are merged based on the fusion degree to generate a more complete and accurate cell image. By referring to the spatial fusion degree, the merging process can minimize errors, ensure that the generated image is accurate in cell morphology and spatial distribution, and generate a final complete cell image.

[0114] Specifically, if Figure 3 As shown, in step S442, region growing is performed on edge pixels corresponding to the first cell image to obtain a second cell image, which includes the following steps:

[0115] Step S4421: analyzing and calculating the first evaluation value and the second evaluation value based on the labeling of the first cell image and the digital image;

[0116] Step S4422: performing an iterative analysis region growing operation based on the first evaluation value and the second evaluation value in combination with the edge pixel points to obtain a second cell image;

[0117] It should be noted that if Figure 4 As shown, the bold lines and points in the figure are the edges of the unrecognized cell images; the above-mentioned embodiment of the present application first marks each pixel in the first cell image to distinguish different areas, clarify the cell area and background information, and can also identify edge pixels and non-edge pixels to avoid erroneous operations on the background or irrelevant areas in subsequent operations;

[0118] Furthermore, by quantifying the relationship between edge pixels and other regions using the first and second judgment values, it is possible to determine whether the edge pixels accurately represent the cell contours and whether further region growing processing is required. Then, through the region growing method, the similarity between the edge pixels and their surroundings is utilized to gradually expand and merge the regions of the edge pixels of the first cell image until a complete cell contour (i.e., the second cell image mentioned above) is formed, effectively filling in the missing or incomplete regions of cell edges caused by cluster deviation. In particular, for abnormal cells (such as medulloblastoma cells), special morphologies such as tumorous protrusions of the cells can be better identified and represented, making the division of cell regions clearer and the edges smoother, thereby improving the quality of cell images.

[0119] Specifically, in step S4421, the first evaluation value and the second evaluation value are obtained by analyzing and calculating the labeled first cell image and the digital image, including the following steps:

[0120] Step S44211: labeling each of the first cell images to obtain a cell image label;

[0121] Step S44212: obtaining a cell image label of a first cell pixel corresponding to each first cell image based on the cell image label;

[0122] Step S44213: obtaining a plurality of unlabeled pixels by removing all the first cell pixels based on all the digital pixels in the digital image;

[0123] Step S44214: constructing an unlabeled pixel point set based on all the unlabeled pixel points;

[0124] Step S44215: Calculate the first influencing evaluation factor based on the brightness value of each of the first cell pixels in the first cell image ; Calculate the second influencing factor based on the brightness value of the unlabeled pixel ;

[0125] Step S44216: The first influencing evaluation factor is determined based on the brightness value of each of the first cell pixels in the first cell image. Calculate the first judgment value Based on the brightness value of the unlabeled pixel and the second influencing factor Calculate the second judgment value ;

[0126] The first influencing factor The calculation method is (quantifying the brightness level of the cell area, thus reflecting the significance or quality of the cell): ;

[0127] Where y is the brightness value of the first cell pixel; is the total number of pixels (including the first cell pixel and unlabeled pixels); The total number of pixels in the first cell;

[0128] The second influencing factor The calculation method of is (reflecting the brightness characteristics of the background): ;

[0129] Where x is the brightness value of the unlabeled pixel; e is the total number of unlabeled pixels;

[0130] The calculation method of the first evaluation value is (reflecting the brightness deviation of the cell area and its consistency with the expected value): ;

[0131] The second evaluation value is calculated as follows (reflecting the brightness deviation of the unlabeled area and its impact on the overall image quality): ;

[0132] It should be noted that the above-mentioned embodiment of the present application first labels the cell image and assigns a unique label to the pixels in each cell image so that the area of ​​each cell can be tracked during subsequent processing, providing a clear basic framework for subsequent identification, analysis and segmentation, so that each cell area can be processed and analyzed separately, avoiding the mixing of different cell areas; further, each pixel point in the cell image is associated with the corresponding cell image label to ensure that the pixel point in each cell image can be associated with a specific cell label, so as to facilitate the accurate calculation of the lighting, morphological characteristics, etc. of the cell area, and avoid misjudgment or loss of information; further, by removing the cell pixels that have been labeled, the accurate distinction between the background and non-cell areas is guaranteed, avoiding affecting the subsequent cell Boundary extension and morphological recognition; then, the screened unlabeled pixels are collected into a set, providing a preliminary "candidate region" for the subsequent steps of region growing and cell boundary extension; further, by calculating the brightness values ​​of the first cell pixel and the unlabeled pixel, the first influencing evaluation factor and the second influencing evaluation factor are obtained. The first influencing evaluation factor and the second influencing evaluation factor reflect the brightness changes of the cell area and help determine which unlabeled pixels may belong to the cell area, providing a quantitative standard for the accurate segmentation of cells; finally, by combining the brightness values ​​of the cell pixels and the influencing evaluation factors, the first evaluation value and the second evaluation value are calculated, providing a powerful evaluation standard for the accurate identification of morphologically abnormal cells (such as intracranial medulloblastoma cells).

[0133] Specifically, in step S4422, an iterative analysis region growing operation is performed based on the first evaluation value and the second evaluation value in combination with the edge pixel points to obtain a second cell image, including the following operation steps:

[0134] Step S44221: performing a multi-factor analysis based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain an edge pixel point sequence set; traversing each edge pixel point in sequence based on the order of each edge pixel point in the edge pixel point sequence set, and calculating a first local brightness contrast ratio based on each unlabeled pixel point in the eight neighboring pixels corresponding to the ti-th edge pixel point;

[0135] Step S44222: Calculate the second local brightness contrast between the neighboring pixel corresponding to the cth unlabeled pixel in the current neighborhood pixel point and the tith edge pixel point; and select a number of the unlabeled pixels having a brightness contrast less than or equal to the first local brightness contrast as candidate pixels based on the second local brightness contrast;

[0136] Step S44223: determining whether the number a of the candidate pixels is greater than or equal to a preset minimum number threshold of candidate pixels; if so (if not, the candidate pixels are considered to be internal pixels of the cell image and the next processing operation is shelved), the candidate pixels are used as supplementary pixels to be determined;

[0137] Step S44224: obtaining a new first cell image to be determined based on the supplementary pixel points to be determined and the first cell image; obtaining a new unlabeled pixel set to be determined based on the new first cell image pixel points to be determined corresponding to the new first cell image to be determined and the digital image;

[0138] Step S44225: Calculating a first evaluation value change rate based on the brightness value of each pixel point of the new first cell image to be determined and the first evaluation value; calculating a second evaluation value change rate based on the brightness value of each new unlabeled pixel point in the new unlabeled pixel point set to be determined and the second evaluation value;

[0139] Step S44226: Determine whether the rate of change of the first evaluation value is less than the rate of change of the second evaluation value. If so (if not, it is determined to be a pixel point inside the cell image and the next processing operation is shelved), determine the to-be-determined supplementary pixel point as a target supplementary pixel point, and merge the target supplementary pixel point into the first cell image to obtain a second cell image; and obtain a new unlabeled pixel point set based on the second cell image; update the second evaluation value based on the brightness value of each second cell image pixel point in the second cell image or the brightness value of each new unlabeled pixel point in the new unlabeled pixel point set to obtain a new second evaluation value;

[0140] Step S44227: Determine whether all edge pixels have been traversed; if so, stop the iteration and output each of the second cell images; if not, return to the above step S44221 to continue the traversal operation until all edge pixels have been traversed and multiple second cell images are output.

[0141] It should be noted that the above-mentioned embodiment of the present application first combines the coordinates, brightness values, and edge pixels of the digital image pixels to obtain a set of edge pixel sequence points through multi-factor analysis, determines the positions of the edge pixels, and sorts them. This provides a structured sequence for subsequent cell boundary recognition and segmentation, and helps to gradually track changes in cell boundaries, especially for cells with abnormal morphology (such as intracranial medulloblastoma cells with tumor-like protrusions);

[0142] Furthermore, by calculating the local brightness contrast between the neighborhood pixels (8 neighborhoods) of the ti-th edge pixel and the unlabeled pixels one by one, the unlabeled pixels with brightness contrast less than or equal to the first local brightness contrast are screened out as candidate pixels. Through the analysis of brightness contrast, the pixels located near the edge and with similar brightness characteristics are effectively identified, and the extended area of ​​the cell edge is identified, especially for the identification of the cell protrusion area with irregular morphology. Furthermore, the number of candidate pixels is judged. If the number of candidate pixels is greater than or equal to the preset minimum threshold, these pixels are considered to be target pixels to be supplemented, ensuring that the screening of candidate pixels is not over-filtered. , ensuring that important edge pixels are not missed; by gradually updating the cell image and the set of unlabeled pixels, the cell boundary can be expanded more finely and the segmentation result can be gradually improved; further, the accuracy of cell segmentation is reflected by calculating the rate of change of the judgment value, ensuring that the boundary changes in the segmentation process are reasonable and effectively avoiding over-segmentation or omissions, which is especially important for cells with complex morphology (such as tumor-like protrusions); then, by dynamically judging the rate of change of the judgment value, the accuracy of the supplemented pixels is ensured, and the cell segmentation results are further optimized to ensure more accurate image segmentation, especially for those abnormal cells with complex morphology.

[0143] Specifically, in step S44221, a multi-factor analysis is performed based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain an edge pixel point sequence set, including the following operation steps:

[0144] Step S442211: traverse each edge pixel point, and calculate the edge pixel contrast coefficient F based on the brightness value of the edge pixel point and the brightness values ​​of the neighboring pixels of the edge pixel point;

[0145] The edge pixel contrast coefficient is calculated as follows: ;

[0146] Where, is the brightness value of the edge pixel; is the average brightness value of the neighboring pixels of the edge pixel; G is the gradient value of the edge pixel; is the maximum gradient value in the digital image;

[0147] It should be noted that the higher the contrast coefficient of the above-mentioned edge pixel point, the more it proves that the edge pixel point is the key position of the cell boundary. Prioritizing the key positions of the cell boundary can process more obvious cell images more quickly, thereby screening out some unlabeled pixels that are easy to process (i.e., the edge missing part in the first cell image), thereby reducing the subsequent processing and calculation pressure.

[0148] Step S442212: calculating the regional connectivity feature C based on the number of first cell pixels in the neighborhood pixels of the edge pixel, the number of window pixels within the preset window range of the edge pixel, and the number of first cell pixels in the window pixels;

[0149] The calculation method of the regional connectivity feature C is: ;

[0150] Where, is the number of first cell pixels in the neighborhood of the edge pixel; is the number of the first cell pixel in the window pixel; The number of pixels in the window;

[0151] It should be noted that in the above-mentioned embodiment of the present application, the larger the regional connectivity feature C is, the better the connectivity of the edge pixel point is, and the edge pixel points with better connectivity can be processed preferentially to ensure the connectivity of the regional growth.

[0152] Step S442213: Obtain the coordinates of each first cell pixel point, and calculate the center point coordinates of each first cell image and the average radius R of the first cell image based on the coordinates of the first cell pixel points; calculate the center distance based on the coordinates of the edge pixel points and the center point coordinates of the first cell image corresponding to the edge pixel points; calculate the regional pixel density based on the number of first cell pixels within the preset window range; calculate the distribution feature D based on the regional pixel density, the average radius R, the center distance, and the preset target density;

[0153] The distribution characteristic D is calculated as follows: ;

[0154] Where d is the center distance; is the mean radius; is the regional pixel density; is the target density;

[0155] It should be noted that the larger the distribution feature D is, the more reasonable the distribution of cell pixels is. Edge pixels with a more reasonable distribution can be processed first to avoid excessive expansion or contraction of cells, thereby maintaining a reasonable spatial distribution and making subsequent analysis and calculation more accurate.

[0156] Step S442214: Calculating the edge pixel processing priority L based on the edge pixel contrast coefficient F, the region connectivity feature C, and the distribution feature D;

[0157] The edge pixel processing priority L is calculated as follows: ;

[0158] Where α1, β1 and γ1 are weight coefficients;

[0159] Step S442215: sorting the edge pixels from high to low based on the edge pixel processing priority L to obtain an edge pixel sequence set;

[0160] It should be noted that the above-mentioned embodiment of the present application achieves efficient sorting of edge pixels by comprehensively considering the edge pixel contrast coefficient F, the region connectivity feature C and the distribution feature D, thereby accelerating the recognition and analysis speed of the second cell image.

[0161] In summary, the present invention proposes a method for detecting, identifying, and counting cerebrospinal fluid cell images. High-quality digital images of cerebrospinal fluid cell smears are acquired through a microscope. Gradient values ​​are then calculated to reveal the edges and other regions within the image that distinguish cells. Furthermore, the method accurately captures microscopic changes in the cell image by calculating the local contrast change rate, effectively distinguishing normal cells from morphologically abnormal cells. Furthermore, the normal and abnormal cells are counted to obtain a count result, which can better assist medical staff in identifying the patient's condition and provide powerful patient medical history information for subsequent medical assistance.

[0162] In particular, by comprehensively considering multiple features (gradient value, local weight), a comprehensive feature value is provided for each pixel point. Combined with the degree of cell morphological abnormality, normal cells are distinguished from abnormal cells, providing more accurate results for cell counting;

[0163] During the specific operation, clusters and connected regions are combined with the region growing algorithm to merge and supplement to generate the final complete cell image;

[0164] During specific execution, the first evaluation value and the second evaluation value are comprehensively calculated by using the brightness values ​​of the labeled pixels and the unlabeled pixels of the first cell image, and an iterative analysis region growing operation is performed in combination with the edge pixels to obtain the second cell image. The edge pixel contrast coefficient F, the regional connectivity feature C, and the distribution feature D are comprehensively considered to construct an edge pixel sequence set to accelerate the recognition and analysis speed of the second cell image. In combination with the local brightness contrast, the second cell image is gradually completed by dynamically judging the rate of change of the evaluation value, effectively filling the area where the cell edge is missing or incomplete due to cluster deviation.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. A person skilled in the art may modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting, identifying and counting cerebrospinal fluid cell images, characterized in that: The steps are as follows: Acquire digital images of cerebrospinal fluid cell smears; Obtaining a digital image pixel gradient value corresponding to each digital image pixel according to a grayscale value difference between adjacent digital image pixels in the digital image of the cerebrospinal fluid cell smear; Analyze the local directional gradient in the preset neighborhood window of each digital image pixel to obtain the local contrast change rate of each digital image pixel; Identifying and counting cell images in the digital image based on the local contrast change rate combined with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result; The counting results include the number of normal cell types counted and the number of abnormal cell types counted; The method of identifying and counting the cell images in the digital image based on the local contrast change rate in combination with the degree of cell morphological abnormality and the digital image pixel gradient value to obtain a counting result includes the following steps: Acquire a connection area of ​​digital image pixel points according to the local contrast change rate, and obtain the degree of cell morphological abnormality of the cerebrospinal fluid cell smear according to the distribution characteristics corresponding to the connection area; According to the degree of abnormal cell morphology and the local contrast change rate corresponding to each digital image pixel, the value of the regional influence factor on the pixel change is analyzed and calculated; Obtaining a cell characteristic value for each pixel point in the digital image according to the gradient value of the pixel point in the digital image and the value of the influence factor of the region on the pixel point change; Clustering is performed based on the cell feature values ​​to obtain a plurality of clusters; based on the clusters and the connected regions, the clusters and the connected regions are merged and supplemented in combination with a region growing algorithm to obtain a plurality of cell images; and counting the cell images based on the cell images and the degree of abnormal cell morphology to obtain a counting result; The calculation method of the influence factor value of the region on the pixel change is: ; Where, and is the weight coefficient; The degree of abnormal cell morphology; is the local contrast change rate; The cell characteristic value is calculated as follows: ; Where G' is the gradient value of the digital image pixel; is the value of the influence factor of the region on the pixel change; and is the weight coefficient, and + =1; The step of merging and supplementing the clusters and the connected regions based on the clusters and the connected regions in combination with a region growing algorithm to obtain a plurality of cell images includes the following steps: acquiring a first cell image based on each of the clusters; performing region growing on edge pixel points corresponding to the first cell image to obtain a second cell image; Constructing a boundary point set based on second edge pixel points of the second cell image; Calculate and obtain the spatial fusion degree R of the boundary point set and the connection area; The second cell image and the connection area are merged based on the spatial fusion degree R to obtain a cell image.

2. The method for detecting, identifying and counting cerebrospinal fluid cell images according to claim 1, characterized in that: The step of performing region growing on edge pixels corresponding to the first cell image to obtain a second cell image comprises the following steps: After labeling the first cell image and the digital image, the first evaluation value and the second evaluation value are obtained by analysis and calculation; An iterative analysis region growing operation is performed based on the first evaluation value and the second evaluation value in combination with the edge pixel points to obtain a second cell image.

3. The method for detecting, identifying and counting cerebrospinal fluid cell images according to claim 2, characterized in that: The step of analyzing and calculating the first evaluation value and the second evaluation value after labeling the first cell image and the digital image comprises the following steps: labeling each of the first cell images to obtain a cell image label; Obtaining cell image labels of first cell pixels corresponding to each of the first cell images based on the cell image labels; Based on all digital pixels in the digital image, a plurality of unlabeled pixels are obtained by removing all first cell pixels; Constructing an unlabeled pixel point set based on all the unlabeled pixel points; A first influencing evaluation factor is obtained by calculating based on the brightness value of each of the first cell pixels in the first cell image. ; Calculate the second influencing factor based on the brightness value of the unlabeled pixel ; The first influencing evaluation factor is based on the brightness value of each of the first cell pixels in the first cell image. Calculate the first judgment value ; Based on the brightness value of the unlabeled pixel and the second influencing evaluation factor Calculate the second judgment value .

4. The method for detecting, identifying and counting cerebrospinal fluid cell images according to claim 3, characterized in that: The first influencing factor The calculation method is: ; Where y is the brightness value of the first cell pixel; is the total number of pixels; The total number of pixels in the first cell; The second influencing factor The calculation method is: ; Where x is the brightness value of the unlabeled pixel; e is the total number of unlabeled pixels; The calculation method of the first evaluation value is: ; The second evaluation value is calculated as follows: 。 5. The method for detecting, identifying and counting cerebrospinal fluid cell images according to claim 4, characterized in that: The step of performing an iterative analysis region growing operation based on the first evaluation value and the second evaluation value in combination with the edge pixel points to obtain a second cell image includes the following steps: performing a multi-factor analysis based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain an edge pixel point sequence set; sequentially traversing each edge pixel point based on the order of each edge pixel point in the edge pixel point sequence set, and calculating a first local brightness contrast ratio based on each unlabeled pixel point in the eight neighboring pixel points corresponding to the ti-th edge pixel point; Calculating a second local brightness contrast ratio between a neighboring pixel corresponding to the cth unlabeled pixel in the current neighborhood and the tith edge pixel; and screening a number of the unlabeled pixels having a brightness contrast ratio less than or equal to the first local brightness contrast ratio as candidate pixels based on the second local brightness contrast ratio; Determine whether the number a of the candidate pixels is greater than or equal to a preset minimum number threshold of candidate pixels; if so, use the candidate pixels as supplementary pixels to be determined; Obtaining a new first cell image to be determined based on the supplementary pixel points to be determined and the first cell image; Obtaining a new set of unlabeled pixels to be determined based on the new first cell image pixel points to be determined corresponding to the new first cell image to be determined and the digital image; Calculating a first judgment value change rate based on the brightness value of each pixel point of the new first cell image to be determined and the first judgment value in the new first cell image to be determined; Calculating a second evaluation value change rate based on the brightness value of each new unlabeled pixel in the set of new unlabeled pixels to be determined and the second evaluation value; Determining whether the first evaluation value change rate is less than the second evaluation value change rate, and if so, determining the to-be-determined supplementary pixel point as a target supplementary pixel point, and merging the target supplementary pixel point into the first cell image to obtain a second cell image; and obtaining a new unlabeled pixel point set based on the second cell image; Updating the second evaluation value based on the brightness value of each second cell image pixel in the second cell image or the brightness value of each new unlabeled pixel in the new unlabeled pixel set to obtain a new second evaluation value; Determine whether all edge pixels have been traversed; if so, stop the iteration and output each of the second cell images; if not, return to the above step to continue the traversal operation until all edge pixels have been traversed and multiple second cell images are output.

6. The method for detecting, identifying and counting cerebrospinal fluid cell images according to claim 5, characterized in that: The step of performing a multi-factor analysis based on the coordinates of each digital image pixel point in the digital image and the brightness value of each digital image pixel point in combination with the edge pixel points to obtain an edge pixel point sequence set includes the following steps: Traversing each of the edge pixels, and calculating the edge pixel contrast coefficient F based on the brightness value of the edge pixel and the brightness values ​​of the neighboring pixels of the edge pixel; Calculating a regional connectivity feature C based on the number of first cell pixels in the neighborhood of the edge pixel, the number of window pixels within a preset window range of the edge pixel, and the number of first cell pixels in the window pixel; Obtaining the coordinates of each first cell pixel point, and calculating the center point coordinates of each first cell image and the average radius R of the first cell image based on the coordinates of the first cell pixel point; and calculating the center distance based on the coordinates of the edge pixel point and the center point coordinates of the first cell image corresponding to the edge pixel point; Calculating the regional pixel density based on the number of first cell pixels within the preset window range; Calculating a distribution feature D based on the regional pixel density, the average radius R, the center distance, and a preset target density; Calculating the edge pixel processing priority L based on the edge pixel contrast coefficient F, the region connectivity feature C, and the distribution feature D; The edge pixel points are sorted from high to low based on the edge pixel point processing priority L to obtain an edge pixel point sequence set.

Citation Information

Patent Citations

  • Lesion cell image segmentation method and device, equipment and storage medium

    CN116596954A