Vacuum blood collection tube defect detection system based on machine vision

Through the vacuum blood collection tube defect detection system based on machine vision, using industrial cameras and YOLOv5 target detection model, the problem of manual detection in the prior art is solved, and the rapid and accurate detection of multiple defects of vacuum blood collection tubes is achieved, and the detection accuracy and efficiency are improved.

CN119426200BActive Publication Date: 2025-05-13SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411453162.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-05-13
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The detection of existing vacuum blood vessels mainly relies on manual labor, which has problems such as time-consuming and labor-intensive, missed detection and causing harm to workers' vision, making it difficult to effectively detect tiny scratch defects.

Method used

Using a vacuum blood collection tube defect detection system based on machine vision, images are captured through industrial cameras, combined with digital image processing technology and YOLOv5 object detection model, we automatically determine whether there are defects in the vacuum blood collection tube, and remove the defective blood collection tubes through the control system.

Benefits of technology

It realizes rapid and accurate detection of various defects of vacuum blood collection tubes, improves detection accuracy and efficiency, reduces the cost and risks of manual testing, and provides technical support to enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119426200B_ABST
    Figure CN119426200B_ABST
Patent Text Reader

Abstract

The present invention discloses a vacuum blood collection tube defect detection system based on machine vision, including a blanking module, a transmission module, a sorting module, a visual recognition module and a control module, wherein the blanking module, the sorting module and the visual recognition module are sequentially arranged along the transmission direction of the transmission module; the vacuum blood collection tube falls into the transmission module through the blanking module, the transmission module transmits the vacuum blood collection tube to the visual recognition module for defect recognition and sends a sorting instruction to the sorting module, and the sorting module sorts out the defective vacuum blood collection tube according to the sorting instruction, thereby realizing intelligent vacuum blood collection tube defect detection and sorting. The present invention can detect multiple defects of vacuum blood collection tubes, including dirt on the vacuum blood collection tube body, defects in the cap and label, etc., and the detection accuracy of the present application is higher after a large number of defect detections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of blood collection tube quality inspection, and in particular relates to a vacuum blood collection tube defect detection system based on machine vision. Background Art

[0002] As an indispensable disposable medical device in the medical field, vacuum blood collection tubes have strict quality requirements. However, in the production process of vacuum blood collection tubes, due to various reasons such as the purity of raw materials, production processes and equipment, different types of defects may appear in various parts. Quickly and effectively eliminating defective products has become the key to ensuring the quality of vacuum blood collection tubes.

[0003] At present, most manufacturers use manual inspection methods to inspect the appearance defects of vacuum blood collection tubes. Workers check the quality of blood collection tubes one by one under the light source at the inspection station. This inspection method is not only time-consuming and labor-intensive, but also prone to false detection and missed detection, especially for small scratch defects that are difficult to find, and it is difficult to ensure the inspection quality. At the same time, the light source for auxiliary inspection may also cause serious damage to the workers' eyesight. Summary of the invention

[0004] The purpose of the present invention is to provide a vacuum blood collection tube defect detection system based on machine vision. The system uses an industrial camera to take pictures, determines whether there are tube defects in the vacuum blood collection tube according to digital image processing technology, and uses a control system to remove the defective blood collection tubes.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A vacuum blood collection tube defect detection system based on machine vision comprises a blanking module, a conveying module, a sorting module, a visual recognition module and a control module, wherein the blanking module, the sorting module and the visual recognition module are sequentially arranged along the transmission direction of the conveying module;

[0007] The blanking module includes a V-shaped blanking cabin and a blanking tray. The middle of the blanking tray is connected to a stepper motor. The blanking tray is provided with a plurality of blanking holes along the circumference with the center as the center. The blanking holes can only pass one vacuum blood collection tube. The blanking tray is rotated by controlling the stepper motor to realize the interval discharge of the vacuum blood collection tube.

