Device and method for blood analysis by image processing

11288794 · 2022-03-29

Assignee

Inventors

Cpc classification

International classification

Abstract

The present application describes a new device and method of use thereof, which allows identifying certain antigens and antibodies present in the blood. The device of the present invention is a closed device consisting of two parts, wherein the upper part has a chamber surrounded by LEDs illuminating the analysis plate, which is supported by the rotating platform. In turn, the rotating platform is connected to a motor that will promote the rotation thereof for mixing reagents with blood. After a period of time, the camera will capture and send the resulting image to a computer program that will analyze the sample, using image processing techniques.

Claims

1. A method for detecting immunological agglutination of blood samples using a portable device, the method comprising: a) providing a portable device for testing blood samples, the portable device comprising: a lower part comprising: a rotating platform; an analytical plate disposed on the rotating platform, the analysis plate having a plurality of containers; each container adapted to hold a reagent and a sample of blood; a motor adapted to cause the rotating platform to rotate; and an upper part connected to the lower part, the upper part comprising: a peripheral wall having a cylindrical shape; a lid; a camera disposed at a center of the cylindrical shape, the camera being adapted to capture an image of the plurality of containers of the analysis plate, the camera further being adapted to transmit the image to a processing device configured to use one or more image processing techniques to analyze the image; and a plurality of LEDs disposed on the peripheral wall in an arrangement that surrounds the camera, the plurality of LEDs adapted to illuminate the analysis plate; b) placing each reagent in a respective containers of the analysis plate, and then a sample of blood to be analyzed, both in respective proportions; c) placing the analysis plate in the portable device, fixing the analysis plate to the rotating platform; d) closing the device by joining the upper part of the device with the lower part and starting the device; e) activating the camera, plurality of LEDs, and motor, according to the following steps: i. moving rotationally the platform, via the motor for a time between 60 and 130 seconds, during which the reaction takes place; ii. stopping the motor and turning on the plurality of LEDs; and iii. after 2 minutes, capturing an image with the camera; f) turning off the plurality of LEDs; g) sending the camera's image to a processing device, which in turn stores this image; h) treating the image by image processing techniques on the processing device, the processing techniques comprising: i. extracting green color planes of the captured image by transforming an original 32-bit image into an 8-bit image, so the green color plane can be used; ii. separating blood and reagent mixtures into two regions, designated particle region and background region, by assigning a value 1 to all pixels belonging to a range of established values and assigning a value 0 to all other pixels in the image that does not belong to the range of established values; iii. calculating a threshold value for each pixel based on statistics of an adjacent pixel, using a 32-width and 32-height default matrix, with a deviation factor which by default is 0.20; iv. in the image, assigning a pixel value 1 to existing holes in the particles corresponding to the blood and reagent mixtures; v. then, removing particles with the value of 1 pixel to remove background noise from the image and ensure that only particles related to test containers remain; vi. removing particles which are the borders of the image, filling in the position with the same value of the adjacent pixel, in order to ensure that only remain for analyzing particles related to containers; vii. calculating metrics on a CenterofMassX and CenterofMassY image, which together provide coordinates of a center of mass of each particle in the image; viii. extracting light planes from the original image and transform the image into an 8-bit image; ix. referencing an object in the image that is an identifying mark of an order in which a test was performed, keeping a profile of the object and searching for the object in each image analyzed, giving coordinates and calculating distances to other objects; x. identifying in each image six containers and presenting coordinates of each one in order to calculate the aforementioned distances; xi. quantifying a given image region defined by a programmer, using each of the coordinates given in a previous function to quantify a set of metrics as average of pixels, minimum value, maximum value, standard deviation and analyzed area, because the standard deviation value determines whether or not agglutination has occurred in each container; and i) classifying an occurrence or non-occurrence of agglutination via a classification algorithm according to a standard deviation value obtained for each of the containers.

2. The method for detecting immunological agglutination of blood samples according to claim 1, wherein a blood to reagent ratio consists of a drop of whole blood having one-fourth of a reagent drop size.

