Quality detection and identification method

Through computer vision and image processing technology, the best detection area in the blood test tube is automatically identified, and layered analysis and quality evaluation are carried out, which solves the problem of low resource utilization, low detection accuracy, low degree of automation, and difficult area identification in the existing technology. and the problem of poor stratification effect, which achieves rapid, accurate and highly automated blood quality detection.

CN119445159APending Publication Date: 2025-02-14FUJIAN NEWLAND AUTO ID TECH CO LTD

Patent Information

Application Number
CN202411586354.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing blood quality detection methods have problems such as low resource utilization, low detection accuracy, low degree of automation, difficulty in area identification, and poor stratification effect.

Method used

Computer vision and image processing technology are used to perform step by step segmentation and similarity judgment through spatial mapping and feature extraction, and color information of the required layer is extracted, and quality evaluation is performed through machine learning-trained regression model.

Benefits of technology

It realizes rapid and accurate collection and quality evaluation of multi-dimensional quality data of blood samples, improves the efficiency and layering accuracy of automated detection, and has a wider range of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445159A_ABST
    Figure CN119445159A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to a quality detection and recognition method. The method comprises the steps of performing spatial mapping on an original image, performing feature extraction on the mapped image, performing step-by-step segmentation on an obtained image to be layered, extracting a required layer, forming color features by using color information of the layer, performing regression judgment through machine learning training, and obtaining a score. The color features are calculated through distribution of hue, saturation and brightness of each pixel in the image and comprise one or more combinations of a mean value, a standard deviation and a deviation. Through computer vision and image processing technologies, an optimal detection area in a sample is automatically identified and analyzed, stratified analysis is carried out, multi-dimensional quality data of the sample is detected, and rapid and accurate acquisition and quality evaluation of the multi-dimensional quality data of the sample are realized. For the evaluation standard difference of different groups, only the evaluation score Y value needs to be adjusted, the model does not need to be trained again, and the application range of the method is greatly widened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a quality detection and recognition method. Background Art

[0002] Blood quality testing plays an important role in medical diagnosis, and commonly used methods include microscopic observation, chemical reagent testing, and biosensor testing. Although these methods can provide certain test results, most of them rely on manual operation and subjective judgment, and it is difficult to ensure the speed and accuracy of the test.

[0003] Specifically, microscopic observation: Traditional microscopic observation requires technicians to manually analyze blood samples under a microscope to identify abnormal cells and components. Although this method is intuitive, it is limited by the experience and judgment of technicians, and the test results are highly subjective. Chemical reagent detection: Chemical reagent detection reacts with specific components in blood samples to produce color changes to judge blood quality. However, this method is complicated to operate, requires precise reagent amounts and reaction times, has high environmental requirements, and is susceptible to interference. Biosensor detection: Biosensor detection achieves quality assessment by detecting specific biological molecules in blood samples. Although this method has high sensitivity, the sensor is expensive and requires complex calibration and maintenance.

[0004] In the prior art patent literature, Patent Document 1: Publication No. CN 114743097 A discloses a blood collection tube visual recognition system, which uses white light to find the upper edge of red blood cells and plasma, uses blue light to identify the upper edge of the white film layer and plasma layer in the blood, and matches them through algorithms and models to obtain relevant results. However, this solution has the following disadvantages: during detection, the test tube needs to be stationary, and two light sources are used to shoot multiple times to distinguish each layer, the detection efficiency is low and the system cost is high; the blood detection area depends on other prior information, and the decoupling degree is low for automated detection; it can only separate a fixed number of layers, and some abnormal multi-layer situations cannot be handled.

[0005] Patent document 2: Publication number CN117393090A discloses a blood collection tube visual recognition system. The invention automatically identifies whether the volume of the sample to be processed is accurate and whether there are any abnormalities in the sample to be processed based on deep learning algorithms and machine vision. When the volume of the sample to be processed is inaccurate and / or there are any abnormalities in the sample to be processed, the sample to be processed is defined as unqualified, and the unqualified sample to be processed is selected and placed in the abnormal area. However, this solution has the following disadvantages: it requires a large amount of categorical sample data and can only classify hemolysis, jaundice and lipemia, and cannot evaluate the severity of these abnormal samples. When the scoring criteria for different areas are different, the model needs to be repeatedly trained.

