Agglutination strength interpretation method and device, and blood type analyzer

By using template image recognition and feature vector analysis in the blood typing analyzer, the problem of low accuracy in agglutination intensity interpretation was solved, achieving higher accuracy in agglutination intensity interpretation and blood type determination.

CN115201464BActive Publication Date: 2026-04-14MEDCAPTAIN MEDICAL TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MEDCAPTAIN MEDICAL TECH
Filing Date
2022-07-15
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing blood typing analyzers have low accuracy in interpreting agglutination intensity, which leads to low accuracy in blood typing and antibody screening.

Method used

By employing template image recognition technology in the blood typing analyzer, the target area of ​​the blood typing card can be accurately obtained, and the accuracy of agglutination intensity interpretation can be improved by utilizing preprocessing and feature vector analysis.

Benefits of technology

It improves the accuracy of agglutination intensity interpretation, ensures the accuracy of blood typing and antibody screening, and is compatible with blood typing cards from different manufacturers and of different types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115201464B_ABST
    Figure CN115201464B_ABST
Patent Text Reader

Abstract

The application provides an agglutination strength interpretation method and device and a blood type analyzer, and relates to the medical field. The agglutination strength interpretation method photographs a blood type card located on the blood type analyzer to obtain a first image, wherein the blood type card comprises a plurality of microcolumn tubes containing blood gel, and the blood gel comprises serum, red blood cells and gel liquid; a template image is acquired; a target region of the first image is identified according to the acquired template image, and the target region is used to indicate the region of the blood gel on the first image; and the agglutination strength of the blood gel in the target region of the first image is interpreted. After the blood type analyzer photographs the blood type card to obtain the first image, the template image can be acquired, and the position of the blood gel on the template image is accurate. In this way, the accuracy of interpreting the agglutination strength of the blood gel in the target region of the first image is also high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the medical field, and in particular to a method, apparatus, and blood typing analyzer for determining agglutination intensity. Background Technology

[0002] In clinical practice, blood agglutination strength refers to the intensity of the antigen-antibody reaction between red blood cell surface antigens and their corresponding antibodies. Agglutination strength is commonly used to determine blood type and screen for antibodies.

[0003] Currently, blood typing cards are typically placed at a designated angle in a blood typing analyzer. Each microcolumn within the card contains different types of serum and red blood cells. The analyzer then photographs the blood typing card and analyzes the image to determine the agglutination strength of the blood gel. However, the accuracy of the agglutination strength obtained by current blood typing analyzers is low. This results in low accuracy in subsequent blood typing determinations or antibody screenings based on agglutination strength. Summary of the Invention

[0004] This application provides a method, apparatus, and blood typing analyzer for interpreting agglutination intensity, in order to solve the problem of low accuracy of agglutination intensity obtained by blood typing analyzers.

[0005] In a first aspect, this application provides a method for determining agglutination intensity, applied to a blood typing analyzer, comprising: taking a picture of a blood typing card located on the blood typing analyzer to obtain a first image, wherein the blood typing card includes multiple microcolumns containing blood gel, and the blood gel includes serum, red blood cells and gel solution; acquiring a template image; identifying a target region of the first image based on the acquired template image, the target region being used to indicate the area where the blood gel is located on the first image; and determining the agglutination intensity of the blood gel in the target region of the first image.

[0006] The agglutination intensity interpretation method provided in this application allows the blood typing analyzer to acquire a template image after taking a picture of the blood typing card to obtain a first image. The location of the blood gel on the template image is precisely defined. Therefore, the location of the target region in the first image can also be accurately identified based on the acquired template image. The target region indicates the area where the blood gel is located in the first image; thus, the accuracy of interpreting the agglutination intensity of the blood gel in the target region of the first image is high.

[0007] In one possible implementation, before the step of identifying the microcolumns of the first image based on the acquired template image, the method further includes: preprocessing the first image so that the size and / or placement angle of the first image are the same as the size and / or placement angle of the preset template image, wherein each microcolumn on the template image is marked with a first region where the blood gel is located.

[0008] This allows for more precise identification of the target region in the first image.

[0009] In one possible implementation, the size of the first image is m×n, the size of the template image is M×N, and the area of ​​the template image is smaller than the area of ​​the first image. The preprocessing steps for the first image include: moving an M×N window on the first image to traverse multiple first sub-images of size M×N in the first image; rotating the traversed first sub-image once at every preset angle when traversing each first sub-image to obtain second sub-images at different placement angles in each first sub-image; after traversal, calculating the similarity between each second sub-image and the template image according to a preset matching algorithm; and using the second sub-image with the highest similarity as the first image with the same size and placement angle as the template image.