3. The method for detecting immunological agglutination of blood samples according to claim 1, wherein when the standard deviation is higher than 16, the classification algorithm classifies as agglutinated.

4. The method for detecting immunological agglutination of blood samples according to claim 1, wherein when the standard deviation is less than 16, the classification algorithm classifies as not agglutinated.

5. The method for detecting immunological agglutination of blood samples according to claim 1, wherein results of occurrence or non-occurrence of agglutination are sent by SMS or email.

6. The method for detecting immunological agglutination of blood samples according to claim 1, wherein blood type is detected by determining ABO and Rh.

Description

BRIEF DESCRIPTION OF THE FIGURES

(1) For an easier understanding of the invention, figures representing preferred embodiments of the invention area appended which, however, do not intend to limit the subject matter of this application.

(2) FIG. 1 illustrates a representation of the device wherein (5) is the lower part, (1) the upper part; (3) the camera; (4) the LEDs; (8) the analysis plate; (6) the rotating platform; (7) the motor and (2) the lid.

(3) FIG. 2 illustrates a representation of the analysis plate (8).

(4) FIG. 3 illustrates a representation of the analysis plate (8) and the respective lid (11).

(5) FIG. 4 illustrates a representation of the spinning plate (12) with the respective containers (13).

(6) FIG. 5 illustrates a representation of a spinning plate with a lid (11).

DESCRIPTION OF EMBODIMENTS

(7) Device

(8) The device of the present invention is a portable device consisting of two parts, the upper (1) and lower (5). The upper part (1) comprises a digital camera (3) which is fixed in the center of the upper part, directly focusing on the region of the sample to be analyzed, surrounded by lighting, which may have between 4 and 6 LEDs (4) for a good image view and, consequently, whether or not agglutination has occurred. The LEDs will illuminate the analysis plate (8) located in the lower part of the device (5), more specifically in the rotating platform (6). The lower part of the device (5) comprises a motor (7) which is connected to the rotating platform (6) where the respective plate having a test sample (8) is securely fitted. The plate may be of tests (8) or spinning (12), i.e. containers are deeper.

(9) The camera is connected to a laptop computer or another mobile device such as a phone (smartphone) or tablet via USB, Wireless or Bluetooth, which analyzes the captured images through image processing techniques.

(10) The incorporation of a camera connected to the internet via USB, Wireless or Bluetooth enables sending the captured image to the equipment referred in the previous paragraph. Through an application developed for different operating systems, the image can be used in any such equipment.

(11) The device is closed, due to the existence of a lid (2), with no ambient light input, which prevents the existence or interference of artifacts in the image, which could compromise the entire analysis performed, providing a wrong blood type result.

(12) The fact that the camera focus directly on the samples enables capture of a whole image and therefore a complete analysis of all reactions.

(13) The rotating platform (6) securely fits the respective closed analysis plate (8) having six separate containers, which have holes made of a sealable and impermeable material (10).

(14) The upper part (1) and the lower part (5) of the device may be connected by a hinge on one side and a lock on the opposite side.

(15) Motor can reach speeds between 0 and 13446 rpm.

(16) The mixing and motor starting is made through a switch and there is a potentiometer for regulating the motor speed, depending on whether an analysis or spinning is performed, and a timer for controlling the run time of each test.

(17) The rotating platform is the basic part of the system which assists in promoting the mixing of the components that are on the board, since it is directly connected to the motor. This basic part has a simple fitting system to allow entry and exit of the test and spinning plates.

(18) The camera and LEDs are properly protected by a fitting that allows easy access to both for future repairs and replacement of LEDs, if necessary.

(19) Importantly, both system and camera require a power supply, which is easily provided by a battery.

(20) The plates have two possibilities for introducing liquids: one in which the plate is a whole with a fixed lid and has in each container a small hole sealed by an impermeable material, allowing only the passage of a needle for introducing blood and reagent, and preventing discharge of blood even during the mixing process where the speeds are high; one in which the plate is dismountable and has a removable lid that allows the introduction of blood and reagent and may be fitted again by means of a thread, being the parts fixed by rotating the lid on the plate, in such a way that there is neither a leakage of blood and reagent, nor mixing between containers.

