Sample layered detection method and system and medium
By collecting images of the sample liquid in the centrifuge container and obtaining pixel difference data, the stratification moment of the blood sample is automatically determined, which solves the problem of the inability to accurately determine the stratification completion time point in the existing technology and achieves efficient cell protection and detection. Accuracy.
Patent Information
- Application Number
- CN202310199085.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2024-08-23
AI Technical Summary
Existing technology cannot accurately determine the time point at which blood samples are stratified, resulting in cell damage and low efficiency. Relying on manual observation or experimental statistical results is not accurate enough.
By collecting the image of the sample liquid after the centrifuge container is rotated, the pixel difference data is obtained, the initial stratification moment is automatically determined, and the separation liquid is injected after the stable stratification of the sample liquid is recognized, and the stratification detection results are output.
It realizes automated layered detection without manual identification, improves accuracy, reduces cell damage, and improves cell yield.
Smart Images

Figure CN118533827A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biomedical technology, and in particular to a sample stratification detection method, system and medium. Background Art
[0002] At present, in the process of processing blood samples, it is often necessary to perform high-speed centrifugation stratification on the blood samples through containers such as centrifuge cups. In the process of centrifugal stratification of blood samples, if stratification has been completed, if centrifugation is continued after the time point when stratification is completed, it will cause damage to the cells in the blood sample, thereby affecting the cell yield. Therefore, determining the time point when stratification is completed is an important indicator for cell centrifugation. In actual centrifugal stratification, due to the different viscosities of different blood samples, the time point when stratification is completed is also different.
[0003] In the prior art, it is usually determined whether the stratification is stable by artificially observing the blood sample, and then the time point when the stratification is completed is determined; or multiple centrifugal stratification experiments are performed and the stratification time after the stable stratification is counted, and then, in order to avoid misjudgment, the longest stratification time obtained from the experimental statistics is used as the time point when the stratification is completed. The shortcomings of the above scheme are that the efficiency of determining the time point when the stratification is completed by artificial observation is low, and it relies on manual experience, and it is impossible to accurately determine the time point when the stratification is completed; and the longest stratification time obtained in the experimental results is used as the time point when the stratification is completed, which is also not accurate enough for blood samples of different viscosities. Therefore, there is an urgent need for a method to accurately determine the time point when the stratification is completed to reduce damage to cells. Summary of the invention
[0004] The embodiments of the present invention provide a sample stratification detection method, system and medium to solve the problem that the time point when stratification is completed cannot be accurately determined in the prior art.
[0005] A sample stratification detection method, comprising:
[0006] After the centrifugal container rotates, collecting a sample image of the sample liquid contained in the centrifugal container;
[0007] Acquiring pixel difference data between the sample images, and determining a preliminary stratification moment according to the pixel difference data;
[0008] After the initial stratification moment, the separation liquid is injected, and after the stable stratification of the sample liquid is identified, the stratification detection result is output.
[0009] A sample stratification detection system comprises a centrifugal container and a controller connected to the centrifugal container, wherein the controller is used to execute the sample stratification detection method.
[0010] A computer-readable storage medium stores a computer program, wherein the computer program implements the above-mentioned sample stratification detection method when executed by a processor.
[0011] The above-mentioned sample stratification detection method, system and medium, the method includes: after the centrifugal container rotates, collecting sample images of the sample liquid contained in the centrifugal container; obtaining pixel difference data between the sample images, and determining the initial stratification time according to the pixel difference data; injecting separation liquid after the initial stratification time, and outputting the stratification detection result after identifying the stable stratification of the sample liquid. The present invention can inject separation liquid and identify the stable stratification of the sample liquid after determining the initial stratification time according to the pixel difference data between the sample images of the sample liquid collected during the rotation of the centrifugal container, and then output the stratification detection result. The sample stratification detection method of the present invention, by automatically determining the initial stratification time, automatically identifying the stable stratification, and outputting the stratification detection result, realizes the elimination of manual identification and manual observation, greatly reduces labor costs, and improves the accuracy of stratification detection of the sample liquid in the centrifugal container, thereby reducing cell damage in the sample liquid and improving cell yield. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0013] Figure 1 is a flow chart of a sample stratification detection method in one embodiment of the present invention;
[0014] Figure 2 is a flow chart of step S20 of the sample stratification detection method in one embodiment of the present invention;
[0015] Figure 3 is a flow chart of step S203 of the sample stratification detection method in one embodiment of the present invention;
[0016] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] In one embodiment, if Figure 1 As shown, a sample stratification detection method is provided, comprising the following steps:
[0019] S10: After the centrifugal container rotates, a sample image of the sample liquid contained in the centrifugal container is collected; wherein the centrifugal container includes but is not limited to a centrifugal cup, a piston centrifuge tube, a can or a bottle, etc. Understandably, in the present invention, after the controller receives the sample stratification detection instruction, it controls the centrifugal container to rotate, and at this time, the sample liquid in the centrifugal container begins to be stratified. Wherein, the sample liquid includes but is not limited to a blood mixed sample liquid. The sample liquid contains cells, so it is necessary to control the centrifugal container to stop rotating after the sample liquid completes stable stratification, thereby avoiding the cells in the sample liquid from being damaged during the long centrifugation process. In the present invention, it is necessary to first collect the sample image of the sample liquid in the centrifugal container that rotates with it through the shooting device after starting the centrifugal stratification of the sample liquid (that is, after the centrifugal container rotates), and then further obtain the pixel difference data between the sample images in the subsequent step S20, so as to determine the initial stratification time according to the pixel difference data, and then accurately determine the stable stratification of the sample liquid, so as to avoid cell damage in the sample liquid due to the long rotation time of the centrifugal container.
[0020] In one embodiment, the step S10, i.e., collecting a sample image of the sample liquid contained in the centrifugal container after the centrifugal container rotates, includes:
[0021] The centrifugal container is controlled to rotate at a preset speed, so that the sample liquid in the centrifugal container adheres to the inner wall of the centrifugal container to form a liquid ring; in this embodiment, the preset speed can be set according to demand, and in the centrifugal container rotating at the preset speed, the sample liquid can rotate with the centrifugal container, and then adhere to the inner wall of the centrifugal container to form a hollow liquid ring. In one embodiment, on the cross section passing through the central axis of the liquid ring, the cross section of the liquid ring is rectangular or trapezoidal. That is, when the centrifuge container is cylindrical (and has a cylindrical centrifugal space), the centrifuge container rotates at a preset speed around a central axis that is perpendicular to the horizontal plane. At the preset speed, the sample liquid will form a liquid ring around the central axis on the inner wall of the centrifuge container, and the outer ring liquid surface of the liquid ring (that is, the outer ring side wall of the liquid ring) fits the inner wall of the centrifuge container, and the inner ring liquid surface of the liquid ring is parallel to the central axis of the centrifuge container, that is, the inner ring liquid surface of the liquid ring is perpendicular to the horizontal plane (that is, the vertical inner ring liquid surface, the vertical inner ring liquid surface of the liquid ring is 90 degrees to the horizontal plane). At this time, since the central axis and the inner wall of the centrifuge container are also perpendicular to the horizontal plane, the cross sections on the liquid ring cut by the plane passing through the central axis are all rectangular cross sections. Understandably, in another embodiment of the present invention, since the liquid surface may not be completely perpendicular to the horizontal plane when the centrifugal container is actually rotating, the inner ring liquid surface of the liquid ring may not be perpendicular to the horizontal plane, but may be inclined at an angle close to 90 degrees to the horizontal plane (in the present invention, this is also referred to as a vertical inner ring liquid surface). At this time, on the section passing through the central axis of the liquid ring, the cross section of the liquid ring is close to a rectangular cross section, but the inner ring liquid surface is slightly deformed (not perpendicular to the horizontal plane, but inclined at an angle close to 90 degrees to the horizontal plane).
[0022] By means of a shooting device installed above or below the centrifugal container, a sample image corresponding to the upper surface or lower surface of the liquid ring is shot in real time or at a fixed time, and the sample image includes the annular region of the liquid ring. Wherein, the shooting device is fixedly installed above or below the centrifugal container (in one embodiment, in order to make the sample image finally shot more accurate, the shooting device can be installed above and below the centrifugal container at the same time, and then the shooting is synchronously performed above and below to determine the sample image). During the whole process of sample stratification detection of the sample liquid, the viewing angle of the shooting device remains unchanged, so as to ensure the accuracy of the sample stratification detection process. At the upper position of the centrifugal container, the shooting device shoots the sample image corresponding to the upper surface of the liquid ring, and at this time, the sample image includes the entire annular region corresponding to the upper surface of the liquid ring; and at the lower position of the centrifugal container, the shooting device shoots the sample image corresponding to the lower surface of the liquid ring, and at this time, the sample image includes the entire annular region corresponding to the lower surface of the liquid ring. The acquisition of sample images can be performed periodically or in real time, that is, real-time shooting can be performed continuously, or timed shooting can be performed at intervals of a preset number of frames or seconds, and it is only necessary to meet the number of real-time sample images actually required in the layered detection process.
[0023] S20: Obtain pixel difference data between the sample images, and determine the initial stratification time according to the pixel difference data; understandably, in one embodiment, the photographing device needs to start collecting sample images after the centrifugal container starts to rotate for a specific period of time. At this time, the sample liquid has just formed a liquid ring, but has not yet started to stratify, that is, the sample liquid is now in an annular area in the sample image. At this time, the sample image that has an annular area that has not yet been stratified can be regarded as the initial image. Understandably, in another embodiment, the photographing device can start collecting sample images when the centrifugal container starts to rotate. At this time, the sample liquid has not yet formed a liquid ring, but is cylindrical, and the sample liquid is now in a round cake shape in the sample image. At this time, the round cake-shaped sample image can be regarded as the initial image. In the present invention, pixel difference data (that is, pixel changes accompanied by stratification changes of the sample liquid) can be determined based on the comparison between other sample images after the initial image and the initial image, as well as the comparison between two adjacent sample images, and then the initial stratification moment can be determined. In this embodiment, the initial stratification moment refers to the time point when the sample liquid in the form of a liquid ring begins to stratify in the sample image. For example, the sample liquid that had not been stratified before begins to stratify into two layers. At this time, since the sample images collected before the initial stratification moment have not been stratified, and the sample images collected after the initial stratification moment begin to show stratification changes, the pixel difference data between the two adjacent sample images will show a large change. At this time, the initial stratification moment can be determined based on the change characteristics of the above-mentioned pixel difference data.
[0024] In one embodiment, if Figure 2 As shown, the step S20, i.e., obtaining the pixel difference data between the sample images and determining the initial stratification moment according to the pixel difference data, includes steps S201-S203:
[0025] S201, insert all the sample images collected into the sample queue in the order of the collection time from first to last, and record the sample image arranged first in the sample queue as the initial image; each sample image is associated with a collection time; in this embodiment, when the sample images are collected between the initial layering time, the collection time point corresponding to each sample image is the collection time. Therefore, the sample images can be sorted according to the collection time. The earlier (the earlier) the collection time is, the higher the ranking of the sample image in the sample queue is, and the later (the later) the collection time is, the later the ranking of the sample image in the sample queue is. Therefore, the sample image arranged first in the sample queue (the sample image collected first) will be recorded as the initial image. It can be understood that in the present invention, the order in the sample queue can also be arranged in the order of the collection time from last to first. At this time, the sample image arranged last in the sample queue can be recorded as the initial image, and the subsequent other operations will also be changed in sequence.
[0026] S202, determining an image to be processed from the sample images arranged after the initial image in the sample queue; in one embodiment, all sample images arranged after the initial image in the sample queue can be regarded as images to be processed, so that all the above-mentioned images to be processed can be compared with the initial image in step S203 according to the acquisition time, and then determining whether the preset pixel difference condition is met between the two.
[0027] In another embodiment, the step S202, i.e., determining the image to be processed from the sample images arranged after the initial image in the sample queue, includes:
[0028] A comparison image group is determined from the sample queue, each comparison image group includes a first target image arranged first and a second target image arranged after and adjacent to the first target image; it can be understood that since the sample images collected before the initial stratification moment have not yet been stratified, and the sample images collected after the initial stratification moment begin to show stratification changes, therefore, in this embodiment, two adjacent sample images collected before and after the initial stratification moment can be compared to determine whether the two meet the first pixel difference condition. Therefore, in this embodiment, all adjacent sample images in the sample queue are grouped into comparison image groups in pairs, wherein the adjacent sample images may be adjacent in intervals, that is, the sample images after each preset period are used as the adjacent sample images of the previous sample images, for example, the first comparison image group is the first arranged initial image (the first target image in the first comparison image group) and the sample image arranged after and adjacent to the initial image (the second target image in the first comparison image group), and in the second sample image group, the new first target image is the original second target image in the first comparison image group, and the new second target image is the sample image collected after the original second target image in the first comparison image group, and so on. That is, in this embodiment, each pair of adjacent sample images can be determined as a comparison image group in sequence according to the order of acquisition time from first to last, and each comparison image group includes the first target image arranged first and the second target image arranged after and adjacent to the first target image.
[0029] The first target image and the second target image in each of the comparison image groups are converted into a first histogram and a second histogram respectively; wherein the histogram is a coordinate display diagram which statistically summarizes the pixel values in the image and reflects the pixel value range of 0-255 through the horizontal axis.
[0030] Performing difference pixel identification on the first histogram and the second histogram in each of the compared image groups, and obtaining the second difference pixel quantity between the first histogram and the second histogram in each of the compared image groups;
[0031] When the second difference pixel number exceeds the second preset pixel number threshold, it is confirmed that the comparison image group corresponding to the second difference pixel number meets the first pixel difference condition, and the second target image in the comparison image group is recorded as the image to be processed. The second preset pixel number threshold can be set according to requirements.
[0032] In this embodiment, when it is necessary to determine whether each of the comparison image groups meets the first pixel difference condition, the first target image and the second target image in the comparison image group can be converted into a first histogram and a second histogram respectively, and then the first histogram and the second histogram are compared to identify the difference pixels therebetween, and obtain the second difference pixel number between the first histogram and the second histogram (that is, the number of different pixels between the first histogram and the second histogram). When the second difference pixel number exceeds the second preset pixel number threshold, it means that the sample liquid may have begun to be stratified, and the acquisition time corresponding to the second target image in the comparison image group may be the initial stratification time.
[0033] However, in the actual rotation process of the centrifugal container, in addition to the reason of reaching the initial stratification moment, the second difference pixel number between two adjacent sample images may also exceed the second preset pixel number threshold due to other reasons. For example, if the initial image is the sample image that starts to be collected when the centrifugal container starts to rotate, since the sample liquid corresponding to the initial image has not yet formed a liquid ring, but is in a cylindrical shape, therefore, in the process of converting from a cylindrical shape to a liquid ring, the second difference pixel number corresponding to the two adjacent sample images will also have a large change. At this time, the second difference pixel number may also exceed the second preset pixel number threshold. Therefore, in order to clarify whether the sample liquid has been determined to start stratification, it is necessary to record the second target image in the current group of comparison images as the image to be processed, and then enter step S203. By comparing the image to be processed with the initial image, it is determined that the preset pixel difference condition is satisfied between the two (the preset pixel difference condition is the pixel change condition that should exist when the initial image changes to the sample image corresponding to the initial stratification moment), and then the acquisition moment corresponding to the image to be processed can be determined as the initial stratification moment. When the second difference pixel number does not exceed the second preset pixel number threshold, it means that the pixel difference between the first histogram and the second histogram in the comparison image group has not reached the level of the initial stratification moment, and at this time, it means that the sample liquid has not yet begun to stratify. This embodiment can improve the accuracy of centrifugal stratification detection by comparing the second difference pixel numbers between adjacent sample images.
[0034] S203, sequentially comparing the initial image with each of the images to be processed according to the acquisition time, and when the image to be processed and the initial image meet the preset pixel difference condition for the first time, determining the acquisition time corresponding to the image to be processed as the preliminary stratification time. That is, in this embodiment, if the image to be processed is compared with the initial image, and it is detected for the first time that the preset pixel difference condition (the preset pixel difference condition is the pixel change condition that should exist when the initial image changes to the sample image corresponding to the preliminary stratification time) is met between the two, the acquisition time corresponding to the image to be processed can be determined as the preliminary stratification time.
[0035] Furthermore, if Figure 3 As shown, the step S203, that is, when the image to be processed and the initial image meet the preset pixel difference condition, the acquisition time corresponding to the image to be processed is determined as the preliminary layering time, includes steps S2031-S2034:
[0036] S2031, converting the image to be processed and the initial image into a histogram to be processed and an initial histogram respectively; wherein the histogram converted from the image to be processed is the histogram to be processed. Correspondingly, the initial image can be converted into an initial histogram.
[0037] S2032, performing difference pixel identification on the histogram to be processed and the initial histogram, and obtaining a first number of difference pixels between the histogram to be processed and the initial histogram; wherein the first number of difference pixels is the number of different pixels between the histogram to be processed and the initial histogram.
[0038] S2033, when the first difference pixel number exceeds the first preset pixel number threshold, confirm whether the pixel points corresponding to the first difference pixel number in the image to be processed meet the preset position requirement; wherein the first preset pixel number threshold is greater than the second preset pixel number threshold. It can be understood that during the centrifugation process, the sample liquid gradually begins to change in layers. Therefore, the layer change should gradually become obvious from the initial image to the first target image (the sample image collected before the second target image), and then to the second target image (that is, the current image to be processed that meets the condition that the second difference pixel number exceeds the second preset pixel number threshold). Therefore, the first difference pixel number must be greater than the second difference pixel number, and the first preset pixel number threshold must also be greater than the second preset pixel number threshold, so that after the first difference pixel number exceeds the first preset pixel number threshold, it can be further determined whether the pixel points corresponding to the first difference pixel number in the image to be processed meet the preset position requirement, thereby accurately determining the initial layering moment. Understandably, when the first difference pixel number does not exceed the first preset pixel number threshold, it indicates that the image to be processed and the initial image do not meet the preset pixel difference condition, and the acquisition moment corresponding to the image to be processed is not the initial stratification moment.
[0039] Furthermore, the step S2033, i.e., confirming whether the pixel points corresponding to the first number of difference pixels in the image to be processed meet the preset position requirement, includes:
[0040] The annular region range corresponding to the liquid ring in the image to be processed is obtained; wherein the annular region range refers to the annular region occupied by the sample liquid in the image to be processed.
[0041] Among all the pixels corresponding to the first number of difference pixels on the image to be processed, determine the percentage of pixel differences within the annular region; that is, in this step, it is necessary to determine from the image to be processed the percentage of the pixel points corresponding to the positions where difference pixels exist after the comparison between the histogram to be processed (in the image to be processed) and the initial histogram (initial image) in the annular region of the entire image to be processed (that is, the above-mentioned percentage of pixel differences). In this embodiment, the above-mentioned percentage of pixel differences excludes the pixel points corresponding to the positions where difference pixels exist (between the histogram to be processed and the initial histogram) in other positions in the image to be processed except in the annular region; eliminating the interference of pixel differences in other positions except in the annular region on the stratification detection process will further improve the accuracy of the determination of stable stratification.
[0042] When the pixel point difference ratio exceeds the preset ratio, it is determined that the pixel points corresponding to the first number of difference pixels meet the preset position requirement; that is, when the pixel point difference ratio exceeds the preset ratio (the preset ratio can be set according to demand, such as 70% and above), it means that the number of pixel points with difference pixels located within the annular area meets the requirement, that is, the above-mentioned pixel points with difference pixels are basically located within the annular area, so the pixel differences at other positions except the annular area have little interference with the layered detection process, and it can be determined that the pixel points corresponding to the first number of difference pixels meet the preset position requirement.
[0043] When the pixel point difference ratio does not exceed the preset ratio, it is determined that the pixel points corresponding to the first number of difference pixels do not meet the preset position requirement. That is, when the pixel point difference ratio does not exceed the preset ratio, it means that the number of pixel points with difference pixels located within the annular area does not meet the requirement, that is, a large part of the above-mentioned pixel points with difference pixels are not located within the annular area. At this time, the pixel differences at other positions except the annular area have a greater interference with the layered detection process. At this time, it is determined that the pixel points corresponding to the first number of difference pixels do not meet the preset position requirement, and the acquisition time corresponding to the image to be processed is not the initial layering time.
[0044] S2034, when the preset position requirement is met, confirm that the image to be processed and the initial image meet the preset pixel difference condition, and determine the acquisition time corresponding to the image to be processed as the preliminary stratification time. That is, only when the first difference pixel number exceeds the first preset pixel number threshold and meets the preset position requirement, can it be confirmed that the image to be processed and the initial image meet the preset pixel difference condition, and then determine that the acquisition time corresponding to the image to be processed is determined as the preliminary stratification time. That is, in this embodiment, firstly, by comparing the first difference pixel number between the image to be processed and the initial image, and then determining that it meets the preset position requirement to exclude the interference of pixel differences at other positions except the annular area range on the stratification detection process, the accuracy of centrifugal stratification detection can be further improved.
[0045] S30: injecting separation liquid after the initial stratification moment, and outputting the stratification detection result after identifying the stable stratification of the sample liquid. The separation liquid can be determined according to the actual type of the sample liquid, and the separation liquid is injected to enable the sample liquid to be better stratified. For example, when the sample liquid is a mixed blood sample, the separation liquid can expand the distance between red blood cells and PBMC (peripheral blood mononuclear cell) liquid. The time point of injecting the separation liquid can be set according to the demand. For example, the time point of injecting the separation liquid can be the current time point of determining the initial stratification moment, that is, the separation liquid can be injected immediately after determining the initial stratification moment. For another example, the time point of injecting the separation liquid can also be a specific time point after the current time point of determining the initial stratification moment. Specifically, the time point of injecting the separation liquid can be a time point after the current time point of determining the initial stratification moment, and the interval after the preset interval length can also be. It can be understood that the stratification detection result may include but is not limited to the number of layers of the final stratification of the sample liquid and the morphology and position data of each layer in the sample image. Understandably, after it is identified that the sample liquid has been stably stratified, it is also necessary to control the centrifugal container to stop rotating, so as to avoid cell damage in the sample liquid during an excessively long centrifugation process.
[0046] In the above-mentioned embodiment of the present invention, after the initial stratification moment is determined based on the pixel difference data between the sample images of the sample liquid collected during the rotation of the centrifugal container, that is, after the initial stratification is identified, the separation liquid is injected to identify whether the sample liquid has been stably stratified, and then the stratification detection process is completed and the stratification detection result is output. The sample stratification detection method of the present invention improves the accuracy of stratification detection of the sample liquid in the centrifugal container, thereby reducing cell damage in the sample liquid and improving the cell yield.
[0047] In one embodiment, in step S30, after the stable stratification of the sample liquid is identified, outputting the stratification detection result includes:
[0048] Collect the layered image of the sample liquid in the centrifugal container after the separation liquid is injected; specifically, the layered image corresponding to the upper surface or lower surface of the liquid ring can also be photographed in real time or at a fixed time by the above-mentioned photographing device installed above or below the centrifugal container (in one embodiment, in order to make the layered image finally photographed more accurate, the photographing device can be installed above and below the centrifugal container at the same time, and then the layered image can be photographed synchronously above and below to determine the layered image), and the layered image must also include the annular area range of the liquid ring. During the entire process of photographing the layered image of the sample liquid, the viewing angle of the photographing device remains unchanged, so as to ensure the accuracy of the sample layer detection process. At the upper position of the centrifugal container, the photographing device photographs the layered image corresponding to the upper surface of the liquid ring, and at this time, the layered image includes the entire annular area range corresponding to the upper surface of the liquid ring; and at the lower position of the centrifugal container, the photographing device photographs the layered image corresponding to the lower surface of the liquid ring, and at this time, the layered image includes the entire annular area range corresponding to the lower surface of the liquid ring. The acquisition of layered images can be performed on a scheduled or real-time basis, that is, real-time shooting can be performed continuously, or timed shooting can be performed at intervals of a preset number of frames or seconds, and it is only necessary to meet the number of real-time layered images actually required in the layered detection process.
[0049] Obtain pixel difference data between the latest acquired layered image and the previously acquired layered image, and when the pixel difference data is less than a preset difference threshold, confirm that the sample liquid has been stably layered, and output the layered detection result. That is, in this embodiment, the two adjacent layered images acquired successively can be compared to obtain pixel difference data of the two, for example, the latest acquired layered image and the previously acquired layered image can be first converted into a first layered histogram and a second layered histogram respectively; then the first layered histogram and the second layered histogram are subjected to difference pixel identification, and pixel difference data between the first layered histogram and the second layered histogram (that is, the number of different pixels between the first layered histogram and the second layered histogram) is obtained, and then determine whether the third pixel difference number is less than a preset difference threshold. It can be understood that the preset difference threshold is set according to the demand. When the pixel difference data is less than the preset difference threshold, it means that the pixel difference between the latest acquired layered image and the previously acquired layered image is very small and basically no longer changes. At this time, it can be confirmed that the sample liquid has been stably layered. When the pixel difference data is greater than or equal to the preset difference threshold, it means that the pixel difference between the latest acquired layered image and the previously acquired layered image has not converged to a very small degree. At this time, the pixel difference between the two can continue to decrease. At this time, it can be confirmed that the sample liquid has not yet completed stable stratification.
[0050] In another embodiment, the step S30, that is, outputting the stratification detection result after identifying the stable stratification of the sample liquid, includes:
[0051] Record the stratification time; the stratification time is the time interval between the time point when the separation liquid injection is completed and the current time point, or the time interval between the time point when the separation liquid is injected and the current time point; that is, the stratification time can be calculated by injecting the separation liquid after the initial stratification moment, and starting the timing at the time of injecting the separation liquid to calculate the stratification time; in another embodiment, the timing can be started after the separation liquid is injected to calculate the stratification time.
[0052] When the stratification time reaches the preset stable time, it is confirmed that the sample liquid has been stably stratified, and the stratification detection result is output. It is understandable that the preset stable time can be obtained through experiments. In this embodiment, the actual stratification test for sample liquids of different sample types can be carried out to determine the stable stratification time actually required after the stratification begins, and then the preset stable time corresponding to the sample liquids of different sample types is determined through the stratification test, and the sample type is stored in association with the corresponding preset stable time. In this way, in this embodiment, after timing the stratification time, the stored preset stable time associated with the sample type of the sample liquid is retrieved, and then, after the stratification time reaches the preset stable time, it can be determined that the sample liquid has been stably stratified, and the stratification detection result is output.
[0053] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0054] The present invention also provides a sample stratification detection system, comprising a centrifugal container and a controller connected to the centrifugal container, wherein the controller is used to execute the above-mentioned sample stratification detection method.
[0055] For more specific definitions of the sample stratification detection system and the controller, please refer to the above definitions of the sample stratification detection method, which will not be repeated here. For specific definitions of the controller, please refer to the above definitions of the sample stratification detection method, which will not be repeated here. Each module in the above controller can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules. It can be understood that the controller can be regarded as one or more computer devices, such as Figure 4As shown, the computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used in the sample stratification detection method in the above-mentioned embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a sample stratification detection method is implemented.
[0056] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned sample stratification detection method is implemented.
[0057] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0058] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0059] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A sample stratification detection method, characterized in that: include: After the centrifugal container rotates, collecting a sample image of the sample liquid contained in the centrifugal container; Acquiring pixel difference data between the sample images, and determining a preliminary stratification moment according to the pixel difference data; After the initial stratification moment, the separation liquid is injected, and after the stable stratification of the sample liquid is identified, the stratification detection result is output.
2. The sample stratification detection method according to claim 1, characterized in that: After the centrifugal container rotates, collecting a sample image of the sample liquid contained in the centrifugal container includes: Controlling the centrifugal container to rotate at a preset speed so that the sample liquid in the centrifugal container adheres to the inner wall of the centrifugal container to form a liquid ring; The sample image corresponding to the upper surface or lower surface of the liquid ring is captured in real time or at a fixed time by a shooting device installed above or below the centrifugal container, wherein the sample image includes the annular region of the liquid ring.
3. The sample stratification detection method according to claim 2, characterized in that: The step of obtaining pixel difference data between the sample images and determining a preliminary stratification moment according to the pixel difference data comprises: Insert all the sample images collected into a sample queue in the order of collection time from earliest to latest, and record the sample image arranged first in the sample queue as the initial image; each sample image is associated with a collection time; Determine an image to be processed from sample images arranged after the initial image in the sample queue; The initial image is compared with each of the images to be processed in sequence according to the acquisition time. When the image to be processed and the initial image meet the preset pixel difference condition for the first time, the acquisition time corresponding to the image to be processed is determined as the preliminary stratification time.
4. The sample stratification detection method according to claim 3, characterized in that: When the image to be processed and the initial image meet a preset pixel difference condition, determining the acquisition moment corresponding to the image to be processed as the preliminary layering moment includes: Converting the image to be processed and the initial image into a histogram to be processed and an initial histogram respectively; Performing difference pixel identification on the to-be-processed histogram and the initial histogram to obtain a first difference pixel number between the to-be-processed histogram and the initial histogram; When the first difference pixel number exceeds a first preset pixel number threshold, confirming whether the pixel points corresponding to the first difference pixel number in the to-be-processed image meet a preset position requirement; When the preset position requirement is met, it is confirmed that the image to be processed and the initial image meet the preset pixel difference condition, and the acquisition moment corresponding to the image to be processed is determined as the preliminary stratification moment.
5. The sample stratification detection method according to claim 4, characterized in that: The confirming whether the pixel points corresponding to the first number of difference pixels in the image to be processed meet the preset position requirement includes: Acquire the annular region range corresponding to the liquid ring in the image to be processed; Determine the difference ratio of pixels located within the annular area among all pixels corresponding to the first number of difference pixels on the image to be processed; When the pixel point difference ratio exceeds a preset ratio, determining that the pixel points corresponding to the first number of difference pixels meet a preset position requirement; When the pixel point difference ratio does not exceed the preset ratio, it is determined that the pixel points corresponding to the first number of difference pixels do not meet the preset position requirement.
6. The sample stratification detection method according to claim 3, characterized in that: The step of determining the image to be processed from the sample images arranged after the initial image in the sample queue comprises: Determine a comparison image group from the sample queue, each comparison image group includes a first target image arranged first and a second target image arranged after and adjacent to the first target image; Converting the first target image and the second target image in each of the comparison image groups into a first histogram and a second histogram respectively; Performing difference pixel identification on the first histogram and the second histogram in each of the compared image groups, and obtaining the second difference pixel quantity between the first histogram and the second histogram in each of the compared image groups; When the second difference pixel number exceeds a second preset pixel number threshold, it is confirmed that the comparison image group corresponding to the second difference pixel number meets the first pixel difference condition, and the second target image in the comparison image group is recorded as an image to be processed.
7. The sample stratification detection method according to claim 1, characterized in that: After the stable stratification of the sample liquid is identified, outputting the stratification detection result includes: collecting a layered image of the sample liquid in the centrifugal container after the separation liquid is injected; Pixel difference data between the most recently acquired stratified image and the previously acquired stratified image is obtained. When the pixel difference data is less than a preset difference threshold, it is confirmed that the sample liquid has been stably stratified, and a stratification detection result is output.
8. The sample stratification detection method according to claim 1, characterized in that: After the stable stratification of the sample liquid is identified, outputting the stratification detection result includes: Recording the stratification time; the stratification time is the time interval between the time point when the separation liquid is injected and the current time point, or the time interval between the time point when the separation liquid is injected and the current time point; When the stratification time reaches the preset stable time, it is confirmed that the sample liquid has been stably stratified, and the stratification detection result is output.
9. A sample stratification detection system, characterized in that: It comprises a centrifugal container and a controller connected to the centrifugal container, and the controller is used to execute the sample stratification detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the sample stratification detection method according to any one of claims 1 to 8 is implemented.