[0006] Patent document 3: Publication number CN114878844A discloses a method, system and equipment for automatically detecting the quality of blood samples after centrifugation. Patent document 4: Publication number CN118447004A discloses a blood collection tube blood detection method based on a deep neural network. Although it also performs blood quality detection, it can only identify and classify known categories. In actual life applications, the categories and standards are not fixed, and the technology in the patent document cannot be used flexibly. Summary of the invention

[0007] The present invention solves the problems of low resource utilization, low detection accuracy, low automation, difficult area identification, and poor stratification effect in the above-mentioned quality detection process. A quality detection and identification method is proposed. The technical solution is as follows:

[0008] A quality detection and identification method comprises the following steps:

[0009] S1, performing spatial mapping on the original image, converting the colors in the original image into corresponding color values ​​in the color space, and obtaining a mapped image;

[0010] S2, setting a color range for feature extraction, performing feature extraction on the mapped image, and obtaining an image to be layered; the color range for feature extraction includes the color value of the original image;

[0011] S3, segmenting the image to be layered step by step, and judging the similarity between two adjacent layers. If they are similar, they are not layered, otherwise they are layered;

[0012] S4, extract the required layer, and combine the color information of the layer into color features, perform regression judgment through machine learning training, and obtain a score; the color features are calculated through the distribution of hue, saturation and brightness of each pixel in the image, including one or more combinations of mean, standard deviation and deviation.

[0013] Furthermore, the regression judgment model includes a data preparation stage and a recognition stage;

[0014] Data preparation stage: A batch of test images are collected, and professional experimenters evaluate the test images and record the evaluation scores. The color feature X of the test image is used as training data, and the evaluation score Y of the test image is used as label data. Machine learning training is performed on X and Y to obtain the corresponding regression model.

[0015] Recognition stage: extract the required layer, calculate the color information of the layer according to the regression model, obtain the test color feature Z, input Z into the regression model, and obtain the score.

[0016] Furthermore, if the original image is a plurality of pictures of samples taken at different angles, the color area of ​​each of the images to be layered is counted, and the images to be layered whose color area is greater than a threshold or a maximum value are selected to perform step S3;

[0017] The color area is the sum of the number of pixels retained in feature extraction.

[0018] Furthermore, step S3 includes: performing equally spaced line cutting on the feature-extracted image to obtain n intervals, comparing the color similarity between interval i and interval i+1, and determining whether to separate layers according to the similarity value;

[0019] Among them, the similarity calculation method is one of histogram similarity, mean square error similarity, and pixel similarity.

[0020] Furthermore, the color space is one or more combinations of HSV color space, Lab color space, CIELAB color space, HCL color space and OKLCH color space.

[0021] Furthermore, the color space is the HSV color space, and the color value conversion formula is as follows:

[0022] v=max,

[0023] Wherein: hue h, saturation s, brightness v, (r, g, b) are the red, green and blue color values ​​in the RGB space respectively, the color value is a real number between 0 and 1, max is equal to the maximum value of r, g, b, and min is equal to the minimum value of r, g, b.

[0024] Furthermore, the S2 step includes:

[0025] S21, the color ranges belong to H[a1,a2], S[a3,a4], V[a5,a6], where a1, a3, a5 are the minimum ranges of HSV, and a2, a4, a6 are the maximum ranges of HSV;

[0026] S22, on the mapped image, the color information H, S, V of all pixels are compared, and the pixels falling within the color range are retained to complete the color feature extraction;

[0027] S23, performing step S22 on all mapped images to complete the color feature extraction of all images.

[0028] Furthermore, the HSV values ​​of pixels are i ,S i and V i There are N pixels in total, and the color feature formula is as follows:

[0029] Mean:

[0030] Mean Hue:

[0031] Saturation mean:

[0032] Mean brightness:

[0033] Standard Deviation:

[0034] Hue standard deviation:

[0035] Saturation standard deviation:

[0036] Brightness standard deviation:

[0037] Skewness:

[0038] Hue Skewness:

[0039] Saturation Skewness:

[0040] Brightness Skewness:

[0041] Furthermore, the sample of the original image is a suspension and needs to be stratified by one of the following methods: sedimentation, centrifugal separation, flotation, and flocculation.

[0042] Furthermore, the suspension is blood, and the desired layer is a serum layer.

[0043] The present invention has the following beneficial effects:

