Sample analysis system and sample analysis method
By acquiring images of the bottom of the magnetic bead reagent container and comparing grayscale values, the problem of abnormal detection results caused by magnetic bead aggregation was solved, achieving higher detection accuracy and applicability, suitable for different types and concentrations of magnetic bead reagents.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MINDRAY BIO MEDICAL ELECTRONICS CO LTD
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-12
AI Technical Summary
Magnetic bead reagents are prone to agglomeration during transportation and storage, leading to abnormal effective concentrations of the magnetic beads and affecting the accuracy of detection results. Existing technologies have not been able to effectively solve this problem.
By acquiring reagent images from the bottom of the reagent container and using relative comparison of gray values at pixel sampling points, it is determined whether magnetic bead reagents have agglomerated. This process includes image preprocessing, circle fitting, line detection, and gray value dispersion analysis to eliminate interference and improve the applicability of the detection.
It effectively identifies whether magnetic bead reagents have agglomerated, avoids abnormal results, improves detection accuracy, is applicable to different types and concentrations of magnetic bead reagents, reduces misjudgments, and achieves non-destructive testing.
Smart Images

Figure CN122193595A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical device technology, and in particular to a sample analysis system and sample analysis method. Background Technology
[0002] In chemiluminescence immunoassay, magnetic beads are a mature and widely used technique for heterogeneous phase separation.
[0003] Irreversible aggregation of magnetic beads can occur during transportation and storage due to factors such as inversion, lateral placement, or excessively high or low storage temperatures. This aggregation leads to precipitation or rapid settling of the magnetic beads even after mixing, resulting in abnormal effective concentrations. Ultimately, this causes incorrect test results after the reagent is applied to the instrument, leading to erroneous results for patients and potentially serious consequences. Magnetic bead aggregation is a widespread problem in the industry, but no solution has yet been provided. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail in this application. This overview is not intended to limit the scope of the claims.
[0005] This application provides a sample analysis system and a sample analysis method that can acquire reagent images from the bottom of the reagent container and determine whether magnetic bead reagents have agglomerated based on the relative grayscale comparison of pixel sampling points in the reagent image, and has better applicability.
[0006] On one hand, embodiments of this application provide a sample analysis system, including a reagent storage module, a detection module, an image acquisition module, and a control module, wherein:
[0007] The reagent storage module is used to place reagent containers, and the reagent containers include at least a reagent container containing magnetic bead reagents;
[0008] The detection module is used to detect the test solution prepared from at least the magnetic bead reagent and the sample;
[0009] The image acquisition module is used to acquire a reagent image of the homogenized magnetic bead reagent from the bottom of the reagent container containing the magnetic bead reagent; the homogenization process is used to improve the uniformity of the magnetic bead reagent; the acquisition of the reagent image is performed before the magnetic bead reagent is mixed with the sample;
[0010] The control module is configured to: acquire the reagent image and determine whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of the pixel sampling points in the reagent image.
[0011] In one embodiment of this application, determining whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of pixel sampling points in the reagent image includes:
[0012] Based on the relative comparison of the gray values of each pixel in the reagent image, the target area corresponding to the bottom of the reagent container is determined;
[0013] Based on the degree of dispersion of the gray values of each pixel sampling point in the target area, it is determined whether the magnetic bead reagent has agglomerated.
[0014] In one embodiment of this application, the control module is further configured to, after determining the target region and before determining whether the magnetic bead reagent has agglomerated based on the dispersion of the gray values of each pixel sampling point in the target region, include a step of removing sub-regions with abnormal gray values in the target region.
[0015] In one embodiment of this application, the step of removing sub-regions with abnormal grayscale values in the target region includes: determining sub-regions with abrupt grayscale changes in the target region, confirming the sub-regions with abrupt grayscale changes as sub-regions with abnormal grayscale values, and removing the sub-regions with abnormal grayscale values in the target region.
[0016] In one embodiment of this application, determining the gray-scale abrupt change sub-region in the target region includes: radially traversing each pixel in the target region to determine whether a gray-scale abrupt change occurs, thereby determining the gray-scale abrupt change sub-region in the target region.
[0017] In one embodiment of this application, the control module is further configured to:
[0018] Perform a circle fitting on the target region to obtain the initial circle center;
[0019] A circular mask is created within the target area based on the initial center point.
[0020] A first straight line detection is performed in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container;
[0021] A sector mask is created in the target area according to the initial rib angle, the sector mask including the bottom rib;
[0022] A second straight line detection is performed in the corresponding area of the sector mask to obtain the edge straight line equations of each of the bottom ribs;
[0023] The rib regions are determined based on the edge line equations of each of the bottom ribs;
[0024] Before determining whether the magnetic bead reagent has agglomerated, the grayscale values of the pixel sampling points in the rib region are removed.
[0025] In one embodiment of this application, determining the rib region based on the edge line equations of each of the bottom ribs includes:
[0026] The rib centerline equation of each bottom rib is determined based on the edge line equation of each bottom rib.
[0027] The intersection points of the centerline equations of two adjacent ribs are calculated sequentially, and the center of the target region is obtained based on all the intersection points;
[0028] The rib region is determined based on the center of the target region and the equation of the edge line.
[0029] In one embodiment of this application, obtaining the center of the target region based on all the intersection points includes:
[0030] Calculate the mean x-coordinate and mean y-coordinate of all the intersection points to obtain the x-coordinate and y-coordinate of the center of the target area;
[0031] Specifically, when calculating the mean of the horizontal coordinate and the mean of the vertical coordinate, intersection points whose distance from the initial center is greater than a first preset value are removed.
[0032] In one embodiment of this application, the step of performing a first straight-line detection in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container includes:
[0033] A first straight line detection is performed in the corresponding area of the annular mask to obtain the initial edge equations of each bottom rib of the reagent container;
[0034] Establish a coordinate system with the initial circle center as the origin, and calculate the rotation angle of the initial edge equation relative to the coordinate axes;
[0035] The average value of the rotation angles of the two initial edge equations corresponding to the bottom ribs is calculated to obtain the initial rib angles of each bottom rib of the reagent container.
[0036] In one embodiment of this application, the control module is further configured to:
[0037] If the difference between an initial rib angle and the angles of two adjacent initial ribs does not fall within the preset angle range, the initial rib angle is removed.
[0038] In one embodiment of this application, the control module is further configured to:
[0039] When the number of initial rib angles is less than the second preset value, image enhancement is performed on the corresponding area of the annular mask, and the first straight line detection is performed again.
[0040] In one embodiment of this application, determining whether the magnetic bead reagent has agglomerated based on the dispersion of grayscale values of each pixel sampling point in the target region includes:
[0041] The grayscale values of each pixel sampling point in the radial direction of the target region are sampled to obtain a single radial grayscale change array;
[0042] Step along the clockwise or counterclockwise direction with a first arc, and continue to sample the gray values of each pixel sampling point in the radial direction of the center of the target area to obtain multiple radial gray value change arrays;
[0043] Based on the radial illumination trend of the target area, the entire radial grayscale change array is subjected to illumination trend removal processing to obtain multiple radial pixel grayscale arrays.
[0044] The degree of dispersion of gray values in the plurality of radial pixel grayscale arrays is used to determine whether the magnetic bead reagent has agglomerated.
[0045] In one embodiment of this application, the control module is further configured to:
[0046] Differential calculations are performed on multiple radial pixel grayscale arrays to obtain radial pixel grayscale difference arrays;
[0047] When the maximum grayscale difference in the radial pixel grayscale difference array is greater than a third preset value, and the minimum grayscale difference in the radial pixel grayscale difference array is less than a fourth preset value, the interpolation region is determined based on the maximum grayscale difference and the minimum grayscale difference.
[0048] The gray values of the corresponding pixel sampling points of the radial gray-level variation array are interpolated according to the interpolation region;
[0049] Based on the radial illumination trend of the target area, the radial grayscale change array after the interpolation calculation is reprocessed to remove the illumination trend.
[0050] In one embodiment of this application, determining whether the magnetic bead reagent has agglomerated based on the dispersion of gray values in the plurality of radial pixel grayscale arrays includes:
[0051] From the plurality of radial pixel grayscale arrays, the grayscale values of the corresponding pixel sampling points for interpolation calculation are removed, the dispersion of the grayscale values is calculated, and it is determined whether the magnetic bead reagent has agglomerated.
[0052] In one embodiment of this application, determining the interpolation region based on the maximum grayscale difference and the minimum grayscale difference includes:
[0053] Obtain the minimum index corresponding to the minimum grayscale difference and the maximum index corresponding to the maximum grayscale difference, and determine the interpolation region based on the minimum index and the maximum index.
[0054] In one embodiment of this application, the difference between the minimum value index and the fifth preset value is used as the starting point of the interpolation region, and the sum of the maximum value index and the sixth preset value is used as the ending point of the interpolation region.
[0055] In one embodiment of this application, when the maximum value index of one interpolation region is greater than the minimum value index of the other interpolation region, the two adjacent interpolation regions are merged.
[0056] In one embodiment of this application, determining whether the magnetic bead reagent has agglomerated based on the dispersion of gray values in the plurality of radial pixel grayscale arrays includes at least one of the following:
[0057] Calculate the standard deviation of gray values in the plurality of radial pixel gray arrays. When the standard deviation is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0058] Calculate the relative range of gray values in the plurality of radial pixel gray arrays. When the relative range is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0059] Calculate the deviation coefficient of gray values in the plurality of radial pixel grayscale arrays. When the deviation coefficient is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0060] In one embodiment of this application, the control module is further configured to:
[0061] Before determining the target region, the reagent image is subjected to image filtering; the image filtering includes any one of the following:
[0062] Median filtering;
[0063] Gaussian filtering;
[0064] Bilateral filtering;
[0065] Morphological filtering.
[0066] On the other hand, embodiments of this application provide a sample analysis method, including:
[0067] The reagent container containing magnetic beads is subjected to a homogenization treatment, which is used to improve the uniformity of the magnetic beads.
[0068] Before the magnetic bead reagent is mixed with the sample, a reagent image of the magnetic bead reagent is captured from the bottom of the reagent container;
[0069] Based on the relative comparison of the gray values of the pixel sampling points in the reagent image, it is determined whether the magnetic bead reagent has agglomerated.
[0070] The embodiments of this application include at least the following beneficial effects:
[0071] On the one hand, the sample analysis system provided in one embodiment of this application can improve the uniformity of the magnetic beads in the magnetic bead reagent by homogenizing the magnetic beads. Then, before the magnetic beads are used, that is, before the magnetic beads are mixed with the sample, the image acquisition module acquires the reagent image of the homogenized magnetic beads from the bottom of the reagent container. The control module then performs anomaly identification based on the reagent image of the magnetic beads to determine whether there is an abnormal phenomenon of aggregation of the magnetic beads. This avoids the use of abnormal magnetic beads in subsequent sample tests, which would cause abnormal test results. Alternatively, it can prompt patients and medical staff to ignore the test results of abnormal magnetic beads, thus avoiding patients and medical staff receiving incorrect test results and misjudging the condition. In addition, the control module determines whether the magnetic bead reagent exhibits abnormal aggregation by comparing the relative gray levels of pixel sampling points in the reagent image. This method is more applicable than directly using a gray level threshold to determine aggregation. This is because directly using a gray level threshold requires extensive testing to determine the appropriate gray level threshold for different types of magnetic bead reagents, different concentrations of magnetic bead reagents, and different image acquisition conditions. In other words, the gray level threshold to be set for different reagent images cannot be standardized. However, using the relative gray level comparison of pixel sampling points in the reagent image can eliminate the influence of differences in reagent type, reagent concentration, and image acquisition conditions, thus providing better applicability.
[0072] On the one hand, the sample analysis method provided in one embodiment of this application can improve the uniformity of the magnetic beads in the magnetic bead reagent by homogenizing the magnetic beads. Then, before the magnetic beads are used, that is, before the magnetic beads are mixed with the sample, the reagent image of the homogenized magnetic beads is collected from the bottom of the reagent container. Then, anomaly identification is performed based on the reagent image of the magnetic beads to determine whether there is an abnormal phenomenon of aggregation of the magnetic beads. This avoids the use of abnormal magnetic beads in subsequent sample tests, which would cause abnormal test results. Alternatively, it can prompt patients and medical staff to ignore the test results of abnormal magnetic beads, thus avoiding patients and medical staff receiving incorrect test results and making misjudgments of the condition. Furthermore, determining whether magnetic bead reagents exhibit agglomeration abnormalities by comparing the relative gray levels of pixel sampling points in the reagent image is more applicable than directly using gray level thresholds. This is because directly using gray level thresholds requires extensive testing to determine the appropriate gray level threshold for different types of magnetic bead reagents, different concentrations of magnetic bead reagents, and different image acquisition conditions. In other words, the gray level thresholds set for different reagent images cannot be standardized. However, using relative gray level comparisons of pixel sampling points in the reagent image can eliminate the influence of differences in reagent type, reagent concentration, and image acquisition conditions, thus providing better applicability.
[0073] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. Attached Figure Description
[0074] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0075] Figure 1 A block diagram of the sample analysis system provided in the embodiments of this application;
[0076] Figure 2 A flowchart of the method steps performed by the control module in the sample analysis system provided in Embodiment 1 of this application;
[0077] Figure 3 This is a schematic diagram illustrating the effect of the sample analysis system provided in this application on performing circle fitting on the target region;
[0078] Figure 4 A flowchart of the method steps executed by the control module in the sample analysis system provided in Embodiment 2 of this application;
[0079] Figure 5A schematic diagram showing the result of a first straight line detection performed by the sample analysis system provided in this embodiment of the application;
[0080] Figure 6 A flowchart of the method steps executed by the control module in the sample analysis system provided in Embodiment 3 of this application;
[0081] Figure 7 A flowchart of the method steps executed by the control module in the sample analysis system provided in Embodiment 4 of this application;
[0082] Figure 8 A flowchart of the method steps executed by the control module in the sample analysis system provided in Embodiment 5 of this application;
[0083] Figure 9 A flowchart of the method steps executed by the control module in the sample analysis system provided in Embodiment Six of this application;
[0084] Figure 10 A schematic diagram of the original pixel grayscale curve corresponding to a single radial grayscale variation array provided in an embodiment of this application;
[0085] Figure 11 A schematic diagram of the original pixel grayscale curves corresponding to the multiple radial grayscale variation arrays provided in the embodiments of this application;
[0086] Figure 12 A schematic diagram showing that a large area of interfering material has been adsorbed on the bottom of the reagent container provided in this embodiment of the application.
[0087] Figure 13 This is a schematic diagram of the pixel difference curve corresponding to the pixel grayscale difference array provided in an embodiment of this application;
[0088] Figure 14 A schematic diagram of the original pixel grayscale curve corresponding to the radial grayscale change array after removing the pixels in the region corresponding to the interference provided in the embodiments of this application;
[0089] Figure 15 This is a schematic diagram of the original pixel grayscale curve corresponding to the radial grayscale change array after interpolation calculation provided in the embodiments of this application. Detailed Implementation
[0090] The present application will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limitations on the present application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present application.
[0091] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0092] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0093] This application provides a sample analysis system capable of detecting and analyzing one or more samples from the human body. These samples may be (but are not limited to) blood, urine, semen, or sweat. For example, the sample analysis system may be a biochemical analyzer, an immunoassay analyzer, or other types of sample analyzers.
[0094] In the process of sample processing and testing, reagents are usually added to the sample to prepare it for subsequent testing. Magnetic bead reagents are a commonly used reagent in immunoassay analyzers. They generally need to be collected when the magnetic beads are evenly distributed to ensure the accuracy of the test results. However, during transportation and storage, conditions such as inversion, lateral placement, and excessively high or low storage temperatures can cause irreversible aggregation of the magnetic beads. Aggregation results in precipitation or rapid sedimentation of the magnetic beads even after mixing, leading to abnormal effective concentrations. This ultimately causes abnormal test results after the reagent is applied to the analyzer, resulting in patients receiving incorrect test results and potentially serious consequences.
[0095] Currently, there is no technical solution in the industry to collect images of the magnetic beads before mixing them with the sample to determine whether the magnetic beads are abnormal.
[0096] This application provides a sample analysis system and a sample analysis method that can acquire reagent images from the bottom of the reagent container and determine whether magnetic bead reagents have agglomerated based on the relative grayscale comparison of pixel sampling points in the reagent image, and has better applicability.
[0097] like Figure 1 The diagram shown is a block diagram of a sample analysis system according to an embodiment of this application. (Refer to...) Figure 1 The sample analysis system includes a reagent storage module 100, a detection module 200, an image acquisition module 300, and a control module 400. The control module 400 is connected to the reagent storage module 100, the detection module 200, and the image acquisition module 300, respectively. Each module will be described in detail below.
[0098] The reagent storage module 100 is used to hold reagent containers, which include at least a reagent container containing magnetic bead reagents. In some embodiments, the reagent storage module 100 is arranged in a disk-shaped structure and has multiple positions for holding reagent containers. The reagent storage module 100 is rotatable and drives the reagent containers it holds to rotate, thereby rotating the reagent containers to the reagent aspiration position so that other modules of the sample analysis system can aspirate the reagents for subsequent mixing, reaction, and detection analysis with the sample. It is understood that the reagent containers stored in the reagent storage module 100 may include reagent containers containing magnetic bead reagents, as well as reagent containers containing other types of reagents.
[0099] The detection module 200 is used to detect a test solution prepared from at least magnetic bead reagents and a sample. The detection module 200 completes the analysis of the sample by detecting the test solution prepared from magnetic bead reagents and a sample. Exemplarily, in some embodiments, the detection module 200 can be a photometric unit, for example, detecting the luminescence intensity of the test solution and calculating the concentration of the analyte in the sample using a calibration curve.
[0100] The image acquisition module 300 is used to acquire reagent images of the homogenized magnetic bead reagent from the bottom of the reagent container containing the magnetic bead reagent; homogenization is used to improve the uniformity of the magnetic bead reagent; the reagent image acquisition is performed before the magnetic bead reagent is mixed with the sample. It should be noted that since aggregated magnetic beads in the reagent generally settle at the bottom of the reagent container, acquiring reagent images of the magnetic bead reagent from the bottom of the reagent container makes it easier and more accurate to identify the aggregation phenomenon of the magnetic bead reagent from the reagent image.
[0101] Additionally, refer to Figure 1The sample analysis system may also include a magnetic bead processing device 500, which is used to homogenize the magnetic beads in the magnetic bead reagent. It is understood that homogenization can improve the uniformity of the magnetic bead reagent, dispersing reversible agglomerations and preventing these reversible agglomerations from affecting the determination of whether the magnetic bead reagent is abnormal. In some embodiments, homogenization includes at least one of a mixing process and a blending process. Accordingly, in one embodiment, the magnetic bead processing device 500 includes a mixing module 510 for mixing the magnetic bead reagent in the reagent container and a blending module 520 for blending the magnetic bead reagent in the reagent container. The homogenization process includes both a mixing process and a blending process. The mixing process is used to drive the magnetic beads deposited in the magnetic bead reagent to detach from their deposition position in the reagent container. Therefore, the mixing module 510 can employ various structures capable of achieving this purpose, such as magnetic suction structures, ultrasonic structures, stirring structures, etc. The mixing process drives the magnetic beads in the reagent to disperse, ensuring uniform dispersion. Therefore, the mixing module 520 primarily disperses aggregated magnetic beads, employing various structures capable of dispersing and driving their movement, such as ultrasonic structures, stirring structures, or the reagent container's own dispersing mechanisms. The mixing module 520 can operate simultaneously with the mixing module 510 acting on the magnetic beads, or it can act on the magnetic beads after the mixing module 510 has finished acting on them. Once the magnetic beads have detached from their deposition sites, they are more easily mixed.
[0102] The control module 400 is configured to acquire a reagent image and determine whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of the pixel sampling points in the reagent image.
[0103] In this embodiment, by homogenizing the magnetic beads in the magnetic bead reagent, the uniformity of the magnetic bead reagent can be improved. Then, before the magnetic bead reagent is used, that is, before the magnetic bead reagent is mixed with the sample, the image acquisition module 300 acquires the reagent image of the homogenized magnetic bead reagent from the bottom of the reagent container. Then, the control module 400 performs anomaly identification based on the reagent image of the magnetic bead reagent to determine whether the magnetic bead reagent has agglomeration abnormality. This avoids the use of abnormal magnetic bead reagent in subsequent sample testing, which would cause abnormal test results. Alternatively, it can prompt patients and medical staff to ignore the test results obtained by using abnormal magnetic bead reagent, thus avoiding patients and medical staff receiving incorrect test results and thus misjudging the condition. In addition, the control module 400 determines whether the magnetic bead reagent exhibits abnormal aggregation by comparing the relative gray levels of pixel sampling points in the reagent image. This method is more applicable than directly using a gray level threshold to determine aggregation. This is because directly using a gray level threshold requires extensive testing to determine the corresponding gray level threshold for different types of magnetic bead reagents, different concentrations of magnetic bead reagents, and different image acquisition conditions. In other words, the gray level threshold to be set for different reagent images cannot be unified. However, using the relative gray level comparison of pixel sampling points in the reagent image can eliminate the influence of different reagent types, reagent concentrations, image acquisition conditions, etc., and has better applicability.
[0104] Furthermore, the image acquisition module 200 is used to acquire reagent images for magnetic bead reagent aggregation detection. This detection method does not require the aspirating of some reagent for detection, which is a lossless detection method. The amount of magnetic bead reagent is not lost due to aggregation detection, thus balancing the accuracy and cost of sample detection.
[0105] Reference Figure 2 In one embodiment, the step performed by the control module 400 to determine whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of pixel sampling points in the reagent image includes, but is not limited to, steps S210 to S220.
[0106] Step S210: Determine the target area corresponding to the bottom of the reagent container based on the relative comparison of the gray values of each pixel in the reagent image.
[0107] In this step, since the reagent image is acquired from the bottom of the reagent container containing the magnetic beads, and the shape of the image captured by the image acquisition module 300 generally cannot perfectly match the bottom of the reagent container, the image captured by the image acquisition module 300 is often larger. Therefore, the image captured by the image acquisition module 300 will include the area corresponding to the bottom of the reagent container as well as other edge areas, for example, refer to... Figure 3As shown, the reagent image acquired by the image acquisition module 300 includes a circular area in the center corresponding to the bottom of the reagent container and an outer peripheral area outside the circular area. The outer peripheral area often corresponds to the image of the base used to hold the reagent container and is unnecessary for determining whether the magnetic beads have agglomerated. That is, the circular area corresponding to the bottom of the reagent container in the reagent image is the target area needed for judgment. Furthermore, because the light transmittance of the base differs from that of the reagent container, the grayscale values of each pixel in the target area corresponding to the bottom of the reagent container and the outer peripheral area corresponding to the base are generally different, with a significant difference in grayscale values. The target area and the outer peripheral area have a relatively clear boundary. For example, if the base is made of transparent material, the image of the outer peripheral area is whiter and has a larger grayscale value; if the base is made of opaque material, the image of the outer peripheral area is darker. Figure 3 As shown, the grayscale value is also relatively small.
[0108] Step S220: Determine whether the magnetic bead reagent has agglomerated based on the dispersion of gray values of each pixel sampling point in the target area.
[0109] In this step, the dispersion of grayscale values at each pixel sampling point in the target area is used to determine whether magnetic bead reagents have agglomerated. This method has better applicability compared to other methods that directly use grayscale thresholds to determine agglomeration. There are several different ways to analyze the acquired images: one method divides the reagent image into agglomerated and non-agglomerated parts based on the pixel grayscale values of each pixel and a preset binarization threshold. Abnormal magnetic bead reagents are then identified based on the area of the agglomerated part. This is because when magnetic bead reagents agglomerate, there is a boundary between the agglomerated and non-agglomerated parts. By setting a binarization threshold and comparing the pixel grayscale values of each pixel in the reagent image with the preset threshold, the reagent image is divided into agglomerated and non-agglomerated parts. Then, the area of the agglomerated part is identified, and the size of this area can be used to determine whether the magnetic bead reagents are abnormal. In another approach, multiple target regions are divided from the reagent image. Abnormal magnetic bead reagents are identified based on the average gray value of each pixel in the multiple target regions and a preset gray value threshold. This is because when magnetic beads aggregate, the gray values of each pixel in the aggregated part will be lower, thus the average gray value of each pixel in each target region will decrease. By setting a gray value threshold, when the average gray value of each pixel in the target region is less than the preset gray value threshold, it can be considered that magnetic bead aggregation has occurred in the target region. In another approach, abnormal magnetic bead reagents are identified based on the histogram of the pixel grayscale values of each pixel in the reagent image. This is because for a reagent container containing normal magnetic bead reagents, the pixel grayscale distribution of each pixel in the bottom of the reagent image is uniform, and its histogram distribution range is relatively concentrated. When magnetic bead aggregation occurs, the pixel grayscale value of the pixel corresponding to the aggregation part decreases, and a peak will appear in the low grayscale value area of the histogram. Therefore, by identifying the histogram distribution structure of the pixel grayscale values of each pixel in the reagent image, it is possible to detect whether magnetic bead aggregation has occurred. However, all three methods have significant drawbacks. The first method, which uses a hard threshold to segment by setting a binarization threshold, is susceptible to interference from different concentrations and types of magnetic beads, making it impossible to unify the detection threshold across different images. The second method, which compares a preset grayscale threshold with the average grayscale value of each pixel, also uses a hard threshold for segmentation. Again, different concentrations and types of magnetic beads can interfere with the detection threshold selection, and this method is significantly affected by lighting conditions, making it impossible to unify the detection threshold across different images. The third method, based on grayscale histogram features, detects the presence of magnetic bead aggregation by identifying whether there are spikes in low grayscale regions of the histogram. However, when only a small amount of aggregation occurs, this peak feature is not obvious, easily leading to missed detections.In this step, for reagent containers containing normal magnetic beads, the pixel grayscale distribution of each pixel in the reagent image at the bottom is uniform, and the pixel grayscale dispersion is good; for example, the standard deviation, relative range, or coefficient of variation of the pixel grayscale will be small. When magnetic beads agglomerate, the pixel grayscale dispersion deteriorates, and the standard deviation, relative range, or coefficient of variation of the pixel grayscale increases. Therefore, by setting a discrete distribution threshold that characterizes the degree of dispersion, such as the standard deviation, relative range, or coefficient of variation of the pixel grayscale, when the pixel grayscale dispersion index is greater than the discrete distribution threshold, it is determined that the magnetic beads have agglomerated, and can be identified as abnormal magnetic beads. Furthermore, the pixel grayscale dispersion index is obtained based on the relative comparison of the grayscale values of each pixel in the reagent image. The type of magnetic beads, the concentration of the magnetic beads, and the lighting conditions during reagent image acquisition all have the same impact on the grayscale values of each pixel, which can eliminate the influence of different reagent types, reagent concentrations, image acquisition conditions, etc., and has better applicability.
[0110] In one embodiment, the control module 400 is further configured to, after determining the target region, and before determining whether the magnetic bead reagent has agglomerated based on the dispersion of the grayscale values of each pixel sampling point in the target region, that is, before... Figure 2 Between steps S210 and S220, there is also a step of removing sub-regions with abnormal grayscale values in the target region.
[0111] In this implementation, during reagent production, filling, or homogenization processes, reagent containers containing magnetic beads are prone to static electricity, which can cause fine dust particles, filamentous materials such as fibers, or other larger interfering objects to adhere to the bottom of the container. Fine dust particles appear as black granular noise in the reagent image, which can cause sudden changes in pixel grayscale, leading to an increase in the physical quantity of agglomeration detection and increasing the risk of false detection. Similarly, filamentous materials such as fibers or other larger interfering objects can also cause abnormal grayscale values in the corresponding areas. Therefore, removing sub-regions with abnormal grayscale values in the target area can eliminate the influence of various interfering objects at the bottom of the reagent container on misjudgments.
[0112] In one embodiment, the step of removing sub-regions with abnormal grayscale values in the target region includes: identifying sub-regions with abrupt grayscale changes in the target region, confirming the sub-regions with abrupt grayscale changes as sub-regions with abnormal grayscale values, and removing the sub-regions with abnormal grayscale values in the target region.
[0113] In this implementation, since various interfering objects at the bottom of the reagent container will cause abrupt changes in the pixel grayscale of the corresponding area in the reagent image, the grayscale change sub-region is first identified from the target area, the grayscale change sub-region is identified as the sub-region with abnormal grayscale value, and the sub-region with abnormal grayscale value in the target area is removed from the target area, which can eliminate the misjudgment caused by various interfering objects at the bottom of the reagent container.
[0114] In one embodiment, determining gray-scale abrupt change sub-regions in a target region includes: radially traversing each pixel in the target region to determine whether a gray-scale abrupt change occurs, thereby determining gray-scale abrupt change sub-regions in the target region.
[0115] In this embodiment, by radially traversing each pixel of the target area, the target area can be comprehensively judged, thereby determining whether a grayscale change has occurred. All pixels corresponding to the grayscale change are identified as grayscale change sub-regions in the target area, so that sub-regions with abnormal grayscale values in the target area can be removed from the target area, eliminating the influence of misjudgment caused by various interferences at the bottom of the reagent container.
[0116] In other embodiments, the pixels of the target region can be traversed along other directions to determine whether a sudden change in grayscale occurs. For example, the pixels can be traversed along a circular direction.
[0117] Reference Figure 4 In one embodiment, the control module 400 is further configured to perform steps S410 to S470.
[0118] Step S410: Perform circle fitting on the target region to obtain the initial circle center.
[0119] Because the reagent container is movable relative to the base used to hold it during image acquisition, the corresponding region (i.e., the target region) of different reagent containers in the reagent image is uncertain. Subsequent processing steps require locating the target region. In this step, a circle fit can be performed on the bottom of the reagent container based on the Hough transform principle to obtain the initial center of the target region. Specifically, the HoughCircles function in OpenCV can be called to perform a circle fit on the target region in the reagent image to obtain the initial center position, for example, referring to... Figure 3 As shown, in this step, the reagent image is input into the HoughCircles function. The HoughCircles function obtains the required input parameters from the reagent image, and thus obtains the initial center of the fitted circle, which can be denoted as centers_org(x0,y0).
[0120] Step S420: Create a circular mask within the target area based on the initial center.
[0121] For reagent containers with bottom ribs, the structural features of the bottom ribs may interfere with the detection of magnetic bead agglomeration. Therefore, before calculating the dispersion of gray values of each pixel sampling point in the target area, it is necessary to detect the bottom ribs and remove the interference in the rib area. Since most of the magnetic beads agglomerate will gather at the bottom center of the reagent container, in this step, a circular mask is created in the target area to detect only the rib structure near the edge of the reagent container. This can avoid the interference of magnetic bead agglomeration on the rib detection and also improve the detection efficiency of the bottom ribs.
[0122] Step S430: Perform the first straight line detection in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container.
[0123] In this step, the edge features of the bottom ribs of the reagent container can be extracted using the Canny operator. Then, the Hough LinesP() function provided by the OpenCV library is used to perform the first line detection in the corresponding region of the annular mask. The result of the first line detection can be referenced... Figure 5 As shown. Specifically, an XY coordinate system is established with the initial center as the origin, and the rotation angle of the straight line corresponding to the edge of each rib relative to the X-axis is calculated to obtain the angle result of each rib edge. The initial rib angle of the current rib can be obtained by calculating the average angle of the two edges of the current rib. Furthermore, the initial rib angles of all bottom ribs of the reagent container can be saved as a rib angle array.
[0124] Step S440: Create a sector mask in the target area based on the initial rib angle. The sector mask includes the bottom rib.
[0125] Since the first line detection is based on the corresponding area of the annular mask, it can only detect the line segments of the bottom rib corresponding to the corresponding area of the annular mask, and cannot obtain the complete rib area. After obtaining the initial rib angle, a sector mask including the bottom rib is created in the target area according to the initial rib angle, and the complete rib edge can be detected in the sector mask.
[0126] Step S450: Perform a second straight line detection in the corresponding area of the sector mask to obtain the edge straight line equations of each bottom rib.
[0127] In this step, since the sector mask is created based on the initial rib angle and includes the bottom rib, performing a second straight line detection in the corresponding area of the sector mask can more accurately and completely detect the edge straight lines of each bottom rib, thus obtaining the edge straight line equations of each bottom rib.
[0128] Step S460: Determine the rib area based on the edge line equation of each bottom rib.
[0129] In this step, the area enclosed by the straight line equation of the bottom rib and the outer edge of the target area is the rib area corresponding to the bottom rib of the reagent container.
[0130] Step S470: Remove the grayscale values of pixel sampling points in the rib region before determining whether the magnetic bead reagent has agglomerated.
[0131] In this embodiment, removing the grayscale values of the pixel sampling points in the rib area can avoid the structural features of the bottom rib from interfering with the detection of magnetic bead agglomeration, which is beneficial to improving the accuracy of magnetic bead agglomeration detection.
[0132] Reference Figure 6 In one embodiment, the step S460 of determining the rib region based on the edge line equation of each bottom rib specifically includes steps S610 to S630.
[0133] Step S610: Determine the rib centerline equation of each bottom rib based on the edge line equation of each bottom rib.
[0134] Step S620: Calculate the intersection points of the centerline equations of two adjacent ribs in sequence, and obtain the center of the target region based on all the intersection points.
[0135] Step S630: Determine the rib region based on the linear equations of the center and edge of the target region.
[0136] During reagent image acquisition, when there is a deflection angle between the bottom of the reagent container and the lens of the image acquisition module 300, the initial center obtained by circle fitting of the target area in step S410 may have errors. However, the edge line equation of the bottom ribs is obtained by creating masks twice and performing line detection twice, thus the accuracy of the bottom rib edge line equation is higher. The center of the target area can be corrected using the bottom rib edge line equation. In this embodiment, the rib centerline equation is obtained based on the edge line equations of each bottom rib. Then, the intersection point of the centerline equations of two adjacent ribs is calculated sequentially, thereby obtaining a more accurate target area center. The rib area determined based on this target area center and the edge line equation has higher accuracy than the rib area determined based on the initial center and edge line equation obtained by circle fitting.
[0137] In one embodiment, step S620, obtaining the center of the target region based on all intersection points, includes:
[0138] Calculate the mean x-coordinate and mean y-coordinate of all intersection points to obtain the x-coordinate and y-coordinate of the center of the target area;
[0139] Specifically, when calculating the mean of the horizontal and vertical coordinates, intersection points whose distance from the initial center is greater than a first preset value are removed.
[0140] Because the equations of the bottom rib's edge lines or centerline may have significant errors and large slope deviations when the bottom rib is at 90 / 270 degrees, resulting in outliers in the intersection point set, outlier handling is necessary. Therefore, in outlier handling, the distance dist between each intersection point and the initial center is calculated. If this distance dist is greater than a first preset value dist_th, the intersection point can be considered an outlier. When calculating the mean of the horizontal and vertical coordinates, this intersection point is excluded from the statistics, thus eliminating the error caused by outliers.
[0141] Reference Figure 7 In one embodiment, step S430 involves performing a first straight line detection in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container, including steps S710 to S730.
[0142] Step S710: Perform a first straight line detection in the corresponding area of the annular mask to obtain the initial edge equations of each bottom rib of the reagent container.
[0143] Step S720: Establish a coordinate system with the initial circle center as the origin, and calculate the rotation angle of the initial edge equation relative to the coordinate axes.
[0144] Step S730: Calculate the average value of the rotation angles of the two initial edge equations corresponding to the bottom ribs to obtain the initial rib angles of each bottom rib of the reagent container.
[0145] In this embodiment, the edge features of the bottom ribs of the reagent container can be extracted using the Canny operator. The Hough LinesP() function provided by the OpenCV library is then used to perform a first line detection in the corresponding region of the annular mask. The result of the first line detection can be referenced... Figure 5 As shown, the initial edge equations of some edge lines of each bottom rib are obtained. An XY coordinate system is established with the initial center as the origin, and the rotation angle of the line corresponding to each rib edge relative to the X-axis is calculated to obtain the angle result of each rib edge. The initial rib angle of the current rib can be obtained by calculating the average angle of the two edges of the current rib. Furthermore, the initial rib angles of all bottom ribs of the reagent container can be saved as a rib angle array.
[0146] In one embodiment, the control module 400 is further configured to:
[0147] If the difference between an initial rib angle and the two adjacent initial rib angles does not fall within the preset angle range, remove one initial rib angle.
[0148] Because the bottom of the reagent container carries static electricity, it may attract filamentous materials such as fibers, which can interfere with the process. If these filaments appear radially, they may be misidentified as bottom ribs. Therefore, after calculating the initial rib angles, multiple rib identification processing is required. Figure 5 Taking the bottom rib as an example, under normal circumstances, the difference between the initial rib angles of two adjacent ribs is between 58°-62° or 116°-124°. If the difference between the initial rib angle of the current rib and the previous or next rib is within the threshold range of 58°-62° or 116°-124°, the rib is considered to be correctly identified and the initial rib angle is saved; otherwise, the initial rib angle is deleted.
[0149] In one embodiment, the control module 400 is further configured to:
[0150] When the number of initial rib angles is less than the second preset value, image enhancement is performed on the corresponding area of the circular mask, and the first straight line detection is performed again.
[0151] In this embodiment, when the contrast of the bottom ribs in the reagent image is low, the edge features of the ribs are not obvious, which may lead to the bottom ribs being missed, resulting in the number of initial rib angles being less than the first preset value. For example, for... Figure 5 The number of initial rib angles obtained from the reagent image detection is 4, which is less than 5, indicating an insufficient number of initial rib angles. At this time, the CLAHE function in OpenCV is called to perform image enhancement on the corresponding area of the circular mask in the reagent image. After enhancing the contrast of the bottom ribs, the straight line detection and initial rib angle calculation are performed again, which can effectively re-detect the missed bottom ribs.
[0152] Reference Figure 8 In one embodiment, step S220, which determines whether the magnetic bead reagent has agglomerated based on the dispersion of the gray values of each pixel sampling point in the target area, includes steps S810 to S840.
[0153] Step S810: Sample the grayscale values of each pixel sampling point in the radial direction of the target area to obtain a single radial grayscale change array. The original pixel grayscale curve corresponding to the single radial grayscale change array is shown below. Figure 10 As shown.
[0154] Step S820: Step along the clockwise or counterclockwise direction with a first arc, and continue sampling the grayscale values of each pixel sampling point radially from the center of the target area to obtain multiple radial grayscale change arrays. The original pixel grayscale curves corresponding to the multiple radial grayscale change arrays are as follows: Figure 11 As shown.
[0155] Step S830: Based on the illumination trend of the target area in the radial direction, perform illumination trend removal processing on all radial grayscale change arrays to obtain multiple radial pixel grayscale arrays.
[0156] Step S840: Determine whether the magnetic bead reagent has agglomerated based on the degree of dispersion of gray values in multiple radial pixel grayscale arrays.
[0157] In this embodiment, the grayscale values of each pixel sampling point in the radial direction of the target area are sampled, that is, each pixel point is sampled from the center of the target area outwards, which can reduce redundant computation. Since light passes through substances in the reagent container, such as magnetic beads and diluents, after entering the reagent container, the illumination gradually dims from the outside to the inside in the radial direction. In terms of grayscale values, this is manifested as a gradual decrease in grayscale values from the outside to the inside, resulting in a relatively discrete grayscale distribution in the radial grayscale change array. According to the illumination trend of the target area in the radial direction, the entire radial grayscale change array is processed to remove the illumination trend, which can obtain multiple radial pixel grayscale arrays that have removed the influence of the illumination trend. Finally, the magnetic bead agglomeration detection is performed based on the dispersion of grayscale values in the multiple radial pixel grayscale arrays. This can eliminate the influence of different reagent types, reagent concentrations, image acquisition conditions, etc., and has better applicability.
[0158] Reference Figure 9 In one embodiment, the control module 400 is further configured to execute steps S910 to S940.
[0159] Step S910: Perform differential calculations on multiple radial pixel grayscale arrays to obtain radial pixel grayscale difference arrays.
[0160] Step S920: When the maximum grayscale difference in the radial pixel grayscale difference array is greater than the third preset value, and the minimum grayscale difference in the radial pixel grayscale difference array is less than the fourth preset value, the interpolation region is determined based on the maximum grayscale difference and the minimum grayscale difference.
[0161] Step S930: Perform interpolation calculations on the gray values of the corresponding pixel sampling points of the radial gray-scale variation array based on the interpolation region.
[0162] Step S940: Based on the radial illumination trend of the target area, reprocess the radial grayscale change array after interpolation to remove the illumination trend.
[0163] In this embodiment, when a large area of interfering material is adsorbed at the bottom of the reagent container, for example, referring to... Figure 12 As shown, since the interfering material is distributed on the bottom surface of the bottle, while the magnetic beads aggregate inside the reagent container, the contrast of the interfering material in the image is higher than that of the magnetic bead aggregate. That is, when the radial curve passes through the interfering material, the gray value will change abruptly, first decreasing sharply and then increasing sharply. At this time, the radial pixel gray value array is differentially calculated through step S910, and the pixel difference curve corresponding to the obtained radial pixel gray value difference array will show downward and upward pulses in sequence. For example, refer to Figure 13 As shown; after determining the interpolation region corresponding to the interference object in step S920, the pixels in the region corresponding to the interference object are removed. The original pixel grayscale curve corresponding to the radial grayscale change array after removing the pixels in the region corresponding to the interference object is shown in Figure 1. Figure 14 As shown, interpolation calculations are then performed using the method described in step S930, and the results of the interpolation calculations are referenced. Figure 15 As shown, the radial grayscale variation array after interpolation is then reprocessed to remove the illumination trend.
[0164] In one embodiment, determining whether the magnetic bead reagent has agglomerated based on the dispersion of gray values in a plurality of radial pixel grayscale arrays includes:
[0165] From multiple radial pixel grayscale arrays, the grayscale values of the corresponding pixel sampling points calculated by interpolation are removed, the dispersion of grayscale values is calculated, and it is determined whether the magnetic bead reagents have agglomerated.
[0166] In this embodiment, since the gray values of the region corresponding to the interference object are restored through interpolation calculation, in order to further remove interference, the pixels of the region corresponding to the interference object are not included in the calculation of the dispersion of gray values in multiple radial pixel gray arrays, which is beneficial to improving the accuracy of magnetic bead agglomeration detection.
[0167] In one embodiment, determining the interpolation region based on the maximum and minimum gray-level difference includes:
[0168] Obtain the minimum index corresponding to the minimum grayscale difference and the maximum index corresponding to the maximum grayscale difference, and determine the interpolation region based on the minimum and maximum indexes.
[0169] As the radial curve passes through the interference, the pixel difference curve corresponding to the radial pixel gray-level difference array will successively show downward and upward pulses. Therefore, the interference area corresponds to the area between the minimum and maximum gray-level difference values in the radial pixel gray-level difference array. Thus, the corresponding interpolation area can be determined based on the minimum index corresponding to the minimum gray-level difference and the maximum index corresponding to the maximum gray-level difference.
[0170] In one embodiment, the difference between the minimum value index and the fifth preset value is used as the starting point of the interpolation region, and the sum of the maximum value index and the sixth preset value is used as the ending point of the interpolation region.
[0171] Since the grayscale of pixels before and after the location of the interfering object will also fluctuate when an interfering object is present, causing further interference, several pixels before and after the location of the interfering object are also removed. This widens the start and end points of the interpolation area, thus preventing the influence of the interfering object from being completely eliminated.
[0172] In one embodiment, when the maximum value index of one interpolation region is greater than the minimum value index of the other interpolation region, the two adjacent interpolation regions are merged.
[0173] When two interfering objects are close together, the two adjacent interpolation regions will overlap. Merging the two adjacent interpolation regions can effectively eliminate the influence of the two interfering objects, which is beneficial to improving the accuracy of magnetic bead aggregation detection.
[0174] In one embodiment, determining whether the magnetic bead reagent has agglomerated is based on the degree of dispersion of gray values in a plurality of radial pixel grayscale arrays, including at least one of the following:
[0175] Calculate the standard deviation of gray values in multiple radial pixel gray arrays. When the standard deviation is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0176] Calculate the relative range of gray values in multiple radial pixel grayscale arrays. When the relative range is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0177] Calculate the deviation coefficient of gray values in multiple radial pixel grayscale arrays. When the deviation coefficient is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
[0178] In this embodiment, the standard deviation, relative range, or deviation coefficient of gray values in the radial pixel grayscale array are all discrete distribution feature values that can characterize the degree of dispersion. They can eliminate the influence of different reagent types, reagent concentrations, image acquisition conditions, etc., and have better applicability.
[0179] In one embodiment, the control module 400 is further configured to:
[0180] Before determining the target region, the reagent image is subjected to image filtering; image filtering includes any one of the following:
[0181] Median filtering;
[0182] Gaussian filtering;
[0183] Bilateral filtering;
[0184] Morphological filtering.
[0185] In this embodiment, because the reagent container containing magnetic beads is prone to static electricity during reagent production, filling, or homogenization processes, the bottom of the container may attract fine dust particles. These fine dust particles appear as black particle noise in the reagent image. This noise can cause abrupt changes in pixel grayscale, leading to an increase in the physical quantity of agglomeration detection and increasing the risk of false detection. By performing image filtering on the reagent image, noise reduction can be effectively achieved, filtering out the black particle noise corresponding to the dust particles in the reagent image. Median filtering, Gaussian filtering, bilateral filtering, and morphological filtering are all effective and feasible image filtering methods. Among them, median filtering is the most suitable filtering method in this embodiment, with good filtering effect.
[0186] On the other hand, embodiments of this application provide a sample analysis method, including:
[0187] The reagent container containing the magnetic beads is homogenized to improve the uniformity of the magnetic beads.
[0188] Before the magnetic bead reagent is mixed with the sample, a reagent image of the magnetic bead reagent is captured from the bottom of the reagent container;
[0189] By comparing the relative gray values of pixel sampling points in the reagent image, it can be determined whether the magnetic bead reagent has agglomerated.
[0190] In this embodiment, by homogenizing the magnetic beads in the magnetic bead reagent, the uniformity of the magnetic bead reagent can be improved. Then, before the magnetic bead reagent is used, that is, before the magnetic bead reagent is mixed with the sample, the reagent image of the homogenized magnetic bead reagent is collected from the bottom of the reagent container. Then, anomaly identification is performed based on the reagent image of the magnetic bead reagent to determine whether there is an abnormal phenomenon of aggregation of the magnetic bead reagent. This avoids the use of abnormal magnetic bead reagent in subsequent sample testing, which may cause abnormal test results. Alternatively, it can prompt patients and medical staff to ignore the test results obtained by using abnormal magnetic bead reagent, so as to avoid patients and medical staff receiving incorrect test results and thus misjudging the condition. Furthermore, determining whether magnetic bead reagents exhibit agglomeration abnormalities by comparing the relative gray levels of pixel sampling points in the reagent image is more applicable than directly using gray level thresholds. This is because directly using gray level thresholds requires extensive testing to determine the appropriate gray level threshold for different types of magnetic bead reagents, different concentrations of magnetic bead reagents, and different image acquisition conditions. In other words, the gray level thresholds set for different reagent images cannot be standardized. However, using relative gray level comparisons of pixel sampling points in the reagent image can eliminate the influence of differences in reagent type, reagent concentration, and image acquisition conditions, thus providing better applicability.
[0191] This application provides an operation control device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the sample analysis method mentioned in any of the above embodiments.
[0192] This application provides a sample analysis system, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the sample analysis method described above.
[0193] This application provides a computer storage medium storing a computer program applied to an ultrasonic imaging device. When the computer program is executed by a processor, it implements the sample analysis method mentioned in any of the above embodiments.
[0194] This application provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the sample analysis method mentioned in any of the above embodiments.
[0195] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0196] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0197] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0198] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0199] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.
[0200] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A sample analysis system, comprising: A reagent storage module for holding reagent containers, wherein the reagent containers include at least a reagent container containing magnetic bead reagents; The detection module is used to detect the test solution prepared from at least the magnetic bead reagent and the sample; Its characteristic is that it further includes: An image acquisition module is used to acquire a reagent image of the homogenized magnetic bead reagent from the bottom of the reagent container containing the magnetic bead reagent; the homogenization process is used to improve the uniformity of the magnetic bead reagent; the acquisition of the reagent image is performed before the magnetic bead reagent is mixed with the sample; The control module is configured to: acquire the reagent image and determine whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of the pixel sampling points in the reagent image.
2. The sample analysis system according to claim 1, characterized in that, The step of determining whether the magnetic bead reagent has agglomerated based on the relative grayscale comparison of pixel sampling points in the reagent image includes: Based on the relative comparison of the gray values of each pixel in the reagent image, the target area corresponding to the bottom of the reagent container is determined; Based on the degree of dispersion of the gray values of each pixel sampling point in the target area, it is determined whether the magnetic bead reagent has agglomerated.
3. The sample analysis system according to claim 2, characterized in that, The control module is further configured to, after determining the target region and before determining whether the magnetic bead reagent has agglomerated based on the dispersion of grayscale values of each pixel sampling point in the target region, include a step of removing sub-regions with abnormal grayscale values in the target region.
4. The sample analysis system according to claim 3, characterized in that, The step of removing sub-regions with abnormal grayscale values in the target region includes: identifying sub-regions with abrupt grayscale changes in the target region, confirming the sub-regions with abrupt grayscale changes as sub-regions with abnormal grayscale values, and removing the sub-regions with abnormal grayscale values in the target region.
5. The sample analysis system according to claim 4, characterized in that, The step of determining the gray-scale abrupt change sub-region in the target region includes: radially traversing each pixel in the target region to determine whether a gray-scale abrupt change occurs, thereby determining the gray-scale abrupt change sub-region in the target region.
6. The sample analysis system according to claim 2, characterized in that, The control module is also configured to: Perform a circle fitting on the target region to obtain the initial circle center; A circular mask is created within the target area based on the initial center point. A first straight line detection is performed in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container; A sector mask is created in the target area according to the initial rib angle, the sector mask including the bottom rib; A second straight line detection is performed in the corresponding area of the sector mask to obtain the edge straight line equations of each of the bottom ribs; The rib regions are determined based on the edge line equations of each of the bottom ribs; Before determining whether the magnetic bead reagent has agglomerated, the grayscale values of the pixel sampling points in the rib region are removed.
7. The sample analysis system according to claim 6, characterized in that, The step of determining the rib region based on the edge line equation of each of the bottom ribs includes: The rib centerline equation of each bottom rib is determined based on the edge line equation of each bottom rib. The intersection points of the centerline equations of two adjacent ribs are calculated sequentially, and the center of the target region is obtained based on all the intersection points; The rib region is determined based on the center of the target region and the equation of the edge line.
8. The sample analysis system according to claim 7, characterized in that, The step of obtaining the center of the target region based on all the intersection points includes: Calculate the mean x-coordinate and mean y-coordinate of all the intersection points to obtain the x-coordinate and y-coordinate of the center of the target area; Specifically, when calculating the mean of the horizontal coordinate and the mean of the vertical coordinate, intersection points whose distance from the initial center is greater than a first preset value are removed.
9. The sample analysis system according to claim 6, characterized in that, The step of performing a first straight-line detection in the corresponding area of the annular mask to obtain the initial rib angles of each bottom rib of the reagent container includes: A first straight line detection is performed in the corresponding area of the annular mask to obtain the initial edge equations of each bottom rib of the reagent container; Establish a coordinate system with the initial circle center as the origin, and calculate the rotation angle of the initial edge equation relative to the coordinate axes; The average value of the rotation angles of the two initial edge equations corresponding to the bottom ribs is calculated to obtain the initial rib angles of each bottom rib of the reagent container.
10. The sample analysis system according to claim 6, characterized in that, The control module is also configured to: If the difference between an initial rib angle and the angles of two adjacent initial ribs does not fall within the preset angle range, the initial rib angle is removed.
11. The sample analysis system according to claim 6, characterized in that, The control module is also configured to: When the number of initial rib angles is less than the second preset value, image enhancement is performed on the corresponding area of the annular mask, and the first straight line detection is performed again.
12. The sample analysis system according to claim 2, characterized in that, The step of determining whether the magnetic bead reagent has agglomerated based on the dispersion of grayscale values of each pixel sampling point in the target region includes: The grayscale values of each pixel sampling point in the radial direction of the target region are sampled to obtain a single radial grayscale change array; Step along the clockwise or counterclockwise direction with a first arc, and continue to sample the gray values of each pixel sampling point in the radial direction of the center of the target area to obtain multiple radial gray value change arrays; Based on the radial illumination trend of the target area, the entire radial grayscale change array is subjected to illumination trend removal processing to obtain multiple radial pixel grayscale arrays. The degree of dispersion of gray values in the plurality of radial pixel grayscale arrays is used to determine whether the magnetic bead reagent has agglomerated.
13. The sample analysis system according to claim 12, characterized in that, The control module is also configured to: Differential calculations are performed on multiple radial pixel grayscale arrays to obtain radial pixel grayscale difference arrays; When the maximum grayscale difference in the radial pixel grayscale difference array is greater than a third preset value, and the minimum grayscale difference in the radial pixel grayscale difference array is less than a fourth preset value, the interpolation region is determined based on the maximum grayscale difference and the minimum grayscale difference. The gray values of the corresponding pixel sampling points of the radial gray-level variation array are interpolated according to the interpolation region; Based on the radial illumination trend of the target area, the radial grayscale change array after the interpolation calculation is reprocessed to remove the illumination trend.
14. The sample analysis system according to claim 13, characterized in that, The step of determining whether the magnetic bead reagent exhibits aggregation based on the dispersion of gray values in the plurality of radial pixel grayscale arrays includes: From the plurality of radial pixel grayscale arrays, the grayscale values of the corresponding pixel sampling points for interpolation calculation are removed, the dispersion of the grayscale values is calculated, and it is determined whether the magnetic bead reagent has agglomerated.
15. The sample analysis system according to claim 13, characterized in that, Determining the interpolation region based on the maximum and minimum grayscale differences includes: Obtain the minimum index corresponding to the minimum grayscale difference and the maximum index corresponding to the maximum grayscale difference, and determine the interpolation region based on the minimum index and the maximum index.
16. The sample analysis system according to claim 15, characterized in that, The difference between the minimum value index and the fifth preset value is used as the starting point of the interpolation region, and the sum of the maximum value index and the sixth preset value is used as the ending point of the interpolation region.
17. The sample analysis system according to claim 15, characterized in that, In two adjacent interpolation regions, if the maximum value index of one interpolation region is greater than the minimum value index of the other interpolation region, the two adjacent interpolation regions are merged.
18. The sample analysis system according to claim 12, characterized in that, Determining whether the magnetic bead reagent exhibits aggregation based on the dispersion of gray values in the plurality of radial pixel grayscale arrays includes at least one of the following: Calculate the standard deviation of gray values in the plurality of radial pixel gray arrays. When the standard deviation is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated. Calculate the relative range of gray values in the plurality of radial pixel gray arrays. When the relative range is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated. Calculate the deviation coefficient of gray values in the plurality of radial pixel grayscale arrays. When the deviation coefficient is greater than a preset value, it is determined that the magnetic bead reagent has agglomerated.
19. The sample analysis system according to claim 2, characterized in that, The control module is also configured to: Before determining the target region, the reagent image is subjected to image filtering; the image filtering includes any one of the following: Median filtering; Gaussian filtering; Bilateral filtering; Morphological filtering.
20. A sample analysis method, characterized in that, include: The reagent container containing magnetic beads is subjected to a homogenization treatment, which is used to improve the uniformity of the magnetic beads. Before the magnetic bead reagent is mixed with the sample, a reagent image of the magnetic bead reagent is captured from the bottom of the reagent container; Based on the relative comparison of the gray values of the pixel sampling points in the reagent image, it is determined whether the magnetic bead reagent has agglomerated.