[0010] In one possible implementation, the preset matching algorithm includes any one of the following: calculating the average absolute difference of grayscale values ​​between each second sub-image and the template image, wherein the average absolute difference is negatively correlated with similarity; calculating the correlation coefficient of grayscale values ​​between each second sub-image and the template image, wherein the correlation coefficient is positively correlated with similarity; calculating the distance between edge points of each second sub-image and corresponding edge points of the template image, wherein the distance is negatively correlated with similarity; extracting specific physical parameters through local feature points of each second sub-image, establishing descriptive information based on the specific physical parameters, and calculating the matching value between the descriptive information and the template image; wherein the specific physical parameters include position parameters, size parameters, and rotation invariants, and the correlation coefficient is positively correlated with the matching value.

[0011] In one possible implementation, the step of identifying the target region of the first image based on the acquired template image includes: determining the target region of each microcolumn in the first image based on each first region on the template image; and segmenting the region where the red blood cells are located from the target regions of each microcolumn in the first image.

[0012] In one possible implementation, before determining the target region of each microcolumn in the first image based on each first region on the template image, the method includes: identifying a first line segment located at the top of each target region and a second line segment located at the bottom of each target region. The corresponding target regions are then corrected based on the first and second line segments. The region containing red blood cells is segmented from the target regions of each microcolumn in the first image, including: the blood typing analyzer segmenting the region containing red blood cells from the corrected target regions.

[0013] This allows for a more precise identification of the regions containing the red blood cells.

[0014] In one possible implementation, the position of the corresponding target region is corrected based on the first and second line segments of each target region, including: determining a third region including the first line segment and a fourth region including the second line segment in each target region, wherein the distance between the top and bottom of the first line segment and the third region is within a distance threshold, and the distance between the top and bottom of the second line segment and the fourth region is within a distance threshold; determining the sum of the absolute values ​​of the gradient values ​​of the brightness of each pixel on each third line segment parallel to the first line segment in the third region, in the direction perpendicular to the third line segment, and determining the sum of the absolute values ​​of the gradient values ​​of the brightness of each pixel on each fourth line segment parallel to the second line segment in the fourth region, in the direction perpendicular to the fourth line segment; correcting the determined target region, wherein the top of the corrected target region is the third line segment with the largest sum of absolute gradient values, and the bottom of the corrected target region is the fourth line segment with the largest sum of absolute gradient values.

[0015] This allows for precise correction of the target area.

[0016] In one possible implementation, the blood typing analyzer segments the region containing red blood cells from the target region, including: the blood typing analyzer segments the region containing red blood cells from the target region according to Otsu's method or clustering method.

[0017] In one possible implementation, the step of determining the agglutination intensity of the blood gel in the target region of the first image includes:

[0018] The micropillars in the first image are divided into multiple sub-regions; a first feature vector is constructed based on the number of red blood cell pixels on the same micropillar in each sub-region; each first feature vector is input into a preset first model to obtain the first aggregation intensity of red blood cells in each micropillar, wherein the first model is trained based on multiple training samples, and any training sample is a second feature vector labeled with a second aggregation intensity.

[0019] In this way, the aggregation intensity can be accurately identified.

[0020] In one possible implementation, after interpreting the agglutination intensity of the blood gel in the target area of ​​the first image, the method further includes: determining the blood type based on the first agglutination intensity of the red blood cells in each microcolumn.

[0021] In one possible implementation, the first image includes a third sub-image and a fourth sub-image. The third sub-image is a photograph of the front of the blood type card, and the fourth sub-image is a photograph of the back of the blood type card. The blood typing analyzer determines the blood type based on the first agglutination intensity in each microcolumn, including: the blood typing analyzer constructs a data set from the two first agglutination intensities corresponding to the same microcolumn in the third sub-image obtained from the front of the blood type card and the fourth sub-image obtained from the back of the blood type card; the blood typing analyzer selects the first agglutination intensity with the larger value from each data set; and the blood typing analyzer determines the blood type based on the selected first agglutination intensities.

[0022] The blood typing analyzer determines the blood type based on the selected first agglutination intensities. This way, even if one side of the blood typing card is contaminated, the larger selected first agglutination intensity becomes the first agglutination intensity of the uncontaminated side, improving accuracy.

[0023] In one possible implementation, the blood typing analyzer further includes: receiving a first instruction to instruct the updating of a template image; and updating the template image in response to the first instruction.

[0024] This allows the blood typing analyzer to accurately analyze different types of blood typing cards from different manufacturers and obtain the first agglutination strength.

[0025] Secondly, this application also provides an agglutination intensity determination device for use in a blood typing analyzer, the device comprising:

[0026] The image capturing unit is used to capture images of the blood type card located on the blood typing analyzer to obtain a first image. The blood type card includes multiple microtubes containing blood gel, and the blood gel includes serum, red blood cells, and gel solution. The image acquisition unit acquires a template image. The image recognition unit is used to identify the target area of ​​the first image based on the acquired template image. The target area is used to indicate the area where the blood gel is located in the first image. The image interpretation unit interprets the agglutination intensity of the blood gel in the target area of ​​the first image.

[0027] Thirdly, this application also provides a blood typing analyzer, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the blood typing analyzer to perform the method as described in the first aspect of this application.