(21) In the latter plate, the sealing mechanism is a thread that allows joining both parts (lid and base with containers) completely sealing liquid spillage.

(22) Both plates are properly sealed for having no contamination or mixing between blood and reagent containers and are transparent for easily capturing the image.

(23) Containers are separate and sealed (isolated), enabling no contamination between samples—in the claimed device the blood will be introduced through the small holes present in each container only, not being necessary to open the analysis plate;

(24) Given the speed that the motor can reach, if blood spinning is required, it can be performed on the device, in order to obtain plasma segregated from its components, which might be used to perform some tests. For this, a spinning plate (12) is used in which containers must be deeper (13) for accommodating a larger amount of blood (total liquid) than the plate used in tests.

(25) The container walls are circular, such that, in the event of blood and reagents deposition, these will always have the tendency to drain/go down to the bottom of the container and deposit/accumulate there. Thus, the liquid will always be deposited at the base of the container and with a good area with the reaction to analyze.

(26) The base of containers can be not completely round. The base of the container is flat or planar to facilitate visualization of the reactions between blood and reagent. Thus, although the plate is currently in the format shown, having some concavity, the same plate completely straight might be used with flat-based containers.

(27) According to the methodology of the slide test, a drop of blood having ¼ of the reagent drop size or plasma should be inserted, depending on the test concerned.

(28) Method of Analysis

(29) The method of analysis of the blood sample comprises the following steps: a) Place each of the reagents in their respective containers (9) of the analysis plate (8), and then the blood to be analyzed, both in their respective proportions; b) Then, place the analysis plate (8) in the device, by fixing it to the rotating platform (6), in order to avoid any displacement possibility during processing due to the high motor (7) speeds; c) Close the device by joining the upper part of the device (1) with the lower part (5) and start the device, adjusting the speed according to that recommended for the test; d) The device activates the camera (3), LEDs (4) and motor (7), according to the following steps: i. The motor (7) moves rotationally the platform (6) for a time between 60 and 130 second, during which the reactions takes place; ii. The motor (7) stops and the LEDs (4) are turned on; iii. The camera (3) captures the image after 2 minutes only, so that weaker reactions are not hidden; e) LEDs (4) are turned off; f) The camera's image is sent to the mobile device, which in turn stores this image; g) The image is treated by image processing techniques; h) The classification algorithm classifies the occurrence or non-occurrence of agglutination according to the standard deviation value obtained in each of the test containers. In the event of performing a spinning, proceed as follows: In a spinning plate place the recommended blood amount in each of the required containers; Open up the system and place the spinning plate (12) therein, well fixed for preventing any displacement from its place; Then, close the system, adjust the speed according to the one recommended for the test and press the button to turn on the system and promote shaking; After spinning, open the system for removing the spinning plate and extracting the plasma; Finally, discharge the spinning plate in a proper place.

(30) In the case of ABO group and RhD testing 4 containers are used and for RhD phenotype 6 containers are used.

(31) Image Processing Techniques

(32) The image processing techniques to detect the occurrence of agglutination and, therefore, determine the result of the test under analysis comprise the following steps: a) Extract the green color planes of the captured image by transforming the original 32-bit image into an 8-bit image so it can be used; b) Separate the blood and reagent mixtures into two regions, designated particle region and background region, by assigning the value 1 (one) to all pixels belonging to a range of established values and assigning the value 0 (zero) to all other pixels in the image that does not belong to such established range; c) Calculate the threshold value for each pixel based on statistics of the adjacent pixel, using a 32-width and 32-height default matrix (kernel), with a deviation factor which by default is 0.20; d) In the image, assign the value 1 (one) to existing holes in the particles corresponding to blood and reagent mixtures; e) Then, remove the particles with the value 1 (one) to remove background noise from the image and ensure that at the end only remain the particles related to test containers; f) Remove the particles which are on the borders of the image, filling in the position with the same value of the adjacent pixel in order to ensure that only remain for analyzing particles related to test containers; g) Calculate the metrics on the CenterofMassX and CenterofMassY image, which together provide the coordinates of the center of mass of each particle in the image; h) Extract the light planes from the original image and transform the image into an 8-bit image, which can now be used by other functions; i) Reference the object in the image that is an identifying mark of the order in which the test was performed, keeping a profile of such object and searching for such object in each image analyzed by the program, giving the coordinates and calculating the distances to other objects; j) Identify in each image six containers and present the coordinates of each in order to calculate the aforementioned distances; k) Quantify a given image region defined by the programmer, using each of the container's coordinates given in the previous function to quantify a set of metrics as average of pixels, minimum value, maximum value, standard deviation and analyzed area, because the standard deviation value determines whether or not agglutination has occurred in each test container.