[0008] The starting end of the conveying module is located below the blanking hole, and two photoelectric sensors are provided on one side of the conveying module, one is located in front of the visual recognition module, and the other is located in front of the sorting module;

[0009] The visual recognition module includes an industrial camera and a defect detection module, wherein the industrial camera is used to capture an image of the vacuum blood collection tube located on the conveying module and send the image to the defect detection module for defect detection;

[0010] The sorting module is used to sort the vacuum blood collection tubes identified as having defects;

[0011] The control module includes a host computer and a lower computer connected to the host computer, the lower computer is connected to the photoelectric sensor, the stepper motor, the transmission module, and the sorting module, and the host computer is installed with a defect detection module and a human-computer interaction module;

[0012] The defect detection module includes image preprocessing, image segmentation and YOLOv5 target detection; the image preprocessing refers to converting the vacuum blood collection tube image taken by the industrial camera into a grayscale image by using the weighted average method, and then removing the image noise by using the Gaussian filtering method;

[0013] The image segmentation refers to first removing the image background and the tube body by threshold processing, and then segmenting the defective target by edge detection; sending the segmented image to the YOLOv5 target detection model for defect detection, and finally synthesizing all the segmented images that have completed the detection to obtain the final vacuum blood collection tube defect detection result.

[0014] Furthermore, the threshold processing selects truncation threshold processing as the threshold processing algorithm through comparative analysis; truncation threshold processing is to set the pixel points greater than the threshold as the threshold, and the pixel points less than or equal to the threshold remain unchanged; truncation threshold thresh is the threshold, src(x,y) is the input image pixel.

[0015] Furthermore, the edge detection is implemented using the Canny operator. First, Gaussian filtering is performed. The Gaussian kernel of this embodiment Then the Sobel operator is used to calculate the horizontal gradient G of the image x and the vertical gradient G y , and then calculate the magnitude G and direction θ of the image gradient. Then, the non-maximum suppression method is used to traverse each pixel point, retaining the local maximum value with the same gradient direction and suppressing all other gradient values, and finally removing the weak edge from the edge image;

[0016] Furthermore, the weak edge is removed from the edge image by using a double threshold method to set two high and low thresholds. When the target edge pixel gradient value is greater than the high threshold, the point is determined to be a strong edge point; when the target edge pixel gradient value is less than the low threshold, the point is suppressed; when the target edge pixel gradient value is between the high and low thresholds, the point needs to be marked and further judged. If the point is connected to the strong edge point, the point is set to be a strong edge point; if the point is not connected to the strong edge point, the point is suppressed.

[0017] Furthermore, the sorting module is implemented by a cylinder.

[0018] Furthermore, a defective storage box is provided below the sorting module, and a qualified storage box is provided at the end of the conveying module.

[0019] Furthermore, the lower computer adopts a PLC controller.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] (1) Compared with the equipment and methods on the market that can only detect a single defect of vacuum blood collection tubes, the present method and device can detect multiple defects of vacuum blood collection tubes, including dirt on the vacuum blood collection tube body, cap and label defects, etc., and the detection accuracy of the present application is higher after a large number of defect detections;

[0022] (2) The combination of the V-shaped drop chamber and the drop tray can be used to test blood collection tubes in batches, greatly improving the testing efficiency;

[0023] (3) The use of fully automatic testing equipment replaces the original manual testing, which improves the testing accuracy, saves costs and improves production efficiency.

[0024] (4) Preprocess the captured images, including cropping irrelevant areas and image segmentation, to improve the speed of the detection process; use a deep learning target detection model to replace the traditional visual detection algorithm. The deep learning algorithm is efficient and has high accuracy.

[0025] (5) The image is processed in the host computer. After processing, the detection data can be saved and classified to provide technical support for subsequent process improvements, reduce the workload of personnel, and bring more profits to the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the device structure of the present invention.

[0027] Figure 2 It is a schematic diagram of the hardware system of the present invention.

