Blood color analysis method

Through RGB quantitative analysis and intelligent device, the problems of large blood color error and Meilan pollution are solved by observing the naked eye, and the accurate quantification and digital analysis of blood color are realized, which improves the objectivity of experimental teaching effects and results.

CN120293877APending Publication Date: 2025-07-11FUDAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510418181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, when evaluating the blood color by naked eyes, the error is large and susceptible to Melanin pollution, resulting in inaccurate and unobjective results determination.

Method used

The RGB quantitative analysis method is adopted, and the RGB color acquisition box and digital intelligent analysis system manufactured by independent modeling and 3D printing is combined with a high-definition camera and multi-angle cold light source to realize the digital acquisition and analysis of blood color. The data processing is performed using the sub-channel color analysis software to remove Meilan pollution and quantify blood color.

Benefits of technology

It significantly improves the accuracy and reliability of blood color analysis, realizes the integration of blood collection and digital color quantitative analysis, and improves the objectivity of experimental teaching effects and results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120293877A_ABST
    Figure CN120293877A_ABST
Patent Text Reader

Abstract

The invention provides a blood color analysis method, which belongs to the technical field of blood analysis, and is characterized in that the blood color is accurately quantified by calculating the numerical value change of three channels of red, green and blue, the methylene blue pollution can be effectively removed, and the accuracy and reliability of blood color analysis are remarkably improved. Based on the basic principle of RGB quantitative analysis, a blood color collection and digital intelligent analysis device is constructed and comprises an RGB color collection box and a digital intelligent analysis system, and the RGB color collection box and the digital intelligent analysis system are independently modeled and manufactured through 3D printing. A high-definition camera is arranged in the collection box and used for fixing blood color collection conditions and collecting blood pictures, the analysis system selects and analyzes the pictures collected by the camera and calculates the average RGB value, and digital collection and analysis of blood colors are achieved. The experiment teaching effect can be remarkably improved, objectivity can be evaluated, experiment content can be expanded, the learning effect can be improved, and collection and intelligent number color recognition of liquid biological samples can be expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blood analysis, and particularly relates to a blood color analysis method. Background Art

[0002] In the functional hypoxia experiment, students visually observe and compare to evaluate the blood color. This method has large errors, is not objective, and is easily affected by methylene blue contamination, which affects the result determination. To improve the accuracy and objectivity of the result determination. Summary of the Invention

[0003] In view of the problems in the prior art, the technical solution adopted in this application is as follows: A blood color analysis method, by calculating the numerical changes in the red, green, and blue channels, precisely quantifies the blood color, can effectively remove methylene blue contamination, and significantly improves the accuracy and reliability of blood color analysis; Based on the basic principle of RGB quantitative analysis, a blood color acquisition and digital intelligent analysis device is constructed. The device includes an RGB color acquisition box and a digital intelligent analysis system that are independently modeled and manufactured by 3D printing. The acquisition box contains a high-definition camera for fixing the blood color acquisition conditions and collecting blood pictures. The analysis system selects and analyzes the pictures collected by the camera, calculates the average RGB value, and realizes the digital acquisition and analysis of the blood color.

[0004] Further, in the instrument design, the internal structure of the acquisition box is optimized in three rounds, adopting a design scheme of an internal test tube bracket, an acquisition slit, a camera, and a multi-angle cold light source.

[0005] Further, a set of RGB-based channel color analysis software is developed and undergoes multiple rounds of stability tests, including continuous operation and performance tests in various environments.

[0006] Further, the blood image is converted from the BGR color space to the RGB color space; then the blood image is converted from the RGB color space to the LAB color space, and the LAB channels are separated into L, A, and B channels.

[0007] Further, the A channel is flattened into a one-dimensional array, and the pixel values are clustered into 7 clusters through K-means clustering, and the clustering centers are mapped back to the original data points.

[0008] Further, the reconstructed clustering result is reshaped into the same shape as the original image, and the data type is converted to unsigned 8-bit integer; the image is binarized according to a threshold, pixel values greater than 141 are set to 255, and pixel values less than 141 are set to 0.

[0009] Further, morphological operations are used to fill the holes in the binary image; objects smaller than 200 pixels in the binary image are removed; holes smaller than 250 pixels in the binary image are removed; finally, a bitwise AND operation is performed on the original RGB image and the binarized image to extract the target region of interest.

[0010] Compared with the prior art, the advantages and positive effects of the present invention are as follows: The device realizes the integration and intelligence of blood collection and digital color quantitative analysis for the first time. It can not only significantly improve and enhance the experimental teaching effect, evaluation objectivity, expand the experimental content, and improve the learning effect, but also be extended to the collection of liquid biological samples and intelligent color recognition. In the future, it will have more extensive and in-depth applications in the fields of life science and medicine. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0012] Figure 1 It is the first experimental data graph of a blood color analysis method of the present invention; Figure 2 It is the second experimental data graph of a blood color analysis method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0013] In order to better understand the above objects, features and advantages of the present invention, the present invention will be further described below with reference to the drawings and embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