(33) The image processing techniques have been developed using the Labview software and also with the programming languages C# and C, such that they can be used by different mobile devices. The possibility of having the application in a mobile device enables its worldwide use. The developed software, as mentioned, uses image processing techniques to detect agglutination and classification algorithms to determine the result of the tests performed.

(34) The application's main functions are: Image Buffer: Store a copy—which allows saving the original image captured by the camera in order to keep it intact for further use later on; Color Plane Extraction: RGB Green Plane—extracts green planes from the captured image, allowing transforming the original 32-bit image into an 8-bit image, such that it can be used by subsequent functions required for processing; Auto Threshold Clustering—this function applies a threshold (threshold, in English threshold) based on statistical techniques called clustering and is used to separate the blood and reagent mixtures into two regions, designated “particle region” and “background region”. This process consists of changing all pixels belonging to a certain range of established values (designated threshold range) by changing all other pixels in the image to zero (0). It is important to note that the function is automatic and the users need not to specify the range values. To set the threshold, the function automatically uses the histogram values; Local Threshold: Niblack—in this function the threshold value for each pixel is calculated based on statistics of the adjacent pixel. A 32-width and 32-height default matrix (kernel) is used, with a deviation factor which by default is 0.20. This function is extremely important to isolate particles to be analyzed. After applying this function, particles corresponding to blood and reagent mixtures are then isolated from the rest of the image; Adv. Morphology: Fill holes—which allow completely filling the existing holes in the particles; Adv. Morphology: Remove small objects—as the name indicates, it removes small particles, by removing trash background that is spoiling the image and ensuring that ultimately only remain particles relating to test containers; Adv. Morphology: Remove border objects—removes particles that are on the borders of the image, ensuring once again that remain for analysis particles relating to test containers only; Particle Analysis—this function is extremely useful since it allows obtaining a series of metrics about the image, such as CenterofMassX and CenterofMassY, which together provide the coordinates of the center of mass of each particle in the image; the center of Mass X is a coordinate that together with the center of Mass Y provide a position in the particle (blood/reagent mixture) which corresponds to the center of mass of such particle—the mass of the particle pixels is averaged and the value obtained according to the following formulae:

(35) CenterofmassX = m 1 x 1 + m 2 x 2 + m 3 x 3 + .Math. + m n x n m 1 + m 2 + m 3 + .Math. + m n CenterofmassY = m 1 y 1 + m 2 y 2 + m 3 y 3 + .Math. + m n y n m 1 + m 2 + m 3 + .Math. + m n Image Buffer: Retrieve Copy—to retrieve the original image saved in the first function presented in such a way that it can be used by the following functions; Color Plane Extraction: HSL Luminance Plane—extracts light planes from the original image and allows once again transforming the image into an 8-bit image which can now be used by other functions; Pattern Matching—this function is crucial for determining the test result. Basically, it consists in referencing an object in the image that actually is an identifying mark of the order in which the test was performed. The function save a profile of such object and will try to search for such an object in each of the images that the program analyzes. Once the reference object is found, it returns its coordinates and, based on these, it allows calculating distances to other objects (in this case, to each of the particles corresponding to the test containers). Knowing the distances, these are ordered and the correct order of test analysis obtained, as well as the result of the test performed, which will then be provided by the classification algorithm; Geometric Matching—this function associated with the previous one help in determining the result of the test. In this case, provided the profile of each test container, the function will identify in each image six containers and will return the coordinates of each container. Through the coordinates of each of them, the aforementioned distances are calculated (from the reference object to each of the containers). In this way, the correct order of the test analysis is known; Quantify—quantifies a particular image region defined by the programmer, using each of the container's coordinates provided in the previous function. Quantification allows obtaining a set of metrics such as average of pixels, minimum value, maximum value, standard deviation and analyzed area. In this case, the standard deviation value is the important metric for the work, as it is based on this value that it is determined whether or not agglutination has occurred in each test container. Classification Algorithm—the classification algorithm classifies the occurrence, or not, of agglutination in accordance with the standard deviation value obtained for each of the test containers. If the standard deviation is greater than 16, classifies as agglutinated, if the standard deviation is less than 16 classifies as non-agglutinated. In addition, combination of results according to agglutination and no agglutination allows to identify the test result for each of the tests performed, being either a blood group, an antibody, a compatibility or a disease.