[0028] Figure 3 This is a defect detection flow chart of the visual recognition module of the present invention.

[0029] Figure 4 It is the work flow chart of the present invention.

[0030] Markings in the figure: 10, rack; 21, drop chamber; 22, drop tray; 23, drop hole; 30, conveying module; 40, visual recognition module; 50, sorting module; 61, defect storage box; 62, qualified storage box; 71, photoelectric sensor. DETAILED DESCRIPTION

[0031] like Figure 1 and Figure 2 As shown, a vacuum blood collection tube defect detection system based on machine vision provided in this embodiment includes a rack, a blanking module, a conveying module, a sorting module, a visual recognition module and a control module; the vacuum blood collection tube falls into the conveying module through the blanking module, the conveying module transmits it to the visual recognition module for defect identification and sends a sorting instruction to the sorting module, and the sorting module sorts out the defective vacuum blood collection tubes according to the sorting instruction, thereby realizing intelligent vacuum blood collection tube defect detection and sorting.

[0032] The frame is used to provide system support, and each module is installed at a corresponding position to realize defect detection of intelligent vacuum blood collection tubes through the control module. Specifically, the blanking module, the sorting module, and the visual recognition module are arranged in sequence along the conveying direction of the conveying module.

[0033] The dropping module is used to drop the vacuum blood collection tubes onto the conveying module one by one. A rectangular dropping cabin matching the vacuum blood collection tubes can be used. The feeding speed of this dropping cabin is too slow. In this embodiment, the dropping module is designed as a V-shaped dropping cabin, and the feeding port of the dropping module is enlarged to increase the feeding speed. The discharge port can only pass one vacuum blood collection tube, so that a single vacuum blood collection tube can enter. In order to control the uniformity of dropping, a rotatable dropping tray is provided at the bottom of the dropping cabin in this embodiment. Several dropping holes are evenly opened along the circumference of the dropping tray with the center. The dropping holes can just pass one vacuum blood collection tube. The dropping speed is controlled by rotating the dropping tray to realize the interval time of vacuum blood collection tube transmission, and the intelligent detection of fluency is realized in conjunction with the detection speed of the visual recognition module.

[0034] A conveying module is installed directly below the blanking port of the blanking module. The conveying module is implemented by using an existing motor to drive a transmission belt. Two photoelectric sensors are provided on one side of the transmission direction of the conveying module, one is located in front of the visual recognition module, and the other is located in front of the sorting module. When the vacuum blood collection tube is conveyed to the photoelectric sensor, the photoelectric is triggered. The photoelectric sensor sends a signal to the visual recognition module through signal transmission. The visual recognition module starts the vacuum blood collection tube defect detection. The visual recognition module includes an industrial camera for obtaining image information of the vacuum blood collection tube and a defect detection module.

[0035] like Figure 3 As shown, the defect detection module includes image preprocessing, image segmentation and YOLOv5 target detection; the image preprocessing refers to converting the vacuum blood collection tube image taken by the industrial camera into a grayscale image by using the weighted averaging method, and then removing the image noise by using the Gaussian filtering method.

[0036] Since the dirt defect of the vacuum blood collection tube has an obvious grayscale value jump with the background, the point where the grayscale value changes sharply is the edge of the dirt defect. Therefore, the image segmentation described in this embodiment refers to first using threshold processing to eliminate the background and the tube body, and then using edge detection to segment the defective target.

[0037] The threshold processing selects the truncation threshold processing as the threshold processing algorithm through comparative analysis; the truncation threshold processing is to set the pixel points greater than the threshold as the threshold, and the pixel points less than or equal to the threshold remain unchanged. thresh is the threshold, src(x,y) is the input image pixel.