[0014] Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the present invention is not limited by the specific embodiments disclosed in the following specification.

[0015] Example 1, as Figures 1-2 shown, the present application provides a blood color analysis method, which accurately quantifies the blood color by calculating the numerical changes in the red, green, and blue channels, can effectively remove methylene blue contamination, and significantly improves the accuracy and reliability of blood color analysis.

[0016] Based on the basic principle of RGB quantitative analysis, in this embodiment, a blood color acquisition and digital intelligent analysis device is constructed. The device includes an RGB color acquisition box independently modeled and manufactured by 3D printing, and a digital intelligent analysis system. The acquisition box contains a high-definition camera, which is used to fix the blood color acquisition conditions and collect blood pictures. The analysis system selects and analyzes the pictures collected by the camera, calculates the average RGB value, and realizes the digital acquisition and analysis of blood color.

[0017] Experimental content: In terms of instrument design, the internal structure of the acquisition box was optimized in three rounds, and finally the design scheme of the internal test tube support, acquisition slit, camera, and multi-angle cold light source was optimized. To ensure condition consistency, we redesigned a set of standard mouse blood collection procedures to ensure that the blood samples have no coagulation, no pollution, and the same dilution. A set of RGB-based color analysis software for each channel was developed and subjected to multiple rounds of stability tests, including continuous operation and performance tests under various environments. After importing the pictures into the software, the user can use the automatic mode to automatically identify the blood area, or use the manual mode to select the four vertices of the area by themselves to obtain the average value of the blood color within the area. This software was initially tested to use this technology for rapid and pollution-free blood detection, and early identification was carried out through blood color changes, which has a high degree of coincidence with the clinical test results.

[0018] Specifically, the blood image is converted from the BGR color space to the RGB color space. Then the blood image is converted from the RGB color space to the LAB color space, and the LAB channels are separated into L, A, and B channels. Then, the A channel is flattened into a one-dimensional array, and the pixel values are clustered into 7 clusters by K-means clustering, and the cluster centers are mapped back to the original data points. The reconstructed clustering result is reshaped into the same shape as the original image, and the data type is converted to unsigned 8-bit integer. The image is binarized according to the threshold, the pixel values greater than 141 are set to 255, and the pixel values less than 141 are set to 0. Then, morphological operations are used to fill the holes in the binary image. Objects with less than 200 pixels in the binary image are removed. Holes with less than 250 pixels in the binary image are removed. Finally, a bitwise AND operation is performed on the original RGB image and the binarized image to extract the target area of interest. Thus, the data preprocessing of this embodiment is temporarily completed. Next, the training set needs to be split, 90% becomes the split training set, and 10% becomes the test set. Among them, there are 2443 blood pictures in the training set, 272 blood pictures in the validation set, and 126 blood pictures in the test set.

[0019] To achieve better results for the model, the image generator and data stream are set up for training, validation, and testing, while the data is scaled and augmented. The ImageDataGenerator class creates two image generator objects, gen and gen2, which will be used for preprocessing and augmenting the images. The gen generator uses some preprocessing operations, including scaling pixel values to the range of 0 - 1, as well as random vertical and horizontal flipping operations. The gen2 generator scales the pixel values to the range of 0 - 1. Three data streams, train_gen, valid_gen, and test_gen, are created using the flow_from_dataframe method. Among them, gen is used to generate the training set, and gen2 is used to generate the validation set and the test set.

[0020] Next, the random forest model is trained, and grid search (GridSearchCV) is used to search for the best parameter combination of the random forest model. The n_estimators parameter is an important parameter in the random forest model, which defines the number of decision trees that make up the random forest. Specifically, n_estimators specifies the number of decision trees to be constructed, so it is set to 100, 150, 200, and 300. The max_depth parameter is another important parameter in the random forest model, which defines the maximum depth of each decision tree. We set it to 5 and 10. The min_samples_split specifies the minimum number of samples that an internal node must have, which are 2, 5, and 10 respectively. The max_features parameter is also another important parameter in the random forest model, which defines the number of features considered when splitting nodes in each decision tree.

[0021] Specifically, max_features specifies the maximum number of features to be considered in each split. The'max_features': ['auto','sqrt', 0.5] means that different max_features values will be tried, including automatic determination ('auto'), square root ('sqrt'), and half of the number of features (0.5). By trying different parameter combinations and selecting the parameters with the best performance. Through grid search, the accuracy of our test set has increased from 88.8% to 91.2%, which can be said to be a significant improvement. Indirectly, it also shows that the random forest has a good fit for predicting blood data.

