A method and device for positioning a label on a medical tube and a blood collection vehicle
By acquiring multiple frames of images during the rotation of the medical tube for light intensity change detection and image preprocessing, the problem of accurately locating the edges of transparent or semi-transparent labels was solved, improving the efficiency of automatic labeling and protecting the collected items.
Patent Information
- Application Number
- CN202310734854.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-06-20
AI Technical Summary
Existing technologies struggle to accurately locate the edges of transparent or semi-transparent original labels on medical tubes, resulting in low efficiency of automated labeling equipment and potential damage to the collected medical items.
By acquiring multiple frames of original images of the medical tube rotating around its axis, light intensity change detection and image preprocessing are performed. Linear fitting calculations are then used to determine the number of label edges, enabling precise positioning of transparent or semi-transparent labels.
It achieves accurate positioning of transparent or semi-transparent labels, improves the efficiency of automatic labeling, and avoids damage to the collected items by sensor signals.
Smart Images

Figure CN116758159B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of new generation information technology and biomedicine industry, and particularly relates to a label positioning method and device of a medical tube and a blood collection vehicle. BACKGROUND
[0002] A medical tube is generally used for collecting medical articles, such as a blood collection tube, and has an original label set at the factory. In order to distinguish the collected blood, the original label needs to be re-labeled, so the original label needs to be positioned to re-label the blank part of the original label or cover the original label of the blood collection tube with a new label.
[0003] The existing solution is to manually label the medical tube, which is time-consuming and labor-intensive. The equipment that can realize automatic labeling, such as a medical blood collection vehicle, can rotate the blood collection tube and install a sensor beside the blood collection tube to monitor and calculate the position of the label of the blood collection tube. However, the detection accuracy of the sensor is low, and the sensor cannot accurately position and detect a semi-transparent label and a transparent label. The automatic blood collection vehicle generally collects blood through a transparent blood collection tube, and the original label is set on the transparent blood collection tube at the factory. In order to distinguish the collected blood, the edge of the original label needs to be rotated to a specific position for re-labeling to cover the original label of the blood collection tube. When the blood collection tube is re-labeled, the equipment needs to find a transparent area for positioning to avoid blocking the transparent area by the label. The existing solution is to rotate the blood collection tube through a rotating device and install a sensor device beside the blood collection tube to monitor. When the blood collection tube is rotated to the position of the sensor, the signal changes to determine that the edge is at this position. However, the traditional method cannot accurately position a semi-transparent label and a transparent label, which reduces the work efficiency. Moreover, when some medical tubes collect medical articles, the chemical properties of the collected medical articles require that the sensor signal, such as ultraviolet light and laser, should not damage the collected medical articles. SUMMARY
[0004] The present application aims to provide a label positioning method and device of a medical tube and a blood collection vehicle, which can accurately position the edge of a transparent or semi-transparent original label on a medical tube.
[0005] In a first aspect, the present application provides a label positioning method of a medical tube. The label is attached to the outer wall of the medical tube around a rotating shaft. The method comprises the following steps.
[0006] Acquiring multiple original images of the medical tube when the medical tube rotates around the rotating shaft;
[0007] Detecting the change in light intensity of the multiple original images;
[0008] When the number of original image frames with light intensity greater than the first threshold value meets a preset range, a corresponding type of the label of the medical tube is obtained.
[0009] Image preprocessing is performed on the plurality of original images to obtain a plurality of target images.
[0010] Linear fitting operation is performed on the plurality of target images to obtain the number of edges of the plurality of target images.
[0011] When the number of edges changes, positioning information of the label is obtained according to the type of the label.
[0012] In a second aspect, an embodiment of the present application provides a label positioning device for a medical tube, comprising:
[0013] The label box comprises a box body, a partition plate and a lighting lamp, the partition plate is provided with a light transmission groove, the light transmission groove is arranged below the medical tube, and the lighting lamp is arranged below the light transmission groove and faces the light transmission groove.
[0014] The motor is used for controlling rotation of the medical tube.
[0015] The camera is arranged above the medical tube and is used for acquiring images of the medical tube.
[0016] The controller is used for executing the label positioning method for the medical tube as described above.
[0017] In a third aspect, an embodiment of the present application provides a blood collection vehicle, comprising a label positioning device for a medical tube as described above and a labeling device, the labeling device is arranged beside the medical tube, and the labeling device is used for labeling the medical tube according to the positioning information of the label when receiving a labeling instruction sent by the label positioning device.
[0018] An embodiment of the present application discloses a label positioning method and device for a medical tube and a blood collection vehicle, a label is attached to an outer wall of a medical tube around a rotation axis, the method comprises: acquiring a plurality of original images of the medical tube when the medical tube rotates around the rotation axis; detecting light intensity variation of the plurality of original images; obtaining a corresponding type of the label of the medical tube when the number of original image frames with light intensity greater than a first threshold value meets a preset range; performing image preprocessing on the plurality of original images to obtain a plurality of target images; performing linear fitting operation on the plurality of target images to obtain the number of edges of the plurality of target images; and obtaining positioning information of the label according to the type of the label when the number of edges changes. The embodiment of the present application can position edges of an original label at a moment when a preset number of edge changes occurs based on different original label types, so as to facilitate secondary labeling, and the label positioning method is suitable for edge positioning of a transparent or semi-transparent original label. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0020] Figure 1 The flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0021] Figure 2 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0022] Figure 3 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0023] Figure 4 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0024] Figure 5 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0025] Figure 6 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0026] Figure 7 The sub-flowchart of the label positioning method of the medical tube provided by the embodiments of the present application is shown in the figure.
[0027] Figure 8 The schematic block diagram of the label positioning device of the medical tube provided by the embodiments of the present application is shown in the figure.
[0028] Figure 9 The position change diagram of the label edge in the target image provided by the embodiments of the present application is shown in the figure.
[0029] Figure 10 The first rule diagram of the edge number change in the target image provided by the embodiments of the present application is shown in the figure.
[0030] Figure 11 The second rule diagram of the edge number change in the target image provided by the embodiments of the present application is shown in the figure.
[0031] Figure 12 The third rule diagram of the edge number change in the target image provided by the embodiments of the present application is shown in the figure.
[0032] Figure 13An implementation schematic diagram for controlling the rotation of a medical tube to drive the label edge to reach a preset target position is provided for the embodiment of the present application.
[0033] Figure 14 Another implementation schematic diagram for controlling the rotation of a medical tube to drive the label edge to reach a preset target position is provided for the embodiment of the present application.
[0034] Figure 15 Still another implementation schematic diagram for controlling the rotation of a medical tube to drive the label edge to reach a preset target position is provided for the embodiment of the present application.
[0035] Explanation of the figure:
[0036] 1, box; 2, camera; 3, partition; 31, light transmission groove; 4, light uniformizing plate; 5, illuminating lamp. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0038] It should be understood that when used in the specification and the appended claims, the terms “comprise” and “include” indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0039] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms “a”, “an” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0040] It should be further understood that the term “and / or” used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0041] For the convenience of understanding the method, please refer to Figure 8 , first introduce the blood collection car provided by the embodiment of the present application, the blood collection car includes a labeling device and a label positioning device of a medical tube, the labeling device is arranged at the side of the medical tube, and the labeling device is used for labeling the medical tube according to the label positioning information when receiving the labeling instruction sent by the label positioning device.
[0042] The label positioning device of the medical tube comprises a labeling box, a motor, a camera 2 and a controller.
[0043] The labeling box comprises a box body 1, a partition plate 3, a uniform light plate 4 and an illuminating lamp 5. The partition plate 3 is provided with a light transmission groove 31, which is arranged below the medical tube. The illuminating lamp 5 is arranged below the light transmission groove 31 and faces the light transmission groove 31. The uniform light plate 4 is arranged between the illuminating lamp 5 and the light transmission groove 31, so that the light of the illuminating lamp 5 can uniformly illuminate the light transmission groove 31.
[0044] The motor is used to control the rotation of the medical tube around the rotation axis.
[0045] The camera 2 is arranged above the medical tube and is used to acquire the image of the medical tube.
[0046] The controller is used to execute the following label positioning method of the medical tube.
[0047] Based on the above introduction, please refer to Figure 1 , Figure 1 for the flowchart of the label positioning method of the medical tube provided by the embodiments of the present application.
[0048] As shown in Figure 1 , the method comprises steps S101-S106.
[0049] S101, acquiring multiple frames of original images of the medical tube when the medical tube rotates around the rotation axis;
[0050] In this step, the motor drives the medical tube to rotate uniformly around the rotation axis, and the camera 2 photographs the medical tube in the rotating state to obtain continuous multiple frames of original images.
[0051] S102, detecting the light intensity change of the multiple frames of original images;
[0052] S103, obtaining the corresponding type of the label of the medical tube when the number of original image frames with light intensity greater than the first threshold value meets the preset range.
[0053] In steps S102-S103, the light intensity presented by different types of labels on the original images is different. Therefore, the light intensity change of the original images can be detected, and the first threshold value can be designed to distinguish the label types. Specifically, when the light intensity is greater than the first threshold value, it can be confirmed that the covering length of the original label on the medical tube in the circumferential direction of the medical tube does not completely cover the medical tube, i.e., the original label has a gap and the liquid in the medical tube can be observed. Further, the number of original image frames with light intensity greater than the first threshold value corresponding to different types of labels is different. When the number of original image frames with light intensity greater than the first threshold value meets the preset range, the type of the label, i.e., long, medium or short label, can be obtained according to the number of original image frames meeting different preset ranges.
[0054] S104, image pre-processing is performed on the plurality of original images to obtain a plurality of target images;
[0055] S105, straight line fitting operation is performed on the plurality of target images to obtain the number of edges of the plurality of target images;
[0056] S106, when the number of edges changes, the positioning information of the label is obtained according to the label type.
[0057] Steps S104-S106 use image processing technology to transform the original image to obtain the target image. For details, refer to Figure 9 The horizontal line appearing in the target image is the edge line, and the upper edge and the lower edge of the medical tube form the upper edge and the lower edge, and the horizontal line between the upper edge and the lower edge is the label edge of the original label. It can be understood that the upper edge and the lower edge always exist in the plurality of target images, and the number of label edges between the upper edge and the lower edge changes with the rotation of the medical tube, that is, the number of edges of the plurality of target images will have regular cyclic changes, so that based on different original label types, the label edge of the original label can be positioned at the moment when the set edge number changes.
[0058] Based on the above steps S101-S106, the embodiment obtains a plurality of original images when the medical tube rotates, analyzes the type of the original label on the medical tube based on the light intensity information of the plurality of original images, and then uses image recognition technology to transform the plurality of original images into a plurality of target images, and obtains the edge number information in the plurality of target images, and positions the label edge of the original label based on the change of the edge number, so as to facilitate secondary labeling. The edge positioning method can accurately position the edge of the transparent or semi-transparent original label.
[0059] Based on the above steps S101-S106, by controlling the medical tube to rotate around the rotation axis, when the positioning information of the label is obtained, the medical tube is controlled to stop rotating, a labeling instruction is sent to an external labeling device, and the labeling operation is performed by the external labeling device to complete the secondary labeling.
[0060] In an embodiment, as Figure 2 shown, the label positioning method of the medical tube further comprises:
[0061] S201, when the light intensity of each original image is less than or equal to a second threshold value, the medical tube is controlled to stop rotating, wherein the first threshold value is greater than the second threshold value;
[0062] S202, sending a labeling instruction to an external labeling device or sending prompt information to an external display device.
[0063] In the embodiment, when the covering length of the original label on the medical tube in the circumferential direction of the medical tube completely covers the circumference of the medical tube, the light intensity of the original image is relatively small and the change of the light intensity of each frame of the original image is not large, and thus a second threshold value smaller than the first threshold value can be defined according to actual operation. When the light intensity of each frame of the original image is less than or equal to the second threshold value, the positioning of the label edge is not required, and a labeling instruction can be directly sent to the external labeling device for labeling operation or a prompt information can be sent to the external display device.
[0064] In an embodiment, as shown in FIG. 1, step S103 comprises: Figure 3
[0065] S301, when the number of frames of the original image with the light intensity greater than the first threshold value meets the first preset range, outputting that the label is a first type label, wherein the circumference of the first type label is greater than half of the circumference of the medical tube;
[0066] S302, when the number of frames of the original image with the light intensity greater than the first threshold value meets the second preset range, outputting that the label is a second type label, wherein the circumference of the second type label is equal to half of the circumference of the medical tube;
[0067] S303, when the number of frames of the original image with the light intensity greater than the first threshold value meets the third preset range, outputting that the label is a third type label, wherein the circumference of the third type label is less than half of the circumference of the medical tube.
[0068] In the embodiment, the light intensity of the original image is affected by the covering length of the original label on the circumference of the medical tube. The greater the covering length of the original label, the greater the shielding of the light emitted by the illuminating lamp 5, that is, the weaker the light when the camera 2 is shooting, that is, the greater the length of the original label on the medical tube covering the circumference of the medical tube, and the lower the light intensity of the original image. Therefore, the number of frames of the original image with the light intensity greater than the first threshold value is relatively small. As can be seen, the fewer the number of frames of the original image with the light intensity greater than the first threshold value, the longer the covering length of the original label on the circumference of the medical tube, and vice versa.
[0069] Based on this, the embodiment sets a first preset range, a second preset range and a third preset range, wherein the first preset range is smaller than the second preset range, and the second preset range is smaller than the third preset range; when the number of original image frames with light intensity greater than the first threshold value meets the first preset range, it indicates that the covering length of the original label on the circumference of the medical tube is relatively long, and is defined as a first type label, the first type label being a long label with a circumference greater than half of the circumference of the medical tube; when the number of original image frames with light intensity greater than the first threshold value meets the second preset range, it indicates that the covering length of the original label on the circumference of the medical tube is relatively medium, and is defined as a second type label, the second type label being a medium label with a circumference equal to half of the circumference of the medical tube; when the number of original image frames with light intensity greater than the first threshold value meets the third preset range, it indicates that the covering length of the original label on the circumference of the medical tube is relatively short, and is defined as a third type label, the third type label being a short label with a circumference smaller than half of the circumference of the medical tube.
[0070] In an embodiment, as shown in FIG. 1, step S104 includes: Figure 4
[0071] S401, performing image grayscaling on the original image to obtain a gray-scale image;
[0072] S402, extracting edge features after denoising processing of the gray-scale image to obtain a binary image containing only edge information, and taking the binary image as a target image.
[0073] In the embodiment, the original image in RGB format is first subjected to image grayscaling to obtain a gray-scale image, then the gray-scale image is subjected to convolution processing using a 3*3 Gaussian kernel to remove noise, and finally the image is subjected to edge feature extraction through horizontal and vertical derivation to obtain a binary image containing edge information, which is taken as a target image.
[0074] In an embodiment, as shown in FIG. 1, step S105 includes: Figure 5
[0075] S501, performing geometric shape recognition on each target image to obtain coordinate point parameters of geometric shapes;
[0076] S502, performing straight line fitting according to the coordinate point parameters to obtain the number of edges of each target image;
[0077] S503, sequentially counting the number of edges in multiple target images.
[0078] The embodiment adopts a Hough transformation algorithm to extract features of the target image to obtain geometric shapes in the target image. In the embodiment, the tube body edge and the label edge of the medical tube in the target image are mainly obtained, i.e., the number of edges in each target image can be obtained, as shown in FIG. 2. Figure 9 As shown in the figure, the horizontal lines in each target image are the edges of the tube body and the edges of the label, wherein the uppermost horizontal line and the lowermost horizontal line are the edges of the tube body, and the middle horizontal line is the edge of the label, according to Figure 9 It can be learned from the rule in the figure that during the rotation of the medical tube, the upper edge and the lower edge remain unchanged, and the middle label edge can change in quantity with the rotation of the medical tube. Thus, the regular change in the quantity of edges can be found out in combination with different original label types.
[0079] The process of step S106, i.e., the process of finding out the regular change in the quantity of edges and the positioning of the original label in combination with different original label types, will be described in detail below.
[0080] Due to the installation position of the equipment, the camera 2 is at the top of the medical tube, the external labeling device is at the labeling side of the medical tube, and labeling is performed on the medical tube from above. Based on this position:
[0081] The first case: when the quantity of edges decreases in the preset order, the corresponding positioning information is obtained according to the first type of label; in combination with Figure 10 As shown in the figure, Figure 10 The gray area in the figure is the original label area, and the white area is the transparent tube body area. When the original label is the first type of label, the medical tube is stopped from rotating when the quantity of edges changes from four to three (i.e., the rightmost edge in the figure), and a labeling instruction is issued. Figure 10
[0082] The second case: when the quantity of edges increases in the preset order, the corresponding positioning information is obtained according to the second type of label and the target image information; in combination with Figure 11 As shown in the figure, Figure 11 The gray area in the figure is the original label area, and the white area is the transparent tube body area. When the original label is the second type of label and the quantity of edges changes from two to three, the gray values of the upper edge to the label edge and the lower edge to the label edge in the target image are judged. Further, the gray image is divided into 256 levels, and the gray value ranges from 0 to 255, i.e., the current gray image is similar to a two-dimensional array, and the gray value of each pixel point is known. Thus, the gray value of the pixel point corresponding to the coordinate sampling point is also known after the coordinate sampling point is found. More specifically, a plurality of sampling points between the upper edge to the label edge in the target image are selected to obtain a first set of gray values, and the average value of the first set of gray values is calculated as a first gray average value. A plurality of sampling points between the lower edge to the label edge in the target image are selected to obtain a second set of gray values, and the average value of the first set of gray values is calculated as a first gray average value. When the second gray average value is greater than the first gray average value, the label positioning information is output as close to the upper edge of the tube, and when the first gray average value is greater than the second gray average value, the label positioning information is output as close to the lower edge of the tube. (The higher the gray value, the more transparent the tube, and the lower the gray value, the more label.)
[0083] Therefore, when the number of edges changes from two to three, and the second grayscale average value is greater than the first grayscale average value, that is, the label is located near the top edge, the rotation of the medical tube is stopped and a labeling instruction is issued.
[0084] The third scenario: When the number of edges increases in a preset order, the corresponding positioning information is obtained based on the second type of label; specifically combined with... Figure 12 As shown, Figure 12 The gray area is the original label area, and the white area is the transparent tube body area. When the original label is a third type label, the medical tube stops rotating when the number of edges changes from two to three, and a labeling instruction is issued.
[0085] More specifically, such as Figure 6 As shown, during the process of controlling the medical tube to rotate around the rotation axis, when the positioning information of the tag is obtained, the medical tube is controlled to stop rotating, including steps S601 to S604:
[0086] S601. When the number of edges increases or decreases in a preset order, acquire edge information of multiple frames of target images and stop detecting the number of edges. The edge information includes the upper edge, lower edge and label edge.
[0087] S602. Calculate the vertical distance between the top and bottom edges, and obtain the centerline distance based on the vertical distance, where the centerline distance is half of the vertical distance;
[0088] S603. Calculate the length of the vertical line segment from the top edge to the midpoint of the label edge. When the difference between the length and the distance to the midline meets the preset range, the label's positioning information is obtained.
[0089] S604. Control the medical tube to stop rotating based on the positioning information.
[0090] In this embodiment, after the medical tube stops rotating, the position of the label edge is confirmed, and the label is positioned before it can be affixed. The specific process is as follows:
[0091] First, the Hough algorithm is used to fit straight lines to find three horizontal lines in the target image (top edge A_1, bottom edge A_2, and label edge A_3).
[0092] Then, calculate the coordinates (Xa, Ya) of the center point O1 of the label from the two endpoints of the label edge A_3;
[0093] Then, according to the formula PQ=|Ax+By+C| / √(A^2+B^2), calculate the distance PQ_1 from the center point O1 of the label edge A_3 to the upper edge line A_1;
[0094] Finally, when PQ_1 meets the preset range, it indicates that the label edge can be positioned and the medical tube is controlled to stop rotating, and then a labeling signal is sent to the controller to control the external labeling device to perform secondary labeling operation; wherein the PQ_1 values corresponding to different categories of medical tubes are different, and can be calculated according to the following formula:
[0095] PQ_1 = ki * L ± i;
[0096] L = S / 2;
[0097] Wherein, ki is the preset coefficient of the original label corresponding to different categories of medical tubes, i is the reasonable distance error, S is the distance from the upper edge line to the lower edge line, and L is the middle line from the upper edge line to the lower edge line.
[0098] More specifically, as shown in Figure 7 , step S603 includes:
[0099] S701, when the length of the previous frame is greater than the length of the current frame, and the length of the current frame is greater than the middle distance, the medical tube is controlled to rotate in the upper edge direction until the difference between the length of the current frame and the middle distance meets the preset range, that is, the positioning information of the label is obtained;
[0100] S702, when the length of the current frame is less than the length of the previous frame and the middle distance, the medical tube is controlled to rotate in the lower edge direction until the difference between the length of the current frame and the middle distance meets the preset range, that is, the positioning information of the label is obtained.
[0101] In this embodiment, when the medical tube is controlled to stop rotating, the position of the label edge has been confirmed, but in order to ensure that the secondary labeling covers the original label as much as possible, when the difference between the length of the current frame and the middle distance still meets the preset range, the medical tube needs to be controlled to rotate in the upper edge or lower edge direction until the difference between the length of the current frame and the middle distance meets the preset range, that is, the positioning information of the label is obtained.
[0102] Specifically, please refer to Figures 13-15 , the gray area in the figure is the original label area, and the white area is the transparent tube body area. The medical tube can be controlled to rotate in the upper edge or lower edge direction according to the comparison of PQ_1 in the continuous two frames of target images with the preset range, and the process is as follows:
[0103] Suppose the original rotating direction of the medical tube is clockwise, and clockwise is the positive direction. PQ_1 上 and PQ_1 当 are the distances from the label edge to the upper edge in the previous frame of target image and the current frame of target image respectively. The dashed line in the dashed line Figures 12-14 is the middle line L from the upper edge to the lower edge.
[0104] As shown in Figure 13In the case where L>PQ_1 上 >PQ_1 当 At this time, control the medical tube to rotate in the positive direction (along the top edge) until PQ_1 当 Stop and send a labeling signal when =ki*L±⊿i;
[0105] like Figure 14 In the case of PQ_1 上 >L>PQ_1 当 At this time, control the medical tube to rotate in the opposite direction (along the lower edge) until PQ_1 当 Stop and send a labeling signal when =ki*L±⊿i;
[0106] like Figure 15 In the case of PQ_1 上 >PQ_1 当 When >L, control the medical tube to rotate in the opposite direction (along the lower edge) until PQ_1. 当 Stop and send a labeling signal when =ki*L±⊿i.
[0107] In this way, the medical tube can be rotated up or down until the difference between the length of the current frame and the distance to the center line meets the preset range. The positioning information of the label is then obtained and the label is applied, which can ensure that the secondary label covers the original label as much as possible.
[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and equipment can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0109] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A label positioning method for a medical tube, the label being attached to an outer wall of the medical tube around a rotation axis, characterized by, The method comprises: acquiring a plurality of original images of the medical tube when the medical tube rotates around the rotation axis; detecting light intensity changes of the plurality of original images; obtaining a corresponding type of label of the medical tube when the number of original image frames with light intensity greater than a first threshold value meets a preset range; performing image preprocessing on the plurality of original images to obtain a plurality of target images; performing straight line fitting operation on the plurality of target images to obtain the number of edges of the plurality of target images; obtaining positioning information of the label according to the label type when the number of edges changes, specifically comprising: obtaining corresponding positioning information according to a first type label when the number of edges decreases in a preset order, the circumference of the first type label being greater than half of the circumference of the medical tube; or obtaining corresponding positioning information according to a second type label and the target image information when the number of edges increases in a preset order, the circumference of the second type label being equal to half of the circumference of the medical tube; or obtaining corresponding positioning information according to a third type label when the number of edges increases in a preset order, the circumference of the third type label being less than half of the circumference of the medical tube; wherein the edge information includes upper edge, lower edge and label edge.
2. The medical tube label positioning method according to claim 1, wherein The method further comprises: controlling the medical tube to rotate around the rotation axis, and controlling the medical tube to stop rotating when the positioning information of the label is obtained; sending a labeling instruction to an external labeling device.
3. The medical tube label positioning method of claim 2, wherein, The method further comprises: controlling the medical tube to stop rotating when the light intensity of each original image is less than or equal to a second threshold value, wherein the first threshold value is greater than the second threshold value; sending a labeling instruction to an external labeling device or sending prompt information to an external display device.
4. The medical tube label positioning method according to claim 2 or 3, characterized by, The method of obtaining the corresponding type of label of the medical tube when the number of original image frames with light intensity greater than a first threshold value meets a preset range comprises: outputting the label as a first type label when the number of original image frames with light intensity greater than a first threshold value meets a first preset range; outputting the label as a second type label when the number of original image frames with light intensity greater than a first threshold value meets a second preset range; outputting the label as a third type label when the number of original image frames with light intensity greater than a first threshold value meets a third preset range.
5. The medical tube label positioning method of claim 4, wherein, The method of performing image preprocessing on the plurality of original images to obtain a plurality of target images comprises: performing image grayscale on the original image to obtain a grayscale image; performing denoising processing on the grayscale image to extract edge features, obtaining a binary image containing only edge information, and taking the binary image as the target image; Correspondingly, The method of performing straight line fitting operation on the plurality of target images to obtain the number of edges of the plurality of target images comprises: performing geometric shape recognition on each target image to obtain coordinate point parameters of geometric shapes; performing straight line fitting according to the coordinate point parameters to obtain the number of edges of each target image; sequentially counting the number of edges in the plurality of target images.
6. The medical tube label positioning method of claim 2, wherein, The control of the medical tube rotating around the rotation axis, when the positioning information of the label is obtained, includes: When the number of edges increases or decreases in a preset order, edge information of multiple frames of the target image is obtained, and the number of edges is stopped from being continuously detected; The vertical distance of the upper edge and the lower edge is calculated, and the midline distance is obtained according to the vertical distance, wherein the midline distance is half of the vertical distance; The length of the vertical line segment from the upper edge to the midpoint of the label edge is calculated, and when the difference between the length and the midline distance meets a preset range, the positioning information of the label is obtained; According to the positioning information, the medical tube is controlled to stop rotating.
7. The medical tube label positioning method of claim 6, wherein, The length of the vertical line segment from the upper edge to the midpoint of the label edge is calculated, and when the difference between the length and the midline distance meets a preset range, the positioning information of the label is obtained, including: When the length of the last frame is greater than the length of the current frame, and the length of the current frame is greater than the midline distance, the medical tube is controlled to rotate in the upward direction until the difference between the length of the current frame and the midline distance meets the preset range, and the positioning information of the label is obtained; When the length of the current frame is less than the length of the last frame and the midline distance, the medical tube is controlled to rotate in the downward direction until the difference between the length of the current frame and the midline distance meets the preset range, and the positioning information of the label is obtained.
8. A medical tube label positioning device, characterized by, It includes: A labeling box, including a box body, a partition plate and a lighting lamp, the partition plate is provided with a light transmission slot, the light transmission slot is arranged below the medical tube, and the lighting lamp is arranged below the light transmission slot and faces the light transmission slot; A motor for controlling the rotation of the medical tube; A camera arranged above the medical tube for obtaining the image of the medical tube; A controller for executing the label positioning method of the medical tube according to any one of claims 1-7.
9. A blood collection vehicle, including a labeling device and a label positioning device of the medical tube according to claim 8, the labeling device is arranged beside the medical tube, and the labeling device is used to label the medical tube according to the positioning information of the label positioning device when receiving the labeling instruction sent by the label positioning device.
Citation Information
Patent Citations
Labeling positioning method based on linemod matching and Hough transform
CN115272653A
Blood collection tube label edge searching device
CN217100827U