[0044] 1. The quality detection and identification method described in the present invention automatically identifies and analyzes the best detection area in the sample through computer vision and image processing technology, performs layered analysis and quality assessment, detects the quality data of multiple dimensions of the sample, and realizes the rapid and accurate collection and quality assessment of the multi-dimensional quality data of the sample. When different regions or user groups have different evaluation criteria, only the evaluation score Y value needs to be adjusted without retraining the model, which greatly improves the scope of application of the method. Compared with the prior art, the present invention has significant advantages in automated detection, effectively meets the needs of large-scale and rapid detection, and realizes a high degree of automation.

[0045] 2. The quality detection and identification method described in the present invention adopts an image processing algorithm to perform layered judgment according to the inherent characteristics of the sample, without presetting the number of layers, with high layering flexibility and a wider range of application scenarios. When processing samples with complex components, compared with the prior art, the layering accuracy of the present invention is higher, which effectively avoids the influence of insufficient precision on the accuracy of the detection results and ensures the superiority of the layering effect.

[0046] 3. The quality detection and identification method described in the present invention has the function of automatic identification of the detection area. Through image analysis technology, it can automatically identify the optimal detection area of ​​the sample without relying on other prior information, thus achieving a high degree of decoupling. Compared with traditional methods, the present invention is simpler in area identification, avoids the need for manual operation, and improves the level of automation. At the same time, the present invention gets rid of the dependence on naked eye observation and subjective judgment, ensures the uniformity and reliability of the detection results, and significantly improves the efficiency of automated detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the process of Example 1 of the present invention.

[0048] Figure 2 It is a schematic diagram of the flow chart of Example 2 of the present invention. DETAILED DESCRIPTION

[0049] The sample of the present invention can be a solid, liquid or colored sample. If the sample is a suspension, it must first be stratified by one of the following methods: sedimentation, centrifugation, flotation, and flocculation. If it is a single color sample, or there is no stratification requirement, the stratification step can be omitted. Figure 1-2 As shown, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0050] Embodiment 1.

[0051] A quality detection and identification method, the sample is blood, and the required layer is the serum layer. It is specifically used in the fields of medical diagnosis and health monitoring, and aims to achieve rapid and accurate quality assessment of blood samples. By using computer vision and image processing technology, it can automatically identify and analyze the best detection area in the blood test tube, and perform stratified analysis to detect blood quality problems such as hemolysis, lipemia and jaundice.

[0052] The existing technical solutions for blood quality detection methods have the following technical disadvantages: low resource utilization, the existing blood quality detection methods usually rely on manual operation, low efficiency, and are easily affected by human factors; low detection accuracy, traditional methods rely on visual observation and subjective judgment for quality assessment of blood samples, and have poor accuracy and consistency; low degree of automation, the existing technology has major deficiencies in automated detection, and cannot meet the needs of large-scale, rapid detection; difficult regional identification, finding the best detection area in a blood test tube usually requires manual operation, lacks automated means, and is difficult to ensure the consistency and reliability of the test results. The stratification effect is not good, the components in the blood sample are complex, and the existing technology is not accurate enough in stratification processing, which affects the accuracy of subsequent test results. The present invention aims to solve these problems.

[0053] S1, spatially map the original image, convert the colors in the original image into corresponding color values ​​in the color space, and obtain a mapped image; specifically, map the demonstrated RGB color to a more stable color space, such as the color space is HSV color space, Lab color space, CIELAB color space, HCL color space, OKLCH color space, etc., or one or more combinations.

[0054] S2, setting a color range for feature extraction, performing feature extraction on the mapped image, and obtaining an image to be layered; the color range for feature extraction includes the color value of the original image.

[0055] S3, segment the image to be layered step by step, and judge the similarity of two adjacent levels. If they are similar, they are not layered, otherwise they are layered; specifically, after centrifugation and layering, the blood can generally be divided into at least a serum layer, a buffy coat layer, and a plasma layer from top to bottom. Perform equal-interval line cutting on the color region of feature extraction from top to bottom to obtain n intervals, compare the color similarity of interval i and interval i+1, and judge whether to layer according to the similarity value; wherein the similarity calculation method is one of histogram similarity, mean square error similarity, and pixel similarity.

[0056] S4, extract the required layer, and combine the color information of the layer into color features, perform regression judgment through random forest machine learning training, and obtain a score; the color features are calculated through the distribution of hue, saturation and brightness of each pixel in the image, including one or more combinations of mean, standard deviation and deviation.

[0057] The regression judgment model includes a data preparation stage and a recognition stage.