[0022] Next, the convolutional neural network CNN was trained. The CNN consists of 3 convolutional layers, 2 normalization layers, and 3 fully connected layers. The first convolutional layer has 32 filters, each with a size of 3x3, and uses the ReLU activation function. The second convolutional layer has 64 filters, each with a size of 3x3, and uses the ReLU activation function. The third convolutional layer has 128 filters, each with a size of 3x3, and uses the ReLU activation function. After running for 30 epochs, the accuracy of the training set reached 88.78%, and the validation set reached 85%. Among them, parameter selection was performed on the output layer of the CNN, and it was found that using softmax was the best, with a test set accuracy of 88.88%, meeting expectations.

[0023] In addition to using the deep learning model CNN of the random forest machine learning model, this embodiment also uses the MobileNetV2 model for classification to construct an image classification model based on MobileNetV2. The tf.keras.applications.mobilenet_v2.MobileNetV2 function was used to construct a MobileNetV2 model. This model was set to not include the top (i.e., the fully connected layer), use the pre-trained ImageNet weights, and set the weights of the pre-trained model to be untrainable, that is, freeze these weights and do not participate in the training process. And the input shape was specified as (224, 224, 3). After that, a series of layer operations were defined.

[0024] Here, when building an image classification model based on MobileNetV2, first, the output of the model is passed as input to the GlobalAveragePooling2D layer for global average pooling of the feature map. Then, the features are batch normalized using the BatchNormalization layer. Finally, the code uses the Dense function to build the output layer, which has 7 nodes (corresponding to the 7 categories) and a softmax activation function. The last line of code creates a Model object and concatenates the input and output of the model to get the final classification model. The code loads the pre-trained MobileNetV2 model and specifies that the weights are ImageNet weights and the input shape is (224,224,3). At the same time, by setting include_top=False, the top classifier of the model is not included. Then, the code continues, and the code uses tf.keras.Sequential to build the complete network model. The model consists of a pre-trained model, a global average pooling layer, and a fully connected layer with 7 nodes and a softmax activation function. After that, the code compiles the model using model.compile, sets the optimizer to Adam, the loss function to categorical_crossentropy, and the evaluation metric to accuracy. Finally, the code trains the model using model.fit. The history of the training process will be saved in the history variable. The accuracy of the training set is 87%, the accuracy of the validation machine is 85%, and the accuracy of the test set is 95%. Figure 2 Here are the loss functions and accuracy of the training set and test set. We can see that we have achieved good results.

[0025] Materials: PLA filament for 3D printing, cold light plate, camera, 5% sodium nitrite solution, 1% methylene blue solution, normal saline, sodium citrate, distilled water; test tubes, test tube racks, syringes, surgical scissors, ophthalmic scissors, and ophthalmic tweezers.

[0026] Preliminary experimental results show that the device can clearly distinguish the changes in blood color under different hypoxic conditions, successfully identify and remove methylene blue contamination, and determine the essential RGB characteristics of hypoxic blood "cherry red" and "rust color". The software stability test shows that the system remains efficient and accurate under high load.

[0027] For the first time, the integration and intelligence of blood collection and digital color quantitative analysis have been realized, which can not only significantly improve and enhance the experimental teaching effect, evaluate the objectivity, expand the experimental content, and improve the learning effect, but also be expanded to the collection of liquid biological samples and intelligent color recognition. In the future, it will have broader and deeper applications in the fields of life sciences and medicine.

[0028] The above are only the preferred embodiments of the present invention, and do not limit the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A method for blood color analysis, characterized in that, Quantify the blood color by calculating the numerical changes in the red, green, and blue channels; based on the basic principle of RGB quantitative analysis, construct a blood color acquisition and digital intelligent analysis device, which includes an independently modeled and 3D printed RGB color acquisition box and a digital intelligent analysis system; the acquisition box contains a high-definition camera for fixing the blood color acquisition conditions and collecting blood pictures, and the analysis system selects and analyzes the pictures collected by the camera, calculates the average RGB value, and conducts digital acquisition and analysis of the blood color.

2. The blood color analysis method according to claim 1, characterized in that The blood color acquisition and digital intelligent analysis device includes an internal test tube holder, a collection slit, a camera, and a multi-angle cold light source.

3. The blood color analysis method according to claim 1, characterized in that, Develop a channel-based color analysis software based on RGB, convert the blood image from the BGR color space to the RGB color space; then convert the blood image from the RGB color space to the LAB color space, and separate the LAB channels into L, A, and B channels.

4. The blood color analysis method according to claim 3, characterized in that, Flatten the A channel into a one-dimensional array, cluster the pixel values into 7 clusters through K-means clustering, and map the cluster centers back to the original data points.

5. A method for blood color analysis according to claim 4, characterized in that, Reshape the reconstructed clustering result into the same shape as the original image, and convert the data type to unsigned 8-bit integer; binarize the image according to the threshold, set the pixel values greater than 141 to 255, and set the pixel values less than 141 to 0.

6. The blood color analysis method according to claim 5, wherein, Use morphological operations to fill the holes in the binary image; remove the objects in the binary image with less than 200 pixels; remove the holes in the binary image with less than 250 pixels; finally, perform a bitwise AND operation on the original RGB image and the binarized image to extract the target area of interest.