[0028] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the computer to perform the method as described in the first aspect of this application. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0030] Figure 1 This is a schematic diagram of the structure of the blood typing analyzer provided in the embodiments of this application;

[0031] Figure 2 This is a schematic diagram of the structure of the blood type card provided in the embodiments of this application;

[0032] Figure 3 One of the flowcharts for the agglomeration intensity determination method provided in the embodiments of this application;

[0033] Figure 4 A schematic diagram illustrating how the blood typing analyzer provided in this application maps each first region on the template image to the target region of each microcolumn in the first image;

[0034] Figure 5 A schematic diagram of the distribution of red blood cells in a microcolumn provided in an embodiment of this application;

[0035] Figure 6 The second flowchart of the agglomeration intensity determination method provided in the embodiments of this application;

[0036] Figure 7 for Figure 6 The specific implementation flowchart of S602 in the document;

[0037] Figure 8 This is a functional block diagram of the agglomeration intensity determination device provided in the embodiments of this application;

[0038] Figure 9 A circuit connection block diagram of a blood typing analyzer provided in an embodiment of this application.

[0039] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0041] First, let me explain the terms used in this application:

[0042] Blood typing cards consist of multiple microcolumns containing gel media. Different human erythrocyte antigens and corresponding antibodies are added to each microcolumn, triggering a specific immune reaction, or hemagglutination reaction, within each microcolumn. After the hemagglutination reaction, the agglutinated red blood cells remain on the surface of the microcolumns in a band or scattered in the middle, while the non-agglutinated red blood cells settle to the bottom of the microcolumns after centrifugation. Therefore, the location of the red blood cells indicates the intensity of agglutination, and thus, the blood type can be determined based on the agglutination intensity.

[0043] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0044] Please see Figure 1 This application provides a method for determining agglutination intensity, applied to a blood typing analyzer 100. The blood typing analyzer 100 can be, but is not limited to, a cuboid blood typing analyzer 100. For example... Figure 1 As shown, the blood typing analyzer 100 includes a card slot 200, a camera 300, and a processor. The card slot 200 corresponds to the position of the camera 300, and the camera 300 is electrically connected to the processor. A blood typing card 400 is inserted into the card slot 200. The blood typing card 400 can be an ABO positive typing blood typing card, an ABO positive and reverse typing blood typing card, an antibody screening blood typing card, etc., and is not limited here. For example, such as... Figure 2 As shown, the blood typing card 400 includes multiple microcolumns 401 containing blood gel 402. The blood gel 402 is generated after different human erythrocyte antigens and corresponding antibodies are added to the microcolumns 401 within the blood typing card 400, resulting in a hemagglutination reaction. After different human erythrocyte antigens and corresponding antibodies are added to each microcolumn 401, each microcolumn 401 can be distinguished into different types. As... Figure 2 As shown, each microcolumn 401 includes -A tube, -B tube, -D tube, -C tube, -E tube, ctr tube, Ac tube, and Bc tube.

[0045] Understandably, in one embodiment, such as Figure 3 As shown in the embodiment of this application, a method for determining agglomeration intensity includes:

[0046] S301: Take a picture of the blood typing card located on the blood typing analyzer to obtain the first image. The blood typing card includes multiple microcolumns containing blood gel, which includes serum, red blood cells, and gel solution.

[0047] For example, the camera 300 of the blood type analyzer 100 takes a picture of the blood type card 400 after detecting that the blood type card 400 has been manually inserted into the card slot 200.

[0048] S302: Obtain the template image.

[0049] Specifically, the processor of the blood analyzer 100 can retrieve template images from memory.

[0050] like Figure 4 As shown, the template image of the blood typing card 400 also includes micropillars 401, wherein each micropillar 401 in the template image of the blood typing card 400 is marked with a first region where the blood gel 402 is located. It should be noted that each micropillar 401 in the template image may not contain the blood gel 402, as long as the first region is marked.

[0051] like Figure 4 As shown, the template image of the blood typing card 400 also includes micropillars 401, where each micropillar 401 in the template image of the blood typing card 400 is marked with a first region where the blood gel 402 is located. It should be noted that the micropillars 401 in the template image do not necessarily contain the blood gel 402; it is sufficient that the first region is marked. The template image of the blood typing card 400 can be placed horizontally, and its size can be M×N. Typically, since the first image includes the background in addition to the blood typing card 400, the area of ​​the template image of the blood typing card 400 is smaller than the area of ​​the first image.

[0052] It should be noted that the template image is a template image that matches the blood type card type of the first image.

[0053] S303: Identify the target region of the first image based on the acquired template image. The target region is used to indicate the area where the blood gel is located on the first image.

[0054] Specifically, the blood typing analyzer 100 can determine the target region of each microcolumn in the first image based on each first region on the template image. For example, the blood typing analyzer 100 maps each first region on the template image onto the first image to obtain the target region of each microcolumn.

