Test tube identification method, system, electronic equipment and medium
By obtaining the real-time image information and equipment parameters of the test tube rack, combining depth data comparison and label identification, the problem of missing test tube recognition is solved, and the accurate identification of test tube count and miss detection is achieved.
Patent Information
- Application Number
- CN202210223810.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-03-07
AI Technical Summary
In the prior art, the omissions of test tubes during the test tube rack handover process have not been effectively identified, resulting in the omissions being unable to be accurately identified.
By obtaining the real-time image information and equipment parameters of the test tube rack, combining depth data comparison and label identification, the accurate identification of the test tube number is achieved.
Accurate identification of test tube omissions is achieved, the accuracy and reliability of test tube identification is improved, data processing is reduced, and identification efficiency is improved.
Smart Images

Figure CN114565782B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a test tube recognition method, system, electronic equipment and medium. Background Art
[0002] The laboratory department serves as a bridge between clinical medicine and basic medicine, encompassing sub-disciplines such as clinical chemistry, clinical microbiology, clinical immunology, hematology, fluidology, and transfusion medicine. When seeking medical attention, patients place body fluid specimens in test tubes, which are then placed in a test tube rack. Medical staff then hand the rack over to the tester. However, test tubes can be lost during the transfer process. Currently, there is no effective method to accurately identify missing test tubes during the transfer process. Summary of the Invention
[0003] The present invention provides a test tube identification method, system, electronic equipment and medium to solve the problem in the prior art of failing to accurately identify missed test tubes.
[0004] The test tube identification method provided by the present invention comprises:
[0005] Acquiring real-time image information of a target test tube rack, and identifying a test tube rack area based on the real-time image information, wherein the target test tube rack has a test tube placed thereon;
[0006] Acquiring equipment parameters of the target test tube rack, and extracting a test tube area based on the equipment parameters and the test tube rack area;
[0007] Acquiring position information of a photographing device, acquiring first depth data based on the position information and the test tube area, and comparing the first depth data with a first preset depth threshold to obtain a first depth comparison result;
[0008] A target number of pixels in the test tube area is obtained according to the first depth comparison result, and the target number of pixels is compared with a preset pixel threshold to obtain a test tube recognition result.
[0009] Optionally, the test tube identification result includes the target test tube number, and obtaining the test tube identification result further includes:
[0010] A label is pre-set on the test tube, and the label is identified on the test tube to obtain a label identification result, wherein the label identification result includes the number of labels;
[0011] Comparing the target test tube number with the label data to obtain a target comparison result;
[0012] If the target test tube number is the same as the label number, the target comparison result is normal;
[0013] If the target test tube number is different from the label number, the target comparison result is abnormal.
[0014] Optionally, identifying the test tube rack area according to the real-time image information includes:
[0015] Acquire second depth data according to the real-time image information and the position information, and compare the second depth data with a second preset depth threshold to obtain a second depth comparison result;
[0016] The real-time image information is binarized according to the second depth comparison result to obtain a target image, and the test tube rack area is identified according to the target image.
[0017] Optionally, the binarization processing of the real-time image information according to the second depth comparison result includes:
[0018] Acquire a first pixel and a second pixel, where a second depth comparison result of the first pixel is normal and a second depth comparison result of the second pixel is abnormal;
[0019] The pixel value of the first pixel is set to 255, and the pixel value of the second pixel is set to 0.
[0020] Optionally, extracting the test tube area according to the equipment parameters and the test tube rack area includes:
[0021] Acquiring edge parameters of the target test tube rack, and extracting a target area according to the edge parameters and the test tube rack area;
[0022] A test tube region is extracted according to the device parameters and the target region.
[0023] Optionally, extracting the test tube region according to the device parameters and the target region includes:
[0024] Respectively obtaining the number of test tubes in a first direction and the number of test tubes in a second direction of the target test tube rack, wherein the target area is rectangular, the first direction is parallel to the length of the target area, and the second direction is parallel to the width of the target area;
[0025] The test tube regions in the target region are extracted according to the number of test tubes in the first direction and the number of test tubes in the second direction.
[0026] Optionally, extracting the test tube region in the target region according to the number of test tubes in the first direction and the number of test tubes in the second direction includes:
[0027] Setting m and n according to the number of test tubes in the first direction and the number of test tubes in the second direction, dividing the target area into m equal parts in the second direction, and obtaining a first bisector;
[0028] Divide the target area after being divided into m parts into n parts in the first direction, and obtain the second bisector;
[0029] Obtaining an intersection point between the first bisector and the second bisector in the target area;
[0030] Acquiring a shooting error parameter, and acquiring a target test tube hole center standard point on a target test tube rack according to the shooting error parameter and the intersection point;
[0031] The test tube area is acquired with the center standard point of the target test tube hole as the center, and the size of the test tube area is pre-set according to the equipment parameters.
[0032] The present invention also provides a test tube identification system, comprising:
[0033] a test tube rack identification module, configured to obtain real-time image information of a target test tube rack and identify a test tube rack area based on the real-time image information, wherein the target test tube rack has a test tube placed thereon;
[0034] a test tube area extraction module, configured to obtain equipment parameters of the target test tube rack and extract the test tube area based on the equipment parameters and the test tube rack area;
[0035] a first depth comparison module, configured to obtain position information of a photographing device, obtain first depth data based on the position information and the test tube area, and compare the first depth data with a first preset depth threshold to obtain a first depth comparison result;
[0036] A test tube recognition module is configured to obtain a target pixel count of the test tube area based on the first depth comparison result, compare the target pixel count with a preset pixel threshold, and obtain a test tube recognition result. The test tube rack recognition module, the test tube area extraction module, the first depth comparison module, and the test tube recognition module are connected.
[0037] The present invention also provides an electronic device, comprising: a processor and a memory;
[0038] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the test tube identification method.
[0039] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the test tube identification method as described above when executed by a processor.
[0040] As described above, the present invention provides a test tube identification method having the following beneficial effects: acquiring real-time image information of a test tube rack on which test tubes are placed, extracting the test tube area based on the equipment parameters of the test tube rack and the real-time image information, then acquiring a target number of pixels based on the depth data of the test tube area and a first preset depth threshold, and performing comparison based on the target number of pixels and the preset pixel threshold, thereby achieving accurate identification of the target number of test tubes; in addition, the present invention also achieves accurate identification of missed test tubes by pre-setting labels on the test tubes and performing label identification to obtain the label number, and then comparing the target test tube number with the label identification number to obtain the target comparison result. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 1 is a flow chart of a test tube identification method according to an embodiment of the present invention;
[0043] Figure 2 1 is a flow chart of a method for identifying a test tube rack area according to an embodiment of the present invention;
[0044] Figure 3 1 is a schematic flow chart of a method for extracting a test tube region according to an embodiment of the present invention;
[0045] Figure 4 is a module diagram of a test tube identification system according to an embodiment of the present invention;
[0046] Figure 5 2 is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.
[0048] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0049] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.
[0050] Figure 1 1 is a flow chart of a test tube identification method provided in one embodiment of the present invention.
[0051] like Figure 1 As shown, the above test tube identification method includes steps S110-S140:
[0052] S110, acquiring real-time image information of a target test tube rack, and identifying a test tube rack area based on the real-time image information;
[0053] S120, obtaining equipment parameters of the target test tube rack, and extracting the test tube area according to the equipment parameters and the test tube rack area;
[0054] S130, obtaining position information of the photographing device, obtaining first depth data based on the position information and the test tube area, and comparing the first depth data with a first preset depth threshold to obtain a first depth comparison result;
[0055] S140 , obtaining a target pixel number of the test tube area according to the first depth comparison result, and comparing the target pixel number with a preset pixel threshold to obtain a test tube recognition result.
[0056] In step S110 of this embodiment, a test tube is placed on the target test tube rack. Before acquiring a real-time image of the target test tube rack, a camera must be pre-placed. The camera's placement can be adjusted based on the test tube rack's placement. A specific method for identifying the test tube rack region based on real-time image information includes: utilizing an OpenCV contour search function to find the outermost contour that meets the requirements, obtaining the test tube rack contour, and then obtaining the test tube rack region based on the test tube rack contour. The specific method for identifying the test tube rack region based on real-time image information also includes: obtaining a sample image containing the test tube rack and forming a sample dataset based on the sample image; constructing an initial recognition model, training the initial recognition model using the sample dataset, and obtaining a target recognition model for identifying the test tube rack; and inputting the target image into the target recognition model to obtain the test tube rack region. The initial recognition model includes, but is not limited to, a neural network model.
[0057] In one embodiment, in order to improve the accuracy of the test tube recognition results, before identifying the test tube rack outline based on the real-time image information, it is necessary to perform binarization processing on the real-time image information so that the pixel values of the pixels that meet the requirements on the real-time image after binarization processing are higher. For the specific implementation method of identifying the test tube rack area based on real-time image information, please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of a method for identifying a test tube rack region in one embodiment of the present invention. Figure 2 As shown, the test tube rack area identification method may include the following steps S210-S220:
[0058] S210, acquiring second depth data according to the real-time image information and the position information, and comparing the second depth data with a second preset depth threshold to obtain a second depth comparison result;
[0059] S220 , performing binarization processing on the real-time image information according to the second depth comparison result, acquiring a target image, and identifying the test tube rack area according to the target image.
[0060] In step S210 of this embodiment, a camera is pre-installed for capturing real-time image information. To facilitate real-time image capture of the test tube rack, the camera is positioned above the test tube rack transfer station, and the camera is positioned above the test tube rack. The position information is the camera's location information. The camera is equipped with a laser. When the camera captures real-time image information, it illuminates the test tube rack with the laser. The returned laser information then captures the positional relationship between the test tube rack and the camera, generating second depth data. The second preset depth threshold is set based on the positional relationship between the horizontal plane on which the test tube rack is mounted and the camera, as well as the height of the test tube rack. Specifically, a point midway between the horizontal plane on which the test tube rack is mounted and the vertical end of the test tube rack's topmost plane can be selected as the target point, and the positional data between the target point and the camera serves as the second preset depth threshold. The second depth data is compared with the second depth threshold. If the second depth data is less than the second depth threshold, the second depth comparison result is normal. If the second depth data is greater than or equal to the second depth threshold, the second depth comparison result is abnormal. A normal second depth comparison result indicates that the corresponding pixel point is located on the test tube rack or on the upper side of the test tube rack.
[0061] In one embodiment, a specific method for binarizing real-time image information based on the second depth comparison result includes: obtaining a first pixel and a second pixel, where the second depth comparison result for the first pixel is normal and the second depth comparison result for the second pixel is abnormal; and setting the pixel value of the first pixel to 255 and the pixel value of the second pixel to 0. By binarizing the real-time image information, setting the pixel value of the useful pixel to 255 and the pixel value of the second pixel to 0, the amount of subsequent data processing is reduced, thereby improving data processing efficiency.
[0062] In one embodiment, identifying the test tube rack region based on the target image includes: obtaining a test tube rack contour using an OpenCV contour search function, and obtaining the test tube rack region based on the test tube rack contour. Identifying the test tube rack region based on the target image also includes identifying the test tube rack region using a target recognition model obtained after training using the initial recognition model.
[0063] In step S120 of this embodiment, the specific implementation method of extracting the test tube area according to the equipment parameters and the test tube rack area is shown in Figure 3 , Figure 3 1 is a flow chart of a method for extracting a test tube region in one embodiment of the present invention.
[0064] like Figure 3 As shown, the test tube rack area identification method may include the following steps S310-S320:
[0065] S310, obtaining edge parameters of a target test tube rack, and extracting a target area based on the edge parameters and the test tube rack area;
[0066] S320: Extract the test tube region according to the device parameters and the target region.
[0067] In one embodiment, the edge parameters of the target test tube rack are the dimensions of the unperforated area on the edge of the target test tube rack. The target test tube rack places test tubes through the openings. The equipment parameters include the total number of test tubes the target test tube rack can hold, the number of horizontal test tubes, the number of vertical test tubes, and the dimensions of a single test tube placed on the target test tube rack. Specifically, after extracting the test tube rack area, the target area within the test tube rack is proportionally extracted based on the edge parameters. The target area includes the perforated area where the test tubes are placed and the rectangular area connecting the perforated areas.
[0068] In one embodiment, a specific method for extracting a test tube region based on device parameters and a target region includes: obtaining the number of test tubes in a first direction and the number of test tubes in a second direction of a target test tube rack, respectively; the target region is rectangular, with the first direction parallel to the length of the target region and the second direction parallel to the width of the target region; and extracting the test tube region within the target region based on the number of test tubes in the first direction and the number of test tubes in the second direction. The test tube region is defined as each opening region, and the maximum number of test tubes that can be placed in the target test tube rack in the first direction is greater than the maximum number of test tubes that can be placed in the second direction.
[0069] In one embodiment, a specific implementation method for extracting a test tube region within a target region based on the number of test tubes in a first direction and the number of test tubes in a second direction includes: setting m and n based on the number of test tubes in the first direction and the number of test tubes in the second direction, dividing the target region into m equal parts in the second direction, and obtaining a first bisector; dividing the target region, which has been divided into m equal parts, into n equal parts in the first direction, and obtaining a second bisector; obtaining the intersection of the first bisector and the second bisector in the target region; obtaining a shooting error parameter, and obtaining a target test tube hole center standard point on a target test tube rack based on the shooting error parameter and the intersection point; obtaining a test tube region centered at the target test tube hole center standard point, and presetting the size of the test tube region based on device parameters. The maximum number of test tubes that can be placed in the target test tube rack in the first direction is the first test tube number, and the maximum number of test tubes that can be placed in the target test tube rack in the second direction is the second test tube number. The first test tube number is greater than the second test tube number. The ratio of the first test tube number to m is the first ratio, and the ratio of the second test tube number to n is the second ratio. The first ratio and the second ratio are equal. The size of the second target area is pre-set based on device parameters. The device parameters are the size data of the openings of each test tube placement area on the target test tube rack. The size of the second target area is larger than the opening size of one test tube area. By setting the size of the second target area larger than the opening size of one test tube area, inaccurate test tube recognition results caused by test tube placement deviating from the center of the opening are avoided. The test tube area refers to the opening area of each test tube placement area on the test tube rack.
[0070] In a specific embodiment, if the target area is long a and wide b, the two long sides are divided into 20 parts to obtain da, and the two widths are divided into 10 parts to obtain db. The first bisector La
[20] and the second bisector Lb
[10] will intersect, and 200 intersection points can be obtained. If both straight line groups start from the second straight line and use 2 as the arithmetic interval to find the intersection points, 50 points can be obtained. These points can be considered as the standard center point P1
[50] of the target test tube hole on the target test tube rack; based on the standard center point P1
[50] , the error function caused by the camera shooting is added to obtain a more accurate target test tube hole center point P2
[50] . With P2
[50] as the center, 1 / 40 of the length and 1 / 40 of the width are used as the possible range of the target test tube, which is recorded as Area
[50] . The depth data of each pixel in Area
[50] is judged separately, and the number of target pixels is recorded. If the number of target pixels is greater than a certain threshold, it is considered that the target test tube exists in the range. The number of target test tubes in all Area
[50] is recorded to obtain the final recognition result, i.e. the number of target test tubes.
[0071] In step S130 of this embodiment, the position information is the same as the information in step S210. The second depth data includes the first depth data, which is the depth data corresponding to all pixels in the real-time image information. The first depth data is the depth data for each test tube area. The height of the target test tube above the target test tube rack can be determined based on the height of the target test tube, the depth of the opening in the test tube rack for test tube placement, and the model of the target test tube. The height of the target test tube above the target test tube rack is used as the target height. A first preset depth threshold is set based on the positional relationship data between the point corresponding to the target height and the camera. The first depth data is compared with the first preset depth threshold. If the first depth data is less than the first depth threshold, the first depth comparison result is normal. If the first depth data is greater than or equal to the first depth threshold, the first depth comparison result is abnormal. A normal second depth comparison result indicates that the height of the corresponding pixel is higher than the height of the highest position of the test tube rack, i.e., a normal second depth comparison result indicates that the corresponding pixel may contain a test tube.
[0072] In step S140 of this embodiment, the target pixel is the pixel for which the first depth comparison result indicates normal, and the target pixel is the target number of pixels corresponding to the test tube area. The target pixel number is compared with a preset pixel threshold. If the target pixel number is greater than or equal to the preset pixel threshold, the test tube identification result is normal; if the target pixel number is less than the preset pixel threshold, the test tube identification result is abnormal. The test tube identification result also includes the target test tube number. The number of test tubes with normal identification results in each test tube area is obtained, and the target test tube number on the target test tube rack is obtained, thereby achieving identification of the target test tube and the target test tube number.
[0073] In one embodiment, labels are pre-placed on target test tubes, and these labels may become damaged or fall off, potentially leading to errors in the label count during label count recognition. To accurately identify the number of labels on target test tubes, during the transfer of the target test tube rack, not only is the target test tube count on the target test tube rack determined through steps S110-S150, but the labels on the target test tubes are also identified, resulting in a label recognition result that includes the label count. Labels correspond one-to-one with target test tubes, meaning each target test tube is assigned a label. The label count is the number of identified labels. The target test tube count is compared with the label count. If the target test tube count and label count are the same, the target comparison result is normal; if they are different, the target comparison result is abnormal. If the target comparison result is abnormal, an alert is generated, alerting the responsible party to address the label anomaly. By comparing the target test tube count with the label count, the label verification is achieved, avoiding label count anomalies such as damaged or fallen labels that could lead to anomalies in label count recognition.
[0074] Based on the same inventive concept as the above-mentioned test tube identification method, this embodiment also provides a test tube identification system.
[0075] Figure 4 This is a module diagram of the test tube identification system provided by the present invention.
[0076] like Figure 4 As shown, the test tube identification system includes: a test tube rack identification module 41, a test tube region extraction module 42, a first depth comparison module 43 and a test tube identification module 44.
[0077] Among them, the test tube rack recognition module is used to obtain real-time image information of the target test tube rack and identify the test tube rack area based on the real-time image information, where the test tube is placed on the target test tube rack;
[0078] A test tube area extraction module is used to obtain the device parameters of the target test tube rack and extract the test tube area based on the device parameters and the test tube rack area;
[0079] a first depth comparison module, configured to obtain position information of the photographing device, obtain first depth data based on the position information and the test tube area, and compare the first depth data with a first preset depth threshold to obtain a first depth comparison result;
[0080] The test tube recognition module is used to obtain the target pixel number of the test tube area according to the first depth comparison result, compare the target pixel number with the preset pixel threshold, and obtain the test tube recognition result. The test tube rack recognition module, the test tube area extraction module, the first depth comparison module and the test tube recognition module are connected.
[0081] In some exemplary embodiments, the test tube identification system further comprises:
[0082] The label recognition module is used to pre-set labels on test tubes, perform label recognition on the test tubes, and obtain label recognition results, which include the label number and the test tube recognition result includes the test tube number; compare the target test tube number with the label data to obtain a target comparison result; if the target test tube number is the same as the label number, the target comparison result is normal; if the target test tube number is different from the label number, the target comparison result is abnormal.
[0083] In some exemplary embodiments, the test tube rack identification module includes:
[0084] a second depth comparison unit, configured to obtain second depth data according to the real-time image information and the position information, and compare the second depth data with a second preset depth threshold to obtain a second depth comparison result;
[0085] The test tube rack recognition unit is used to perform binarization processing on the real-time image information according to the second depth comparison result, obtain a target image, and recognize the test tube rack area according to the target image.
[0086] In some exemplary embodiments, the test tube rack identification unit includes:
[0087] a pixel acquisition subunit, configured to acquire a first pixel and a second pixel, wherein a second depth comparison result of the first pixel is normal and a second depth comparison result of the second pixel is abnormal;
[0088] The binarization processing subunit is used to set the pixel value of the first pixel point to 255 and the pixel value of the second pixel point to 0.
[0089] In some exemplary embodiments, the test tube region extraction module includes:
[0090] a target region extraction unit, configured to obtain edge parameters of a target test tube rack and extract the target region based on the edge parameters and the test tube rack region;
[0091] The test tube region extraction unit is used to extract the test tube region according to device parameters and target region.
[0092] In some exemplary embodiments, the test tube region extraction unit includes:
[0093] a test tube number acquisition subunit, configured to respectively acquire the number of test tubes in a first direction and a number of test tubes in a second direction of a target test tube rack, wherein the target area is rectangular, the first direction is parallel to the length of the target area, and the second direction is parallel to the width of the target area;
[0094] The test tube region extraction subunit is configured to extract the test tube region in the target region according to the number of test tubes in the first direction and the number of test tubes in the second direction.
[0095] In some exemplary embodiments, the test tube area extraction subunit is further used to set m and n according to the number of test tubes in the first direction and the number of test tubes in the second direction, divide the target area into m parts in the second direction, and obtain a first bisector; divide the target area after being divided into m parts into n parts in the first direction, and obtain a second bisector; obtain the intersection of the first bisector and the second bisector in the target area; obtain shooting error parameters, and obtain the target test tube hole center standard point on the target test tube rack according to the shooting error parameters and the intersection point; obtain the test tube area with the target test tube hole center standard point as the center, and pre-set the size of the test tube area according to the equipment parameters.
[0096] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.
[0097] In one embodiment, see Figure 5 This embodiment also provides an electronic device 500, including a memory 501, a processor 502, and a computer program stored in the memory and executable on the processor. When the processor 502 executes the computer program, the steps of the method described in any of the above embodiments are implemented.
[0098] Regarding the computer-readable storage medium in this embodiment, those skilled in the art will appreciate that all or part of the steps in the aforementioned method embodiments can be implemented using hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0099] The electronic device provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.
[0100] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0101] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0102] In the above embodiments, references in the specification to "this embodiment," "one embodiment," "another embodiment," "in some exemplary embodiments," or "other embodiments" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least some, but not necessarily all, embodiments. Multiple occurrences of "this embodiment," "one embodiment," or "another embodiment" do not necessarily refer to the same embodiment.
[0103] In the above embodiments, although the invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory structures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed. The embodiments of the present invention are intended to encompass all such alternatives, modifications, and variations that fall within the broad scope of the appended claims.
[0104] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0105] The present invention can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above.
[0106] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0107] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, any equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.
Claims
1. A test tube identification method, characterized in that: include: Acquiring real-time image information of a target test tube rack, and identifying a test tube rack area based on the real-time image information, wherein the target test tube rack has a test tube placed thereon; Acquiring equipment parameters of the target test tube rack, and extracting a test tube area based on the equipment parameters and the test tube rack area; Obtaining position information of a photographing device, obtaining first depth data based on the position information and the test tube region, and comparing the first depth data with a first preset depth threshold to obtain a first depth comparison result; the first depth data is depth data corresponding to a pixel point on the real-time image information, and is depth data for each test tube region; The first preset depth threshold is set according to positional relationship data between a point corresponding to a target height and the photographing device; A target number of pixels in the test tube area is obtained according to the first depth comparison result, and the target number of pixels is compared with a preset pixel threshold to obtain a test tube recognition result.
2. The test tube identification method according to claim 1, characterized in that: The test tube identification result includes the target test tube number, and obtaining the test tube identification result further includes: A label is pre-set on the test tube, and the label is identified on the test tube to obtain a label identification result, wherein the label identification result includes the number of labels; Comparing the target test tube number with the label data to obtain a target comparison result; If the target test tube number is the same as the label number, the target comparison result is normal; If the target test tube number is different from the label number, the target comparison result is abnormal.
3. The test tube identification method according to claim 1, characterized in that: The identifying the test tube rack area according to the real-time image information includes: Acquire second depth data according to the real-time image information and the position information, and compare the second depth data with a second preset depth threshold to obtain a second depth comparison result; The real-time image information is binarized according to the second depth comparison result to obtain a target image, and the test tube rack area is identified according to the target image.
4. The test tube identification method according to claim 3, characterized in that: The binarization processing of the real-time image information according to the second depth comparison result includes: Acquire a first pixel and a second pixel, where a second depth comparison result of the first pixel is normal and a second depth comparison result of the second pixel is abnormal; The pixel value of the first pixel is set to 255, and the pixel value of the second pixel is set to 0.
5. The test tube identification method according to claim 1, characterized in that: Extracting the test tube area according to the equipment parameters and the test tube rack area includes: Acquiring edge parameters of the target test tube rack, and extracting a target area according to the edge parameters and the test tube rack area; A test tube region is extracted according to the device parameters and the target region.
6. The test tube identification method according to claim 5, characterized in that: Extracting the test tube region according to the device parameters and the target region includes: Respectively obtaining the number of test tubes in a first direction and the number of test tubes in a second direction of the target test tube rack, wherein the target area is rectangular, the first direction is parallel to the length of the target area, and the second direction is parallel to the width of the target area; The test tube regions in the target region are extracted according to the number of test tubes in the first direction and the number of test tubes in the second direction.
7. The test tube identification method according to claim 6, characterized in that: Extracting the test tube region in the target region according to the number of test tubes in the first direction and the number of test tubes in the second direction includes: Setting m and n according to the number of test tubes in the first direction and the number of test tubes in the second direction, dividing the target area into m equal parts in the second direction, and obtaining a first bisector; Divide the target area after being divided into m parts into n parts in the first direction, and obtain the second bisector; Obtaining an intersection point between the first bisector and the second bisector in the target area; Acquiring a shooting error parameter, and acquiring a target test tube hole center standard point on a target test tube rack according to the shooting error parameter and the intersection point; The test tube area is acquired with the center standard point of the target test tube hole as the center, and the size of the test tube area is pre-set according to the equipment parameters.
8. A test tube identification system, characterized in that: include: a test tube rack identification module, configured to obtain real-time image information of a target test tube rack and identify a test tube rack area based on the real-time image information, wherein the target test tube rack has a test tube placed thereon; a test tube area extraction module, configured to obtain equipment parameters of the target test tube rack and extract the test tube area based on the equipment parameters and the test tube rack area; a first depth comparison module, configured to obtain position information of the camera, obtain first depth data based on the position information and the test tube region, and compare the first depth data with a first preset depth threshold to obtain a first depth comparison result; the first depth data is depth data corresponding to a pixel point in the real-time image information, and is depth data for each test tube region; The first preset depth threshold is set according to positional relationship data between a point corresponding to a target height and the photographing device; A test tube recognition module is configured to obtain a target pixel count of the test tube area based on the first depth comparison result, compare the target pixel count with a preset pixel threshold, and obtain a test tube recognition result. The test tube rack recognition module, the test tube area extraction module, the first depth comparison module, and the test tube recognition module are connected.
9. An electronic device, characterized in that: Includes processor, memory and communication bus; The communication bus is used to connect the processor and the memory; The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is used to make the computer execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Luggage tray identification method and device
CN110705552A
Deposit identification method and device and electronic device
CN113657191A