[0038] The edge detection is implemented by using the Canny operator. Specifically, the Gaussian filter is first used. The Gaussian kernel of this embodiment Then the Sobel operator is used to calculate the horizontal gradient G of the image x and the vertical gradient G y , and then calculate the magnitude G and direction θ of the image gradient. Then, the non-maximum suppression method is used to traverse each pixel point, retaining the local maximum value with the same gradient amplitude in the direction and suppressing all other gradient values. Finally, in order to remove the weak edge from the edge image, the double threshold method is used to set the high and low thresholds. When the target edge pixel gradient value is greater than the high threshold, the point is determined to be a strong edge point; when the target edge pixel gradient value is less than the low threshold, the point is suppressed; when the target edge pixel gradient value is between the high and low thresholds, the point needs to be marked and further judged. If the point is connected to the strong edge point, the point is set as a strong edge point; if the point is not connected to the strong edge point, the point is suppressed.

[0039] The segmented images are sent to the YOLOv5 target detection model for defect detection. Finally, all the segmented images that have completed the detection are synthesized to obtain the final vacuum blood collection tube defect detection results.

[0040] When the visual recognition module identifies a defect, the second photoelectric sensor is triggered and the sorting module implements sorting. The sorting module includes a cylinder and a solenoid valve. The direction of the telescopic rod of the cylinder is perpendicular to the transmission direction. When the solenoid valve is energized, the cylinder works to push the defective vacuum blood collection tube on the transmission module out of the transmission module. A defective storage box is provided under the sorting module, and a qualified storage box is provided at the end of the transmission module.

[0041] The control module includes a host computer and a lower computer, and the lower computer is a PLC controller, which is connected to the cylinder, the stepper motor that controls the rotation of the blanking tray, the asynchronous motor that drives the transmission module, and the cylinder, and sends work instructions to each motor according to the instructions sent by the host computer. The host computer includes the image processing module and human-computer interaction in the visual recognition module, and generates instructions according to the image processing module and human-computer interaction to control the work of each module.

[0042] like Figure 4 The specific working process of this embodiment is as follows:

[0043] The vacuum blood collection tubes are loaded into the blanking chamber in batches. The blanking tray rotates at a certain speed driven by a stepper motor. When it reaches the gap between the blades of the blanking tray, a blood collection tube located at the bottom of the blanking chamber passes through the blanking tray due to gravity, completing a blanking process. Since the size of the blanking tray gap can only meet the size of a single blood collection tube, the remaining blood collection tubes in the blanking chamber will be blocked by the blades for a period of time until the next gap appears, thereby achieving the condition that there is a time interval between the blanking of the tubes.

[0044] When the vacuum blood collection tube falls onto the conveyor belt, the asynchronous motor drives the conveyor belt to move and transport the blood collection tube to the visual recognition module. When the vacuum blood collection tube reaches the photoelectric sensor, the photoelectric sensor receives the signal and transmits the signal to the PLC controller. The PLC controller stops the stepper motor and the asynchronous motor and communicates with the host computer. The host computer controls the industrial camera to complete image acquisition and then performs image processing.

[0045] The collected vacuum blood collection tube image is first preprocessed and then segmented into 6 images of 640×640 size. Finally, it is detected by YOLOv5 target. If there is no defect, the blood collection tube is considered a qualified product. The host computer sends a signal to the PLC controller to start the motor, the conveyor belt resumes movement, and the vacuum blood collection tube continues to move until it falls into the qualified storage box.

[0046] If any of the divided images has defects, the current vacuum blood collection tube has one or more defects, and the sorting operation is performed. The host computer sends a signal to the PLC controller to start the motor, the conveyor belt resumes movement, and the vacuum blood collection tube continues to move until it moves to the sorting module, and the sorting module pushes the vacuum blood collection tube into the defect storage box.

[0047] The above description is only a preferred implementation manner of the present invention, but the protection scope of the present invention is not limited thereto, and any modification and replacement based on the technical solution and inventive concept provided by the present invention should be included in the protection scope of the present invention.

Claims