[0055] S304: Determine the agglutination intensity of the blood gel in the target area of ​​the first image.

[0056] For example, such as Figure 5As shown, the blood typing analyzer 100 divides each microcolumn 401 in the first image into multiple sub-regions 504, and the target region 505 is located in the first image. The blood typing analyzer 100 constructs a first feature vector based on the number of pixels of red blood cells on the same microcolumn 401 in each sub-region 504. The blood typing analyzer 100 inputs each first feature vector into a preset first network model to obtain the first agglutination intensity of red blood cells in each microcolumn 401. The first network model is trained using multiple training samples, and each training sample is a second feature vector labeled with a second agglutination intensity. The first network model can be a support vector machine, decision tree model, or random forest model, etc., and is not limited here. The first agglutination intensity may be 4+, 3+, 2+, 1+, 0.5+, negative, hemolysis, or binomial, etc., and is not limited here. 4+, 3+, 2+, 1+, and 0.5+ can all be considered positive.

[0057] The agglutination intensity interpretation method provided in this application allows the blood typing analyzer to acquire a template image after photographing the blood type card to obtain a first image. The location of the blood gel on the template image is precisely defined. Therefore, the location of the target region in the first image, identified based on the acquired template image, is also precise. The target region indicates the area where the blood gel is located in the first image; thus, the accuracy of interpreting the agglutination intensity of the blood gel in the target region of the first image is high. The blood typing analyzer 100 can use the first agglutination intensity to determine blood type, screen antibodies, and perform other operations. The following example illustrates how the blood typing analyzer 100 uses the first agglutination intensity to determine blood type.

[0058] In another embodiment, such as Figure 6 As shown in the embodiments of this application, another method for determining agglomeration intensity is also provided, including:

[0059] S601: The blood type analyzer 100 takes a picture of the blood type card 400 located on the blood type analyzer 100 and obtains the first image.

[0060] For example, the principle of S601 can be referred to S301 above, and will not be repeated here. It should be noted that the first image obtained by taking the picture may include a background part in addition to the blood type card 400. The size of the first image obtained by taking the picture can be m×n. Since the blood type card 400 is manually inserted into the card slot 200, the placement angle of the blood type card 400 may deviate from the standard placement angle (such as horizontal placement). Consequently, the placement angle of the blood type card 400 in the first image captured by the camera 300 also deviates from the standard placement angle.

[0061] S602: The blood type analyzer 100 preprocesses the first image so that the size and / or placement angle of the first image are the same as the size and / or placement angle of the preset template image, wherein each microcolumn on the template image is marked with the first region where the blood gel is located.

[0062] It should be noted that the template image of the blood type card 400 can be placed horizontally, and the size of the template image of the blood type card 400 can be M×N. Usually, since the first image taken includes the background in addition to the blood type card 400, the area of ​​the template image of the blood type card 400 is smaller than the area of ​​the first image.

[0063] Optionally, the blood typing analyzer 100 can receive a first instruction to instruct the updating of the template image; in response to the first instruction, the blood typing analyzer 100 updates the template image. This allows the blood typing analyzer 100 to accurately analyze different types of blood type cards 400 generated by different manufacturers to obtain the first agglutination intensity.

[0064] For example, such as Figure 7 As shown, the specific implementation steps of S602 may include:

[0065] S701: The blood type analyzer 100 moves an M×N window on the first image to traverse multiple first sub-images of size M×N in the first image.

[0066] As can be seen, the size of the M×N window is the same as the size of the template image of the blood type card 400. That is to say, the blood type analyzer 100 can traverse the first sub-image, which is the same size as the template image of the blood type card 400, in the first image in a left-to-right, top-to-bottom order, every other pixel unit.

[0067] S702: When the blood type analyzer 100 traverses a first sub-image, it rotates the traversed first sub-image once at a preset angle to obtain a second sub-image at a different placement angle in each first sub-image.

[0068] The preset angle can be 1 degree, 2 degrees, or 5 degrees, etc., and is not limited here. In this way, the blood type analyzer 100 can obtain the second sub-images of each first sub-image at different angles.

[0069] In addition, the blood type analyzer 100 can adjust the brightness of each second sub-image to be consistent with the brightness of the template image, so as to perform more accurate similarity calculations in the future.

[0070] S703: After the blood type analyzer 100 has completed the traversal, it calculates the similarity between each second sub-image and the template image according to the preset matching algorithm.

[0071] The preset matching algorithm includes any of the following:

[0072] Algorithm 1: The blood type analyzer 100 calculates the mean absolute difference of the grayscale values ​​of each second sub-image and the template image, where the mean absolute difference is negatively correlated with the similarity. Specifically, the blood type analyzer 100 calculates the mean absolute difference according to the formula... Calculate the mean absolute difference of grayscale values ​​between each second sub-image and the template image. Where: 1≤i≤m-M+1, 1≤j≤n-N+1, D(i,j) is the mean absolute difference, i is the x-coordinate of the top left corner of the second sub-image, j is the y-coordinate of the top left corner of the second sub-image, s is the x-coordinate of the pixel in the second sub-image or template image, t is the y-coordinate of the pixel in the second sub-image or template image, S(i+s-1,j+t-1) is the grayscale value of the pixel at coordinate (s,t) in the second sub-image, and T(s,t) is the grayscale value of the pixel at coordinate (s,t) in the template image.

