Method for calculating red blood cell parameters
Patent Information
- Application Number
- CN202610831507.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]然而,现有数字图像分析法受到硬件条件的限制,通常难以获取高分辨率图像
[0040]1、圆度计算方案相比依赖低分辨率图像直接分类的现有技术,显著提高了红细胞形态特征(与圆的相似度)的测量精度。该方案能够在较小图像上以高于传统AI模型的精度反映红细胞形状变化,并提供标准化、可量化比对的形态指标。
Smart Images

Figure CN122835937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical testing technology, and in particular to a method for calculating red blood cell parameters. Background Technology
[0002] In the field of urinalysis, digital image analysis is one of the mainstream methodologies for routine urinalysis. This method classifies red blood cells in urine based on morphological characteristics, mainly into three categories: homogeneous (normal morphology) red blood cells, heterogeneous (abnormal morphology) red blood cells, and mixed red blood cells. Homogeneous red blood cells refer to those with relatively consistent morphology, size, and hemoglobin content under a microscope, accounting for ≥70%; heterogeneous red blood cells refer to those with predominantly abnormal morphology, varying sizes, uneven hemoglobin content distribution, and pleomorphic changes, accounting for ≥70%; mixed red blood cells refer to those containing both of the above categories but not meeting any of the aforementioned criteria in proportion. Clinically, homogeneous red blood cells are generally considered more common in non-renal hematuria, while heterogeneous red blood cells are more common in renal hematuria. Therefore, the assessment of red blood cell morphology homogeneity and heterogeneity has important clinical reference value for differentiating renal hematuria.
[0003] However, existing digital image analysis methods are limited by hardware conditions and often struggle to acquire high-resolution images. Because red blood cells are small in size within the formed elements of urine, subtle changes in their morphology pose a significant challenge to classification algorithms. Current techniques still exhibit some subclassification errors in red blood cell morphology recognition, directly affecting the accuracy of judging the homogeneity and heterogeneity of red blood cell populations, and potentially impacting the differential diagnosis of the source of clinical hematuria. Summary of the Invention
[0004] The purpose of this invention is to provide a method for calculating red blood cell parameters, which aims to provide a more accurate and reliable quantitative basis for distinguishing red blood cell homogeneity and heterogeneity, so as to overcome the judgment bias caused by image quality and recognition error in the prior art.
[0005] To achieve the above objectives, the present invention provides a method for calculating red blood cell parameters, comprising the following steps:
[0006] Calculate the color intensity of red blood cells;
[0007] Calculate the roundness of red blood cells;
[0008] The chroma and roundness are used as quantitative criteria for judging the homogeneity of red blood cells;
[0009] The step of calculating the color intensity of red blood cells includes:
[0010] Select red blood cells facing forward from the red blood cell images that have already been cut and classified by the instrument's original algorithm;
[0011] The selected positive red blood cells were segmented, and intact cell regions were extracted.
[0012] Calculate the sum of the gray values of all pixels within the complete cell region;
[0013] Obtain the background grayscale value of the original image;
[0014] Based on the background grayscale value, the sum of the grayscale values is corrected using a pre-fitted illumination correction function to obtain the corrected grayscale value;
[0015] Based on a pre-established mapping relationship related to hemoglobin concentration, the corrected grayscale value is converted into a quasi-chromatic value;
[0016] The quasi-chromaticity values are standardized and mapped to the [0,1] interval to obtain standardized chromaticity values;
[0017] The step of calculating the roundness of red blood cells includes:
[0018] Select red blood cells facing forward from the red blood cell images that have already been cut and classified by the instrument's original algorithm;
[0019] The selected positive red blood cells are segmented, and their complete edge contours are extracted;
[0020] An ellipse is fitted to the point set of the edge contour to obtain a fitted ellipse;
[0021] The root mean square error between the actual distance from the contour point to the center of the fitted circle and the theoretical radius at the corresponding angle is calculated and used as the roundness value.
[0022] The quasi-roundness value is standardized and mapped to the [0,1] interval to obtain the standardized roundness value.
[0023] The process of selecting red blood cells facing forward is achieved using a classification algorithm.
[0024] Specifically, obtaining the background grayscale value of the original image involves:
[0025] Analyze the grayscale histogram of the original image and define the grayscale value that appears most frequently as the background grayscale value.
[0026] The standardization process stretches the valid interval to [0,1] and compresses the invalid interval.
[0027] The root mean square error of the radial distance is calculated according to the following formula:
[0028] in, This represents the actual distance from the contour point to the center of the fitted ellipse. To fit the theoretical radius of the ellipse at the corresponding angle.
[0029] The sum of grayscale values is the sum of pixel values calculated under the pre-selected color channel that is most correlated with hemoglobin concentration.
[0030] The present invention provides a method for calculating red blood cell parameters, wherein the colorimetric calculation method includes:
[0031] 1. A classification algorithm can be used to select cells facing the front from red blood cell images as the calculation target, eliminating measurement interference caused by the different morphology and optical properties of red blood cells on the side.
[0032] 2. A cutting algorithm can be used to accurately segment the edges of the selected positive red blood cells, ensuring the accuracy of the subsequent calculation area.
[0033] 3. To eliminate the influence of illumination differences in microscope imaging, image background brightness is introduced as a variable into the calculation model. By establishing a correction relationship between background brightness and the sum of gray levels in cell regions, systematic errors caused by changes in light source are compensated for, thus improving consistency.
[0034] 4. Calibration is performed using the hemoglobin (HGB) concentration measured by a blood cell analyzer as a benchmark. A linear relationship between the fitted cell grayscale information and the hemoglobin concentration is established, making the final colorimetric value a quantitative indicator directly related to the hemoglobin content.
[0035] Roundness calculation method:
[0036] 1. A classification algorithm was used to select cells facing the front from the red blood cell image as the calculation target, eliminating measurement interference caused by the different morphology and optical properties of red blood cells on the side.
[0037] 2. Use a cutting algorithm to perform precise edge segmentation on the selected positive red blood cells to ensure the accuracy of the subsequent calculation area.
[0038] 3. The root mean square error (RMSE) of the actual distance from the contour point to the fitted circle center and the theoretical radius at the corresponding angle is calculated as the core metric to effectively reduce the impact of outliers caused by errors on the results.
[0039] The present invention has the following beneficial effects:
[0040] 1. Compared to existing technologies that rely on direct classification of low-resolution images, the roundness calculation scheme significantly improves the measurement accuracy of red blood cell morphological features (similarity to a circle). This scheme can reflect red blood cell shape changes with higher accuracy than traditional AI models on smaller images and provides standardized, quantifiable morphological indicators for comparison.
[0041] 2. Establish a calibration relationship between colorimetry and hemoglobin (HGB) concentration measured by a blood cell analyzer, and comprehensively consider brightness factors to make the extracted parameters have a more direct and stable correlation with the homogeneity / heterogeneity of red blood cells.
[0042] 3. This solution can provide new parameters for existing instruments based on digital image analysis, and can improve the judgment of red blood cell homogeneity without relying on expensive high-resolution imaging hardware upgrades. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0044] Figure 1 This is a flowchart of the method for calculating red blood cell parameters according to the present invention.
[0045] Figure 2 This is a flowchart of the method for calculating red blood cell colorimetry according to the present invention.
[0046] Figure 3 This is a flowchart of the calculation of red blood cell roundness according to the present invention. Detailed Implementation
[0047] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, but should not be construed as limiting the present invention.
[0048] First embodiment:
[0049] This invention provides a method for calculating red blood cell parameters, comprising the following steps:
[0050] S1: Calculate the chromaticity of red blood cells;
[0051] S2: Calculate the roundness of red blood cells;
[0052] S3: Use the color and roundness as quantitative criteria for judging the uniformity of red blood cells.
[0053] The step of calculating the color intensity of red blood cells includes:
[0054] S11: Select red blood cells facing the front from the red blood cell images that have been cut and classified in the instrument's original algorithm.
[0055] Specifically, the screening of red blood cells facing forward is achieved using classification algorithms (such as traditional classification algorithms SVM, decision trees, or AI classification models).
[0056] In this embodiment, an AI classification model is used to select cells facing the front from the segmented red blood cell images as the calculation target, thus eliminating measurement interference caused by the different morphology and optical properties of red blood cells on the side.
[0057] S12: Segment the selected positive red blood cells and extract the intact cell regions.
[0058] Specifically, red blood cell segmentation algorithms (such as the traditional gradient and threshold combination method, Otsu's algorithm, or AI-based semantic segmentation models) are used to accurately extract complete cell regions along cell edges, ensuring the accuracy of subsequent calculation regions.
[0059] In this embodiment, the segmentation is implemented using a semantic segmentation model.
[0060] S13: Calculate the sum of the gray values of all pixels within the complete cell region.
[0061] In this embodiment, based on the complete cell region extracted in S12, the sum of the gray values of all pixels within that region is calculated. The grayscale value is a pixel value calculated under a pre-selected color channel that has the highest correlation with hemoglobin concentration. This color channel is selected as follows: under fixed lighting conditions, a dataset is prepared using blood samples with good homogeneity, and cell images of samples with different hemoglobin (HGB) concentrations measured by a blood cell analyzer are statistically analyzed. The sum of pixel values in multiple color channels, including R, G, B and H, S, V, are calculated. Through correlation analysis, the channel data with the highest correlation to the hemoglobin (HGB) result is selected as the basis for subsequent colorimetric calculations.
[0062] S14: Obtain the background grayscale value of the original image.
[0063] Specifically, the grayscale histogram of the original image is statistically analyzed, and the grayscale value that appears most frequently is defined as the background grayscale value.
[0064] In this embodiment, the grayscale histogram of the original images captured by the camera is statistically analyzed, and the grayscale value with the highest frequency is defined as the background color (bg), which serves as the reference parameter for subsequent illumination correction.
[0065] S15: Based on the background grayscale value, the sum of the grayscale values is corrected using a pre-fitted illumination correction function to obtain the corrected grayscale value.
[0066] In this embodiment, the illumination correction function is pre-fitted in the following way: a dataset is prepared using blood samples with good homogeneity, multiple sets of images are acquired under different illumination conditions, and the background grayscale value of each set of images is statistically analyzed. The sum of gray values of the cell regions Analyze the relationship between the two and fit the result to obtain the correction function. This function can eliminate systematic errors caused by changes in light source, making images acquired under different lighting conditions comparable.
[0067] S16: Based on a pre-established mapping relationship related to hemoglobin concentration, the corrected grayscale value is converted into a quasi-chromaticity value.
[0068] In this embodiment, using the hemoglobin concentration measured by a blood cell analyzer as a benchmark, multiple groups of samples with different hemoglobin concentrations are used to obtain their corrected grayscale values, and the mapping relationship between the corrected grayscale values and the hemoglobin concentration is fitted. Where i is the sample number; bg i The background color of the sample; sum_gray i The sum of grayscale values of the red blood cells on the front of the sample is represented by f1; f1 is the correction function used to correct sum_gray. i Remove background color bg from the same sample i For sum_gray i The effect; f2 is the corrected sum_gray i The mapping relationship with HGB can be linear or non-linear; volume represents the sample volume. This mapping relationship converts the corrected grayscale values into quasi-chromatic values directly related to hemoglobin content.
[0069] S17: The quasi-chromaticity values are standardized and mapped to the [0,1] interval to obtain standardized chromaticity values.
[0070] In this embodiment, a piecewise linear stretching process based on sample statistics is used for standardization: stretching the effective range, compressing the ineffective range, and mapping the final result to the range [0, 1]. Extreme values outside the effective range are compressed to the boundary, and finally, the chromaticity calculation function is obtained. Among them, bg i : The background color of the sample; sum_gray i f1: The mean of the sum of gray values of red blood cells on the front of the sample; f1: Correction function, correcting sum_gray i Eliminate background color bg from sum_gray in the same sample i The impact; f2: sum_gray i The mapping relationship with HGB may be linear or non-linear; volume: sample volume; f3: stretches the valid range of the output of f2, compresses the invalid range, and maps it to [0,1].
[0071] The step of calculating the roundness of red blood cells includes:
[0072] S21: Select red blood cells facing the front from the red blood cell images that have been cut and classified in the instrument's original algorithm.
[0073] In this embodiment, the same pre-trained classification model as S11 is used to select cells facing the front from the red blood cell image as the calculation target, eliminating measurement interference caused by the different morphology and optical properties of red blood cells on the side, and ensuring the accuracy of roundness calculation.
[0074] S22: Segment the selected positive red blood cells and extract their complete edge contours.
[0075] Specifically, red blood cell segmentation algorithms (such as the traditional gradient and threshold combination method, Otsu's algorithm, or AI-based semantic segmentation models) are used to extract the complete edge contours of cells.
[0076] In this embodiment, the segmentation is implemented using a semantic segmentation model.
[0077] S23: Perform ellipse fitting on the point set of the edge contour to obtain a fitted ellipse.
[0078] In this embodiment, the extracted edge contour point set is fitted to an ellipse using the least squares method in polar coordinates, and the theoretical radius of the fitted ellipse corresponding to each contour point is obtained. And calculate the actual distance from the contour points to the center of the fitted ellipse. .
[0079] S24: Calculate the root mean square error between the actual distance from the contour point to the center of the fitted circle and the theoretical radius at the corresponding angle, and use it as the quasi-circularity value.
[0080] Specifically, the root mean square error of the radial distance is calculated according to the following formula:
[0081]
[0082] in, This represents the actual distance from the contour point to the center of the fitted ellipse. To fit the theoretical radius of the ellipse at the corresponding angle.
[0083] In this embodiment, based on the theoretical radius of the fitted ellipse obtained in S23 and the actual distance from the contour points to the center, the root mean square error of the radial distance of all contour points is calculated as the quasi-circularity value. This root mean square error reflects the degree of deviation between the actual cell morphology and the ideal ellipse.
[0084] S25: The quasi-roundness value is standardized and mapped to the [0,1] interval to obtain the standardized roundness value.
[0085] In this implementation, piecewise linear stretching based on sample statistics is used for standardization: stretching the effective interval and compressing the ineffective interval, and mapping the final result to the range [0, 1]. A larger value indicates a shape closer to a perfect ellipse. This ultimately yields the roundness calculation function. .
[0086] The above-disclosed embodiments are merely one or more preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments and equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A method for calculating red blood cell parameters, characterized in that, Includes the following steps: Calculate the color intensity of red blood cells; Calculate the roundness of red blood cells; The chroma and roundness are used as quantitative criteria for judging the homogeneity of red blood cells; The step of calculating the color intensity of red blood cells includes: Select red blood cells facing forward from the red blood cell images that have already been cut and classified by the instrument's original algorithm; The selected positive red blood cells were segmented, and intact cell regions were extracted. Calculate the sum of the gray values of all pixels within the complete cell region; Obtain the background grayscale value of the original image; Based on the background grayscale value, the sum of the grayscale values is corrected using a pre-fitted illumination correction function to obtain the corrected grayscale value; Based on a pre-established mapping relationship related to hemoglobin concentration, the corrected grayscale value is converted into a quasi-chromatic value; The quasi-chromaticity values are standardized and mapped to the [0,1] interval to obtain standardized chromaticity values; The step of calculating the roundness of red blood cells includes: Select red blood cells facing forward from the red blood cell images that have already been cut and classified by the instrument's original algorithm; The selected positive red blood cells are segmented, and their complete edge contours are extracted; An ellipse is fitted to the point set of the edge contour to obtain a fitted ellipse; The root mean square error between the actual distance from the contour point to the center of the fitted circle and the theoretical radius at the corresponding angle is calculated and used as the roundness value. The quasi-roundness value is standardized and mapped to the [0,1] interval to obtain the standardized roundness value.
2. The method for calculating red blood cell parameters as described in claim 1, characterized in that, The process of selecting red blood cells facing forward is achieved using a classification algorithm.
3. The method for calculating red blood cell parameters as described in claim 1, characterized in that, The specific steps for obtaining the background grayscale value of the original image are as follows: Analyze the grayscale histogram of the original image and define the grayscale value that appears most frequently as the background grayscale value.
4. The method for calculating red blood cell parameters as described in claim 1, characterized in that, The standardization process stretches the valid interval to [0,1] and compresses the invalid interval.
5. The method for calculating red blood cell parameters as described in claim 1, characterized in that, The root mean square error of the radial distance is calculated according to the following formula: in, This represents the actual distance from the contour point to the center of the fitted ellipse. To fit the theoretical radius of the ellipse at the corresponding angle.
6. The method for calculating red blood cell parameters as described in claim 1, characterized in that, The sum of grayscale values is the sum of pixel values calculated under the pre-selected color channel that is most correlated with hemoglobin concentration.