[0058] Data preparation stage: collect a batch of test images of blood test tubes, and have professional experimenters with the ability to identify hemolysis, jaundice, and lipemia characteristics perform blood assessment; record the assessment scores of hemolysis, jaundice, and lipemia of each test tube; use the color features X (i.e., feature vector X) of hemolysis, jaundice, and lipemia of all test tubes as training data, and use the assessment scores Y of hemolysis, jaundice, and lipemia of each test tube as label data, perform machine learning training on X and Y, and after the training is completed, obtain the corresponding three regression models f1, f2, and f3; the testing stage includes: for the extracted serum layer, calculate the color moment of the blood sample according to the model to obtain the feature vector X.

[0059] Identification stage: extract the serum layer, calculate the color information of the layer according to the regression model, obtain the test color feature Z, input Z into the regression model f1, f2, f3, and obtain the tester's score for hemolysis, jaundice, and lipemia.

[0060] In step S2, the color space is the HSV color space. The HSV color space is a method for statistical analysis of color distribution. It mainly describes the color characteristics of an image by calculating the distribution of hue, saturation, and brightness of each pixel in the image. Common color moments include mean, standard deviation, and skewness. The acquisition of color feature X is consistent with that of the test color feature Z. The calculation formula of the HSV color moment starts from the color value conversion, and the formula is as follows:

[0061]

[0062] v=max,

[0063] Wherein: hue h, saturation s, brightness v, (r, g, b) are the red, green and blue color values ​​in the RGB space respectively, the color value is a real number between 0 and 1, max is equal to the maximum value of r, g, b, and min is equal to the minimum value of r, g, b.

[0064] S21, the color ranges belong to H[a1,a2], S[a3,a4], V[a5,a6], where a1, a3, a5 are the minimum ranges of HSV, and a2, a4, a6 are the maximum ranges of HSV.

[0065] S22, on the mapped image, the color information H, S, V of all pixels are compared, and the pixels within the color range are retained to complete the color feature extraction.

[0066] S23, performing step S22 on all mapped images to complete the color feature extraction of all images.

[0067] The HSV values ​​of pixels are H i ,S i and Vi There are N pixels in total, and the color feature formula is as follows.

[0068] Mean:

[0069] Mean Hue:

[0070] Saturation mean:

[0071] Mean brightness:

[0072] Standard Deviation:

[0073] Hue standard deviation:

[0074] Saturation standard deviation:

[0075] Brightness standard deviation:

[0076] Skewness:

[0077] Hue Skewness:

[0078] Saturation Skewness:

[0079] Brightness Skewness:

[0080] The present invention introduces computer vision image processing algorithms to automatically identify the optimal detection area in the blood test tube, perform accurate stratified analysis and quality assessment, effectively overcome the defects of the prior art, and has the following advantages:

[0081] Multifunctional blood quality detection: In addition to the classification and judgment of hemolysis, lipemia and jaundice, the present invention also scores the severity of the three blood types, providing a comprehensive blood quality assessment function. When different regions or hospitals have different evaluation criteria, only the score threshold needs to be adjusted. There is no need to retrain the model. If there is a degree display in addition to the evaluation criteria, the score can be replaced, or the score can be bound to the required degree, etc.

[0082] High stratification flexibility and wider application scenarios: Using image processing algorithms, the blood can be layered step by step according to its own characteristics, which can adapt to the stratification judgment of blood with various layers without assuming the number of blood layers in advance, and has a wider application scenario. Automatic detection area identification: Through image analysis technology, the best detection area in the rotating blood test tube can be automatically identified without relying on other prior information, with a high degree of decoupling and automation.

[0083] Embodiment 2.

[0084] Based on the first embodiment, multiple pictures are taken of the sample, and the required layer of blood is the serum layer.

[0085] The original image data of the same blood test tube at different rotation angles are obtained. Specifically, the mechanical device grabs the test tube and rotates it at a constant speed around the central axis of the test tube, and the shooting device continuously shoots the rotating test tube and records the original pictures shot.

[0086] Add a step between steps S2 and S3: perform color area statistics on each image to be layered, and select the images to be layered whose color area is greater than a threshold or a maximum value to perform step S3; the color area is the sum of the number of pixels retained in feature extraction.

[0087] Embodiment three.

[0088] On the basis of the first or second embodiment, the blood is replaced with a chemical reagent, and its purity or whether it has deteriorated can be indicated by color change.

[0089] Embodiment 4.