[0073] Algorithm 2: The blood type analyzer 100 calculates the correlation coefficient of the grayscale values ​​of each second sub-image and the template image, where the correlation coefficient is positively correlated with the similarity. Specifically, the blood type analyzer 100 calculates the correlation coefficient according to the formula... Calculate the correlation coefficient between the grayscale values ​​of each second sub-image and the template image. Here, R(i, j) is the correlation coefficient, and its value ranges from [-1, 1]. i is the x-coordinate of the top-left corner of the second sub-image, j is the y-coordinate of the top-left corner of the second sub-image, s is the x-coordinate of the pixel in the second sub-image or template image, t is the y-coordinate of the pixel in the second sub-image or template image, and S... i,j (s, t) represents the gray value of the pixel at coordinates (s, t) in the second sub-image. i,j Let T(s,t) be the mean gray value of all pixels in the second sub-image, and let T(s,t) be the gray value of the pixel at coordinates (s,t) in the template image. σ is the mean gray value of all pixels in the second sub-image. ij σ is the standard deviation of the gray values ​​of the pixels in the second sub-image. T σ represents the standard deviation of the grayscale values ​​of the pixels in the template image. ij σ T Each condition is satisfied

[0074] Algorithm 3: The blood type analyzer 100 calculates the distance between the edge points of each second sub-image and the corresponding edge points of the template image; where the distance is negatively correlated with the similarity.

[0075] Specifically, the blood typing analyzer 100 uses a formula... The distance between the edge points of each second sub-image and the corresponding edge points of the template image. SED(i, j) is the distance between the edge points of the second sub-image and the corresponding edge points of the template image, D(i+s1, j+t1) is the edge distance of the edge point with coordinates (s1, t1) in the second sub-image, T is the set of all edge points in the template image, n is the size of the set, i is the x-coordinate of the top-left corner of the second sub-image, j is the y-coordinate of the top-left corner of the second sub-image, s is the x-coordinate of the pixel in the second sub-image or template image, and t is the y-coordinate of the pixel in the second sub-image or template image. E k (x), E k (y) represents the position of the kth edge point.

[0076] Algorithm 4: The blood type analyzer 100 extracts specific physical parameters from the local feature points of each second sub-image, establishes descriptive information based on the specific physical parameters, and calculates the matching value between the descriptive information and the template image; among them, the specific physical parameters include position parameters, size parameters, and rotation invariants, and the correlation coefficient is positively correlated with the matching value.

[0077] The descriptive information can be Fast Up Robust Features (SURF), Scale Invariant Feature Transform (SIFT), or Features from Accelerated Segment Test (FAST), etc., and is not limited here.

[0078] S704: The blood type analyzer 100 uses the second sub-image with the highest similarity as the first image, which has the same size and placement angle as the template image.

[0079] In this way, not only is the size of the second sub-image the same as the size of the template image, but the deviation between the placement angle of the second sub-image and the placement angle of the template image is also greatly reduced.

[0080] S603: The blood type analyzer 100 maps each first region on the template image to the target region 501 of each microcolumn 401 in the first image, wherein the target region 501 is used to indicate the region where the blood gel 402 is located in the first image.

[0081] Because the size and orientation of the first image are adjusted to match the size and orientation of the preset template image of the blood type card 400, the blood type analyzer 100 can map each first region on the template image to the target region 501 of each micro-column 401 of the first image with higher accuracy. Figure 5 As shown, Figure 5 This illustrates how each first region on the template image is mapped to the target region 501 of each micropillar 401 in the first image.

[0082] Therefore, S603 can be understood as: the blood type analyzer 100 determines the target area of ​​each microcolumn in the first image based on each first area on the template image.

[0083] S604: The blood type analyzer 100 identifies the first line segment 502 located at the top of each target area 501 and the second line segment 503 located at the bottom of each target area 501.

[0084] Still Figure 5 As shown, the first line segment 502 is located at the top of each target area 501, and the second line segment 503 is located at the bottom of each target area 501.

[0085] S605: The blood type analyzer 100 corrects the corresponding target region 501 based on the first line segment 502 and the second line segment 503 of each target region 501.