1. A vacuum blood collection tube defect detection system based on machine vision, characterized in that: It includes a blanking module, a conveying module, a sorting module, a visual recognition module and a control module, wherein the blanking module, the sorting module and the visual recognition module are sequentially arranged along the transmission direction of the conveying module; The blanking module includes a V-shaped blanking cabin and a blanking tray. The middle of the blanking tray is connected to a stepper motor. The blanking tray is provided with a plurality of blanking holes along the circumference with the center as the center. The blanking holes can only pass one vacuum blood collection tube. The blanking tray is rotated by controlling the stepper motor to realize the interval discharge of the vacuum blood collection tube. The starting end of the conveying module is located below the blanking hole, and two photoelectric sensors are provided on one side of the conveying module, one is located in front of the visual recognition module, and the other is located in front of the sorting module; The visual recognition module includes an industrial camera and a defect detection module, wherein the industrial camera is used to capture an image of the vacuum blood collection tube located on the conveying module and send the image to the defect detection module for defect detection; The sorting module is used to sort the vacuum blood collection tubes identified as having defects; The control module includes a host computer and a lower computer connected to the host computer, the lower computer is connected to the photoelectric sensor, the stepper motor, the transmission module, and the sorting module, and the host computer is installed with a defect detection module and a human-computer interaction module; The defect detection module includes image preprocessing, image segmentation and YOLOv5 target detection; the image preprocessing refers to converting the vacuum blood collection tube image taken by the industrial camera into a grayscale image by using the weighted average method, and then removing the image noise by using the Gaussian filtering method; The image segmentation refers to first removing the image background and the tube body by threshold processing, and then segmenting the defective target by edge detection; sending the segmented image to the YOLOv5 target detection model for defect detection, and finally synthesizing all the segmented images that have completed the detection to obtain the final vacuum blood collection tube defect detection result.

2. The vacuum blood collection tube defect detection system based on machine vision according to claim 1, characterized in that: The threshold processing selects truncation threshold processing as the threshold processing algorithm through comparative analysis; truncation threshold processing is to set the pixel points greater than the threshold as the threshold, and the pixel points less than or equal to the threshold remain unchanged; truncation threshold Thresh is the threshold, src(x,y) is the input image pixel.

3. The vacuum blood collection tube defect detection system based on machine vision according to claim 2, characterized in that: The edge detection is implemented using the Canny operator. First, Gaussian filtering is performed. Then the Sobel operator is used to calculate the horizontal gradient G of the image x and the vertical gradient G y , and then calculate the magnitude G and direction θ of the image gradient. Then, the non-maximum suppression method is used to traverse each pixel point, retaining the local maximum value with the same gradient direction and suppressing all other gradient values, and finally removing the weak edges from the edge image.

4. The vacuum blood collection tube defect detection system based on machine vision according to claim 3, characterized in that: The weak edge is removed from the edge image by using a double threshold method to set two high and low thresholds. When the target edge pixel gradient value is greater than the high threshold, the point is determined to be a strong edge point; when the target edge pixel gradient value is less than the low threshold, the point is suppressed; when the target edge pixel gradient value is between the high and low thresholds, the point needs to be marked and further judged. If the point is connected to the strong edge point, the point is set as a strong edge point; if the point is not connected to the strong edge point, the point is suppressed.

5. The vacuum blood collection tube defect detection system based on machine vision according to claim 1, characterized in that: The sorting module is implemented by a cylinder.

6. The vacuum blood collection tube defect detection system based on machine vision according to claim 1, characterized in that: A defective storage box is provided below the sorting module, and a qualified storage box is provided at the end of the conveying module.

7. The vacuum blood collection tube defect detection system based on machine vision according to claim 1, characterized in that: The lower computer adopts a PLC controller.

Citation Information

Patent Citations

  • Practical training system and method for intelligent detection of industrial defects

    CN115999959A

  • Ceramic cup defect detection method and system

    CN117474886A