[0090] On the basis of the first or second embodiment, the blood is replaced with oil, and its performance and whether it needs to be replaced can be indicated by color change.

[0091] The above descriptions are only embodiments of the present invention. The selection of the embodiments is only for a better understanding of the invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A quality detection and identification method, characterized in that: The following steps are involved: S1, performing spatial mapping on the original image, converting the colors in the original image into corresponding color values ​​in a color space, and obtaining a mapped image; S2, setting a color range for feature extraction, performing feature extraction on the mapping image, and obtaining an image to be layered; The color range of the feature extraction includes the color value of the original image; S3, segmenting the image to be layered step by step, and judging the similarity between two adjacent layers. If they are similar, they are not layered, otherwise they are layered; S4, extract the required layer, and combine the color information of the layer into color features, perform regression judgment through machine learning training, and obtain a score; the color features are calculated through the distribution of hue, saturation and brightness of each pixel in the image, including one or more combinations of mean, standard deviation and deviation.

2. A quality detection and identification method according to claim 1, characterized in that: The regression judgment model includes a data preparation stage and a recognition stage; Data preparation stage: A batch of test images are collected, and professional experimenters evaluate the test images and record the evaluation scores. The color feature X of the test image is used as training data, and the evaluation score Y of the test image is used as label data. Machine learning training is performed on X and Y to obtain the corresponding regression model. Recognition stage: extract the required layer, calculate the color information of the layer according to the regression model, obtain the test color feature Z, input Z into the regression model, and obtain the score.

3. A quality detection and identification method according to claim 1, characterized in that: If the original image is a plurality of pictures of samples taken at different angles, the color area of ​​each of the images to be layered is counted, and the images to be layered whose color area is greater than the threshold or the maximum value are selected to proceed to step S3; The color area is the sum of the number of pixels retained in feature extraction.

4. A quality detection and identification method according to claim 1, characterized in that: Step S3 includes: performing equally spaced line cutting on the feature-extracted image to obtain n intervals, comparing the color similarity between interval i and interval i+1, and determining whether to separate layers according to the similarity value; Among them, the similarity calculation method is one of histogram similarity, mean square error similarity, and pixel similarity.

5. A quality detection and identification method according to claim 1, characterized in that: The color space is one or more combinations of HSV color space, Lab color space, CIELAB color space, HCL color space and OKLCH color space.

6. A quality detection and identification method according to claim 5, characterized in that: The color space is the HSV color space, and the color value conversion formula is as follows: v=max, Wherein: hue h, saturation s, brightness v, (r, g, b) are the red, green and blue color values ​​in the RGB space respectively, the color value is a real number between 0 and 1, max is equal to the maximum value of r, g, b, and min is equal to the minimum value of r, g, b.

7. A quality detection and identification method according to claim 1, characterized in that: The S2 step includes: S21, the color ranges belong to H[a1,a2], S[a3,a4], V[a5,a6], where a1, a3, a5 are the minimum ranges of HSV, and a2, a4, a6 are the maximum ranges of HSV; S22, on the mapped image, the color information H, S, V of all pixels are compared, and the pixels falling within the color range are retained to complete the color feature extraction; S23, performing step S22 on all mapped images to complete the color feature extraction of all images.

8. A quality detection and identification method according to claim 4, characterized in that: The HSV values ​​of pixels are H i ,S i and V i There are N pixels in total, and the color feature formula is as follows: Mean: Mean Hue: Saturation mean: Mean brightness: Standard Deviation: Hue standard deviation: Saturation standard deviation: Brightness standard deviation: Skewness: Hue Skewness: Saturation Skewness: Brightness Skewness:

9. A quality detection and identification method according to claim 1, characterized in that: The sample of the original image is a suspension and needs to be stratified by one of the following methods: sedimentation, centrifugal separation, flotation, and flocculation.

10. A quality detection and identification method according to claim 9, characterized in that: The suspension is blood, and the desired layer is the serum layer.

Citation Information

Patent Citations

  • Blood collection tube visual identification system

    CN114743097A

  • Method, system and equipment for automatically detecting quality of centrifuged blood sample

    CN114878844A

  • Automatic sorting and racking method for test specimens

    CN117393090A

  • Blood collection tube blood detection method based on deep neural network

    CN118447004A

Cited By

  • Judgment method for particle uniformity of steam foaming foam plastic

    CN120182613A

  • Centrifugal detection system

    CN120318202A

  • A centrifugal detection system

    CN120318202B