[0086] Specifically, the implementation process of S604 can be as follows: The blood type analyzer 100 determines a third region including a first line segment 502 and a fourth region including a second line segment 503 in each target region 501, wherein the distance between the top and bottom of the first line segment 502 and the third region is within a distance threshold, and the distance between the top and bottom of the second line segment 503 and the fourth region is within a distance threshold. The blood type analyzer 100 determines the sum of the absolute values ​​of the gradient values ​​of the brightness of each pixel on each third line segment parallel to the first line segment 502 in the third region, and determines the sum of the absolute values ​​of the gradient values ​​of the brightness of each pixel on each fourth line segment parallel to the second line segment 503 in the fourth region, and the sum of the absolute values ​​of the gradient values ​​of the fourth line segment. The blood type analyzer 100 corrects the determined target region 501, wherein the top of the corrected target region 501 is the third line segment with the largest sum of absolute gradient values, and the bottom of the corrected target region 501 is the fourth line segment with the largest sum of absolute gradient values.

[0087] As can be seen, S603-S605 above is the process of correcting the position of the target region 501, so that the region 602 where the red blood cells are located can be more accurately segmented in the subsequent step S606.

[0088] S606: The blood type analyzer 100 segments the region 602 where the red blood cells are located from the corrected target region 501 of each microcolumn 401 in the first image.

[0089] For example, the blood typing analyzer 100 segments the region 602 containing red blood cells from the target region 501 according to the Otsu method or clustering method.

[0090] For example, the specific implementation process of S606 can be as follows: the blood type analyzer 100 converts the first image from the RGB color space to the Lab color space. Furthermore, the blood type analyzer 100 defines the redness of each pixel in the first image located in the Lab color space as follows:

[0091] Where redness represents the degree of redness, L represents the value of the L channel in the Lab color space, and a represents the value of the a channel in the Lab color space.

[0092] When using Otsu's method to segment the region where red blood cells are located, the blood typing analyzer 100 can determine the redness of each pixel in the first image within the Lab color space. The blood typing analyzer 100 selects a redness value T from each pixel's redness value to maximize the inter-class variance between the foreground and background in the first image (pixels with redness values ​​greater than or equal to T are considered foreground, and pixels with redness values ​​less than T are considered background). The similarity variance satisfies the condition: σ 2 =ω0(μ0-μ) 2 +ω1(μ1-μ) 2 =ω0ω1(μ1-μ0) 2 μ0 represents the average redness of all pixels in the foreground of the first image; μ1 represents the average redness of all pixels in the background of the first image; μ represents the average redness of all pixels in the first image; ω0 and ω1 represent the proportions of the foreground and background in the first image, respectively. In this way, the blood typing analyzer 100 identifies pixels with a redness greater than T as representing red blood cells (i.e., foreground); and pixels with a redness less than T as representing background pixels. Thus, the blood typing analyzer 100 can segment the region 602 containing red blood cells from the target region 501.

[0093] When using clustering to segment the region where red blood cells are located, the blood typing analyzer 100 can divide the redness of each pixel in the first image into K classes, and randomly select a pixel from the redness of each class as the initial cluster center. The blood typing analyzer 100 calculates the Euclidean distance between the redness of each pixel in each class and the redness of each cluster center. Then, the blood typing analyzer 100 assigns the redness of each pixel to the nearest cluster center, and for each pixel assigned, the blood typing analyzer 100 calculates the distance according to a formula... Recalculate the cluster centers of the pixel set whose erythrocytes were assigned to the new pixel. Here, μ is the cluster center, and C... i Let x represent the set of pixels in category i, and x be the number of pixels in category i. (redness) jThe redness of the pixels in category i is determined. This process is repeated until the cluster centers no longer change. Then, the blood typing analyzer 100 determines the pixel corresponding to the largest redness of the cluster center as the pixel representing a red blood cell. In this way, the blood typing analyzer 100 can segment the region 602 containing red blood cells from the target region 501.

[0094] S607: The blood type analyzer 100 determines the first agglutination intensity based on the distribution of red blood cells in each microcolumn 401 in the preprocessed first image.

[0095] The agglutination intensity interpretation method provided in this application allows the blood typing analyzer to acquire a template image after photographing the blood type card to obtain a first image. The location of the blood gel on the template image is precisely defined. Therefore, the location of the target region in the first image, identified based on the acquired template image, is also precise. The target region indicates the area where the blood gel is located in the first image; thus, the accuracy of interpreting the agglutination intensity of the blood gel in the target region of the first image is high. The blood typing analyzer 100 can use the first agglutination intensity to determine blood type, screen antibodies, and perform other operations. The following example illustrates how the blood typing analyzer 100 uses the first agglutination intensity to determine blood type.

[0096] For example, there is a mapping relationship between the initial agglutination intensity of red blood cells in each microcolumn 401 and the blood type. In this way, the blood typing analyzer 100 determines the blood type based on the initial agglutination intensity of red blood cells in each microcolumn 401. The mapping relationship can be shown in Table 1.

[0097]

[0098] Table 1

[0099] In one possible implementation, the first image includes a third sub-image and a fourth sub-image, wherein the third sub-image is a photograph of the front of the blood type card and the fourth sub-image is a photograph of the back of the blood type card.

