CN115908290A - Blood type card defect detection method and device and computer readable storage medium - Google Patents
Blood type card defect detection method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN115908290A CN115908290A CN202211392719.5A CN202211392719A CN115908290A CN 115908290 A CN115908290 A CN 115908290A CN 202211392719 A CN202211392719 A CN 202211392719A CN 115908290 A CN115908290 A CN 115908290A
- Authority
- CN
- China
- Prior art keywords
- blood
- detection area
- micro
- pollution
- type card
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Investigating Or Analysing Biological Materials (AREA)
Abstract
A blood type card defect detection method, a device and a computer readable storage medium relate to the technical field of medical treatment. The method comprises the steps of obtaining an image of a blood type card to be detected, wherein the blood type card comprises a micro-column tube containing blood gel, further determining a detection area in the image of the blood type card to be detected, the detection area is used for indicating the area where the micro-column tube on the image is located, and therefore, based on the detection area, detecting whether the blood type card to be detected has defects, wherein the defects comprise pollutants, high abnormity of blood coagulation glue in the micro-column tube, dry glue and the like, if the defects exist in the detection, defect prompting is carried out, so that the blood type card in an abnormal state is screened out, the reliability of the judgment and reading result of a blood type analyzer is improved, meanwhile, the manual detection of the blood type card is reduced, and the efficiency of blood type analysis is improved.
Description
Technical Field
The embodiment of the application relates to the technical field of medical treatment, in particular to a method and a device for detecting blood type card defects and a computer readable storage medium.
Background
Blood type related detection items, such as blood typing, irregular antibody screening, etc., have been widely detected by blood type analyzers. Because the detection is quick and convenient, the blood type analyzer is suitable for blood type related detection tests of hospitals at all levels, blood stations, blood centers and the like.
In the related technology, one of the key links of the blood type analyzer is interpretation, namely, the blood type card with the sample added is photographed, then the photographed image is analyzed and identified, and finally the item detection result is output.
However, the blood type card before use may have some defects, thereby affecting the final interpretation result of the blood type analyzer and reducing the reliability of the interpretation result.
Disclosure of Invention
The embodiment of the application provides a blood type card defect detection method, a blood type card defect detection device and a computer readable storage medium, so as to overcome at least one problem.
In a first aspect, an embodiment of the present application provides a method for detecting a blood type card defect, including:
acquiring an image of a blood type card to be detected, wherein the blood type card comprises a microcolumn tube containing blood gel;
determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the micro-column tube on the image is located;
detecting whether the blood type card to be detected has defects based on the detection area, wherein the defects comprise one or more of pollutants, abnormal height of blood coagulation glue in the microcolumn tube and dry glue;
and if the blood type card to be detected has defects, prompting the defects.
In one possible embodiment, the defect comprises a contaminant;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
determining response intensity and position coordinates of a pollution candidate point based on the detection area, wherein the response intensity is determined according to the brightness change condition of the pollution candidate point;
acquiring a pollution candidate area according to the response strength and the position coordinates of the pollution candidate points;
and judging whether the blood type card to be detected has pollutants or not based on the pollution candidate area.
In one possible embodiment, the method further comprises:
extracting the edge of the gel column in the detection area, and determining the response intensity of each pollution candidate point on the edge of the gel column;
obtaining a first weight for each contamination candidate point on the gel column edge based on a response intensity for each contamination candidate point on the gel column edge, wherein the first weight is inversely proportional to the response intensity;
and acquiring a second weight of each pollution candidate point outside the edge of the gel column based on the response intensity of each pollution candidate point in the detection area and outside the edge of the gel column, wherein the second weight is a preset value and is greater than the first weight.
In a possible implementation manner, the obtaining a contamination candidate region according to the response strength and the position coordinates of the contamination candidate point includes:
screening out a pollution seed point from the pollution candidate points according to the response strength of the pollution candidate points and the weight of each pollution candidate point in the detection area;
determining the position coordinates of the contamination seed point based on the position coordinates of the contamination candidate point;
and obtaining a corresponding pollution candidate area according to the position coordinates and the gray value of each pollution seed point.
In a possible implementation manner, the obtaining a corresponding contamination candidate region according to the position coordinate and the gray scale value of each contamination seed point includes:
identifying pixel points which form a communication area with the corresponding pollution seed points in the detection area according to the position coordinates of each pollution seed point;
determining pixel points of which the difference value between the gray value and the gray value of the corresponding seed point is within a preset difference value range from the pixel points forming the communicated region with the corresponding pollution seed point;
and acquiring a pollution candidate area corresponding to each pollution seed point based on the determined pixel points.
In one possible embodiment, the determining the response strength and the position coordinates of the contamination candidate point based on the detection area includes:
inputting the detection area into a preset model, wherein the preset model is used for determining the response intensity and the position coordinates of the feature points in the image;
determining the response intensity and the position coordinates of the feature points of the detection area based on the output of the preset model;
and taking the characteristic points of the detection area as the pollution candidate points, and obtaining the response intensity and the position coordinates of the pollution candidate points.
In a possible implementation manner, the determining whether the blood type card to be detected has a contaminant based on the contamination candidate area includes:
acquiring prestored judging conditions of pollutants, wherein the judging conditions comprise one or more of the number of pixel points of a pollution candidate region, the length of a circumscribed rectangle of the pollution candidate region, the width of the circumscribed rectangle of the pollution candidate region, the length-width ratio of the circumscribed rectangle of the pollution candidate region, the maximum gray value in the circumscribed rectangle of the pollution candidate region, the minimum gray value in the circumscribed rectangle of the pollution candidate region, the gray difference value in the circumscribed rectangle of the pollution candidate region, the gray value of the central point in the circumscribed rectangle of the pollution candidate region and the area ratio of the pollution candidate region to the circumscribed rectangle thereof;
and judging whether the blood type card to be detected has pollutants or not according to the judgment condition and the pollution candidate area.
In one possible embodiment, the defect comprises a high abnormality of the blood clotting glue in the microcolumn tube;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
determining a bottom of the microcolumn tube based on the detection region;
obtaining a detection area at the top of the blood coagulation glue and a detection area of the supernatant in the micro-column tube according to the bottom of the micro-column tube;
and judging whether the blood group card to be detected has abnormal height of the blood coagulation adhesive in the micro-column tube or not based on the detection area at the top of the blood coagulation adhesive in the micro-column tube and the detection area of the supernatant.
In a possible embodiment, the determining the bottom of the microcolumn based on the detection area includes:
obtaining the pixel distribution condition of the edge of the detection area based on the detection area;
and determining the bottom of the micro-column tube according to the pixel distribution condition of the edge and the pixel distribution condition of the bottom of a preset micro-column tube.
In a possible embodiment, the obtaining of the top detection zone and the supernatant detection zone of the blood coagulation glue in the micro-column tube according to the bottom of the micro-column tube comprises:
determining a detection area at the top of the blood coagulation glue in the micro-column tube according to the bottom of the micro-column tube and the preset height of the blood coagulation glue;
judging whether the position of the top blood coagulation glue in the micro-column tube is obtained by positioning based on the detection area of the top blood coagulation glue in the micro-column tube;
and if the position of the top hemagglutination glue in the micro-column tube is obtained by judging and positioning, determining a supernatant detection area in the micro-column tube according to the position of the top hemagglutination glue and the preset height of the supernatant.
In a possible embodiment, the determining whether to locate the position of the top blood coagulation glue in the micro-column tube based on the detection area of the top blood coagulation glue in the micro-column tube comprises:
determining the pixel distribution condition of a detection area at the top of the blood coagulation glue in the microcolumn tube;
and judging whether to locate to obtain the position of the top blood coagulation glue in the micro-column tube according to the pixel distribution condition of the blood coagulation glue top detection area and the pixel distribution condition of the top blood coagulation glue in the preset micro-column tube.
In a possible implementation manner, the determining whether the blood group card to be detected has a blood coagulation glue height abnormality in the microcolumn tube based on the detection area at the top of the blood coagulation glue and the detection area of the supernatant in the microcolumn tube includes:
if the position of the top blood coagulation glue in the micro-column tube is obtained through positioning judgment, judging whether the liquid level of the supernatant in the micro-column tube is obtained through identification according to the detection area of the supernatant in the micro-column tube;
if the liquid level of the supernatant in the micro-column tube is judged and identified, determining the height of the blood coagulation glue in the micro-column tube and the height of the supernatant according to the bottom of the micro-column tube, the position of the blood coagulation glue at the top in the micro-column tube and the liquid level of the supernatant;
and judging whether the blood group card to be detected has abnormal height of the blood coagulation glue in the micro-column tube or not based on the height of the blood coagulation glue in the micro-column tube and the height of the supernatant, the preset height of the blood coagulation glue and the preset height of the supernatant.
In a possible embodiment, before the determining the bottom of the micro-column tube based on the detection area, the method further includes:
extracting the features of the image corresponding to the detection area to obtain a first preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the first preset characteristic component image;
the determining the bottom of the microcolumn tube based on the detection region includes:
and determining the bottom of the microcolumn tube based on the first preset characteristic component image after Gaussian filtering and contrast enhancement processing.
In one possible embodiment, the defect comprises a blood clotting gel dried gel in the micropillar tube;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
carrying out blocking processing on the detection area according to a preset size to obtain a plurality of blocking areas;
determining an average gray value of each of the plurality of block regions;
and judging whether the blood type card to be detected has blood coagulation adhesive dry glue in the micro-column tube or not according to the average gray value of each block area.
In a possible implementation manner, the determining whether the blood group card to be detected has blood coagulation glue dry glue in a microcolumn tube according to the average gray value of each partitioning area includes:
determining a standard deviation of the plurality of block areas based on the average gray value of each block area;
comparing the standard deviation with a preset standard deviation threshold value, wherein the preset standard deviation threshold value is determined according to the gray standard deviation of an image when the blood group card exists in the microcolumn tube and blood coagulation adhesive is dry;
and if the standard deviation is greater than or equal to the preset standard deviation threshold value, judging that the blood type card to be detected exists in the blood coagulation adhesive dry glue in the micro-column tube.
In a possible implementation manner, before the blocking the detection area according to the preset size to obtain a plurality of block areas, the method further includes:
performing feature extraction on the image corresponding to the detection area to obtain a second preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the second preset characteristic component image;
the blocking processing is performed on the detection area according to a preset size to obtain a plurality of blocking areas, and the blocking processing includes:
and according to the preset size, carrying out blocking processing on the second preset characteristic component image after the Gaussian filtering and contrast enhancement processing to obtain a plurality of blocking areas.
In a possible embodiment, the determining a detection area in the image of the blood type card to be detected includes:
acquiring a preset template image, wherein the preset template image comprises a detection area;
and matching the preset template image with the image of the blood type card to be detected, and determining a detection area in the image of the blood type card to be detected.
In a second aspect, an embodiment of the present application provides a blood type card defect detecting device, including:
the acquisition module is used for acquiring an image of a blood type card to be detected, wherein the blood type card comprises a microcolumn tube containing blood gel;
the determination module is used for determining a detection area in the image of the blood type card to be detected, and the detection area is used for indicating the area where the microcolumn tube is located on the image;
the detection module is used for detecting whether the blood type card to be detected has defects based on the detection area, wherein the defects comprise one or more of pollutants, abnormal height of blood coagulation glue in the microcolumn tube and dry glue;
and the prompting module is used for prompting the defect if the blood type card to be detected has the defect.
In a third aspect, embodiments of the present application further provide a blood type analyzer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to make the blood type analyzer execute the method according to the first aspect of the present application.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program causes a computer to execute the method according to the first aspect of the present application.
The embodiment of the application provides a blood type card defect detection method, device and computer readable storage medium, this method is through obtaining the image that detects the blood type card, this blood type card is including the microcolumn pipe that holds blood gel, and then, confirm the detection area in the image that detects the blood type card, this detection area is used for instructing the region that the microcolumn pipe on the image is located, thereby, based on above-mentioned detection area, whether detect and detect the blood type card that detects and have the defect, this defect includes the pollutant, highly unusual and dry glue of blood coagulation glue in the microcolumn pipe, if detect and have above-mentioned defect, then carry out the defect suggestion, so that screen out the blood type card of abnormal state, improve the reliability of blood type analysis appearance interpretation result, also reduced artifical detection to the blood type card simultaneously, improve blood type analysis's efficiency.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic structural diagram of a blood type analyzer according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a blood type card according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a method for detecting a defect of a blood type card according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a detection area in an image of a blood type card according to an embodiment of the present disclosure;
FIG. 5 is a schematic flowchart of another blood type card defect detection method according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of another blood type card defect detection method according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of another blood type card defect detection method according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a blood type card defect detecting device according to an embodiment of the present disclosure;
fig. 9 is a circuit connection block diagram of a blood type analyzer according to an embodiment of the present disclosure.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terms referred to in the present application are explained first:
blood type card: the blood type card includes several micro column tubes holding gel medium, and different human erythrocyte antigens and corresponding antibodies are added into the micro column tubes in the blood type card to produce specific immunoreaction, i.e. hemagglutination reaction. After the hemagglutination, the agglutinated red blood cells are left on the upper surface of the micro-column tube in a band shape or spread in the middle of the micro-column tube, while the unagglutinated red blood cells sink to the bottom of the micro-column tube by centrifugation. Therefore, the agglutination strength can be judged according to the position of the red blood cells, and the blood type can be further judged according to the agglutination strength.
The inventor finds that one of the key links of the blood type analyzer is interpretation, namely, the blood type card added with the sample is photographed, then the photographed image is analyzed and identified, and finally the item detection result is output. However, the blood type card before use may have some defects, thereby affecting the final interpretation result of the blood type analyzer and reducing the reliability of the interpretation result.
From the idea that improves blood group analysis appearance interpretation result reliability, in the embodiment of this application, whether there is the defect to the blood group card to detect, this defect includes pollutant, little pillar pipe in the high exception of blood coagulation glue and dry glue etc. if detect and have above-mentioned defect, then carry out the defect suggestion to screen out the blood group card of abnormal condition, improve blood group analysis appearance interpretation result reliability.
Having described the basic principles of the present application, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 1, the present application provides a method for detecting a defect of a blood type card, which can be applied to a blood type analyzer 100. Wherein blood type analyzer 100 may be, but is not limited to, a cuboid blood type analyzer 100. As shown in fig. 1, the blood type 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. The blood type card 400 is inserted into the card insertion slot 200, and the blood type card 400 may be an ABO positive typing blood type card or an ABO positive and negative typing blood type card, an antibody screening blood type card, or the like, which is not limited herein. Illustratively, as shown in fig. 2, a blood type card 400 includes a plurality of micropillars 401 holding a blood gel 402. The blood gel 402 is formed by adding different human erythrocyte antigens and corresponding antibodies to each micro-column tube 401 in the blood type card 400 for hemagglutination. After each micro-column tube 401 is added with different human erythrocyte antigens and corresponding antibodies, each micro-column tube 401 can be distinguished into different types. As also shown in FIG. 2, each microcolumn tube 401 includes a tube divided into-A tube, -B tube, -D tube, -C tube, -E tube, ctr tube, ac tube, and Bc tube.
When the application scene is the defect detection of the blood type card: before using a blood type card, the user may insert the blood type card into card slot 200 and send a test command to the processor. After receiving the detection instruction, the processor can control the camera 300 to start up to take a picture of the blood type card inserted into the card slot 200. After the completion of shooing, the blood group card image transmission that camera 300 will take a photograph sends the treater to, and the treater is after receiving the blood group card image that camera 300 sent, based on this blood group card image, detects whether there is the defect in the blood group card, and this defect includes that pollutant, little pillar pipe in the blood coagulation glue highly unusual and dry glue etc. if detect and have above-mentioned defect, then carry out the defect suggestion to screen out the blood group card of abnormal state, improve the reliability of blood group analysis appearance interpretation result.
Optionally, the blood type analyzer 100 may further include a prompting unit, and when the processor detects that the blood type card has a defect, the processor may perform defect prompting through the prompting unit, where the prompting unit has a display function, and may display the defect of the blood type card, so that a relevant person may timely handle the defect.
The method for detecting defects of blood type cards provided according to the exemplary embodiment of the present application is described below with reference to fig. 3 to 7 in conjunction with fig. 1 and 2. It should be noted that the above application scenarios are only presented to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
Referring to fig. 3, fig. 3 schematically shows a flow chart of a blood type card defect detection method provided in an embodiment of the present application. The execution subject of this embodiment may be determined according to an actual application scenario, and this is not particularly limited in this embodiment of the application. As shown in fig. 3, the method for detecting blood type card defects includes:
s301, obtaining an image of a blood type card to be detected, wherein the blood type card to be detected comprises a micro-column tube containing blood gel.
Wherein, the above-mentioned blood group card of waiting to detect can be confirmed according to actual conditions, for example in figure 1 before using the blood group card, detect this blood group card, this embodiment can regard this blood group card as the above-mentioned blood group card of waiting to detect.
S302, determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the microcolumn tube is located on the image.
Here, the embodiment may determine the detection area in the image of the blood type card to be detected by a template matching method, for example, a preset template image may be obtained first, wherein the preset template image includes the detection area, and then the preset template image is matched with the image of the blood type card to be detected to determine the detection area in the image of the blood type card to be detected, so that whether the blood type card to be detected has a defect or not may be detected subsequently based on the detection area, which not only reduces the amount of calculation, but also eliminates aluminum film interference above the blood type card, and improves the accuracy of the subsequent detection result. Taking the blood type card shown in fig. 2 as an example, the detection area obtained in this embodiment can be as shown in fig. 4.
And S303, detecting whether the blood type card to be detected has defects based on the detection area, wherein the defects comprise one or more of pollutants, abnormal height of blood coagulation glue in the microcolumn tube and dry glue.
The pollutants can be stains or dirt, the stains and the dirt refer to dirt stuck on people or objects, and the stains and the dirt refer to dirt stuck on the blood type card, and are relatively small, and the dirt is large. Here, the embodiment may input the image of the blood type card to be detected into a preset model to detect whether the blood type card to be detected has a defect based on the preset model and the detection area, wherein the preset model determines whether the blood type card has a defect based on the image of the blood type card.
S304, if the blood type card to be detected has defects, performing defect prompt.
Here, if detect above-mentioned blood group card that waits to detect and have the defect, can carry out the defect suggestion, if send the warning sound that has the defect or show defect etc. on the display screen, exemplary to send the warning sound that has the defect as an example, this embodiment can set up different defects and correspond different warning sounds, detect the above-mentioned blood group card that waits to detect and have the defect, if there is the pollutant, then send the warning sound that this defect corresponds, so that relevant personnel in time discover abnormal state's blood group card and screen out, improve the reliability of blood group analysis appearance interpretation result. If the blood type card to be detected does not have defects, normal prompt can be carried out, so that the blood type card without defects is subsequently used for carrying out blood type related detection, and the accuracy of a detection result is provided.
In the embodiment of the application, treat the image of blood group card through acquireing, and then, the check area in the image of treating the blood group card is detected to the definite, thereby, based on above-mentioned check area, whether detect and treat the blood group card and have the defect, this defect includes the pollutant, the blood coagulation glue height is unusual among the microcolumn pipe and glues etc. futilely, if detect and have above-mentioned defect, then carry out the defect suggestion, so that screen out the blood group card of abnormal condition, improve the reliability of blood type analysis appearance interpretation result, also reduced artifical detection to the blood group card simultaneously, the efficiency of blood type analysis is improved.
In addition, when the defect includes a contaminant, in the embodiment of the present application, when detecting whether the blood type card to be detected has a defect based on the detection area, it is further considered to determine the response intensity and the position coordinate of a contamination candidate point based on the detection area, where the response intensity is determined according to the brightness change condition of the contamination candidate point, and then a contamination candidate area is obtained according to the response intensity and the position coordinate of the contamination candidate point, so that whether the blood type card to be detected has a contaminant is determined based on the contamination candidate area, so as to implement defect detection of the blood type card to be detected. Fig. 5 is a schematic flow chart of another blood type card defect detection method according to an embodiment of the present application, and as shown in fig. 5, the method includes:
s501, obtaining an image of a blood type card to be detected, wherein the blood type card to be detected comprises a micro-column tube containing blood gel.
S502, determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the microcolumn tube is located on the image.
The implementation of steps S501 to S502 refers to the related description in fig. 3, and is not repeated here.
And S503, determining the response intensity and the position coordinates of the pollution candidate points based on the detection area, wherein the response intensity is determined according to the brightness change condition of the pollution candidate points.
Here, in the present embodiment, considering that the interference of the edge of the gel column to the detection of the contaminant is relatively large, the edge of the gel column is further processed, and for example, the edge of the gel column in the detection area is extracted by using an edge detection method, the response intensity of each contamination candidate point on the edge of the gel column is determined, and then, based on the response intensity of each contamination candidate point on the edge of the gel column, a first weight of each contamination candidate point on the edge of the gel column is obtained, where the first weight is inversely proportional to the response intensity, that is, the greater the response intensity, the smaller the weight, the lower the possibility of the presence of the contaminant is indicated. In addition, the present embodiment may further obtain a second weight of each contamination candidate point located outside the edge of the gel column based on the response strength of each contamination candidate point located outside the edge of the gel column in the detection area, where the second weight is a preset value and is greater than the first weight.
Because the brightness change of the edge of the detection area is obvious, the response intensity of each point on the edge is large, and correspondingly, the weight is small, so that the interference of the edge of the gel column on the detection of the pollutants is reduced.
In addition, in the present embodiment, when determining the response intensity and the position coordinates of the contamination candidate points based on the detection area, a preset model for determining the response intensity and the position coordinates of the feature points in the image may be input to the detection area, the response intensity and the position coordinates of the feature points of the detection area may be determined based on the output of the preset model, and the response intensity and the position coordinates of the contamination candidate points may be obtained by using the feature points of the detection area as the contamination candidate points.
The preset model may determine the response strength and the position coordinates of the feature points in the image by using a preset algorithm, such as an AKAZE algorithm.
And S504, acquiring a pollution candidate area according to the response intensity and the position coordinates of the pollution candidate points.
In this embodiment, the number of the contamination candidates is generally large, and many of the contamination candidates are not smears, so that preliminary screening is required. Alternatively, the embodiment may screen out the contamination seed points from the contamination candidate points according to the response strength of the contamination candidate points and the weight (the first weight and the second weight) of each contamination candidate point in the detection area, determine the position coordinates of the contamination seed points based on the position coordinates of the contamination candidate points, and obtain the corresponding contamination candidate area according to the position coordinates and the gray scale value of each contamination seed point.
In this embodiment, the response intensity of the contamination candidate point may be multiplied by the weight of the corresponding location (for example, the response intensity of each contamination candidate point on the edge of the gel column is multiplied by the first weight of the corresponding location, and the response intensity of each contamination candidate point located outside the edge of the gel column is multiplied by the second weight of the corresponding location), so as to obtain the comprehensive intensity, and then, the feature point where the comprehensive intensity is greater than the preset intensity threshold is screened as the stain seed point, so as to reduce the subsequent calculation amount, and also improve the accuracy of the subsequent processing result.
For example, when a corresponding pollution candidate area is obtained according to the position coordinate and the gray value of each pollution seed point, in the embodiment, pixel points forming a connected area with the corresponding pollution seed point may be identified in the detection area according to the position coordinate of each pollution seed point, further, pixel points having a difference value between the gray value and the gray value of the corresponding seed point within a preset difference value range are determined from the pixel points forming the connected area with the corresponding pollution seed point, and the pollution candidate area corresponding to each pollution seed point is obtained based on the determined pixel points. The preset difference range can be determined according to actual conditions, pixels which are close to the gray value of the seed points and form a communication area with the seed points are identified in the embodiment to form a pollution candidate area, and finally, each seed point generates a pollution candidate area, so that whether pollutants exist in the blood type card to be detected is judged based on the pollution candidate area generated by each seed point.
And S505, judging whether the blood type card to be detected has pollutants or not based on the pollution candidate area.
Here, the embodiment may obtain a pre-stored judgment condition of the contaminant, so as to judge whether the blood type card to be detected has the contaminant according to the judgment condition and the contamination candidate region, where the judgment condition includes one or more of the number of pixels in the contamination candidate region, the length of the rectangle outside the contamination candidate region, the width of the rectangle outside the contamination candidate region, the aspect ratio of the rectangle outside the contamination candidate region, the maximum gray value in the rectangle outside the contamination candidate region, the minimum gray value in the rectangle outside the contamination candidate region, the gray value difference in the rectangle outside the contamination candidate region, the gray value of the central point in the rectangle outside the contamination candidate region, and the area ratio of the contamination candidate region to the external rectangle thereof.
In this embodiment, a plurality of data of the contaminated candidate area, such as the number of pixels in the contaminated candidate area, the length of the circumscribed rectangle of the contaminated candidate area, the width of the circumscribed rectangle of the contaminated candidate area, and the like, are considered, so that whether the blood type card to be detected has contaminants or not is accurately judged based on the data, and the reliability of the interpretation result of the subsequent blood type analyzer is improved.
And S506, if the blood type card to be detected is detected to have pollutants, carrying out defect prompt.
The implementation manner of step S506 refers to the related description in the embodiment of fig. 3, and is not described herein again.
In the embodiment of the present application, when above-mentioned defect includes the pollutant, this embodiment is considered based on above-mentioned detection area, confirm to pollute response intensity and position coordinate of candidate point, wherein, this response intensity is confirmed according to the bright change condition of above-mentioned pollution candidate point, and then, according to the response intensity and the position coordinate of above-mentioned pollution candidate point, obtain and pollute candidate area, thereby, based on this pollutes candidate area, judge whether above-mentioned blood group card that waits to detect has the pollutant, in order to realize the defect detection of treating the blood group card that detects, screen out the blood group card of abnormal condition, improve the reliability of blood group analysis appearance interpretation result.
Because the length of the gel in the micro-column tube of the blood type card is obviously higher or lower than the standard value due to the sample adding error in the production process, whether the height of the blood coagulation gel in the micro-column tube is abnormal or not is considered to detect the blood type card to be detected. As shown in fig. 6, a schematic flow chart of another blood type card defect detection method provided in the embodiment of the present application is shown. When above-mentioned defect includes that blood coagulation glue is highly unusual in the microcolumn pipe, this application embodiment is based on above-mentioned detection area, when detecting the above-mentioned blood group card that waits to detect and whether have the defect, can confirm the bottom of above-mentioned microcolumn pipe based on above-mentioned detection area, then, according to the bottom of above-mentioned microcolumn pipe, obtain blood coagulation glue top detection area and supernatant detection area in above-mentioned microcolumn pipe to, based on blood coagulation glue top detection area and supernatant detection area in above-mentioned microcolumn pipe, judge the above-mentioned blood group card that waits to detect and whether have blood coagulation glue height unusual in the microcolumn pipe. As shown in fig. 6, the method includes:
s601, obtaining an image of a blood type card to be detected, wherein the blood type card to be detected comprises a micro-column tube containing blood gel.
S602, determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the microcolumn tube is located on the image.
The implementation of steps S601-S602 refers to the related description in the embodiment of fig. 3, and is not repeated here.
And S603, determining the bottom of the micro-column tube based on the detection area.
Here, in this embodiment, the pixel distribution of the edge of the detection area may be obtained based on the detection area, and the bottom of the micro-column tube may be determined according to the pixel distribution of the edge and the pixel distribution of the bottom of the preset micro-column tube.
Wherein, the pixel distribution condition of the above-mentioned little pillar tube bottom of predetermineeing can be according to the pixel distribution setting of the little pillar tube bottom of a plurality of blood group cards.
Optionally, in this embodiment, before determining the bottom of the microcolumn based on the detection region, feature extraction may be performed on an image corresponding to the detection region to obtain a first preset feature component image, gaussian filtering and contrast enhancement processing are performed on the first preset feature component image, and the bottom of the microcolumn is determined based on the first preset feature component image after the gaussian filtering and the contrast enhancement processing. The first preset feature component image may be determined according to an actual situation, for example, if the brightness (Value, V) component image contrast of the gel column top and the liquid surface edge in Hue, saturation, and brightness (Hue, saturation, value, HSV) space is obvious, the first preset feature component image may be a V component image in HSV space. In this embodiment, the image corresponding to the detection region may be transformed from a red, green, blue, RGB space to an HSV space to obtain a V component image, and the V component image is subjected to gaussian filtering and contrast enhancement, so that the bottom of the microcolumn tube is determined based on the V component image after the gaussian filtering and the contrast enhancement.
In the embodiment, considering that the contrast of the top of the gel column and the liquid level edge on the V component is obvious, the embodiment performs subsequent processing based on the V component image, performs Gaussian filtering and contrast enhancement processing on the V component image, reduces certain external interference, and improves the contrast of the top of the gel column and the liquid level edge on the V component, so that the bottom of the micro-column tube can be determined accurately in the subsequent process.
And S604, obtaining a detection area at the top of the blood coagulation glue and a detection area of the supernatant in the micro-column tube according to the bottom of the micro-column tube.
For example, in this embodiment, the top detection area of the blood coagulation glue in the micro-column tube may be determined according to the bottom of the micro-column tube and the preset height of the blood gel, so that whether the position of the top blood coagulation glue in the micro-column tube is located or not is determined based on the top detection area of the blood coagulation glue in the micro-column tube, and if the position of the top blood coagulation glue in the micro-column tube is determined, the top detection area of the supernatant in the micro-column tube is determined according to the position of the top blood coagulation glue and the preset height of the supernatant. Here, the preset blood coagulation glue height may be set according to practical situations, for example, 200 pixel height. Similarly, the above-mentioned preset supernatant height can also be set according to practical situations, for example, 20 pixel height.
In this embodiment, when determining whether to locate the position of the top blood coagulation gel in the micro-column tube based on the detection area of the top blood coagulation gel in the micro-column tube, the pixel distribution of the detection area of the top blood coagulation gel in the micro-column tube may be determined first, and then, according to the pixel distribution of the detection area of the top blood coagulation gel and the pixel distribution of the top blood gel in the pre-set micro-column tube, the pixel distribution of the detection area of the top blood coagulation gel in the micro-column tube is determined whether to locate the position of the top blood coagulation gel in the micro-column tube.
Optionally, in this embodiment, the pixel distribution of the hemagglutination gel top detection area may be compared with the pixel distribution of the top hemagglutination gel in a preset microcolumn tube, if the comparison similarity between the two is within a preset similarity range, the position of the top hemagglutination gel in the microcolumn tube is determined and located, and otherwise, the position of the top hemagglutination gel in the microcolumn tube is determined and located. The preset similarity range may be set according to an actual situation, for example, the similarity is 80% to 90%.
S605, judging whether the blood coagulation adhesive height in the micro-column tube is abnormal or not based on the detection area at the top of the blood coagulation adhesive in the micro-column tube and the detection area of the supernatant.
Here, if the position of the blood coagulation glue at the top in the micro-column tube is obtained by the judgment and the location, whether the liquid level of the supernatant in the micro-column tube is obtained by identification or not can be judged according to the detection area of the supernatant in the micro-column tube, if the liquid level of the supernatant in the micro-column tube is obtained by judgment and identification, the height of the blood coagulation glue in the micro-column tube and the height of the supernatant can be determined according to the bottom of the micro-column tube, the position of the blood coagulation glue at the top in the micro-column tube and the liquid level of the supernatant, and whether the blood coagulation glue height in the micro-column tube is abnormal or not can be judged based on the height of the blood coagulation glue in the micro-column tube and the height of the supernatant, the preset height of the blood coagulation glue and the preset height of the supernatant.
In this embodiment, whether the liquid level of the supernatant in the micro-column tube is identified can be determined according to the pixel distribution of the supernatant detection area in the micro-column tube and the preset liquid level of the supernatant. And if the liquid level of the supernatant in the microcolumn tube is judged and identified, determining the height of the blood coagulation glue in the microcolumn tube and the height of the supernatant according to the bottom of the microcolumn tube, the position of the blood coagulation glue at the top of the microcolumn tube and the liquid level of the supernatant, comparing the height of the blood coagulation glue in the microcolumn tube with the preset height of the blood coagulation glue, comparing the height of the supernatant with the preset height of the supernatant, and judging whether the blood type card to be detected has abnormal height of the blood coagulation glue in the microcolumn tube according to a comparison result. If the height of the blood coagulation glue in the microcolumn tube is lower than or higher than the preset height of the blood coagulation glue, judging that the blood coagulation glue in the microcolumn tube is abnormal; and comparing the height of the supernatant fluid with the height of the preset supernatant fluid to judge whether the blood type card to be detected has abnormal height of the blood coagulation glue in the microcolumn tube and the like.
In addition, if the position of the top blood coagulation glue in the micro-column tube is judged not to be located, or the liquid level of the supernatant in the micro-column tube is judged not to be identified, the blood type card to be detected can be judged to have abnormal height of the blood coagulation glue in the micro-column tube.
And S606, if the blood group card to be detected has abnormal height of the blood coagulation glue in the micro-column tube, carrying out defect prompt.
The implementation manner of step S606 refers to the relevant description in fig. 3, and is not described herein again.
In this application embodiment, when above-mentioned defect includes that the blood coagulation glue is highly unusual in the microcolumn pipe, this application embodiment is based on above-mentioned detection area, detect whether above-mentioned blood group card that waits detects when having the defect, can be based on above-mentioned detection area, confirm the bottom of above-mentioned microcolumn pipe, then, according to the bottom of above-mentioned microcolumn pipe, obtain blood coagulation glue top detection area and supernatant detection area in the above-mentioned microcolumn pipe, thereby, based on blood coagulation glue top detection area and supernatant detection area in above-mentioned microcolumn pipe, judge whether above-mentioned blood group card that waits to detect has the blood coagulation glue height unusual in the microcolumn pipe, in order to screen out the blood group card of abnormal state, improve the reliability of blood group analyzer interpretation result.
In addition, when the storage mode of the blood type card is improper (such as the temperature exceeds 25 ℃ for a long time, or the blood type card is stored in an air conditioner or a refrigerator with automatic defrosting), or the aluminum film sealing performance of the blood type card is poor, the gel column is easily dried, and therefore the detection of whether the blood type card to be detected has the gel dried in the microcolumn tube or not is considered in the embodiment. Fig. 7 is a schematic flow chart of another blood type card defect detection method according to an embodiment of the present application. When the defects include dry blood coagulation adhesive in the microcolumn tube, the embodiment of the application can perform blocking treatment on the detection area according to a preset size to obtain a plurality of blocking areas when detecting whether the blood type card to be detected has the defects based on the detection area, further determine an average gray value of each blocking area in the plurality of blocking areas, and judge whether the blood type card to be detected has the dry blood coagulation adhesive in the microcolumn tube according to the average gray value of each blocking area. As shown in fig. 7, the method includes:
s701, obtaining an image of a blood type card to be detected, wherein the blood type card to be detected comprises a micro-column tube containing blood gel.
S702, determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the microcolumn tube is located on the image.
The implementation of steps S701-S702 refers to the related description in fig. 3, and is not repeated here.
And S703, carrying out blocking processing on the detection area according to a preset size to obtain a plurality of blocking areas.
Here, the preset size may be determined according to actual conditions, for example, the detection area is divided into 20 × 20 small blocks.
Optionally, in this embodiment, before the detection region is subjected to blocking processing according to a preset size to obtain a plurality of blocking regions, feature extraction may be performed on an image corresponding to the detection region to obtain a second preset feature component image, gaussian filtering and contrast enhancement processing are performed on the second preset feature component image, and the blocking processing is performed on the second preset feature component image after the gaussian filtering and the contrast enhancement processing according to the preset size to obtain the plurality of blocking regions. The second preset characteristic component image may be determined according to actual conditions, for example, the gel column of the dry glue has a relatively obvious contrast on the blacK (blacK, K) component image in the printing color mode (Cyan, magenta, yellow, blacK, CMYK) space, and the second preset characteristic component image may be a K component image in the CMYK space. In this embodiment, the image corresponding to the detection area may be transformed from an RGB space to a CMYK space to obtain a K component image, and then the K component image is subjected to gaussian filtering and contrast enhancement, and the V component image subjected to gaussian filtering and contrast enhancement is subjected to blocking processing according to a preset size to obtain a plurality of blocking areas.
In this embodiment, it is considered that the contrast of the gel column of the dry glue is more obvious on the K component, so the embodiment performs subsequent processing based on the K component, and performs gaussian filtering and contrast enhancement processing on the K component, thereby reducing certain external interference and improving the contrast of the gel column of the dry glue on the K component, and therefore, whether the blood type card has the blood coagulation glue dry glue in the micro-column tube can be accurately determined subsequently.
S704, determining the average gray value of each block area in the plurality of block areas.
S705, judging whether the blood type card to be detected has blood coagulation adhesive dry glue in the microcolumn tube or not according to the average gray value of each block area.
For example, in this embodiment, the standard deviation of the plurality of block areas may be determined based on the average gray value of each block area, the standard deviation is compared with a preset standard deviation threshold, and if the standard deviation is greater than or equal to the preset standard deviation threshold, the blood coagulation glue dry glue in the microcolumn tube of the blood type card to be detected is determined. Wherein, the preset standard deviation threshold is determined according to the gray standard deviation of the image when the blood type card exists in the blood coagulation adhesive dry glue in the micro-column tube.
S706, if the blood type card to be detected has the dry gel of the blood coagulation adhesive in the micro-column tube, prompting the defect.
The implementation manner of step S706 refers to the related description in fig. 3, and is not described herein again.
In this application embodiment, when above-mentioned defect includes that blood coagulation adhesive is glued futilely in the micropillar pipe, this application embodiment is based on above-mentioned detection area, when detecting above-mentioned blood group card that awaits measuring whether there is the defect, can be right according to the size that predetermines detection area carries out the blocking processing, obtains a plurality of blocking regions, and then, confirms the average grey value of each blocking region in a plurality of blocking regions, according to the average grey value of each blocking region, judges above-mentioned blood group card that awaits measuring whether blood group card exists the blood coagulation adhesive and is glued futilely in the micropillar pipe to screen out the blood group card of abnormal state, improve the reliability of blood type analyzer interpretation result.
After introducing the method for detecting a blood type card defect according to the exemplary embodiment of the present application, next, a blood type card defect detecting device according to the exemplary embodiment of the present application is described with reference to fig. 8, where the blood type card defect detecting device is used to implement the method for detecting a blood type card defect provided by any one of the above method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Referring to fig. 8, an embodiment of the present application further provides a blood type card defect detecting device 800 applied to a blood type analyzer. It should be noted that the blood type card defect detecting device 800 provided in the embodiment of the present application has the same basic principle and the same technical effects as those of the above embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the above embodiments for the part of the embodiment of the present application that is not mentioned. The application provides a blood type card defect detecting device 800 includes:
the obtaining module 801 is configured to obtain an image of a blood type card to be detected, where the blood type card to be detected includes a micro-column tube containing blood gel.
A determining module 802, configured to determine a detection area in the image of the blood type card to be detected, where the detection area is used to indicate an area where the microcolumn tube is located on the image.
And the detection module 803 is configured to detect whether the blood type card to be detected has a defect based on the detection area, where the defect includes one or more of a pollutant, abnormal height of blood coagulation glue in the microcolumn tube, and dry glue.
And the prompting module 804 is used for prompting the defect if the blood type card to be detected has the defect.
In one possible embodiment, the defect comprises a contaminant;
the detection module is specifically configured to:
determining response intensity and position coordinates of a pollution candidate point based on the detection area, wherein the response intensity is determined according to the brightness change condition of the pollution candidate point;
acquiring a pollution candidate area according to the response intensity and the position coordinates of the pollution candidate points;
and judging whether the blood type card to be detected has pollutants or not based on the pollution candidate area.
In a possible implementation, the detection module is further configured to:
extracting the edge of the gel column in the detection area, and determining the response intensity of each pollution candidate point on the edge of the gel column;
obtaining a first weight for each contamination candidate point on the gel column edge based on a response intensity for each contamination candidate point on the gel column edge, wherein the first weight is inversely proportional to the response intensity;
and acquiring a second weight of each pollution candidate point outside the edge of the gel column based on the response intensity of each pollution candidate point in the detection area and outside the edge of the gel column, wherein the second weight is a preset value and is greater than the first weight.
In a possible implementation manner, the detection module is specifically configured to:
screening out a pollution seed point from the pollution candidate points according to the response strength of the pollution candidate points and the weight of each pollution candidate point in the detection area;
determining the position coordinates of the contamination seed point based on the position coordinates of the contamination candidate point;
and obtaining a corresponding pollution candidate area according to the position coordinates and the gray value of each pollution seed point.
In a possible implementation manner, the detection module is specifically configured to:
identifying pixel points which form a communication area with the corresponding pollution seed points in the detection area according to the position coordinates of each pollution seed point;
determining pixel points of which the difference value between the gray value and the gray value of the corresponding seed point is within a preset difference value range from the pixel points forming the communicated region with the corresponding pollution seed point;
and acquiring a pollution candidate area corresponding to each pollution seed point based on the determined pixel points.
In a possible implementation manner, the detection module is specifically configured to:
inputting the detection area into a preset model, wherein the preset model is used for determining the response intensity and the position coordinates of the feature points in the image;
determining the response intensity and the position coordinates of the feature points of the detection area based on the output of the preset model;
and taking the characteristic points of the detection area as the pollution candidate points, and obtaining the response intensity and the position coordinates of the pollution candidate points.
In a possible implementation manner, the detection module is specifically configured to:
acquiring prestored judging conditions of pollutants, wherein the judging conditions comprise one or more of the number of pixel points of a pollution candidate region, the length of a circumscribed rectangle of the pollution candidate region, the width of the circumscribed rectangle of the pollution candidate region, the length-width ratio of the circumscribed rectangle of the pollution candidate region, the maximum gray value in the circumscribed rectangle of the pollution candidate region, the minimum gray value in the circumscribed rectangle of the pollution candidate region, the gray difference value in the circumscribed rectangle of the pollution candidate region, the gray value of the central point in the circumscribed rectangle of the pollution candidate region and the area ratio of the pollution candidate region to the circumscribed rectangle thereof;
and judging whether the blood type card to be detected has pollutants or not according to the judgment condition and the pollution candidate area.
In one possible embodiment, the defect comprises a high abnormality of the blood clotting glue in the microcolumn tube;
the detection module is specifically configured to:
determining a bottom of the microcolumn tube based on the detection region;
obtaining a detection area at the top of the blood coagulation glue and a detection area of the supernatant in the micro-column tube according to the bottom of the micro-column tube;
and judging whether the blood group card to be detected has abnormal height of the blood coagulation adhesive in the micro-column tube or not based on the detection area at the top of the blood coagulation adhesive in the micro-column tube and the detection area of the supernatant.
In a possible implementation manner, the detection module is specifically configured to:
obtaining the pixel distribution condition of the edge of the detection area based on the detection area;
and determining the bottom of the micro-column tube according to the pixel distribution condition of the edge and the pixel distribution condition of the bottom of a preset micro-column tube.
In a possible implementation manner, the detection module is specifically configured to:
determining a detection area at the top of the blood coagulation glue in the microcolumn tube according to the bottom of the microcolumn tube and the preset height of the blood coagulation glue;
judging whether the position of the top blood coagulation glue in the micro-column tube is obtained by positioning based on the detection area of the top blood coagulation glue in the micro-column tube;
and if the position of the top hemagglutination glue in the micro-column tube is obtained by judging and positioning, determining a supernatant detection area in the micro-column tube according to the position of the top hemagglutination glue and the preset height of the supernatant.
In a possible implementation manner, the detection module is specifically configured to:
determining the pixel distribution condition of a detection area at the top of the blood coagulation glue in the microcolumn tube;
and judging whether to locate to obtain the position of the top hemagglutination glue in the micro-column tube according to the pixel distribution condition of the hemagglutination glue top detection area and the pixel distribution condition of the top hemagglutination glue in a preset micro-column tube.
In a possible implementation manner, the detection module is specifically configured to:
if the position of the top blood coagulation glue in the micro-column tube is obtained through positioning judgment, judging whether the liquid level of the supernatant in the micro-column tube is obtained through identification according to the detection area of the supernatant in the micro-column tube;
if the liquid level of the supernatant in the micro-column tube is judged and identified, determining the height of the blood coagulation glue in the micro-column tube and the height of the supernatant according to the bottom of the micro-column tube, the position of the blood coagulation glue at the top of the micro-column tube and the liquid level of the supernatant;
and judging whether the blood group card to be detected has abnormal height of the blood coagulation glue in the micro-column tube or not based on the height of the blood coagulation glue in the micro-column tube and the height of the supernatant, the preset height of the blood coagulation glue and the preset height of the supernatant.
In a possible implementation, the detection module is further configured to:
extracting the features of the image corresponding to the detection area to obtain a first preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the first preset characteristic component image;
the determining the bottom of the microcolumn tube based on the detection region includes:
and determining the bottom of the microcolumn tube based on the first preset characteristic component image after Gaussian filtering and contrast enhancement processing.
In one possible embodiment, the defect comprises a blood clotting gel dried gel in the micropillar tube;
the detection module is specifically configured to:
carrying out blocking processing on the detection area according to a preset size to obtain a plurality of blocking areas;
determining an average gray value of each of the plurality of block regions;
and judging whether the blood group card to be detected has the blood coagulation adhesive dry glue in the microcolumn tube or not according to the average gray value of each block area.
In a possible implementation manner, the detection module is specifically configured to:
determining a standard deviation of the plurality of block areas based on the average gray value of each block area;
comparing the standard deviation with a preset standard deviation threshold value, wherein the preset standard deviation threshold value is determined according to the gray standard deviation of an image when the blood group card exists in the microcolumn tube and blood coagulation adhesive is dry;
and if the standard deviation is greater than or equal to the preset standard deviation threshold value, judging that the blood type card to be detected exists in the blood coagulation adhesive dry glue in the micro-column tube.
In a possible implementation, the detection module is further configured to:
performing feature extraction on the image corresponding to the detection area to obtain a second preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the second preset characteristic component image;
the blocking processing is performed on the detection area according to a preset size to obtain a plurality of blocking areas, and the blocking processing includes:
and according to the preset size, carrying out blocking processing on the second preset characteristic component image after the Gaussian filtering and contrast enhancement processing to obtain a plurality of blocking areas.
In a possible implementation manner, the determining module is specifically configured to:
acquiring a preset template image, wherein the preset template image comprises a detection area;
and matching the preset template image with the image of the blood type card to be detected, and determining a detection area in the image of the blood type card to be detected.
Fig. 9 is a block diagram illustrating a blood type analyzer according to an exemplary embodiment. A blood type analyzer may include one or more of the following components: processing component 902, memory 904, power component 906, input/output (I/O) interface 912, sensor component 914, and camera 300.
The processing component 902 generally controls the overall operation of the device 900. The processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components.
The memory 904 is configured to store various types of data to support operation at the device 900. Examples of such data include instructions for any application or method operating on device 900, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices, 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 memory, flash memory.
The power supply component 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc.
The sensor component 914 includes one or more sensors for providing various aspects of state assessment for the device 900. For example, the sensor component 914 can detect the open/closed state of the device 900, the relative positioning of the components. The sensor assembly 914 may also detect a change in position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, orientation or acceleration/deceleration of the device 900, and a change in temperature of the device 900.
The camera 300 is configured for taking a picture of the blood type card.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the apparatus 900 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The non-transitory computer readable storage medium, when the instructions in the storage medium are executed by a processor of a blood type analyzer, enables an electronic device to perform the above-described method.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the above method.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (20)
1. A blood type card defect detection method is characterized by comprising the following steps:
acquiring an image of a blood type card to be detected, wherein the blood type card to be detected comprises a micro-column tube containing blood gel;
determining a detection area in the image of the blood type card to be detected, wherein the detection area is used for indicating the area where the micro-column tube on the image is located;
detecting whether the blood type card to be detected has defects based on the detection area, wherein the defects comprise one or more of pollutants, abnormal height of blood coagulation glue in the microcolumn tube and dry glue;
and if the blood type card to be detected has defects, prompting the defects.
2. The method of claim 1, wherein the defect comprises a contaminant;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
determining response intensity and position coordinates of a pollution candidate point based on the detection area, wherein the response intensity is determined according to the brightness change condition of the pollution candidate point;
acquiring a pollution candidate area according to the response intensity and the position coordinates of the pollution candidate points;
and judging whether the blood type card to be detected has pollutants or not based on the pollution candidate area.
3. The method of claim 2, further comprising:
extracting the edge of the gel column in the detection area, and determining the response intensity of each pollution candidate point on the edge of the gel column;
obtaining a first weight for each contamination candidate point on the gel column edge based on a response intensity of each contamination candidate point on the gel column edge, wherein the first weight is inversely proportional to the response intensity;
and acquiring a second weight of each pollution candidate point outside the edge of the gel column based on the response intensity of each pollution candidate point in the detection area and outside the edge of the gel column, wherein the second weight is a preset value and is greater than the first weight.
4. The method of claim 3, wherein obtaining a contamination candidate region according to the response strength and the position coordinates of the contamination candidate points comprises:
screening out a pollution seed point from the pollution candidate points according to the response strength of the pollution candidate points and the weight of each pollution candidate point in the detection area;
determining the position coordinates of the pollution seed points based on the position coordinates of the pollution candidate points;
and obtaining a corresponding pollution candidate area according to the position coordinates and the gray value of each pollution seed point.
5. The method of claim 4, wherein obtaining the corresponding contamination candidate region according to the position coordinates and the gray scale value of each contamination seed point comprises:
identifying pixel points which form a communication area with the corresponding pollution seed points in the detection area according to the position coordinates of each pollution seed point;
determining pixel points of which the difference value between the gray value and the gray value of the corresponding seed point is within a preset difference value range from the pixel points forming the communicated region with the corresponding pollution seed point;
and acquiring a pollution candidate area corresponding to each pollution seed point based on the determined pixel points.
6. The method of any one of claims 2 to 5, wherein determining the response intensity and the location coordinates of the contamination candidate points based on the detection area comprises:
inputting the detection area into a preset model, wherein the preset model is used for determining the response intensity and the position coordinates of the feature points in the image;
determining the response intensity and the position coordinates of the feature points of the detection area based on the output of the preset model;
and taking the characteristic points of the detection area as the pollution candidate points, and obtaining the response intensity and the position coordinates of the pollution candidate points.
7. The method according to any one of claims 2 to 5, wherein the determining whether the blood type card to be detected has a contaminant based on the contamination candidate area comprises:
acquiring prestored judging conditions of pollutants, wherein the judging conditions comprise one or more of the number of pixel points of the pollution candidate area, the length of a circumscribed rectangle of the pollution candidate area, the width of a circumscribed rectangle of the pollution candidate area, the aspect ratio of a circumscribed rectangle of the pollution candidate area, the maximum gray value in the circumscribed rectangle of the pollution candidate area, the minimum gray value in the circumscribed rectangle of the pollution candidate area, the gray value difference in the circumscribed rectangle of the pollution candidate area, the gray value of the central point in the circumscribed rectangle of the pollution candidate area and the area ratio of the pollution candidate area to the circumscribed rectangle;
and judging whether the blood type card to be detected has pollutants or not according to the judgment condition and the pollution candidate area.
8. The method of any one of claims 1 to 5, wherein the defect comprises a high abnormality of blood clotting cement in a microcolumn tube;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
determining a bottom of the microcolumn tube based on the detection region;
obtaining a detection area at the top of the blood coagulation glue and a detection area of the supernatant in the microcolumn tube;
and judging whether the blood group card to be detected has abnormal height of the blood coagulation adhesive in the micro-column tube or not based on the detection area at the top of the blood coagulation adhesive in the micro-column tube and the detection area of the supernatant.
9. The method of claim 8, wherein determining the bottom of the microcolumn based on the detection region comprises:
obtaining the pixel distribution condition of the edge of the detection area based on the detection area;
and determining the bottom of the micro-column tube according to the pixel distribution condition of the edge and the pixel distribution condition of the bottom of a preset micro-column tube.
10. The method of claim 8, wherein obtaining the top detection zone and the supernatant detection zone of the blood coagulation glue in the micro-column tube according to the bottom of the micro-column tube comprises:
determining a detection area at the top of the blood coagulation glue in the micro-column tube according to the bottom of the micro-column tube and the preset height of the blood coagulation glue;
judging whether the position of the top blood coagulation glue in the micro-column tube is obtained by positioning based on the detection area of the top blood coagulation glue in the micro-column tube;
and if the position of the top hemagglutination glue in the micro-column tube is obtained through positioning judgment, determining a supernatant detection area in the micro-column tube according to the position of the top hemagglutination glue and the preset supernatant height.
11. The method of claim 10, wherein the determining whether the position of the top hemagglutination glue in the microcolumn tube is located or not based on the detection area of the top hemagglutination glue in the microcolumn tube comprises:
determining the pixel distribution condition of a detection area at the top of the blood coagulation glue in the microcolumn tube;
and judging whether to locate to obtain the position of the top blood coagulation glue in the micro-column tube according to the pixel distribution condition of the blood coagulation glue top detection area and the pixel distribution condition of the top blood coagulation glue in the preset micro-column tube.
12. The method according to claim 10, wherein the determining whether the blood group card to be detected has abnormal height of the blood coagulation glue in the micro-column tube based on the detection area at the top of the blood coagulation glue and the detection area of the supernatant in the micro-column tube comprises:
if the position of the top blood coagulation glue in the micro-column tube is obtained through positioning judgment, judging whether the liquid level of the supernatant in the micro-column tube is obtained through identification according to the detection area of the supernatant in the micro-column tube;
if the liquid level of the supernatant in the micro-column tube is judged and identified, determining the height of the blood coagulation glue in the micro-column tube and the height of the supernatant according to the bottom of the micro-column tube, the position of the blood coagulation glue at the top of the micro-column tube and the liquid level of the supernatant;
and judging whether the blood coagulation glue height in the microcolumn tube is abnormal or not based on the blood coagulation glue height and the supernatant height in the microcolumn tube, the preset blood coagulation glue height and the preset supernatant height.
13. The method of claim 8, further comprising, prior to said determining the bottom of the microcolumn tube based on the detection region:
performing feature extraction on the image corresponding to the detection area to obtain a first preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the first preset characteristic component image;
the determining the bottom of the microcolumn tube based on the detection region includes:
and determining the bottom of the microcolumn tube based on the first preset characteristic component image after Gaussian filtering and contrast enhancement processing.
14. The method of any one of claims 1 to 5, wherein the defect comprises a blood clotting glue dry glue in a micropillar tube;
the detecting whether the blood type card to be detected has defects based on the detection area comprises the following steps:
carrying out blocking processing on the detection area according to a preset size to obtain a plurality of blocking areas;
determining an average gray value of each of the plurality of block areas;
and judging whether the blood type card to be detected has blood coagulation adhesive dry glue in the micro-column tube or not according to the average gray value of each block area.
15. The method according to claim 14, wherein said determining whether the blood group card to be detected has blood coagulation glue dry glue in the microcolumn tube according to the average gray value of each of the partitioned areas comprises:
determining a standard deviation of the plurality of block areas based on the average gray value of each block area;
comparing the standard deviation with a preset standard deviation threshold, wherein the preset standard deviation threshold is determined according to the gray standard deviation of an image when blood coagulation glue is dry and exists in the microcolumn tube of the blood type card;
and if the standard deviation is greater than or equal to the preset standard deviation threshold value, judging that the blood type card to be detected exists in the blood coagulation adhesive dry glue in the micro-column tube.
16. The method according to claim 14, wherein before the blocking the detection area according to the preset size to obtain a plurality of blocked areas, the method further comprises:
performing feature extraction on the image corresponding to the detection area to obtain a second preset feature component image;
performing Gaussian filtering and contrast enhancement processing on the second preset characteristic component image;
the blocking processing is performed on the detection area according to a preset size to obtain a plurality of blocking areas, and the blocking processing includes:
and according to the preset size, carrying out blocking processing on the second preset characteristic component image after the Gaussian filtering and contrast enhancement processing to obtain a plurality of blocking areas.
17. The method according to any one of claims 1 to 5, wherein the determining a detection area in the image of the blood type card to be detected comprises:
acquiring a preset template image, wherein the preset template image comprises a detection area;
and matching the preset template image with the image of the blood type card to be detected, and determining a detection area in the image of the blood type card to be detected.
18. A blood type card defect detecting device, characterized by comprising:
the acquisition module is used for acquiring an image of a blood type card to be detected, wherein the blood type card to be detected comprises a microcolumn tube containing blood gel;
the determination module is used for determining a detection area in the image of the blood type card to be detected, and the detection area is used for indicating the area where the microcolumn tube is located on the image;
the detection module is used for detecting whether the blood type card to be detected has defects based on the detection area, wherein the defects comprise one or more of pollutants, abnormal height of blood coagulation glue in the microcolumn tube and dry glue;
and the prompting module is used for prompting the defect if the blood type card to be detected has the defect.
19. A blood analyser comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor when executing the computer program causing the blood analyser to perform the method of any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes a computer to perform the method of any of claims 1 to 17.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211392719.5A CN115908290A (en) | 2022-11-08 | 2022-11-08 | Blood type card defect detection method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211392719.5A CN115908290A (en) | 2022-11-08 | 2022-11-08 | Blood type card defect detection method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115908290A true CN115908290A (en) | 2023-04-04 |
Family
ID=86470327
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211392719.5A Pending CN115908290A (en) | 2022-11-08 | 2022-11-08 | Blood type card defect detection method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115908290A (en) |
-
2022
- 2022-11-08 CN CN202211392719.5A patent/CN115908290A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109961421B (en) | Data generating device, data generating method, and data generating recording medium | |
JP6858243B2 (en) | Systems, methods and equipment for identifying container caps for sample containers | |
CN108603835B (en) | Method and apparatus adapted to quantify a sample according to multiple side views | |
EP3408641B1 (en) | Methods and apparatus for multi-view characterization | |
CN110659660A (en) | Automatic optical detection classification device using deep learning system and training device thereof | |
CN105453153A (en) | Traffic light detection | |
JP2021510201A (en) | Methods and equipment for characterization of biofluid specimens using less trained neural networks | |
CN111758117B (en) | Inspection system, recognition system, and learning data generation device | |
CN116071294A (en) | Optical fiber surface defect detection method and device | |
CN114441512B (en) | Vaginal secretion detector, dry chemical detection device and dry chemical detection method | |
CN115908290A (en) | Blood type card defect detection method and device and computer readable storage medium | |
CN114667452A (en) | Method for determining the concentration of an analyte in a body fluid | |
IT201600109354A1 (en) | Procedure for discerning fresh meat from meats subjected to freezing by analyzing images of muscle tissue samples and a corresponding system designed to carry out this procedure. | |
JP2022501595A (en) | Hypothesis and validation networks and methods for sample classification | |
JP7438345B2 (en) | Apparatus and method for training diagnostic analyzer models | |
JP7177917B2 (en) | Visualization analyzer and visual learning method | |
CN113298166A (en) | Defect classifier, defect classification method, device, equipment and storage medium | |
JPH0979985A (en) | Method and device for judging particle reaction pattern | |
CN110441315A (en) | Electronic component test equipment and method | |
JP7407282B2 (en) | Apparatus and method for identifying pipe assembly types | |
US20240169093A1 (en) | Methods and apparatus for protecting patient information during characterization of a specimen in an automated diagnostic analysis system | |
CN117495846B (en) | Image detection method, device, electronic equipment and storage medium | |
US20240104717A1 (en) | Defect detection method and device | |
US20240168006A1 (en) | Methods and apparatus for hashing and retrieval of training images used in hiln determinations of specimens in automated diagnostic analysis systems | |
CN115201464A (en) | Agglutination strength interpretation method and device and blood type analyzer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |