Method and device for detecting concentration of red blood cells in cerebrospinal fluid, computer equipment and storage medium
By scanning and color analysis of the entire cerebrospinal fluid slide, a functional relationship between red blood cells and background area was established, errors were corrected, and the accuracy of red blood cell concentration detection in cerebrospinal fluid was solved, improving detection efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGXIA MEDICAL UNIVERSITY GENERAL HOSPITAL
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-01
AI Technical Summary
In existing techniques for detecting red blood cell concentration in cerebrospinal fluid, uneven slide preparation leads to variations in the apparent area of red blood cells, affecting counting accuracy. This is especially true in low-concentration samples, where the error is significant and impacts clinical interpretation.
By scanning a slide containing cerebrospinal fluid of different cell concentrations, images were acquired, pixel regions were selected for color analysis, a functional relationship between red blood cell area and background area was established, errors were corrected, and the number and concentration of red blood cells were calculated using the functional relationship.
It improves the efficiency and accuracy of red blood cell concentration detection in cerebrospinal fluid, enhances the reliability of detection results, and solves the problem of changes in the area of individual cells caused by different degrees of compression of red blood cells by surrounding cells.
Smart Images

Figure CN121962074A_ABST
Abstract
Description
Methods, apparatus, computer equipment and storage media for detecting red blood cell concentration in cerebrospinal fluid Technical Field
[0001] This invention relates to the field of clinical neurology, and in particular to methods, apparatus, computer equipment, and storage media for detecting red blood cell concentration in cerebrospinal fluid. Background Technology
[0002] In the field of clinical neurology, accurate measurement of red blood cell concentration in cerebrospinal fluid is of great value in differentiating puncture injuries from pathological hemorrhage. Traditional detection methods mainly include manual microscopic counting and indirect estimation using automated hematology analyzers. Manual microscopic counting relies on operator experience and is easily affected by subjective judgment, field-of-view selection bias, and red blood cell morphology variations in low-concentration samples, resulting in poor repeatability. While automated instruments have the advantage of high throughput, the complex composition of cerebrospinal fluid matrix and extremely low cell concentration often lead to signal interference or ineffective identification of red blood cells, resulting in false positive or false negative results. With the development of digital pathology and image analysis technology, cell quantification methods based on whole-slice scanning and computer vision are gradually being explored for body fluid cell analysis. By combining high-resolution imaging with image processing algorithms, these methods are expected to improve the objectivity and repeatability of the detection.
[0003] However, existing image-based methods for erythrocyte quantification often employ fixed threshold segmentation or preset erythrocyte area for counting, failing to adequately consider the differences in apparent erythrocyte area caused by uneven sample thickness, fluctuations in staining intensity, or changes in background optical properties during actual slide preparation. This leads to systematic biases in the estimation of erythrocyte count per unit area, especially in low-concentration cerebrospinal fluid samples, where such errors can significantly affect clinical interpretation. To address this issue, a quantitative model capable of dynamically correcting the relationship between erythrocyte appearance characteristics and the background environment is urgently needed to achieve more accurate erythrocyte concentration retrieval. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method for detecting red blood cell concentration in cerebrospinal fluid, which solves the technical problem that the accuracy of counting is affected by the change in the apparent area of red blood cells due to uneven slide preparation in existing image analysis technology.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for detecting red blood cell concentration in cerebrospinal fluid, comprising: scanning a slide made of cerebrospinal fluid with different cell concentrations to obtain corresponding full-slide images of the cerebrospinal fluid; selecting several pixel regions of preset sizes on each of the cerebrospinal fluid full-slide images and counting the number of red blood cells in each pixel region; performing color analysis on all the pixel regions to obtain the background area and red blood cell area of each pixel region; dividing the red blood cell area corresponding to each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region; performing function fitting on the background area and the corresponding average red blood cell area corresponding to each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area; and placing the cerebrospinal fluid to be detected... The image is divided into several image blocks of the preset size; the image of the cerebrospinal fluid to be tested is an image obtained by scanning a whole slide of the cerebrospinal fluid to be tested; color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block; the background area corresponding to each image block is substituted into the function relationship to obtain the area of a single red blood cell corresponding to each image block; the area of red blood cells corresponding to each image block is divided by the area of a single red blood cell to obtain the number of red blood cells corresponding to each image block; the number of red blood cells corresponding to each image block is accumulated to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be tested; the red blood cell concentration of the cerebrospinal fluid to be tested is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be tested and the amount of cerebrospinal fluid used when preparing the slide.
[0007] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid according to the present invention, the method further includes preprocessing the sample before performing a full-slide scan on slides made from cerebrospinal fluid with different cell concentrations, including but not limited to centrifugation, filtration and specific staining to enhance the contrast between red blood cells and the background.
[0008] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid according to the present invention, when obtaining the number of red blood cells in each pixel region, an image segmentation algorithm is used to automatically identify and count red blood cells, eliminating interference from non-target cells or impurities.
[0009] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid described in this invention, the method not only considers the relationship between the area of a single red blood cell and the background area during the function fitting process, but also incorporates factors that may affect the morphological changes of red blood cells under different experimental conditions, such as pH value and temperature, to obtain a more accurate and widely applicable function relationship model.
[0010] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid according to the present invention, wherein: after performing color analysis on the image of the cerebrospinal fluid to be detected, a correction factor is introduced to adjust for errors caused by non-uniformity during the preparation process, thereby obtaining red blood cell count and concentration values that are closer to the actual values; specifically, the expression is: ;in, This is the corrected red blood cell concentration. Red blood cell concentration, This is the temperature correction factor. The actual temperature at the time of measurement. For standard reference temperature, This represents the actual average thickness of the sample during measurement. This is the standard reference thickness.
[0011] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid according to the present invention, an automated quality control module is configured to monitor key parameters in the analysis process in real time and automatically adjust the analysis process according to preset standards.
[0012] As a preferred embodiment of the method for detecting red blood cell concentration in cerebrospinal fluid according to the present invention, it further includes data recording and report generation functions, automatically saving all relevant data and analysis results of each test, and generating standardized electronic reports.
[0013] Secondly, the present invention provides a device for detecting red blood cell concentration in cerebrospinal fluid, comprising: a statistical module, a fitting module, an analysis module, and an output module; the statistical module is used to perform full-slide scanning on slides made of cerebrospinal fluid with different cell concentrations to acquire corresponding full-slide images of cerebrospinal fluid; select several pixel regions of preset sizes on each full-slide image of cerebrospinal fluid, and count the number of red blood cells in each pixel region; the fitting module is used to perform color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region; divide the red blood cell area corresponding to each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region; perform function fitting on the background area and the corresponding average red blood cell area corresponding to each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area; the analysis module is used to divide the cerebrospinal fluid image to be detected into the preset size... Several image blocks; the image of the cerebrospinal fluid to be detected is an image obtained by full-slide scanning of a slide prepared with the cerebrospinal fluid to be detected; color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block; the background area corresponding to each image block is substituted into the function relationship to obtain the area of a single red blood cell corresponding to each image block; the area of red blood cells corresponding to each image block is divided by the area of a single red blood cell corresponding to each image block to obtain the number of red blood cells corresponding to each image block; the number of red blood cells corresponding to each image block is accumulated to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be detected; the output module is used to accumulate the number of red blood cells corresponding to each image block to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be detected; the red blood cell concentration of the cerebrospinal fluid to be detected is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be detected and the amount of cerebrospinal fluid used when preparing the slide.
[0014] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein the computer program, when executed by the processor, implements any step of the method for detecting red blood cell concentration in cerebrospinal fluid as described in the first aspect of the present invention.
[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for detecting red blood cell concentration in cerebrospinal fluid as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: The above-mentioned method, apparatus, computer equipment, and computer-readable storage medium for detecting red blood cell concentration in cerebrospinal fluid (CSF) acquire corresponding full-slide images of CSF by scanning slides made of CSF with different cell concentrations; select several pixel regions of preset sizes on each CSF full-slide image and count the number of red blood cells in each pixel region; perform color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region; divide the red blood cell area corresponding to each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region; and perform function fitting on the background area and the corresponding average red blood cell area of each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area. The cerebrospinal fluid (CSF) image to be tested is divided into several image blocks of a preset size. The CSF image to be tested is obtained by scanning a full slide of the CSF to be tested. Color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block. The background area corresponding to each image block is substituted into a function relationship to obtain the area of a single red blood cell corresponding to each image block. The red blood cell area corresponding to each image block is divided by the corresponding area of a single red blood cell to obtain the number of red blood cells corresponding to each image block. The red blood cell counts corresponding to each image block are summed to obtain the number of red blood cells present in the CSF image to be tested. The red blood cell concentration of the CSF to be tested is determined based on the number of red blood cells present in the CSF image to be tested and the amount of CSF used when preparing the slide. This application evaluates the red blood cell density of each pixel region of CSF by analyzing the background area and red blood cell area, and establishes a functional relationship between the area of a single red blood cell and the background area. This solves the problem of the variation in the area of a single red blood cell caused by the different degrees of compression of red blood cells by surrounding cells when estimating the number of red blood cells using the area method. In practical applications, a full-slide scan image of a cerebrospinal fluid slide is obtained. Color analysis is used to obtain the background area and red blood cell area of all cropped images, and the total number of red blood cells in the slide is calculated to determine the red blood cell concentration of the sample. This effectively improves the detection efficiency of red blood cell concentration in cerebrospinal fluid and enhances the reliability and accuracy of the detection results. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and constitute a part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 is an application scenario diagram of the method for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of this application; Figure 2 is a flowchart of the method for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of this application; Figure 3 is a schematic diagram of a single pixel region in the method for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of this application; Figure 4 is an effect diagram of color analysis of a single pixel region in the method for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of this application; Figure 5 is a structural schematic diagram of the device for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of this application; Figure 6 is a structural schematic diagram of the computer device according to an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0019] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0020] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0021] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0022] Figure 1 illustrates an application scenario of a method for detecting red blood cell concentration in cerebrospinal fluid (CSF) according to an embodiment of this application. As shown in Figure 1, both the CSF review device 101 and the scanner 102 can transmit data via a network. The scanner 102 performs a full-slide scan of slides containing CSF of different cell concentrations to obtain corresponding full-slide images of the CSF, and then transmits these images to the CSF review device 101. After the CSF review device 101 obtains the full-slide images, it selects several pixel regions of preset sizes on each CSF full-slide image and counts the number of red blood cells in each pixel region. Color analysis is performed on all pixel regions to obtain the background area and red blood cell area of each pixel region. The red blood cell area corresponding to each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region. A function is fitted to the background area and the average red blood cell area corresponding to each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area. The CSF review device 101 also divides the CSF image to be tested into several image blocks of preset sizes. The image to be tested is... The image is obtained by scanning the entire slide of the cerebrospinal fluid to be tested. Color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block. The background area corresponding to each image block is substituted into a function to obtain the area of a single red blood cell corresponding to each image block. The red blood cell area corresponding to each image block is divided by the area of a single red blood cell to obtain the number of red blood cells corresponding to each image block. Finally, the cerebrospinal fluid review device 101 sums up the number of red blood cells corresponding to each image block to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be tested. The red blood cell concentration of the cerebrospinal fluid to be tested is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be tested and the amount of cerebrospinal fluid used when preparing the slide.
[0023] This application provides a method for detecting red blood cell concentration in cerebrospinal fluid, as shown in Figure 2. The method includes the following steps: Step S210, scanning a glass slide made of cerebrospinal fluid with different cell concentrations to obtain corresponding full-slide images of cerebrospinal fluid; selecting several pixel regions of preset size on each full-slide image of cerebrospinal fluid, and counting the number of red blood cells in each pixel region.
[0024] Figure 3 is a schematic diagram of a single pixel region in the cerebrospinal fluid red blood cell concentration detection method provided in this application. It can be understood that the pixel region selected on the whole cerebrospinal fluid image is usually a region that can reflect the characteristics of the current whole cerebrospinal fluid image.
[0025] Step S220: Perform color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region; divide the red blood cell area of each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area of each pixel region; perform function fitting on the background area and the average red blood cell area of each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area.
[0026] Figure 4 shows the effect of color analysis on a single pixel region in the method for detecting red blood cell concentration in cerebrospinal fluid provided in this application. The green part represents the background region, and the red part represents the red blood cell region. Through color analysis, the background area and red blood cell area of each pixel region can be accurately obtained. It can be understood that after obtaining the functional relationship between the area of a single red blood cell and the background area through the above steps, the functional relationship between the area of a single red blood cell and the background area can be reused. When detecting the red blood cell concentration in cerebrospinal fluid again, it is not necessary to obtain the functional relationship between the area of a single red blood cell and the background area again. Instead, steps S230 and S240 can be directly performed to complete the detection of red blood cell concentration in cerebrospinal fluid.
[0027] Step S230: Divide the cerebrospinal fluid image to be tested into several image blocks of a preset size; the cerebrospinal fluid image to be tested is an image obtained by scanning a whole slide of the cerebrospinal fluid to be tested; perform color analysis on each image block to obtain the background area and red blood cell area corresponding to each image block; substitute the background area corresponding to the image block into the function relationship to obtain the area of a single red blood cell corresponding to each image block; and divide the red blood cell area corresponding to each image block by the area of a single red blood cell to obtain the number of red blood cells corresponding to each image block.
[0028] Step S240: The number of red blood cells corresponding to each image block is accumulated to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be detected; the red blood cell concentration of the cerebrospinal fluid to be detected is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be detected and the amount of cerebrospinal fluid to be detected used when preparing the slide.
[0029] Specifically, assuming the number of red blood cells corresponding to each image patch is summed to obtain a total of 10,000 red blood cells in the cerebrospinal fluid image to be tested, and assuming the cerebrospinal fluid used to prepare the slide is 100 μL, then the red blood cell concentration in the cerebrospinal fluid to be tested is 10,000 / 100 = 100 / μL. Further, assuming the cerebrospinal fluid used to prepare the slide is 100 μL diluted 5 times, then the red blood cell concentration in the cerebrospinal fluid to be tested is 10,000 / 100 × 5 = 500 / μL.
[0030] In existing technologies, the cerebrospinal fluid sample to be tested is processed manually or directly dripped into a hemocytometer and counted manually under a high-power microscope. The whole process is cumbersome and time-consuming, which seriously affects the detection efficiency of red blood cell concentration in cerebrospinal fluid.
[0031] To address the aforementioned issues, this application proposes a method for detecting red blood cell concentration in cerebrospinal fluid (CSF). The method involves scanning a slide containing CSF of varying cell concentrations to obtain corresponding full-slide images. Several pixel regions of preset sizes are selected within each CSF full-slide image, and the number of red blood cells within each pixel region is counted. Color analysis is performed on all pixel regions to obtain the background area and red blood cell area for each region. The red blood cell area corresponding to each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area for each pixel region. A function is fitted to the background area and the average red blood cell area for each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area. The CSF to be tested is then... The image is divided into several image blocks of a preset size; the image of the cerebrospinal fluid to be tested is obtained by scanning the entire slide prepared from the cerebrospinal fluid; color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block; the background area corresponding to each image block is substituted into a function relationship to obtain the area of a single red blood cell corresponding to each image block; the red blood cell area corresponding to each image block is divided by the corresponding area of a single red blood cell to obtain the number of red blood cells corresponding to each image block; the red blood cell numbers corresponding to each image block are summed to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be tested; the red blood cell concentration of the cerebrospinal fluid to be tested is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be tested and the amount of cerebrospinal fluid used when preparing the slide. This application evaluates the red blood cell density of each pixel region by analyzing the background area and red blood cell area of each pixel region of the cerebrospinal fluid, and establishes a functional relationship between the area of a single red blood cell and the background area, thus solving the problem of the variation in the area of a single cell caused by the different degrees of compression of red blood cells by surrounding cells when estimating the number of red blood cells using the area method. In practical applications, a full-slide scan image of a cerebrospinal fluid slide is obtained. Color analysis is used to obtain the background area and red blood cell area of all cropped images, and the total number of red blood cells in the slide is calculated to determine the red blood cell concentration of the sample. This effectively improves the detection efficiency of red blood cell concentration in cerebrospinal fluid and enhances the reliability and accuracy of the detection results.
[0032] Figure 5 is a schematic diagram of a device for detecting red blood cell concentration in cerebrospinal fluid according to an embodiment of the present invention. As shown in Figure 5, a device 30 for detecting red blood cell concentration in cerebrospinal fluid is provided. The device includes a statistical module 31, a fitting module 32, an analysis module 33, and an output module 34. The statistical module 31 is used to perform full-slide scanning on slides made of cerebrospinal fluid with different cell concentrations to obtain corresponding full-slide images of cerebrospinal fluid. Several pixel regions of preset size are selected on each full-slide image of cerebrospinal fluid, and the number of red blood cells in each pixel region is counted. The fitting module 32 is used to perform color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region. The red blood cell area corresponding to each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region. The background area and the average red blood cell area corresponding to each pixel region are fitted with a function to obtain the functional relationship between the area of a single red blood cell and the background area. The system includes an analysis module 33, which divides the cerebrospinal fluid (CSF) image to be tested into several image blocks of a preset size. The CSF image to be tested is an image obtained by scanning a full slide of the CSF to be tested. Color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block. The background area corresponding to each image block is substituted into a function relationship to obtain the area of a single red blood cell corresponding to each image block. The area of red blood cells corresponding to each image block is divided by the area of a single red blood cell corresponding to each image block to obtain the number of red blood cells corresponding to each image block. The number of red blood cells corresponding to each image block is accumulated to obtain the number of red blood cells present in the CSF image to be tested. The output module 34 is used to accumulate the number of red blood cells corresponding to each image block to obtain the number of red blood cells present in the CSF image to be tested. The red blood cell concentration of the CSF to be tested is determined based on the number of red blood cells present in the CSF image to be tested and the amount of CSF used when preparing the slide.
[0033] The above-mentioned detection of red blood cell concentration in cerebrospinal fluid (CSF) involves scanning slides containing CSF of different cell concentrations to obtain corresponding full-slide images. Several pixel regions of preset sizes are selected on each CSF full-slide image, and the number of red blood cells in each pixel region is counted. Color analysis is performed on all pixel regions to obtain the background area and red blood cell area of each pixel region. The red blood cell area corresponding to each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region. A function is fitted to the background area and the average red blood cell area corresponding to each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area. The CSF image to be tested is divided into preset... The method involves analyzing several image blocks of varying sizes. The image of the cerebrospinal fluid (CSF) to be tested is obtained by scanning a full-slide slide containing the CSF. Color analysis is performed on each image block to obtain the corresponding background area and red blood cell area. The background area of each image block is then used in a functional relationship to obtain the area of a single red blood cell in each image block. The red blood cell area of each image block is divided by the area of a single red blood cell to obtain the number of red blood cells in each image block. The red blood cell counts of each image block are summed to obtain the total number of red blood cells present in the CSF image. The red blood cell concentration of the CSF to be tested is determined based on the number of red blood cells in the image and the amount of CSF used in preparing the slide. This application assesses the red blood cell density in each pixel region of the CSF by analyzing the background area and red blood cell area, establishing a functional relationship between the area of a single red blood cell and the background area. This solves the problem of variations in the area of a single red blood cell caused by different degrees of compression from surrounding cells when estimating the number of red blood cells using area methods. In practical applications, a full-slide scan image of a cerebrospinal fluid slide is obtained. Color analysis is used to obtain the background area and red blood cell area of all cropped images, and the total number of red blood cells in the slide is calculated to determine the red blood cell concentration of the sample. This effectively improves the detection efficiency of red blood cell concentration in cerebrospinal fluid and enhances the reliability and accuracy of the detection results.
[0034] It should be noted that the above modules can be functional modules or program modules, and can be implemented in software or hardware. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or they can be stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0035] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram is shown in Figure 6. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores a set of preset configuration information. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the aforementioned method for detecting red blood cell concentration in cerebrospinal fluid.
[0036] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a method for detecting red blood cell concentration in cerebrospinal fluid. The display screen may be a liquid crystal display (LCD) or an e-ink display. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0037] Those skilled in the art will understand that the structure shown in Figure 6 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0038] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program performs the following steps: scanning a slide made of cerebrospinal fluid with different cell concentrations to obtain corresponding full-slide images of the cerebrospinal fluid; selecting several pixel regions of preset sizes on each full-slide image of the cerebrospinal fluid and counting the number of red blood cells in each pixel region; performing color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region; dividing the red blood cell area corresponding to each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region; and performing function fitting on the background area and the average red blood cell area corresponding to each pixel region to obtain the function relating the area of a single red blood cell to the background area. The process involves: dividing the cerebrospinal fluid (CSF) image into several image blocks of a preset size; the CSF image is obtained by scanning a full slide of the CSF to be tested; performing color analysis on each image block to obtain the background area and red blood cell area corresponding to each image block; substituting the background area of the image block into a function to obtain the area of a single red blood cell in each image block; dividing the red blood cell area of each image block by the area of a single red blood cell to obtain the number of red blood cells in each image block; summing the number of red blood cells in each image block to obtain the number of red blood cells present in the CSF image; and determining the red blood cell concentration of the CSF based on the number of red blood cells present in the CSF image and the amount of CSF used when preparing the slide.
[0039] The aforementioned storage medium acquires full-slide images of cerebrospinal fluid (CSF) slides prepared with different cell concentrations by scanning them. Several pixel regions of preset sizes are selected within each CSF image, and the number of red blood cells in each pixel region is counted. Color analysis is performed on all pixel regions to obtain the background area and red blood cell area of each region. The red blood cell area of each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area of each pixel region. A function is fitted to the background area and the average red blood cell area of each pixel region to obtain the functional relationship between the area of a single red blood cell and the background area. The CSF image to be tested is then divided into several pre-set sizes. The image is a dry image patch; the image of the cerebrospinal fluid to be tested is obtained by scanning the entire slide of the cerebrospinal fluid to be tested. Color analysis is performed on each image patch to obtain the background area and red blood cell area corresponding to each image patch. The background area corresponding to the image patch is substituted into a function relationship to obtain the area of a single red blood cell corresponding to each image patch. The red blood cell area corresponding to each image patch is divided by the corresponding area of a single red blood cell to obtain the number of red blood cells corresponding to each image patch. The red blood cell counts corresponding to each image patch are summed to obtain the number of red blood cells present in the image of the cerebrospinal fluid to be tested. The red blood cell concentration of the cerebrospinal fluid to be tested is determined based on the number of red blood cells present in the image of the cerebrospinal fluid to be tested and the amount of cerebrospinal fluid used when preparing the slide. This application evaluates the red blood cell density of each pixel region of the cerebrospinal fluid by analyzing the background area and red blood cell area of each pixel region, and establishes a functional relationship between the area of a single red blood cell and the background area. This solves the problem of the variation in the area of a single cell caused by the different degrees of compression of red blood cells by surrounding cells when estimating the number of red blood cells using the area method. In practical applications, a full-slide scan image of a cerebrospinal fluid slide is obtained. Color analysis is used to obtain the background area and red blood cell area of all cropped images, and the total number of red blood cells in the slide is calculated to determine the red blood cell concentration of the sample. This effectively improves the detection efficiency of red blood cell concentration in cerebrospinal fluid and enhances the reliability and accuracy of the detection results.
[0040] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0041] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0042] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0043] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A method for detecting red blood cell concentration in cerebrospinal fluid, characterized in that: The method includes: scanning a slide containing cerebrospinal fluid of different cell concentrations to obtain corresponding full-slide images of the cerebrospinal fluid; selecting several pixel regions of preset sizes on each full-slide image of the cerebrospinal fluid and counting the number of red blood cells in each pixel region; performing color analysis on all pixel regions to obtain the background area and red blood cell area of each pixel region; and dividing the red blood cell area corresponding to each pixel region by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region. The background area and the average red blood cell area corresponding to each pixel region are fitted with a function to obtain the functional relationship between the area of a single red blood cell and the background area; the cerebrospinal fluid image to be tested is divided into several image blocks of the preset size; the cerebrospinal fluid image to be tested is an image obtained by scanning a glass slide made of the cerebrospinal fluid to be tested; color analysis is performed on each image block to obtain the background area and red blood cell area corresponding to each image block; the background area corresponding to each image block is substituted into the functional relationship to obtain the area of a single red blood cell corresponding to each image block; the area of red blood cells corresponding to each image block is divided by the area of a single red blood cell to obtain the number of red blood cells corresponding to each image block; the number of red blood cells corresponding to each image block is accumulated to obtain the number of red blood cells present in the cerebrospinal fluid image to be tested; the red blood cell concentration of the cerebrospinal fluid to be tested is determined based on the number of red blood cells present in the cerebrospinal fluid image to be tested and the amount of cerebrospinal fluid used when preparing the glass slide.
2. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 1, characterized in that: Before performing a full-slide scan on slides made from cerebrospinal fluid of varying cell concentrations, the process includes sample pretreatment, including but not limited to centrifugation, filtration, and specific staining to enhance the contrast between red blood cells and the background.
3. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 2, characterized in that: When obtaining the number of red blood cells in each pixel region, an image segmentation algorithm is used to automatically identify and count red blood cells, eliminating interference from non-target cells or impurities.
4. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 3, characterized in that: Based on the fact that the function fitting process not only considers the relationship between the area of a single red blood cell and the background area, but also incorporates factors that may affect the morphological changes of red blood cells under different experimental conditions, such as pH value and temperature, a more accurate and widely applicable function relationship model is obtained.
5. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 4, characterized in that: After performing color analysis on the cerebrospinal fluid image to be tested, a correction factor is introduced to adjust for errors caused by inhomogeneities during the preparation process, resulting in red blood cell counts and concentrations that are closer to the actual values. Specifically, the expression is: ;in, This is the corrected red blood cell concentration. Red blood cell concentration, This is the temperature correction factor. The actual temperature at the time of measurement. For standard reference temperature, This represents the actual average thickness of the sample during measurement. This is the standard reference thickness.
6. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 5, characterized in that: It is equipped with an automated quality control module that monitors key parameters in the analysis process in real time and automatically adjusts the analysis process according to preset standards.
7. The method for detecting red blood cell concentration in cerebrospinal fluid as described in claim 6, characterized in that: It also includes data recording and report generation functions, automatically saving all relevant data and analysis results for each test, and generating standardized electronic reports.
8. A device for detecting red blood cell concentration in cerebrospinal fluid, based on the method for detecting red blood cell concentration in cerebrospinal fluid according to any one of claims 1 to 7, characterized in that: The device includes a statistics module, a fitting module, an analysis module, and an output module. The statistics module is used to perform full-slide scanning on slides prepared with cerebrospinal fluid of different cell concentrations to acquire corresponding full-slide images of the cerebrospinal fluid. Several pixel regions of preset sizes are selected on each of the full-slide images of the cerebrospinal fluid, and the number of red blood cells in each pixel region is counted. The fitting module is used to perform color analysis on all the pixel regions to obtain the background area and red blood cell area of each pixel region. The red blood cell area corresponding to each pixel region is divided by the corresponding number of red blood cells to obtain the average red blood cell area corresponding to each pixel region. The background area and the average area of red blood cells corresponding to each pixel region are fitted with a function to obtain the functional relationship between the area of a single red blood cell and the background area; the analysis module is used to divide the cerebrospinal fluid image to be detected into several image blocks of the preset size; the cerebrospinal fluid image to be detected is an image obtained by full-slide scanning of a glass slide containing the cerebrospinal fluid to be detected; color analysis is performed on each image block to obtain the background area and the red blood cell area corresponding to each image block; the background area corresponding to each image block is substituted into the functional relationship to obtain the single red blood cell area corresponding to each image block. The area of each image patch is divided by the area of the corresponding red blood cell to obtain the number of red blood cells corresponding to each image patch; the number of red blood cells corresponding to each image patch is accumulated to obtain the number of red blood cells present in the cerebrospinal fluid image to be detected; the output module is used to accumulate the number of red blood cells corresponding to each image patch to obtain the number of red blood cells present in the cerebrospinal fluid image to be detected; the red blood cell concentration of the cerebrospinal fluid to be detected is determined based on the number of red blood cells present in the cerebrospinal fluid image to be detected and the amount of cerebrospinal fluid used when preparing the slide.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for detecting red blood cell concentration in cerebrospinal fluid according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for detecting red blood cell concentration in cerebrospinal fluid as described in any one of claims 1 to 7.