[0100] The third sub-image is obtained by photographing the front of the blood type card 400, and the fourth sub-image is obtained by photographing the back of the blood type card 400. The blood type analyzer 100 determines the blood type based on the first agglutination intensity in each microcolumn 401 as follows: The blood type analyzer 100 constructs a data set from the first image obtained from photographing the front of the blood type card 400 and the two first agglutination intensities corresponding to the same microcolumn 401 in the first image obtained from photographing the front of the blood type card 400. The blood type analyzer 100 selects the first agglutination intensity with the larger value from each data set. The blood type analyzer 100 determines the blood type based on the selected first agglutination intensities. In this way, even if one side of the blood type card 400 is contaminated, the selected larger first agglutination intensity is the first agglutination intensity of the uncontaminated side, improving accuracy.

[0101] Please see Figure 8 This application also provides an agglutination intensity determination device 800, applied to a blood typing analyzer. It should be noted that the agglutination intensity determination device 800 provided in this application has the same basic principle and technical effects as the above embodiments. For the sake of brevity, any parts not mentioned in this application can be referred to the corresponding content in the above embodiments. The agglutination intensity determination device 800 provided in this application includes:

[0102] The image capturing unit 801 is used to capture images of the blood type card located on the blood type analyzer to obtain a first image. The blood type card includes multiple microcolumns containing blood gel, and the blood gel includes serum, red blood cells, and gel solution.

[0103] Image acquisition unit 802 acquires template image.

[0104] Image recognition unit 803 is used to identify a target region of the first image based on the acquired template image, wherein the target region is used to indicate the area where the blood gel is located on the first image.

[0105] The image interpretation unit 804 is used to interpret the agglutination intensity of the blood gel in the target area of ​​the first image.

[0106] Figure 9 This is a block diagram illustrating a blood typing analyzer according to an exemplary embodiment. The blood typing analyzer may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, an input / output (I / O) interface 912, a sensor component 914, and a camera 300.

[0107] Processing component 902 typically controls the overall operation of device 900. Processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the method described above. In addition, processing component 902 may include one or more modules to facilitate interaction between processing component 902 and other components.

[0108] Memory 904 is configured to store various types of data to support the operation of device 900. Examples of this data include instructions for any application or method operating on device 900. Memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, and flash memory.

[0109] Power supply component 906 provides power to various components of device 900. Power supply component 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 900.

[0110] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc.

[0111] Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of device 900. For example, sensor assembly 914 can detect the on / off state of device 900, the relative positioning of components. Sensor assembly 914 can also detect changes in the position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration / deceleration of device 900, and temperature changes of device 900.

[0112] Camera 300 is configured to take pictures of blood type cards.

[0113] In an exemplary embodiment, the apparatus 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0114] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, which can be executed by a processor 920 of device 900 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. This non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the blood typing analyzer, enables the electronic device to perform... Figure 3 The method for interpreting agglomeration intensity is shown.

[0115] This application also provides a computer program product, including a computer program, which, when executed by a processor, performs... Figure 3 The method for interpreting agglomeration intensity is shown.

[0116] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0117] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for determining agglomeration intensity, characterized in that, Applied to a blood typing analyzer, the method includes: A first image is obtained by taking a picture of the blood type card located on the blood type analyzer. The blood type card includes multiple microcolumns containing blood gel, and the blood gel includes serum, red blood cells and gel solution. The size of the first image is m×n. Obtain a template image; wherein the size of the template image is M×N, the area of ​​the template image is smaller than the area of ​​the first image, and each microcolumn on the template image is marked with the first region where the blood gel is located; The first image is preprocessed to make it the same as the template image in size and orientation. The target region of the first image is identified based on the acquired template image, and the target region is used to indicate the area where the blood gel is located on the first image; The agglutination intensity of the blood gel in the target area of ​​the first image is determined; The steps for preprocessing the first image include: Move an M×N window over the first image to traverse multiple first sub-images of size M×N in the first image; When traversing to a first sub-image, rotate the traversed first sub-image once every preset angle to obtain a second sub-image at a different placement angle in each first sub-image. After traversal is complete, the similarity between each second sub-image and the template image is calculated according to a preset matching algorithm; The second sub-image with the highest similarity is used as the first image with the same size and placement angle as the template image.

2. The method according to claim 1, characterized in that, The preset matching algorithm includes any one of the following: Calculate the average absolute difference of the grayscale values ​​of each second sub-image and the template image, wherein the average absolute difference is negatively correlated with the similarity. Calculate the correlation coefficient between the grayscale values ​​of each second sub-image and the template image; wherein the correlation coefficient is positively correlated with the similarity. Calculate the distance between the edge points of each second sub-image and the corresponding edge points of the template image; wherein the distance is negatively correlated with the similarity. Specific physical parameters are extracted from local feature points of each of the second sub-images, descriptive information is established based on the specific physical parameters, and the matching value between the descriptive information and the template image is calculated; wherein, the specific physical parameters include position parameters, size parameters, and rotation invariants, and the correlation coefficient is positively correlated with the matching value.

