Test tube detection method, device, blood analyzer and readable storage medium
By segmenting the test tube image into multiple sub-regions and performing image similarity comparison and identification information scanning, the problem of inaccurate identification of test tube information is solved, and efficient and accurate test tube information detection is achieved.
Patent Information
- Application Number
- CN202010759607.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-07-31
AI Technical Summary
In the prior art, the identification of test tube information is not efficient and accurate enough, resulting in an automated blood detector prone to errors when identifying test tube information, affecting the detection results.
By segmenting the test tube image into multiple sub-regions, including the test tube cap area and the test tube bottom area, and image similarity comparison is performed separately, and scanning the identification information area, the type and identity information of the test tube are determined.
It improves the accuracy and efficiency of test tube information detection, ensures the accuracy and speed of test tube information identification, and reduces the possibility of misidentification.
Smart Images

Figure CN114092483B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical testing equipment, and specifically to a test tube testing method, device, blood analyzer and readable storage medium. Background Art
[0002] In the field of medical diagnosis, in order to detect sample information in test tubes, automated blood testing instruments are usually required for testing. Different sample information requires different measurement operations. The test tube is a direct index of the sample information to be tested. Therefore, in the automated testing process, the identification of test tube information is crucial. Test tube information usually includes three parts: the presence or absence of the test tube, the test tube type, and the test tube bar information. This is also of particular concern to major medical device manufacturers. Once the test tube information is misidentified, it will have fatal consequences.
[0003] Therefore, how to efficiently and accurately identify and output various information of the tube to be tested is a problem that needs to be solved urgently. Summary of the Invention
[0004] In order to solve the above problems, the present application provides a test tube detection method, device, blood analyzer and readable storage medium, which can efficiently and accurately obtain test tube information.
[0005] In order to solve the above technical problems, a technical solution adopted in this application is: to provide a test tube testing method, the method comprising: obtaining an image to be detected; dividing the test tube area in the image to be detected into multiple sub-areas; wherein the multiple sub-areas include a test tube cap area and a test tube bottom area; respectively detecting the multiple sub-areas to obtain a detection result corresponding to each sub-area; and determining the test tube information corresponding to the test tube area based on the multiple detection results.
[0006] The detecting of the plurality of sub-regions is performed respectively to obtain the detection result corresponding to each sub-region, including: comparing each sub-region with the corresponding standard image to obtain the detection result corresponding to each sub-region.
[0007] Among them, each sub-region is compared with the corresponding standard image to obtain the detection result corresponding to each sub-region, including: performing image similarity comparison between the test tube cap region and multiple preset test tube cap images to determine the type of the test tube cap region; performing image similarity comparison between the test tube bottom region and multiple preset test tube bottom images to determine the type of the test tube bottom region; determining the test tube information corresponding to the test tube region based on the multiple detection results, including: determining the test tube type corresponding to the test tube region based on the type of the test tube cap region and the type of the test tube bottom region.
[0008] Among them, multiple sub-areas also include identification information areas; detecting multiple sub-areas separately to obtain detection results corresponding to each sub-area, also includes: extracting identification images of the identification information areas; scanning the identification images to obtain corresponding test tube identity information.
[0009] Among them, the detection results corresponding to the test tube cap area and the test tube bottom area are the test tube type information, and the detection results corresponding to the identification information area are the test tube identity information; determining the test tube information corresponding to the test tube area based on multiple detection results includes: determining the test tube comprehensive information corresponding to the test tube area based on the test tube type information and the test tube identity information.
[0010] The acquiring of the image to be detected includes: acquiring the image to be detected when the movement of the test tube rack is detected; or acquiring the image to be detected when the movement of the test tube rack to a preset position is detected.
[0011] When the movement of the test tube rack is detected, the image to be detected is collected, including: using the image collection module to perform real-time detection on the test tube rack; when the movement of the test tube rack is detected, using the image collection module to collect the image to be detected.
[0012] When the test tube rack is detected to move to a preset position, the image to be detected is collected, including: detecting the sample injection position of the test tube rack; when the test tube rack is detected to move to the preset position, a collection instruction is sent to the image collection module to control the image collection module to collect the image to be detected.
[0013] Among them, obtaining the image to be detected includes: obtaining a first image to be detected and a second image to be detected, the first image to be detected being a top view of the test tube rack, and the second image to be detected being a side view of the test tube rack; the method also includes: detecting the first image to be detected to determine first test tube information corresponding to each test tube area; dividing the test tube area in the image to be detected into multiple sub-areas, including: dividing the test tube area in the second image to be detected into multiple sub-areas; detecting the multiple sub-areas respectively to obtain a detection result corresponding to each sub-area, including: detecting the multiple sub-areas to determine second test tube information corresponding to the test tube area; determining the test tube information corresponding to the test tube area according to the multiple detection results, including: determining the comprehensive test tube information corresponding to the test tube area according to the first test tube information and the second test tube information.
[0014] In order to solve the above technical problems, another technical solution adopted in this application is: to provide a test tube detection device, which includes: an image acquisition module for acquiring an image to be detected; a hardware decoding module for dividing the test tube area in the image to be detected into multiple sub-areas, and detecting the multiple sub-areas separately to obtain a detection result corresponding to each sub-area; wherein the multiple sub-areas include a test tube cap area and a test tube bottom area; an information integration module for determining the test tube information corresponding to the test tube area based on multiple detection results.
[0015] To solve the above technical problems, another technical solution adopted in this application is: to provide a blood analyzer, which includes a processor and a memory, the memory stores computer data, and the processor is used to execute a computer program to implement the above test tube detection method.
[0016] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the above-mentioned test tube detection method.
[0017] The beneficial effects of the embodiments of the present application are as follows: Different from the prior art, the test tube detection method provided by the present application divides the image to be detected into multiple test tube cap areas and test tube bottom areas, and detects these areas separately to determine the test tube information of the corresponding test tube areas. In this way, on the one hand, by detecting two different test tube areas, the accuracy of test tube information detection can be improved; on the other hand, the efficiency of information detection can be improved by detecting the two test tube areas together. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:
[0019] Figure 1 This is a structural diagram of an embodiment of a test tube detection device provided by the present application;
[0020] Figure 2 This is a flow chart of an embodiment of the test tube detection method provided by the present application;
[0021] Figure 3 This is a flow chart of another embodiment of the test tube detection method provided by the present application;
[0022] Figure 4 yes Figure 3A specific flow chart of step S31;
[0023] Figure 5 yes Figure 3 Another specific flow chart of step S31;
[0024] Figure 6 yes Figure 3 A specific flow chart of step S33;
[0025] Figure 7 is a schematic diagram of image similarity comparison in the test tube cap area;
[0026] Figure 8 This is a schematic diagram of image similarity comparison of the test tube bottom area;
[0027] Figure 9 This is a flow chart of another embodiment of the test tube detection method provided by the present application;
[0028] Figure 10 This is a flow chart of another embodiment of the test tube detection method provided by the present application;
[0029] Figure 11 This is a structural diagram of an embodiment of a blood analyzer provided by the present application;
[0030] Figure 12 It is a structural diagram of an embodiment of a computer-readable storage medium provided by this application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some, rather than all, structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0032] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0033] See Figure 1 , Figure 1FIG1 is a schematic diagram of the structure of an embodiment of a test tube detection device provided in the present application. The test tube detection device 10 includes an image acquisition module 11, a hardware decoding module 12, and an information integration module 13. The image acquisition module 11 is used to acquire an image to be detected; the hardware decoding module 12 is used to divide the test tube region in the image to be detected into multiple sub-regions, and to detect each of the multiple sub-regions to obtain a detection result corresponding to each sub-region. In this embodiment, the multiple sub-regions include the test tube cap region and the test tube bottom region; and the information integration module 13 is used to determine the test tube information corresponding to the test tube region based on the multiple detection results.
[0034] The image acquisition module 11 can be a camera, which is positioned on either side of the test tube rack's sample introduction direction. Furthermore, the image acquisition module 11 can operate in two modes: active triggering and passive triggering. The active triggering mode utilizes the image acquisition module 11 to perform real-time detection of the test tube rack, capturing the image to be detected upon detecting movement of the test tube rack. The passive triggering mode captures the image to be detected upon detecting movement of the test tube rack to a preset position. The specific detection triggering mode will be described in detail in subsequent embodiments.
[0035] The test tube information includes valid information such as the presence or absence of the test tube, the test tube type, and the test tube barcode content.
[0036] Among them, the hardware decoding module can be a DSP (Digital Signal Processor) or an FPGA (Field Programmable Gate Array). Using the hardware decoding module to process the image to be detected can reduce the CPU workload and power consumption compared to the software decoding method with a large workload and excessive processor resource occupation.
[0037] The test tube detection device 10 in this embodiment is a device applied to a blood analyzer. The test tube detection device 10 integrates the method of obtaining test tube information into one device, eliminating the need for separate detection and identification in multiple devices, thereby saving materials and simplifying production and assembly.
[0038] See Figure 2 , Figure 2 : is a flow chart of an embodiment of the test tube detection method provided by the present application. The test tube detection method of this embodiment specifically includes:
[0039] S21: Acquire the image to be detected.
[0040] The image to be inspected can be an image in a format such as JPG or PNG, or a frame from a video. The image to be inspected corresponds to at least one test tube to be inspected and is captured by a camera. The image to be inspected can be a top view or a side view of the test tube to be inspected. In this embodiment, the image to be inspected is a side view of the test tube to be inspected.
[0041] Furthermore, the image to be inspected may be a full or partial image of a test tube rack. The test tube rack image typically includes multiple test tubes corresponding to multiple test tube regions. Alternatively, the test tube rack image may include only one test tube, corresponding to one test tube region. In this embodiment, since the image acquisition module captures the image to be inspected each time the test tube rack moves, the image to be inspected may only include the region corresponding to one test tube.
[0042] It is understandable that after the camera initially captures the image of the test tube, it undergoes a certain image format conversion to convert the captured image into a data stream specified by the hardware decoding module, facilitating subsequent processing of the captured image by the hardware decoding module. The specific methods and principles of image data format conversion are well known to those skilled in the art and will not be elaborated upon here.
[0043] S22: Segment the test tube region in the image to be detected into multiple sub-regions.
[0044] In this embodiment, the multiple sub-regions include a test tube cap region and a test tube bottom region. Different test tube caps may differ in features such as shape, color, and size, and different test tube bottoms may differ in features such as shape, size, and the color and height of the sample solution within the test tube. Different test tube caps and different test tube bottoms may correspond to different test tube types, thereby indicating different sample information or sample measurement methods. In other embodiments, the sub-regions of the test tube may also include a test tube wall region, etc.
[0045] S23: Detect the multiple sub-regions respectively to obtain a detection result corresponding to each sub-region.
[0046] The test tube cap and bottom regions can be detected by image comparison, where the test tube cap and bottom regions in the image to be detected are compared with their respective corresponding preset images, thereby obtaining respective comparison results, i.e., the corresponding test tube cap detection results and test tube bottom detection results. The test tube cap detection results and test tube bottom detection results can respectively indicate the types of the test tube cap and test tube bottom.
[0047] In this embodiment, since the image tube subregion is detected using image comparison, the resulting detection results can only be in two situations: one is when the subregion has the same features as a pre-set image, in which case the detection result corresponding to the pre-set image is output; the other is when the subregion has the same or completely different features as all pre-set images, in which case an abnormal or blank detection result is output. In other words, during image comparison, only when the features of the subregion in the image to be detected and the pre-set image are substantially identical can they be considered identical and the detection result corresponding to the pre-set image be output.
[0048] Taking the test tube cap area as an example, if the color, shape, size, and other features of the test tube cap area in the image to be inspected are identical to those in the first preset image, the test tube cap detection result corresponding to the first preset image is output. If at least one feature of the test tube cap area in the image to be inspected differs from that in the first preset image, the second preset image is used for inspection until the test tube cap detection result corresponding to the preset image is obtained and output. For the test tube bottom area, image comparison is also used for inspection, and the test tube bottom detection result is output based on the feature comparison results.
[0049] In actual application scenarios, the main task is to perform image comparison on the shapes of the test tube cap area and the test tube bottom area to determine the type of the corresponding sub-area; and the comparison of color and size is used for further confirmation to improve accuracy.
[0050] S24: Determine the test tube information corresponding to the test tube area according to the multiple detection results.
[0051] Among them, the test tube information is jointly determined by the test tube cap detection results and the test tube bottom detection results. For the same test tube, different test tube cap types and test tube bottom types can be combined to determine the test tube information of multiple test tubes. The test tube information indicates the type of the corresponding test tube in the image to be detected, so that the blood tester can use corresponding means to measure the sample in the test tube.
[0052] In an application scenario, when the test tube cap detection result obtained in step S23 is the first test tube cap type (red test tube cap, dome, height 15.0 mm), and the test tube bottom detection result is the first test tube bottom type (round bottom, diameter 12.0 mm), the test tube is determined to be the first test tube type. At this time, the first test tube type can, for example, indicate that a routine biochemical serum test is required; when the test tube cap detection result obtained in step S23 is the second test tube cap type (black, dome, height 10.0 mm), and the test tube bottom detection result is the second test tube bottom type (round bottom, diameter 8.0 mm), the test tube is determined to be the fourth test tube type. At this time, the fourth test tube type can, for example, indicate that a coagulation mechanism test is required.
[0053] The above types are for illustration only and do not represent information about test tube types in actual applications. Specific test tube types and corresponding sample measurement methods are not specifically limited.
[0054] After determining the test tube information of one test tube in the test tube rack, the test tube rack continues to advance in a single step to perform the same steps of information acquisition and determination on the next test tube in the test tube rack until the blood analyzer completes the measurement of all samples on the test tube rack.
[0055] Different from the existing technology, the test tube detection method provided in this application divides the image to be detected into multiple test tube cap areas and test tube bottom areas, and detects these areas separately to determine the test tube information of the corresponding test tube areas. In this way, on the one hand, by detecting two different test tube areas, the accuracy of test tube information detection can be improved; on the other hand, the joint detection of the two test tube areas can improve the efficiency of information detection.
[0056] See Figure 3 , Figure 3 : is a flow chart of another embodiment of the test tube detection method provided by the present application. The test tube detection method of this embodiment specifically includes:
[0057] S31: Acquire the image to be detected.
[0058] After the blood analyzer issues the command to start automatic sampling, it starts the test tube rack loading action to load the test tube rack to the specified position. Furthermore, the blood analyzer starts the test tube rack single-step feeding action. At this time, there are usually two triggering methods to capture images of the test tube rack:
[0059] Active triggering: When the test tube rack is detected to move, the image to be detected is captured; or passive triggering: When the test tube rack is detected to move to a preset position, the image to be detected is captured.
[0060] In some embodiments, the process of actively collecting the image to be detected in step S31 can be as follows: Figure 4 As shown, specifically including:
[0061] S311a: Use the image acquisition module to perform real-time detection on the test tube rack.
[0062] Among them, real-time detection means that after the automatic sampling of the blood analyzer is started, the image acquisition module begins to acquire each frame of the test tube rack in real time and compares any continuous image frames.
[0063] S312a: When the movement of the test tube rack is detected, the image to be detected is acquired by the image acquisition module.
[0064] When the current image frame obtained is inconsistent with the previous image frame, it means that the test tube rack has started a single-step feeding action. At this time, the test tube rack moves, and the image acquisition module can capture the image of the test tube rack to obtain the image to be detected.
[0065] Optionally, a sensor may be provided in the device. When the sensor detects an object at the target position, indicating that the test tube rack has moved, a signal is sent to the image acquisition module so that the image acquisition module acquires an image of the test tube.
[0066] Optionally, after the blood analyzer starts automatic sampling, it can also collect images to be tested at a certain time period. For example, the image acquisition module collects images to be tested every 2 seconds, and the test tube rack single-step feed is also at a frequency of one step every 2 seconds. This is only an example, and the time period is not specifically limited.
[0067] In other embodiments, the process of passively collecting the image to be detected in step S31 can be as follows: Figure 5 As shown, specifically including:
[0068] S311b: Check the injection position of the test tube rack.
[0069] The injection position is detected by the blood analyzer. Every time the test tube rack advances to a working position, the blood analyzer can detect and obtain the change of the injection position.
[0070] S312b: When it is detected that the test tube rack moves to the preset position, a collection instruction is sent to the image collection module to control the image collection module to collect the image to be detected.
[0071] Among them, the preset position can be the next working position of the blood analyzer to control the feeding of the test tube rack. Since the movement of the test tube rack is controlled by the blood analyzer, when it controls the test tube rack to move to the preset position, it can send an acquisition instruction to the image acquisition module to obtain the image to be detected.
[0072] Optionally, the preset position can also be any position within the maximum range that the image acquisition module can capture images. When the test tube rack moves into the capture range of the image acquisition module, the blood analyzer sends an acquisition instruction to the image acquisition module to control the image acquisition module to capture the image to be detected.
[0073] In this embodiment, each time image acquisition is triggered, the image acquisition module will acquire more than two frames of images to be detected as image data input, so as to facilitate subsequent steps to verify and confirm the test tube information of the same test tube.
[0074] S32: Segment the test tube region in the image to be detected into multiple sub-regions.
[0075] The multiple sub-areas include a test tube cap area and a test tube bottom area.
[0076] S33: Compare each sub-region with the corresponding standard image to obtain a detection result corresponding to each sub-region.
[0077] Specifically, step S33 can be performed as follows: Figure 6 The method shown is implemented, specifically including:
[0078] S331: performing image similarity comparison between the test tube cap region and a plurality of preset test tube cap images to determine the type of the test tube cap region.
[0079] The image similarity comparison can first extract key regions from the image. For example, when performing image similarity comparison based on shape, only the shape features in the image need to be extracted. The test tube cap region is then compared with multiple pre-set test tube cap images for similarity to obtain multiple similarity values. The pre-set test tube cap image with the largest similarity value, greater than the similarity threshold value, is identified as the target test tube cap image. The type of the current test tube cap region is then determined based on the type of the target test tube cap image.
[0080] See Figure 7 For example, when shape is used as the image similarity comparison standard, the similarity standard value may be 80. The current test tube cap region A is characterized by two stacked circular shapes. The third test tube cap type B, which is characterized by two stacked circular shapes, has a similarity value of 90 greater than the similarity value standard; and the fourth test tube cap type C, which is characterized by multiple stacked circular shapes, has a similarity value of 80. Then, the third test tube cap type with the higher similarity value is selected from the third and fourth test tube cap types to be determined as the type of the test tube cap region.
[0081] Furthermore, in addition to shape, other features such as color and size can be added as comparison criteria. Figure 7 For example, at this time, the similarity standard value is still 80, and the characteristics of the current test tube cap area A are red, the diameter of the cap top is smaller than the diameter of the bottom, and the height is 13.0 mm. The third test tube cap type B (red, the diameter of the cap top is smaller than the diameter of the bottom, and the height is 10.0 mm) has a similarity value of 80; and the fourth test tube cap type C (red, the diameter of the cap top to the bottom gradually increases, and the height is 13.0 mm), and the similarity value of the two is 60. Then, the third test tube cap with a higher value is selected from the third and fourth test tube caps to be determined as the type of the test tube cap area, that is, the test tube cap area is the third test tube cap type.
[0082] It can be understood that when multiple features are used to compare image similarities, more accurate comparison results can be obtained, thereby improving the accuracy of obtaining the corresponding sub-region type.
[0083] S332: performing image similarity comparison between the test tube bottom region and a plurality of preset test tube bottom images to determine the type of the test tube bottom region.
[0084] Similar to the image similarity comparison of the test tube cap area, the test tube bottom area is compared with multiple preset test tube bottom images for similarity. Based on the multiple similarity values obtained, the type corresponding to the preset test tube bottom image with the highest similarity value is determined to be the type of the current test tube cap area.
[0085] See Figure 8 For example, the similarity standard value may be 80. The current test tube bottom region D is characterized by a round bottom and a bottom length of 5.0 mm. The fifth test tube bottom type E (round bottom, bottom length 8.0 mm) has a similarity value of 90, and the sixth test tube bottom type F (round bottom, bottom length 13.0 mm) has a similarity value of 50. Therefore, the fifth test tube bottom is determined to be the type of the test tube bottom region, that is, the test tube bottom region is of the fifth test tube bottom type.
[0086] Since the image acquisition module can capture more than two frames of images to be tested each time, the test tube cap area and the test tube bottom area of the same test tube can be confirmed using more than two frames of images to avoid the randomness when using one frame of image confirmation. The number of image frames obtained for the same test tube can be appropriately increased to further improve accuracy.
[0087] S34: Determine the test tube type corresponding to the test tube region according to the type of the test tube cap region and the type of the test tube bottom region.
[0088] In this embodiment, the test tube type is determined by the test tube cap region type and the test tube bottom region type. Different test tube cap region types and test tube bottom region types can be combined to determine multiple test tube types. For example, if the test tube cap region type obtained in step S33 is the third test tube cap type and the test tube bottom region type is the fifth test tube bottom type, the test tube type is determined to be the tenth test tube type, and the test tube type information is sent to the blood analyzer so that the blood analyzer can perform corresponding sample testing on the test tube based on the test tube type information.
[0089] Optionally, when the specific types of the test tube cap area and the test tube bottom area cannot be confirmed from the image to be tested based on the image similarity comparison, whether the type cannot be determined because the similarity value cannot reach the similarity standard value, or because the position of the test tube rack is an empty test tube, the test tube type of the test tube area is confirmed to be a no-test tube type. At this time, the blood analyzer will skip the test tube position when performing sample measurement and directly proceed to sample detection of the next test tube.
[0090] After confirming the test tube information of one test tube in the test tube rack, the test tube rack continues to advance in a single step to confirm the information of the next test tube in the test tube rack in the same step until the blood analyzer completes the measurement of all samples in the test tube rack.
[0091] In this way, by utilizing the detection of the test tube cap area and the test tube bottom area, the two detection methods are combined to increase the types of identifiable test tubes, and the two methods are used together to improve the accuracy and efficiency of test tube information detection.
[0092] See Figure 9 , Figure 9 FIG. 5 is a flow chart of another embodiment of the test tube detection method provided by the present application. The test tube detection method of this embodiment specifically includes:
[0093] S91: Acquire an image to be detected.
[0094] S92: Segment the test tube region in the image to be detected into multiple sub-regions.
[0095] The multiple sub-areas include a test tube cap area, a test tube bottom area, and an identification information area.
[0096] S93: Compare each sub-region with the corresponding standard image to obtain a detection result corresponding to each sub-region.
[0097] S94: Determine the test tube type corresponding to the test tube region according to the type of the test tube cap region and the type of the test tube bottom region.
[0098] The detection results corresponding to the test tube cap area and the test tube bottom area are the test tube type information, that is, the test tube type is determined by the test tube cap area and the test tube bottom area together.
[0099] Steps S91 to S94 are the same as steps S31 to S34 and are not described in detail here.
[0100] S95: Extracting the logo image from the logo information area.
[0101] The identification information area is located between the test tube cap and the test tube bottom, and the identification information is placed on the outer surface of the test tube wall between the two areas. This identification information area has a barcode at the corresponding position on the test tube. The barcode consists of an uninterrupted string of one-dimensional barcodes, which uniquely identifies the test tube sample and also uniquely indexes a patient's test. The identification image is an image that includes the complete barcode.
[0102] S96: Scan the identification image to obtain corresponding test tube identity information.
[0103] In this embodiment, the identification image can be scanned and decoded using a hardware decoding module in the test tube detection device. Specifically, the extracted identification image can be preprocessed to reduce the impact of various noises and then binarized to obtain a binary identification image. The preprocessed identification image is then decoded, and barcode characters are identified using statistical methods and similar edge distances. The barcode is then read through decoding, verification, and error correction. Finally, the obtained barcode is compared with a database to obtain the text information corresponding to the identification image, which is the corresponding test tube identity information in this embodiment.
[0104] The test tube identity information includes the patient's identity information and blood sample information, etc. The identification image uniquely corresponds to one test tube identity information and is used to uniquely associate the patient so as to establish a connection between the test tube and the patient.
[0105] There is no restriction on the execution order of steps S93-S94 and steps S95-S96, and steps S92-S96 are mainly implemented by the hardware decoding module.
[0106] It can be understood that the method of capturing images and extracting the test tube barcode information in the image through the image acquisition module avoids the situation of being unable to read or misreading when using a traditional linear scanner, simplifies the operation of scanning barcode images, can improve the accuracy of obtaining test tube identity information, and solve the problem of barcode misrecognition.
[0107] S97: Determine the comprehensive test tube information corresponding to the test tube area according to the test tube type information and the test tube identity information.
[0108] Among them, the comprehensive information of the test tube is used to determine the blood analysis items, so that the blood analyzer can perform subsequent sample measurements and other tasks.
[0109] Through the above method, the test tube identity information and the test tube type information are integrated into one device for detection, eliminating the need for separate detection and identification in multiple devices, thereby improving the efficiency of test tube information detection.
[0110] See Figure 10 , Figure 10FIG. 5 is a flow chart of another embodiment of the test tube detection method provided by the present application. The test tube detection method of this embodiment specifically includes:
[0111] S101: Acquire a first image to be detected and a second image to be detected.
[0112] Among them, the first image to be detected is a top view of the test tube rack, and the second image to be detected is a side view of the test tube rack. The first image to be detected and the second image to be detected correspond to the same test tube or the same test tube area. Please refer to the above embodiment for the specific image acquisition method.
[0113] S102: Detecting the first image to be detected to determine first test tube information corresponding to each test tube area.
[0114] The first test tube information includes information such as whether each test tube area is blank, the capping type, and whether a pipette is left behind. This information can be obtained by comparing with various types of historical overhead images or by directly identifying the first image to be detected.
[0115] For example, when a blank space is detected in the first image to be detected, it indicates that there is no test tube at that part of the test tube position; when it is detected that there is only a test tube but no test tube cap at a certain test tube position, and there may be liquid in the test tube, it indicates that the test tube may be a usable reagent; when it is detected that there is only a test tube but no test tube cap at a certain test tube position, and there is no liquid in the test tube, it indicates that the test tube may be a used reagent; when a test tube is detected at a certain test tube position, and the shape of the test tube cap is a certain test tube cap type, it indicates that the test tube is a test tube to be tested; when it is detected that a test tube position is neither a test tube cap nor blank, it indicates that a pipette may be left at that test tube position to be processed.
[0116] S103: Divide the test tube region in the second image to be detected into multiple sub-regions.
[0117] The multiple sub-areas may include a test tube cap area, a test tube bottom area, and a test tube identification area.
[0118] S104: Detect the multiple sub-regions to determine the second test tube information corresponding to the test tube region.
[0119] The second test tube information includes test tube type information and test tube identity information, and the test tube type information further includes the test tube cap area type and the test tube bottom area type. In this embodiment, the test tube cap area and the test tube bottom area are detected using image similarity comparison to determine the test tube cap area type and the test tube bottom area type. Furthermore, the test tube identification area is extracted, scanned, and decoded to obtain the corresponding test tube identity information.
[0120] Optionally, the second test tube information may further include test tube liquid level information. Based on the relationship between the sample solution and the test tube height in the second image to be detected, which is typically known, the test tube liquid level information can be calculated based on the ratio of the sample solution to the test tube height in the image. In other embodiments, the test tube liquid level information can also be obtained directly by reading a scale on the outer wall of the test tube.
[0121] There is no restriction on the order of obtaining the first test tube information and the second test tube information. In some embodiments, the first test tube information and the second test tube information can be obtained at the same time to facilitate subsequent work of the blood analyzer.
[0122] S105: Determine comprehensive test tube information corresponding to the test tube area according to the first test tube information and the second test tube information.
[0123] Combining the recognition detection information of the top view of the test tube rack in the first test tube information can further improve the accuracy of the test tube information detection, and the above detection and output can be implemented in one device, which can further improve the detection efficiency.
[0124] See Figure 11 , Figure 11 2 is a schematic diagram of the structure of an embodiment of a blood analyzer provided by the present application. The blood analyzer 20 of this embodiment includes a processor 21 and a memory 22. The processor 21 is coupled to the memory 22. The memory 22 is used to store a computer program executed by the processor 21. The processor 21 is used to execute the computer program to implement the following method steps:
[0125] Acquire an image to be detected; divide a test tube region in the image to be detected into multiple sub-regions; wherein the multiple sub-regions include a test tube cap region and a test tube bottom region; detect the multiple sub-regions separately to obtain a detection result corresponding to each sub-region; and determine the test tube information corresponding to the test tube region based on the multiple detection results.
[0126] The following briefly describes the workflow of the blood analyzer 20 in one step:
[0127] 1) Start automatic sampling: The blood analyzer 20 sends an automatic sampling command, and the instrument host starts the automatic sampling process after receiving the command.
[0128] 2) Test tube rack loading: The loading component of the blood analyzer 20 starts the test tube rack loading action and loads the test tube rack onto the sample loading platform.
[0129] 3) Single-step feeding of the test tube rack: The feeding component of the blood analyzer 20 starts the single-step feeding action of the test tube rack until the feeding of one test tube position is completed.
[0130] 4) Test tube information acquisition: The blood analyzer 20 activates the image acquisition module to acquire the image to be detected, and divides the image to be detected into multiple test tube cap areas, test tube bottom areas, and identification information areas. Further, through image similarity comparison and scanning recognition, the test tube type information and test tube identity information are determined and output.
[0131] 5) Test tube sample measurement: The test tube rack is fed to the sample measurement position, and the blood analyzer 20 detects the sample solution in the test tube.
[0132] 6) All samples in the test tube rack are measured: Determine whether all test tube samples in the current test tube rack have been measured. If not, return to step 3) for single-step feeding to continue executing subsequent steps.
[0133] 7) All test tube racks are tested: Determine whether the test tube samples in all test tube racks have been tested. If not, return to step 2) to load the test tube racks and continue to execute subsequent steps.
[0134] 8) Automatic sampling ends: when all test tube racks are determined to be complete, the automatic sampling ends.
[0135] See Figure 12 , Figure 12 1 is a schematic diagram of the structure of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 30 of this embodiment is used to store a computer program 31. When the computer program 31 is executed by a processor, it is used to implement the following method steps:
[0136] Acquire an image to be detected; divide a test tube region in the image to be detected into multiple sub-regions; wherein the multiple sub-regions include a test tube cap region and a test tube bottom region; detect the multiple sub-regions separately to obtain a detection result corresponding to each sub-region; and determine the test tube information corresponding to the test tube region based on the multiple detection results.
[0137] It should be noted that the method steps executed by the computer program 31 of this embodiment are based on the above method embodiments, and their implementation principles and steps are similar. Therefore, when the computer program 31 is executed by the processor, it can also implement other method steps in any of the above embodiments, which will not be repeated here.
[0138] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0139] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made according to the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A test tube detection method, characterized in that: The method comprises: Acquire an image to be detected; wherein the image to be detected includes: a first image to be detected and a second image to be detected, the first image to be detected is a top view of the test tube rack, and the second image to be detected is a side view of the test tube rack; Detecting the first image to be detected to determine first test tube information corresponding to each test tube area; Segmenting the test tube region in the second image to be detected into a plurality of sub-regions; wherein the plurality of sub-regions include a test tube cap region and a test tube bottom region; Detecting each of the plurality of sub-regions to determine second test tube information corresponding to the test tube region; The comprehensive test tube information corresponding to the test tube area is determined according to the first test tube information and the second test tube information.
2. The method according to claim 1, characterized in that The detecting the plurality of sub-regions respectively to determine the second test tube information corresponding to the test tube region includes: Each of the sub-regions is compared with a corresponding standard image to determine second test tube information corresponding to the test tube region.
3. The method according to claim 2, characterized in that Comparing each of the sub-regions with a corresponding standard image to determine second test tube information corresponding to the test tube region includes: performing image similarity comparison between the test tube cap region and a plurality of preset test tube cap images to determine the type of the test tube cap region; performing image similarity comparison between the test tube bottom area and a plurality of preset test tube bottom images to determine the type of the test tube bottom area; The test tube type corresponding to the test tube area is determined according to the type of the test tube cap area and the type of the test tube bottom area.
4. The method according to claim 1, wherein The multiple sub-areas further include an identification information area; The detecting each of the plurality of sub-regions to determine the second test tube information corresponding to the test tube region further includes: Extracting a logo image from the logo information area; The identification image is scanned to obtain corresponding test tube identity information.
5. The method according to claim 4, characterized in that The detection results corresponding to the test tube cap area and the test tube bottom area are test tube type information, and the detection result corresponding to the identification information area is test tube identity information; The determining, based on the first test tube information and the second test tube information, the test tube comprehensive information corresponding to the test tube area includes: The comprehensive test tube information corresponding to the test tube area is determined according to the test tube type information and the test tube identity information.
6. The method according to claim 1, characterized in that The step of obtaining an image to be detected includes: When the movement of the test tube rack is detected, the image to be detected is acquired; or When it is detected that the test tube rack moves to a preset position, an image to be detected is collected.
7. The method according to claim 6, characterized in that When the movement of the test tube rack is detected, collecting the image to be detected includes: Using an image acquisition module to perform real-time detection on the test tube rack; When the movement of the test tube rack is detected, the image to be detected is acquired by using the image acquisition module.
8. The method according to claim 6, characterized in that When detecting that the test tube rack moves to a preset position, collecting an image to be detected includes: detecting the sample injection position of the test tube rack; When it is detected that the test tube rack moves to the preset position, a collection instruction is sent to the image collection module to control the image collection module to collect the image to be detected.
9. A test tube detection device, characterized in that: The test tube detection device comprises: An image acquisition module is configured to acquire an image to be detected; wherein the image to be detected includes: a first image to be detected and a second image to be detected, wherein the first image to be detected is a top view of the test tube rack, and the second image to be detected is a side view of the test tube rack; a hardware decoding module, configured to detect the first image to be detected to determine first test tube information corresponding to each test tube region; divide the test tube region in the second image to be detected into a plurality of sub-regions, and detect each of the plurality of sub-regions to determine second test tube information corresponding to the test tube region; wherein the plurality of sub-regions include a test tube cap region and a test tube bottom region; An information integration module is used to determine comprehensive test tube information corresponding to the test tube area based on the first test tube information and the second test tube information.
10. A blood analyzer, characterized in that: The blood analyzer includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the test tube detection method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, is used to implement the test tube detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Analyte testing automation system, biological sample check module, and biological sample check method
CN105637370A
Methods and systems for tube inspection and liquid level detection
CN107076732A
Image recognition method and device based on image recognition model
CN109934305A