(36) The function that removes border particles eliminates particles that touch the border of the image, that is, the outer boundaries of the image. In other words, if the particle touches the image borders, on the sidelines, it is eliminated. This is used to eliminate the circle made by the system base that is captured by the camera and does—not account for image analysis. No values are used, it is just enough to touch on said image boundaries.

(37) The Image Processing techniques developed and remaining algorithms are capable of being used in mobile devices such as tables and mobile phones with Windows Phone, Android and iOS operating system. These applications are primarily based on capturing an image by the mobile device and processing of such an image by the image processing techniques developed; or image capturing can be performed by the system camera and sent to the mobile device via Bluetooth/Wireless, being the Image Processing of the sent image performed therein by the developed application.

(38) The above described software also allows sending electronic mail and short messages (sms) to a mobile phone with the results of the tests performed, allowing, in the event of tests performed outside the laboratory, to prepare in advance a compatible blood unit.

EXAMPLES

(39) In the following example, results are presented for ABO group and RhD testing, and for RhD phenotyping. Taking into account that occurrence of agglutination identifies the antigen present, in the case of ABO group and RhD testing, there is a range of possible results, some of which are shown in Table 1. Analyzing Table 1, it follows that, for example, Example 1 Agglutinated in the presence of anti-A, anti-AB and anti-D reagents, indicating the presence of antigens A and D. Since D indicates whether it is Rh positive or Rh negative, the occurrence of agglutination indicates positiveness, and therefore the result of this test is A Positive. The same reasoning will be applied to the other examples. For example, Example 4 has 0 Positive as its result, because the single reagent which agglutinated the blood was in the presence of Anti-D reagent, indicating the positiveness of Rh and indicating that no other antigens are present, hence it is a 0 or zero positive.

(40) TABLE-US-00001 TABLE 1 Expected results with classification algorithm for ABO group and Rh testing AntiA Anti-B Anti-AB Anti-D Reagent Reagent Reagent Reagent Result Example 1 Agglu- Not Agglu- Agglu- A Positive tinated Agglu- tinated tinated tinated Example 2 Not Agglu- Agglu- Not B Negative Agglu- tinated tinated Agglu- tinated tinated Example 3 Agglu- Agglu- Agglu- Not AB Negative tinated tinated tinated Agglu- tinated Example 4 Not Not Not Agglu- O Positive agglu- Agglu- Agglu- tinated tinated tinated tinated

(41) In case of RhD phenotype testing, the procedure is similar. The agglutination identifies the presence of the antigen and as such, analyzing one of the examples, e.g. Example 2, taking into account that agglutinated in the presence of anti-D, anti-c, anti-c and anti-E reagents, with no agglutination in the others, the present phenotype is DcCe.

(42) TABLE-US-00002 TABLE 2 Results for the phenotype testing with the classification algorithm Anti-D Anti-C Anti-c Anti-E Anti-e Anti-K Reagent Reagent Reagent Reagent Reagent Reagent Result Example 1 Agglutinated Not Agglutinated Agglutinated Agglutinated Not DcEe Agglutinated Agglutinated Example 2 Agglutinated Agglutinated Agglutinated Not Agglutinated Not DcCe Agglutinated Agglutinated