3. The method according to claim 1 or 2, characterized in that, The step of identifying the target region of the first image based on the acquired template image includes: The target region of each of the micropillars in the first image is determined based on each first region on the template image; The region where the red blood cells are located is segmented from the target region of each of the micropillars in the first image.

4. The method according to claim 3, characterized in that, Before determining the target region of each of the micropillars in the first image based on each first region on the template image, the method further includes: Identify a first line segment located at the top of each of the target regions, and a second line segment located at the bottom of each of the target regions; Based on the first line segment and the second line segment of each target region, the corresponding target region is corrected; The process of segmenting the region where the red blood cells are located from the target regions of each of the microcolumns in the first image includes: the blood type analyzer segmenting the region where the red blood cells are located from the corrected target regions.

5. The method according to claim 4, characterized in that, The step of correcting the position of the corresponding target region based on the first line segment and the second line segment of each target region includes: Each of the target regions is determined to include a third region comprising the first line segment and a fourth region comprising the second line segment, wherein the distance between the first line segment and the top and bottom of the third region is within a distance threshold, and the distance between the second line segment and the top and bottom of the fourth region is within the distance threshold; The brightness of each pixel on each third line segment parallel to the first line segment in the third region is determined by the sum of the absolute values ​​of the gradient values ​​in the direction perpendicular to the third line segment; and the brightness of each pixel on each fourth line segment parallel to the second line segment in the fourth region is determined by the sum of the absolute values ​​of the gradient values ​​in the direction perpendicular to the fourth line segment. The target region is corrected, wherein the top of the corrected target region is the third line segment with the largest sum of absolute gradient values, and the bottom of the corrected target region is the fourth line segment with the largest sum of absolute gradient values.

6. The method according to claim 4, characterized in that, The blood typing analyzer segments the region containing the red blood cells from the target region, including: The blood typing analyzer segments the region where the red blood cells are located from the target region based on the Otsu method or clustering method.

7. The method according to claim 1, characterized in that, The steps for determining the agglutination intensity of the blood gel in the target region of the first image include: Each of the micropillars in the first image is divided into multiple sub-regions; A first feature vector is constructed based on the number of pixels of red blood cells on the same microcolumn in each of the sub-regions; Each of the first feature vectors is input into a preset first model to obtain the first aggregation intensity of red blood cells in each of the microcolumns, wherein the first model is trained based on multiple training samples, and any one of the training samples is a second feature vector labeled with a second aggregation intensity.

8. The method according to claim 1, characterized in that, After determining the agglutination intensity of the blood gel in the target region of the first image, the method further includes: Blood type is determined based on the first agglutination intensity of the red blood cells in each of the aforementioned microcolumns.

9. The method according to claim 8, characterized in that, The first image includes a third sub-image and a fourth sub-image. The third sub-image is a photograph of the front of the blood type card, and the fourth sub-image is a photograph of the back of the blood type card. The blood type analyzer determines the blood type based on the first agglutination intensity in each of the microcolumns, including: The blood type analyzer will construct a data set from the third sub-image obtained by taking a picture of the front of the blood type card and the fourth sub-image obtained by taking a picture of the back of the blood type card, which contains two first agglutination intensities corresponding to the same microcolumn. The blood typing analyzer selects the first agglutination intensity with the larger value from each of the data sets; The blood typing analyzer determines the blood type based on the selected first agglutination intensities.

10. The method according to claim 1, characterized in that, The method further includes: The blood typing analyzer receives a first instruction, which is used to instruct the template image to be updated. The blood typing analyzer updates the template image in response to the first command.

11. A device for determining agglomeration intensity, characterized in that, Applied to a blood typing analyzer, the device includes: An image capturing unit is used to capture an image of a blood type card located on the blood type analyzer to obtain a first image. The blood type card includes multiple microcolumns containing blood gel, and the blood gel includes serum, red blood cells, and gel solution. The size of the first image is m×n. An image acquisition unit acquires a template image; wherein the size of the template image is M×N, the area of ​​the template image is smaller than the area of ​​the first image, and each microcolumn on the template image is marked with a first region where the blood gel is located; the first image is preprocessed to make the first image and the template image the same in size and placement angle; An image recognition unit is configured to identify a target region of the first image based on an acquired template image, wherein the target region is used to indicate the area where the blood gel is located on the first image; An image interpretation unit is used to interpret the agglutination intensity of the blood gel in the target area of ​​the first image; The image acquisition unit is specifically used to move an M×N window on the first image to traverse multiple first sub-images of size M×N in the first image; when traversing to a first sub-image, the traversed first sub-image is rotated once at a preset angle to obtain second sub-images at different placement angles in each of the first sub-images; after traversal is completed, the similarity between each second sub-image and the template image is calculated according to a preset matching algorithm; the second sub-image with the highest similarity is used as the first image with the same size and placement angle as the template image.

12. A blood typing analyzer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the blood typing analyzer to perform the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the computer to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Blood type distinguishing method based on blood type card

    CN106199014A