Automatic glass tube inspection method and inspection machine

By using cameras with different focal lengths in a 90° layout to capture front and back images of the glass tube, the problem of blind spots and low efficiency in the existing technology is solved, achieving accurate detection of the glass tube and simplifying the mechanical structure, reducing costs and space occupation.

CN118655157APending Publication Date: 2024-09-17BEIJING DAHENG IMAGE VISION CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410794717.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing glass tube quality screening equipment has blind spots, low efficiency, high cost, and takes up a large space. It is also difficult to accurately detect the number and width of gas lines, resulting in missed detection and repeated counting problems.

Method used

Two sets of cameras with different focal lengths are used for shooting. The optical axis of the camera is arranged at 90°. The front and back images of the glass tube are taken from two mutually perpendicular directions. The real defects are determined through image comparison, the number of defects in the overlapping area is calculated, and the machine is simplified. type structure, reducing cost and space.

Benefits of technology

It achieves clear detection of glass tubes, accurately distinguishes the location and number of defects, avoids missing detection in blind areas, improves detection efficiency and accuracy, simplifies the mechanical structure, and reduces costs and space occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118655157A
    Figure CN118655157A
Patent Text Reader

Abstract

The invention discloses an automatic glass tube inspection method and an inspection machine, and relates to the technical field of inspection equipment, the inspection machine comprises a camera mounting mechanism and an adjusting mechanism, the camera mounting mechanism is provided with two groups of cameras with mutually vertical optical axes, each group comprises a short-focus camera and a long-focus camera, and a shooting light source is arranged opposite to each group of cameras; during inspection, two cameras with short focal lengths are used for respectively shooting a target glass tube from two mutually perpendicular directions to obtain front detection images, and then two cameras with long focal lengths are used for shooting from the same direction to obtain back detection images; comparing positions and definitions of all defects in the front detection image and the back detection image in the same shooting direction one by one, finding true defects in the images, and de-weighting the defects in the overlapped area shot twice to obtain the total number of the defects of the target glass tube; by means of the technical scheme, the front face and the back face of the glass tube can be clearly shot in the two perpendicular directions, the position of the defect is accurately distinguished, and the shooting blind area problem is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of inspection equipment, and more specifically, to an automatic glass tube inspection method and an inspection machine. Background Art

[0002] In the glass tube production line, the quality of the produced glass tubes needs to be manually screened. However, manual screening requires large investment and low efficiency, and the quality of the screening cannot be guaranteed. Especially for large-scale glass tube manufacturers, the problems in quality screening are an urgent problem to be solved in terms of the entire production process and production efficiency.

[0003] Items that need to be inspected in quality screening include nodules, stones, gas lines, streaks, dead material, wall thickness, diameter, etc. The existing equipment used to detect the above items is a three-camera layout. Since a light source needs to be set at the corresponding position when using camera detection, 4 cameras cannot be arranged for detection. When three cameras are evenly distributed for detection, the viewing angle of each camera is close to 120°. After measurement and verification in actual operation, the field of view angle of the camera is only 90° on the cylindrical surface. Therefore, there will be blind spots in the actual use of three-camera evenly distributed detection, and if the camera focuses on the front and back surfaces of the glass tube at the same time, the image effects of the front and back surfaces cannot be optimal, and there is a risk of missed detection. In addition, in the three-camera layout, when multiple cameras capture the same gas line, it is difficult to distinguish the front and back focus, and the position of the gas line in different camera images is uncertain. The gas line will also appear in the image. The problem of superposition, so it is difficult to accurately integrate the existing defects, and there may be a situation where the number of gas lines is calculated too much or the gas line width is calculated inaccurately. Due to layout restrictions in the glass tube production line, the mechanical structure used for quality screening can only be open at one end. When the glass tube product needs to be replaced, it is necessary to extend and retract it to change the product. Therefore, the existing mechanical structure is inefficient, costly, and occupies a large space. If a flip-cover mechanical structure is used, it is necessary to flip the cover back and forth when changing products. A camera is set on the cover, and flipping the cover back and forth will cause the camera position to be inaccurate, affecting the detection effect. Summary of the invention

[0004] The purpose of this application is to utilize the characteristics of different shooting effects achieved by different camera focuses, and to adjust the camera focal length to achieve clear shooting of the front and back of the detection tube from one direction. Two cameras form a group, and two groups of cameras are arranged at 90° to solve the problem of blind spots. Each camera focuses on a single side of the glass tube, and there is no need to consider the front and back sides, thereby ensuring the clarity of the gas lines and the comprehensiveness of the positions, solving the problem of inaccurate calculation of the number and width of the gas lines. This layout simplifies the machine structure, reduces costs, and reduces floor space.

[0005] The technical solution of the present application is to provide a glass tube automatic inspection method, the method comprising:

[0006] Step 1, using two cameras with short focal lengths to photograph the target glass tube from a first direction and a second direction respectively, to collect front detection images of the target glass tube in the first direction and the second direction;

[0007] Step 2, using two cameras with long focal lengths to photograph the target glass tube from a first direction and a second direction, respectively, to collect back detection images of the target glass tube in the first direction and the second direction;

[0008] Step 3, compare the positions of all defects in the front inspection image and all defects in the corresponding back inspection image under the same shooting direction one by one, for any target defect in the front inspection image or the back inspection image, find the defect to be compared from the other inspection image, when there is no defect to be compared, determine that the current target defect is a true defect, when there is a defect to be compared, find the same position defect from the defects to be compared, determine that the current target defect and the defect with the highest clarity among all the same position defects are true defects, and delete the remaining defects, when there is no same position defect among the defects to be compared, find similar defects, determine that the defect with the largest column coordinate range among the current target defect and the similar defects is a true defect, and delete the remaining defects, when there is no similar defect among the defects to be compared, the current defect is a true defect, after all the target defects in the front inspection image or the back inspection image are completely found, the remaining defects in the other inspection image are all true defects;

[0009] Step 4, divide the overlapping area captured in the inspection image, and calculate the true defect number of the overlapping area in the front inspection image and the true defect number of the overlapping area in the back inspection image, take the maximum value of the two as the defect number of the overlapping area, and add the defect number of the overlapping area with the defect number of the non-overlapping area to obtain the total number of defects of the target glass tube.

[0010] Furthermore, step 1 includes: taking a point on the central axis of the target glass tube as the center, setting camera No. 1 and camera No. 3 at positions with the same distance in the first direction and the second direction, respectively, so that the optical axis of camera No. 1, the optical axis of camera No. 3 and the central axis of the target glass tube are perpendicular to each other and intersect at one point, setting a light source on the other side of the glass tube opposite to the camera, adjusting the camera focus to the front surface of the target glass tube, turning on the light source and using camera No. 1 and camera No. 3 to shoot the target glass tube at the same time to obtain a front detection image.

[0011] Furthermore, step 2 includes: on the same side of camera No. 1 and camera No. 3 and in a direction parallel to the central axis of the target glass tube, respectively arranging camera No. 2 and camera No. 4, so that the optical axis of camera No. 2, the optical axis of camera No. 4 and the central axis of the target glass tube are perpendicular to each other and intersect at one point, adjusting the camera focus to the rear surface of the target glass tube, setting the time difference t according to the distance between camera No. 1 and camera No. 2, and after the front detection image is taken, after an interval of t, turning on the light source and using camera No. 2 and camera No. 4 to respectively and simultaneously shoot the rear surface of the target glass tube to obtain a back detection image of the target glass tube.

[0012] Furthermore, step 3 specifically includes the following steps:

[0013] Step 3.1, set the first threshold value, based on the starting row coordinates R1 and the ending row coordinates R2 of the defect, compare all defects in the front detection image with all defects in the corresponding back detection image one by one, for any target defect in the front detection image or the back detection image, find the defect that meets the first threshold condition from the other detection image as the subsequent defect to be compared, and execute step 3.2. When there is no defect that meets the first threshold condition in the other detection image, determine that the current target defect is a true defect, wherein the first threshold condition is that the difference between R1 and R2 in the two images is less than the first threshold value, and the true defect in step 3.1 does not participate in the next step of comparison analysis;

[0014] Step 3.2, set the second threshold value, compare the current target defect with the defect to be compared one by one based on the starting column coordinate C1 and the ending column coordinate C2 of the defect, find the defect that meets the second threshold condition from the defects to be compared as the same-position defect, determine whether the clarity of the current target defect is greater than the clarity of all the same-position defects, if it is greater, determine the current target defect as a true defect, otherwise determine the defect with the highest clarity among the same-position defects as a true defect, delete the defects other than the true defects in the same-position defects, and when there is no defect that meets the second threshold condition among the defects to be compared, execute step 3.3, wherein the second threshold condition is that the difference between C1 and C2 in the two images is less than the second threshold value;

[0015] Step 3.3, searching for defects that meet the third threshold condition or the inclusion condition from the defects to be compared as similar defects, determining whether the column coordinate range of the current target defect is greater than all similar defects, if greater, determining the current target defect to be a true defect, otherwise determining the defect with the largest column coordinate range among the similar defects to be a true defect, and deleting defects other than true defects among the similar defects, wherein the third threshold condition is that one and only one of the difference between C1 and C2 in the two images is less than the threshold, and the inclusion condition is that there is an inclusion relationship with the column coordinate range of the current target defect, and when there is no similar defect among the defects to be compared, determining the current defect to be a true defect;

[0016] After all target defects in the front inspection image or the back inspection image are searched and compared, the remaining defects in the other inspection image that do not meet the second threshold condition, the third threshold condition and the inclusion condition are all true defects.

[0017] Furthermore, step 4 specifically includes:

[0018] Step 4.1: divide the overlapping area in the image according to the diameter of the target glass tube. The overlapping area includes area 1 and area 3. Calculate the number of defects in the overlapping area according to the number of true defects in the front detection image and the back detection image:

[0019] n=max(Sa1+Sa3,Sb1+Sb3)

[0020] Where n is the number of defects in the overlapping area, Sa1 is the sum of the true defects in area 1 captured by camera 1 and camera 2, Sa3 is the sum of the true defects in area 3 captured by camera 1 and camera 2, Sb1 is the sum of the true defects in area 1 captured by camera 3 and camera 4, Sb3 is the sum of the true defects in area 3 captured by camera 3 and camera 4, and max() represents the maximum value operation;

[0021] Step 4.2, add the number of defects in the overlapping area and the number of defects in the non-overlapping area to obtain the total number of defects in the current shooting section of the target glass tube.

[0022] The present application also provides a glass tube automatic inspection machine for performing the glass tube automatic inspection method, the inspection machine comprising: an adjustment mechanism, a camera mounting mechanism, a camera, a light source, a frame and a software detection system;

[0023] The camera mounting mechanism is fixed on the adjusting mechanism and is used for supporting the target glass tube and fixing the camera and the light source;

[0024] The adjustment mechanism is installed inside the frame and is used to adjust the detection position of the camera according to the position of the target glass tube;

[0025] The cameras include a first camera group and a second camera group, and the two cameras are respectively mounted on a camera mounting mechanism, wherein the first camera group includes a first camera and a second camera, a straight line where the center of the first camera and the center of the second camera are located is parallel to the central axis of the target glass tube, and an optical axis of the first camera and an optical axis of the third camera intersect vertically at the central axis of the target glass tube, and the second camera group includes a third camera and a fourth camera, a straight line where the center of the third camera and the center of the fourth camera are located is parallel to the central axis of the target glass tube, and an optical axis of the third camera and an optical axis of the fourth camera intersect vertically at the central axis of the target glass tube, and the first camera group and the second camera group are used to collect detection images of the front and back sides of the target glass tube from two mutually perpendicular angles;

[0026] The light source is used to provide shooting light source for the first group of cameras and the second group of cameras;

[0027] The software detection system is used to analyze and summarize the detection images and obtain detection data.

[0028] Further, the adjustment mechanism includes a first sliding assembly, a second sliding assembly and a bracket;

[0029] The first sliding assembly is arranged on a side of the bracket close to the target glass tube and is connected to the camera mounting mechanism, and is used to adjust the position of the camera mounting mechanism in the vertical direction;

[0030] The second sliding assembly is arranged at the bottom of the bracket and connected to the frame, and is used for adjusting the position of the camera mounting mechanism in the horizontal direction.

[0031] Further, the camera mounting mechanism comprises a base frame, a flip cover, a first camera mounting frame, a second camera mounting frame, a first light source mounting frame, and a second light source mounting frame, wherein a product support is arranged on the base frame;

[0032] The base frame is connected to the first sliding assembly, and the flip cover is installed on the base frame, and the flip cover is used to provide an operating space for re-threading the target glass tube;

[0033] The first camera mounting bracket is fixed at the middle position of the lower end of the base frame, the second camera mounting bracket is fixed at the middle position of the base frame on one side close to the adjustment mechanism, the first light source mounting bracket is fixed at the other side of the glass tube opposite to the first camera mounting bracket, and the second light source mounting bracket is fixed at the other side of the glass tube opposite to the second camera mounting bracket.

[0034] Furthermore, the inspection machine also includes an electrical cabinet, an air conditioner and an internal control module. The electrical cabinet is used to provide protection and isolation for the electrical equipment, the air conditioner is used to dissipate heat for the automatic glass tube inspection machine, and the control module is used to control the coordinated work of various modules of the automatic glass tube inspection machine.

[0035] Furthermore, the automatic glass tube inspection machine is used to perform the method of any one of claims 1-5.

[0036] The inventors of the present application discovered during the research and development process that the glass tube images captured by the three cameras with a shooting angle of view close to 120° in the prior art are unable to distinguish the location of defects. Since the glass tube is a transparent cylindrical tube and the three cameras have different shooting directions, such a layout will not only result in missed shots due to the camera angle of view not reaching 120°, but will also increase the overlapping area of ​​the shots, causing the same defect to appear in different positions in the three images. Therefore, when counting defects, the same defect will be counted repeatedly and defects will be missed, which is very unfavorable for the subsequent rejection of glass tubes, and will cause problems such as the inability to reject waste materials and waste of good materials due to the wrong number and position of defects. During the research and development process, the inventors of the present application discovered that different defects will appear in the glass tube images taken from the same direction by two cameras with different focal lengths, and the clarity of the defects is different. By comparing the two images, it is possible to more accurately distinguish whether the defects are on the front or back, and whether the defects are repeated. Since the camera viewing angle does not reach 120°, setting two groups of such cameras with optical axes perpendicular to each other can achieve the best shooting effect, which can avoid missed inspections due to blind spots in shooting, and can more conveniently divide the areas of repeated shooting and deduplicate, ultimately obtaining the accurate number and location of defects.

[0037] The beneficial effects of this application are:

[0038] First, the technical solution in the present application can clearly capture the front and back of the glass tube from one direction through cameras with different focal lengths. Each camera only focuses on a single side of the glass tube, and there is no need to take into account both the front and back sides. The effect of the captured image is optimal, and the specific position, quantity and outline size of the defects can be accurately distinguished based on the coordinate data and clarity of the defects in the image. The technical solution in the present application solves the problem that the defects on the front and back sides cannot be distinguished and the defect positions are uncertain in the prior art, ensures the clarity and comprehensiveness of the defects, solves the problem of inaccurate calculation of the number and width of gas lines, and facilitates subsequent waste rejection operations.

[0039] Second, the technical solution in the present application uses two groups of cameras to shoot the target glass tube from two mutually perpendicular directions respectively. The optical axes of the two groups of cameras are arranged at 90°, which can avoid the blind spots of the three-camera use in the prior art and solve the problem of missed detection. Moreover, the vertical layout of the optical axes of the two groups of cameras can more conveniently divide the overlapping areas of the shooting. The number of defects obtained after deduplication of the overlapping areas is more accurate, which is beneficial to the subsequent waste rejection operation and avoids the inability to reject waste and waste of good materials due to errors in the number and position of defects.

[0040] Third, the technical solution in the present application simplifies the structure of the inspection machine through the layout of two groups of cameras. A flap is provided on the camera mounting mechanism to facilitate the tube threading operation, which makes it more convenient to replace the glass tube and re-thread the tube after truncation. It solves the problem in the prior art that due to the limitation of camera layout and the mechanical structure that can only be opened at one end, the tube threading can only be operated by extending and retracting. The opening and closing of the flap does not move the position of the camera and will not affect the inspection results. The layout in the technical solution of the present application can also reduce costs, reduce floor space, facilitate operation, and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The advantages of the above and / or additional aspects of the present application will become apparent and easily understood in the description of the embodiments in conjunction with the following drawings, in which:

[0042] Figure 1 is a structural schematic diagram of a glass tube automatic inspection machine according to an embodiment of the present application;

[0043] Figure 2 is a structural schematic diagram of an adjustment mechanism according to an embodiment of the present application;

[0044] Figure 3 is a structural schematic diagram of a camera mounting mechanism according to an embodiment of the present application;

[0045] Figure 4 is a longitudinal cross-sectional view of a camera mounting mechanism according to an embodiment of the present application;

[0046] Figure 5 is an overlapping area division diagram of a detection image according to an embodiment of the present application;

[0047] Figure 6 is an original image and a defect detection image of camera No. 1 according to an embodiment of the present application;

[0048] Figure 7 is an original image and a defect detection image of a second camera according to an embodiment of the present application;

[0049] Figure 8 is an analysis comparison diagram of an image taken by camera No. 1 and an image taken by camera No. 2 according to an embodiment of the present application;

[0050] Fig. 9 is an original image and a defect detection image of a camera No. 3 according to an embodiment of the present application;

[0051] Fig.10 is an original image and a defect detection image of camera No. 4 according to an embodiment of the present application;

[0052] Fig.11is an analysis comparison diagram of an image taken by a third camera and an image taken by a fourth camera according to an embodiment of the present application;

[0053] Fig.12 is a comparative analysis diagram of defects in an overlapping area according to an embodiment of the present application;

[0054] Fig.13 is an analysis diagram of detection images of camera No. 1 and camera No. 2 according to one embodiment of the present application;

[0055] Fig.14 is an analysis diagram of detection images of camera No. 3 and camera No. 4 according to one embodiment of the present application;

[0056] Among them, 1-adjustment mechanism, 11-first sliding assembly, 12-second sliding assembly, 13-bracket, 2-camera mounting mechanism, 21-base, 211-product support, 22-flip cover, 23-first camera mounting frame, 24-second camera mounting frame, 25-first light source mounting frame, 26-second light source mounting frame, 3-camera, 31-first group of cameras, 32 second group of cameras, 4-light source, 41-first light source, 42-second light source, 5-electrical cabinet, 6-rack, 7-software detection system, 8-air conditioning, 9-target glass tube. DETAILED DESCRIPTION

[0057] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0058] In the following description, many specific details are elaborated to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present application is not limited to the specific embodiments disclosed below.

[0059] like Figures 1 to 4 As shown, this embodiment provides an automatic glass tube inspection machine, which includes: an adjustment mechanism 1, a camera installation mechanism 2, a camera 3, a light source 4, a frame 6 and a software detection system 7.

[0060] The camera mounting mechanism 2 is fixed on the adjusting mechanism 1, and is used to support the target glass tube 9 and fix the camera 3 and the light source 4. The adjusting mechanism 1 is installed inside the frame 6, and is used to adjust the detection position of the camera according to the position of the target glass tube 9. The camera 3 is used to collect detection images of the front and back of the target glass tube 9 from two mutually perpendicular angles. The light source 4 is used to provide a shooting light source for the camera 3 to ensure clear imaging. The software detection system 7 is used to analyze and summarize the detection images to obtain detection data.

[0061] like Figure 2 As shown, the adjustment mechanism 1 includes a first sliding component 11, a second sliding component 12 and a bracket 13. The first sliding component 11 is arranged on a side of the bracket 13 close to the target glass tube 9, the second sliding component 12 is arranged at the bottom of the bracket 13, and the camera mounting mechanism 2 is fixedly connected to the first sliding component 11.

[0062] The first sliding assembly 11 is used to adjust the position of the camera mounting mechanism 2 in the vertical direction, and includes a first slide groove and a first slider. The first slide groove is fixed on both sides of the side of the bracket 13 close to the target glass tube 9, and is slidably connected to the first slider. The camera mounting mechanism 2 is fixedly connected to the first slider. When the first slider slides along the first slide groove, it drives the camera mounting mechanism 2 to move in the vertical direction, so as to adjust the detection position of the camera in the vertical direction. The second sliding assembly 12 is used to adjust the position of the camera mounting mechanism 2 in the horizontal direction, and includes a second slide groove and a second slider. The second slide groove is fixedly connected to the frame 6 through its bottom support structure. The second slider is slidably connected to the second slide groove, and the bracket 13 is installed on the second slider. When the second slider slides along the second slide groove, the bracket 13 moves in the horizontal direction, drives the camera mounting mechanism 2 to move, so as to adjust the detection position of the camera in the horizontal direction.

[0063] like Figure 3 As shown, the camera mounting mechanism 2 includes a base frame 21, a flip cover 22, a first camera mounting frame 23, a second camera mounting frame 24, a first light source mounting frame 25, and a second light source mounting frame 26, wherein a product support 211 is provided on the base frame 21.

[0064] The base frame 21 is fixedly connected to the first slider in the first sliding assembly 11, and the flip cover 22 is installed on the base frame 21 and forms a circular ring structure with the base frame 21. The flip cover 22 is used to provide an operating space for re-threading the target glass tube 9. The target glass tube 9 transmitted during the inspection process passes through the center of the circular ring structure. The base frame 21 is provided with a product support 211 for supporting the target glass tube 9 during the inspection process. A groove is provided at one end of the product support 211 close to the center of the circular ring structure. The transmitted target glass tube 9 is set in the groove. When the base frame 21 is used to support the target glass tube 9, it is necessary to adjust the camera mounting mechanism 2 according to the position of the target glass tube 9 so that the position of the groove on the product support 211 coincides with the position of the target glass tube 9. When the target glass tube 9 is broken or replaced, the flip cover 22 is opened to place the glass tube on the product support 211, and the flip cover 22 is closed to complete the replacement.

[0065] The first camera mounting frame 23 is fixed at the middle position of the lower end of the base frame 21 and is located directly below the target glass tube 9. The second camera mounting frame 24 is fixed at the middle position of the base frame 21 on the side close to the adjustment mechanism 1. The vertical line between the first camera mounting frame 23 and the target glass tube 9 and the vertical line between the second camera mounting frame 24 and the target glass tube 9 intersect vertically at the central axis of the target glass tube 9. The first light source mounting frame 25 is fixed at the middle position of the upper end of the base frame 21 and is located directly opposite to the first camera mounting frame 23. The second light source mounting frame 26 is fixed at the middle position of the side of the base frame 21 away from the adjustment mechanism 1 and is located directly opposite to the second camera mounting frame 24.

[0066] The camera 3 includes a first group of cameras 31 and a second group of cameras 32, and the two groups of cameras are randomly installed on two different camera mounting frames. The optical axes of the first group of cameras 31 and the second group of cameras 32 are both perpendicular to the central axis of the target glass tube 9, and the optical axes of the first group of cameras 31 and the second group of cameras 32 are perpendicular to each other.

[0067] The first camera group 31 includes camera No. 1 and camera No. 2, which are mounted side by side on one of the camera mounting frames, and the straight line where the center of camera No. 1 and the center of camera No. 2 are located is parallel to the central axis of the target glass tube 9, that is, the vertical distances between the two cameras and the central axis of the target glass tube 9 are equal. The second camera group 32 includes camera No. 3 and camera No. 4, which are mounted side by side on another camera mounting frame, and the straight line where the center of camera No. 3 and the center of camera No. 4 are located is parallel to the central axis of the target glass tube 9. Among them, the optical axis of camera No. 1 and the optical axis of camera No. 3 intersect vertically at the central axis of the target glass tube 9, and the optical axis of camera No. 3 and the optical axis of camera No. 4 intersect vertically at the central axis of the target glass tube 9.

[0068] The light source 4 includes a first light source 41 and a second light source 42, which are randomly mounted on two different light source mounting frames. The first light source 41 provides light for a group of cameras directly opposite it, and the second light source 42 provides light for another group of cameras directly opposite it.

[0069] The frame 6 is used to support and install the glass tube automatic inspection machine components and other electronic equipment.

[0070] The automatic glass tube inspection machine also includes an electrical cabinet 5, an air conditioner 8 and an internal control module. The electrical cabinet 5 is used to provide protection and isolation for the electrical equipment to prevent the influence of external environmental factors on the equipment. The air conditioner 8 is used to dissipate heat for the automatic glass tube inspection machine. The control module is used to control the various modules of the automatic glass tube inspection machine to work together to complete the detection of the target glass tube 9.

[0071] This embodiment also provides an inspection method for a glass tube automatic inspection machine, the method comprising:

[0072] Step 1: Use two short-focal-length cameras to photograph the target glass tube from a first direction and a second direction respectively, and collect front detection images of the target glass tube in the first direction and the second direction, wherein the first direction and the second direction are perpendicular to each other.

[0073] Taking the point on the central axis of the target glass tube as the center, camera No. 1 and camera No. 3 are respectively set at the same distance in two mutually perpendicular directions, and the two mutually perpendicular directions are used as the first direction and the second direction. A light source is set on the other side of the glass tube opposite to the camera, and the positions of the cameras are adjusted so that the optical axes of camera No. 1, camera No. 3 and the central axis of the target glass tube are perpendicular to each other and intersect at one point. The focal lengths of the two cameras are adjusted so that the focus is located on the surface of the target glass tube close to the camera side, and the surface of the target glass tube close to the camera side is used as the front surface of the glass tube.

[0074] After the inspection starts, the control module simultaneously triggers camera No. 1, camera No. 3 and the light source arranged opposite to the cameras, uses the light source corresponding to camera No. 1 and camera No. 3 to illuminate the target glass tube, uses camera No. 1 and camera No. 3 to simultaneously photograph the front surface of the target glass tube from the first direction and the second direction respectively, obtains the front detection image of the target glass tube and uploads it to the software detection system 7, and turns off the light source after the shooting is completed.

[0075] Step 2: Use two cameras with long focal lengths to photograph the target glass tube from a first direction and a second direction, respectively, to collect back detection images of the target glass tube in the first direction and the second direction.

[0076] Using the method in step 1, camera No. 2 and camera No. 4 are respectively arranged on the same side of camera No. 1 and camera No. 3 and in a direction parallel to the central axis of the target glass tube, wherein the spacing between camera No. 1 and camera No. 2 is the same as the spacing between camera No. 3 and camera No. 4. The positions of the cameras are adjusted so that the optical axes of camera No. 2, camera No. 4 and the central axis of the target glass tube are perpendicular to each other and intersect at one point. The focal lengths of the two cameras are adjusted so that the focal points are located on the surface of the target glass tube away from the cameras, and the surface of the target glass tube away from the cameras is used as the rear surface of the glass tube.

[0077] According to the distance between two cameras in the same direction (i.e., the distance between camera No. 1 and camera No. 2), the time difference t is set, and after the front detection image is taken, the control module triggers camera No. 2, camera No. 4, and the light source set opposite to the camera at the same time, and uses the light source corresponding to camera No. 2 and camera No. 4 to illuminate the target glass tube, and uses camera No. 2 and camera No. 4 to simultaneously take pictures of the rear surface of the target glass tube from the first direction and the second direction respectively, to obtain the back detection image of the target glass tube and upload it to the software detection system 7, and turns off the light source after the shooting is completed. Among them, camera No. 1 and camera No. 2 share a set of light sources, and camera No. 3 and camera No. 4 share a set of light sources. The corresponding light source is turned on when camera No. 1 takes pictures, and the light source is turned on again when camera No. 2 takes pictures, and the light source corresponding to camera No. 3 and camera No. 4 is the same.

[0078] In this embodiment, there is a certain distance between the two cameras in the same direction. If you want to determine the real defects based on the front detection image and the back detection image, you need to use a short-focal-length camera and a long-focal-length camera to successively shoot the same section of the glass tube. The glass tube moves at a constant speed, so for the same section of the glass tube, at a certain interval, camera No. 1 and camera No. 2 shoot from the same direction relative to the glass tube, and the same applies to camera No. 3 and camera No. 4.

[0079] In this embodiment, a first camera group 31 and a second camera group 32 are respectively installed on the first camera mounting frame 23 and the second camera mounting frame 24 of the camera mounting mechanism 2, wherein the first camera group 31 includes a first camera and a second camera, and the distance between the two cameras is l, and the second camera group 32 includes a third camera and a fourth camera, and the distance between the two cameras is l. A first light source 41 is correspondingly arranged on the first light source mounting frame 25 directly opposite to the first camera group 31, and a second light source 42 is correspondingly arranged on the second light source mounting frame 26 directly opposite to the second camera group 32. The position of the camera mounting mechanism 2 is adjusted by the adjustment mechanism 1 so that the center of the target glass tube is located on the supporting position of the product support 211 in the camera mounting mechanism 2, and the positions of the above four cameras are adjusted so that the connecting line between camera No. 1 and camera No. 2 and the connecting line between camera No. 3 and camera No. 4 are parallel to the central axis of the target glass tube, the optical axes of camera No. 1 and camera No. 3 intersect at the central axis of the target glass tube, the optical axes of camera No. 1, camera No. 3 and the central axis of the target glass tube are perpendicular to each other, the optical axes of camera No. 2 and camera No. 4 intersect at the central axis of the target glass tube, the optical axes of camera No. 2, camera No. 4 and the central axis of the target glass tube are perpendicular to each other, and the vertical distances between each camera and the central axis of the target glass tube are the same, so that all cameras can clearly and completely capture the image of the current section of the target glass tube.

[0080] In this embodiment, camera No. 1 and camera No. 2 share the first light source 41, and camera No. 3 and camera No. 4 share the second light source 42. The light sources are respectively controlled by external triggers of the corresponding cameras, and the light sources are triggered synchronously when the cameras are triggered. Since there is a distance difference l between the two cameras in each group, the light sources will not affect each other's shooting effects when they are turned on.

[0081] The shooting interval of the camera is set according to the tube length of the target glass tube that can be photographed by the camera. The shooting interval of each camera is the same. The shooting time difference between the first shooting and the second shooting is set according to the camera spacing l and the transmission speed v of the target glass tube. The formula is as follows:

[0082] t=l / v

[0083] Wherein, t is the shooting time difference between the first shooting and the second shooting, l is the distance between the two cameras included in each camera group (i.e., the distance between camera No. 1 and camera No. 2, and the distance between camera No. 3 and camera No. 4), and v is the transmission speed of the target glass tube.

[0084] In this embodiment, since the target glass tube is transmitted at the same speed, and the two cameras in the same camera group are used to shoot the front surface and the back surface of the target glass tube respectively, in order to determine the position and number of defects according to the front detection image and the back detection image of the target glass tube in the subsequent analysis, in one shooting cycle, the two cameras in the same camera group need to shoot at the same position of the target glass tube, so the shooting time difference between the first shooting and the second shooting is set, and after the first shooting of the No. 1 camera and the No. 3 camera, the second camera and the No. 4 camera shoot the second time after the interval time t. Among them, the No. 1 camera and the No. 3 camera shoot the front surface of the target glass tube to obtain the front detection image, and the No. 2 camera and the No. 4 camera shoot the back surface of the target glass tube to obtain the back detection image. In this embodiment, when any camera shoots, the light source set opposite to it will be triggered to turn on, such as when the No. 1 camera shoots, the first light source 41 is turned on at the same time, and is turned off after the shooting is completed, and when the No. 2 camera shoots, the first light source 41 is turned on at the same time, and is turned off after the shooting is completed, and the No. 3 camera and the No. 4 camera are the same, which will not be repeated here. In this embodiment, a high-precision timing control card can be provided in the control module, and the high-precision timing control card is used to control the opening and closing of the camera and its corresponding light source by means of external triggering.

[0085] Step 3, comparing the defects of the front detection image and the corresponding back detection image under the same shooting direction, and determining the true defects in the front detection image and the back detection image.

[0086] In this embodiment, since the target glass tube is transparent, the same defects will be captured when inspecting the front and back surfaces of the tube. In order to determine the location of the defects and avoid repeated counting, it is necessary to perform defect deduplication processing based on the location, size and clarity of the defects in the image, so as to screen out the real defects. Therefore, it is necessary to compare and analyze the front inspection image and the back inspection image of the target glass tube, and determine the location of the defects and the number of defects based on the analysis results.

[0087] Image processing technology (convolutional neural network, YOLO series and other processing technologies may be used) is used to extract all defects in the image, and coordinates of the extracted defects are marked, including the row coordinates and column coordinates of the starting point of the defect, and the row coordinates and column coordinates of the end point. In the software detection system 7, the defects in the front detection image and the corresponding defects in the back detection image are compared and analyzed one by one. The steps of comparison and analysis specifically include:

[0088] Step 3.1, compare the positions of all defects in the front detection image with those in the corresponding back detection image under the same shooting direction one by one. For any target defect in the front detection image or the back detection image, find the defect to be compared from the other detection image. When there is no defect to be compared, determine that the current target defect is a true defect. When there is a defect to be compared, execute step 3.2. The true defect in step 3.1 does not participate in the next comparison analysis.

[0089] A first threshold is set according to the coordinate system used by the image. The first threshold is a threshold of the row coordinate difference. The defect in the image includes a starting point and an end point. The row coordinate of the starting point is represented by R1, and the row coordinate of the end point is represented by R2. Based on the row coordinates of the starting point R1 and the row coordinates of the end point R2 of the defect, all defects in the front detection image are compared with all defects in the corresponding back detection image one by one. For any target defect in the front detection image or the back detection image, a defect that meets the first threshold condition is found from the other detection image as a subsequent defect to be compared, and step 3.2 is executed. When there is no defect that meets the first threshold condition in the other detection image, the current target defect is determined to be a true defect, wherein the first threshold condition is that the difference of R1 and the difference of R2 in the two images are both less than the first threshold, and the true defect in step 3.1 does not participate in the next step of comparison analysis;

[0090] In this embodiment, when the difference between the starting row coordinates R1 and the ending row coordinates R2 of the defects in the two images are both less than the set threshold, it means that the positions of the rows where the defects are located in the two images are close, and there is a possibility of repeated shooting, and the next step of comparative analysis is required. In the above step 3.1, all defects in the front detection image and the back detection image need to be compared once, and the defects that meet the conditions are found for the next step of comparative analysis. Other defects that are not close in position are determined to be true defects. True defects determined by this step do not participate in the comparative analysis of step 3.2.

[0091] Step 3.2, compare the current target defect with the defects to be compared one by one, find the co-located defects from the defects to be compared, determine the current target defect and the defect with the highest clarity among all co-located defects as the true defect, and delete the remaining defects. When there is no co-located defect among the defects to be compared, execute step 3.3;

[0092] The starting column coordinate of the defect in the image is represented by C1, and the ending column coordinate is represented by C2. A second threshold is set, which is the threshold of the column coordinate difference. Based on the starting column coordinate C1 and the ending column coordinate C2 of the defect, the current target defect is compared with the defect to be compared one by one, and the defect that meets the second threshold condition is found from the defects to be compared as the co-located defect, and it is determined whether the clarity of the current target defect is greater than the clarity of all co-located defects. If it is greater, the current target defect is determined to be a true defect, otherwise the defect with the highest clarity among the co-located defects is determined to be a true defect, and defects other than true defects in the co-located defects are deleted. The deleted defects do not participate in the subsequent comparison and analysis. When there is no defect that meets the second threshold condition among the defects to be compared, step 3.3 is executed, wherein the second threshold condition is that the difference between C1 and C2 in the two images is less than the second threshold.

[0093] Step 3.3, search for similar defects from the defects to be compared, determine the defect with the largest column coordinate range among the current target defect and similar defects as the true defect, and delete the remaining defects. When there is no similar defect among the defects to be compared, the current defect is the true defect.

[0094] Find defects that meet the third threshold condition or the inclusion condition from the defects to be compared as similar defects, determine whether the column coordinate range of the current target defect is greater than all similar defects, if greater, determine the current target defect as a true defect, otherwise determine the defect with the largest column coordinate range among the similar defects as a true defect, and delete defects other than true defects among the similar defects. Among them, the third threshold condition is that one and only one of the difference between C1 and C2 in the two images is less than the threshold, and the inclusion condition is that there is an inclusion relationship with the column coordinate range of the current target defect. When there is no similar defect among the defects to be compared, determine the current defect as a true defect.

[0095] After all target defects in the front inspection image or the back inspection image are searched and compared, the remaining defects in the other inspection image that do not meet the second threshold condition, the third threshold condition and the inclusion condition are all true defects.

[0096] In this embodiment, since the glass tube is transparent and the two cameras in the same group have different focuses, the defects on the back surface of the glass tube photographed by the camera with a close focus position are discontinuous, which will cause the column coordinate range of one defect to be included in the column coordinate range of another defect.

[0097] According to the defect analysis results in the above steps, the positions and numbers of defects in the front detection image and the back detection image are determined, and the number and position data of true defects on the front and back surfaces of the target glass tube are obtained.

[0098] Step 4, divide the overlapping area captured in the inspection image, and calculate the true defect number of the overlapping area in the front inspection image and the true defect number of the overlapping area in the back inspection image, take the maximum value of the two as the defect number of the overlapping area, and add the defect number of the overlapping area with the defect number of the non-overlapping area to obtain the total number of defects of the target glass tube.

[0099] Since the target glass tube is photographed from two perpendicular directions, the overlapping areas will be captured, so the same defect will appear in different positions in different images, such as Fig.12 As shown, when the number of true defects in step 3 is directly added, the number of defects will be double-counted. Therefore, it is necessary to remove the number of defects in the overlapping area of ​​the image. According to the requirements of the later glass tube rejection, the overlapping area in the image is just the repeated gas line, but the number of true defects obtained by analysis is not double-counted. Therefore, when calculating the total number of defects, it is only necessary to take out the calculated value with the larger data in the overlapping area. Calculating the total number of defects of the target glass tube includes the following steps:

[0100] Step 4.1, dividing the overlapping area in the image according to the diameter of the target glass tube, and calculating the number of defects in the overlapping area according to the number of true defects in the front detection image and the number of true defects in the back detection image;

[0101] like Figure 5 As shown, according to the diameter of the target glass tube, the target glass tube in the image is divided into three areas according to a certain ratio. Areas 1 and 3 on both sides of the target glass tube are overlapping areas, and area 2 in the middle is a non-overlapping area. When shooting from two mutually perpendicular directions, area 1 and area 3 will be repeatedly shot by two groups of cameras.

[0102] The number of defects n in the overlapping area is calculated as:

[0103] n=max(Sa1+Sa3,Sb1+Sb3)

[0104] In the formula, n is the number of defects in the overlapping area, Sa1 is the number of true defects in area one photographed by the first group of cameras 31 (that is, the sum of the true defects in area one photographed by camera No. 1 and camera No. 2), Sa3 is the number of true defects in area three photographed by the first group of cameras 31, Sb1 is the number of true defects in area one photographed by the second group of cameras 32, Sb3 is the number of true defects in area three photographed by the second group of cameras 32, and max() represents the operation of the maximum value.

[0105] Step 4.2, add the number of defects in the overlapping area and the number of defects in the non-overlapping area to obtain the total number of defects in the current shooting section of the target glass tube.

[0106] The number of defects n in the overlapping area is added to the number of true defects in the non-overlapping area in the front detection image and the back detection image, and the maximum value of the defects in the overlapping area is added to the number of defects in the non-overlapping area 2 to obtain the total number of defects in the glass tube segment photographed in the current cycle.

[0107] In subsequent operations, the rejection device cuts and rejects the glass tube according to the rejection requirements and the above-mentioned defect data. When the target glass tube is broken or replaced, it is necessary to re-thread the tube. The flip cover 22 in the camera mounting mechanism 2 is opened, and the glass tube is placed on the product support 211 therein. The flip cover 22 is closed to complete the threading.

[0108] In this embodiment, since the optical axis of the camera is perpendicular to the central axis of the glass tube, in addition to the above-mentioned function of detecting defects in the glass tube, the inspection machine and detection method in this embodiment can also measure the size and wall thickness of the glass tube through two groups of cameras arranged vertically.

[0109] The actual inspection equipment is capable of detecting scratches, air lines, stones, nodules, streaks and other defect types caused during the glass tube production process. It can classify the glass tube defects according to their size, location, quantity, length, etc. and determine whether to remove them.

[0110] This embodiment takes the detection of gas line defects in a glass tube as an example, and photographs a section of the target glass tube.

[0111] Table 1. Image comparison results between camera 1 and camera 2

[0112]

[0113] like Figure 6 and Fig. 9 As shown, the front detection image of the glass tube is captured by using the No. 1 camera and the No. 3 camera with close focal positions; Figure 7 and Fig.10As shown, the back detection image of the glass tube is taken by using the second camera and the fourth camera with a far focus position; Figure 8 As shown, the images taken by camera No. 1 and camera No. 2 are compared; Fig.11 As shown, the images taken by camera 3 and camera 4 are compared. The overlapping areas are marked with blue lines and the defects are marked with red lines.

[0114] The comparison results of the images taken by camera No. 1 and camera No. 2 are shown in Table 1. In the table, the data in the coding column represents: camera number-image number-gas line number. For example, 0-0-300 means the gas line numbered 300 in the first image taken by camera No. 1, and 1-0-300 means the gas line numbered 300 in the first image taken by camera No. 2.

[0115] like Fig.13 As shown, taking the comparison of the images taken by camera 1 and camera 2 as an example, the first threshold is set to 20, the second threshold is set to 120, the starting row coordinate R1 of the gas line 0-0-300 in the front detection image is 55, and the end row coordinate R2 is 60. After comparing the defects in the back detection image one by one, it is found that the starting row coordinate R1 of the gas line 1-0-300 is 52, and the end row coordinate R2 is 57. The row coordinate difference of the two gas lines is less than the set threshold 20, then the next step is to compare the column coordinate data of the two gas lines, 0-0-300. The starting point column coordinate C1 of the gas line is 1147, and the ending point column coordinate C2 is 1912. The starting point column coordinate C1 of gas line 1-0-300 is 1251, and the ending point column coordinate C2 is 1911. The difference between the starting point column coordinate C1 and the ending point column coordinate C2 of the two gas lines is less than the set threshold value 120. Compared with the clarity of the current two gas lines, the clarity of gas line 0-0-300 is 6.66, and the clarity of gas line 1-0-300 is 2.67. Therefore, gas line 0-0-300 is determined to be the true gas line, and gas line 1-0-300 is deleted.

[0116] The comparison results of the images taken by the third camera and the fourth camera are shown in Table 2:

[0117] Table 2. Image comparison results of camera 3 and camera 4

[0118]

[0119] The comparison results of the images taken by the third camera and the fourth camera are shown in Table 2 and Fig.14As shown, the starting row coordinate R1 of the gas line 3-0-304 in the back detection image is 258, and the ending row coordinate R2 is 268. The corresponding gas lines 2-0-307 and 2-0-308 in the front detection image are the gas lines to be compared. After comparing the column coordinate data one by one, it is found that the gas lines 2-0-307 and 2-0-308 do not meet the first threshold condition or the second threshold condition, but the gas line 2-0-308 and the gas line 3-0-304 meet the inclusion relationship, so the gas line 2-0-307 with a large column coordinate range is determined to be the true gas line. By analogy, all the true gas lines of the glass tube are found.

[0120] It can be seen from Table 1 that the gas line No. 300 photographed by camera No. 1 and the gas line No. 300 photographed by camera 2 are the same gas line, and there is repeated shooting. Similarly, it can be seen that 0-0-301, 0-0-302, 0-0-305, 0-0-306 photographed by camera No. 1 correspond to 1-0-301, 1-0-303, 1-0-306, 1-0-307 photographed by camera No. 2, respectively, and 0-0-304 photographed by camera No. 1 corresponds to 1-0-304 photographed by camera No. 2. As shown in Table 2, 2-0-301 photographed by the third camera and 3-0-300 photographed by the fourth camera are the same gas line, 2-0-304 photographed by the third camera and 3-0-302 photographed by the fourth camera are the same gas line, 2-0-307 photographed by the third camera and 3-0-304 photographed by the fourth camera are the same gas line, 2-0-308 photographed by the third camera and 3-0-305 photographed by the fourth camera are the same gas line, and the same gas line is counted only once, and so on to find all the true gas lines of the glass tube, and obtain the position and number of the true gas lines. Then, according to the number of true defects on the front and back sides, the gas lines in the overlapping area of ​​the image are deduplicated to obtain the total number of defects of the target glass tube for subsequent rejection operations.

[0121] The steps in this application can be adjusted in order, combined, and deleted according to actual needs.

[0122] The units in the device of the present application can be combined, divided and deleted according to actual needs.

[0123] Although the present application is disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and are not intended to limit the application of the present application. The scope of protection of the present application is defined by the appended claims and may include various modifications, alterations and equivalents made to the invention without departing from the scope and spirit of the present application.

Claims

1. A glass tube automatic inspection method, characterized in that: The automatic glass tube inspection method comprises: Step 1, using two cameras with short focal lengths to photograph the target glass tube from a first direction and a second direction respectively, to collect front detection images of the target glass tube in the first direction and the second direction; Step 2, using two cameras with long focal lengths to photograph the target glass tube from the first direction and the second direction, respectively, to collect back detection images of the target glass tube in the first direction and the second direction; Step 3, compare the positions of all defects in the front inspection image and all defects in the corresponding back inspection image under the same shooting direction one by one, for any target defect in the front inspection image or the back inspection image, find the defect to be compared from the other inspection image, when there is no defect to be compared, determine that the current target defect is a true defect, when there is a defect to be compared, find the same position defect from the defects to be compared, determine that the current target defect and the defect with the highest clarity among all the same position defects are true defects, and delete the remaining defects, when there is no same position defect among the defects to be compared, find similar defects, determine that the defect with the largest column coordinate range among the current target defect and the similar defects is a true defect, and delete the remaining defects, when there is no similar defect among the defects to be compared, the current defect is a true defect, after all the target defects in the front inspection image or the back inspection image are completely found, the remaining defects in the other inspection image are all true defects; Step 4, divide the overlapping area captured in the inspection image, and calculate the true defect number of the overlapping area in the front inspection image and the true defect number of the overlapping area in the back inspection image, take the maximum value of the two as the defect number of the overlapping area, and add the defect number of the overlapping area with the defect number of the non-overlapping area to obtain the total number of defects of the target glass tube.

2. The automatic glass tube inspection method according to claim 1, characterized in that: The step 1 comprises: taking a point on the central axis of the target glass tube as the center, setting a camera No. 1 and a camera No. 3 at positions with the same distance in the first direction and the second direction respectively, so that the optical axis of the camera No. 1, the optical axis of the camera No. 3 and the central axis of the target glass tube are perpendicular to each other and intersect at one point, setting a light source on the other side of the glass tube opposite to the camera, adjusting the camera focus to the front surface of the target glass tube, turning on the light source and using the camera No. 1 and the camera No. 3 to shoot the target glass tube at the same time to obtain a front detection image.

3. The automatic glass tube inspection method according to claim 2, characterized in that: The step 2 comprises: setting a No. 2 camera and a No. 4 camera respectively on the same side of the No. 1 camera and the No. 3 camera and in a direction parallel to the central axis of the target glass tube, so that the optical axis of the No. 2 camera, the optical axis of the No. 4 camera and the central axis of the target glass tube are perpendicular to each other and intersect at one point, adjusting the camera focus to the rear surface of the target glass tube, setting a time difference t according to the distance between the No. 1 camera and the No. 2 camera, and after an interval of t after the front detection image is taken, turning on the light source and using the No. 2 camera and the No. 4 camera to respectively and simultaneously take pictures of the rear surface of the target glass tube to obtain a back detection image of the target glass tube.

4. The automatic glass tube inspection method according to claim 3, characterized in that: The step 3 specifically includes the following steps: Step 3.1, set a first threshold value, based on the starting row coordinates R1 and the ending row coordinates R2 of the defect, compare all defects in the front detection image with all defects in the corresponding back detection image one by one, for any target defect in the front detection image or the back detection image, find a defect that meets the first threshold condition from the other detection image as a subsequent defect to be compared, and execute step 3.2, when there is no defect that meets the first threshold condition in the other detection image, determine that the current target defect is a true defect, wherein the first threshold condition is that the difference between R1 and R2 in the two images is less than the first threshold value, and the true defect in step 3.1 does not participate in the next step of comparison analysis; Step 3.2, set the second threshold value, compare the current target defect with the defect to be compared one by one based on the starting column coordinate C1 and the ending column coordinate C2 of the defect, find the defect that meets the second threshold condition from the defects to be compared as the same-position defect, determine whether the clarity of the current target defect is greater than the clarity of all the same-position defects, if it is greater, determine the current target defect as a true defect, otherwise determine the defect with the highest clarity among the same-position defects as a true defect, delete the defects other than the true defects in the same-position defects, and when there is no defect that meets the second threshold condition among the defects to be compared, execute step 3.3, wherein the second threshold condition is that the difference between C1 and C2 in the two images is less than the second threshold value; Step 3.3, searching for defects that meet the third threshold condition or the inclusion condition from the defects to be compared as similar defects, determining whether the column coordinate range of the current target defect is greater than all similar defects, if greater, determining the current target defect to be a true defect, otherwise determining the defect with the largest column coordinate range among the similar defects to be a true defect, and deleting defects other than true defects among the similar defects, wherein the third threshold condition is that one and only one of the difference between C1 and C2 in the two images is less than the threshold, and the inclusion condition is that there is an inclusion relationship with the column coordinate range of the current target defect, and when there is no similar defect among the defects to be compared, determining the current defect to be a true defect; After all target defects in the front inspection image or the back inspection image are searched and compared, the remaining defects in the other inspection image that do not meet the second threshold condition, the third threshold condition and the inclusion condition are all true defects.

5. The automatic glass tube inspection method according to claim 4, characterized in that: The step 4 specifically includes: Step 4.1: divide the overlapping area in the image according to the diameter of the target glass tube. The overlapping area includes area 1 and area 3. Calculate the number of defects in the overlapping area according to the number of true defects in the front detection image and the back detection image: n=max(Sa1+Sa3,Sb1+Sb3) Where n is the number of defects in the overlapping area, Sa1 is the sum of the true defects in area 1 captured by camera 1 and camera 2, Sa3 is the sum of the true defects in area 3 captured by camera 1 and camera 2, Sb1 is the sum of the true defects in area 1 captured by camera 3 and camera 4, Sb3 is the sum of the true defects in area 3 captured by camera 3 and camera 4, and max() represents the maximum value operation; Step 4.2, add the number of defects in the overlapping area and the number of defects in the non-overlapping area to obtain the total number of defects in the current shooting section of the target glass tube.

6. An automatic glass tube inspection machine for executing the automatic glass tube inspection method according to claims 1 to 5, characterized in that: The inspection machine comprises: an adjustment mechanism (1), a camera installation mechanism (2), a camera (3), a light source (4), a frame (6) and a software detection system (7); The camera mounting mechanism (2) is fixed on the adjustment mechanism (1) and is used to support the target glass tube and fix the camera (3) and the light source (4); The adjustment mechanism (1) is installed inside the frame (6) and is used to adjust the detection position of the camera according to the position of the target glass tube; The camera (3) comprises a first camera group (31) and a second camera group (32), and the two camera groups are respectively mounted on the camera mounting mechanism (2), wherein the first camera group (31) comprises a first camera and a second camera, the straight line where the center of the first camera and the center of the second camera are located is parallel to the central axis of the target glass tube, and the optical axis of the first camera and the optical axis of the third camera intersect vertically at the central axis of the target glass tube, and the second camera group (32) comprises a third camera and a fourth camera, the straight line where the center of the third camera and the center of the fourth camera are located is parallel to the central axis of the target glass tube, and the optical axis of the third camera and the optical axis of the fourth camera intersect vertically at the central axis of the target glass tube, and the first camera group (31) and the second camera group (32) are used to collect detection images of the front and back sides of the target glass tube from two mutually perpendicular angles; The light source (4) is used to provide shooting light source for the first group of cameras (31) and the second group of cameras (32); The software detection system (7) is used to analyze and summarize the detection images to obtain detection data.

7. The automatic glass tube inspection machine according to claim 6, characterized in that: The adjustment mechanism (1) comprises a first sliding component (11), a second sliding component (12) and a bracket (13); The first sliding assembly (11) is arranged on a side of the bracket (13) close to the target glass tube and is connected to the camera mounting mechanism (2) and is used to adjust the position of the camera mounting mechanism (2) in the vertical direction; The second sliding assembly (12) is arranged at the bottom of the bracket (13) and is connected to the frame (6) and is used to adjust the position of the camera mounting mechanism (2) in the horizontal direction.

8. The automatic glass tube inspection machine according to claim 7, characterized in that: The camera mounting mechanism (2) comprises a base frame (21), a flip cover (22), a first camera mounting frame (23), a second camera mounting frame (24), a first light source mounting frame (25), and a second light source mounting frame (26), wherein a product support (211) is provided on the base frame (21); The base frame (21) is connected to the first sliding assembly (11), and the flip cover (22) is installed on the base frame (21), and the flip cover (22) is used to provide an operating space for re-threading the target glass tube; The first camera mounting frame (23) is fixed at the middle position of the lower end of the base frame (21), the second camera mounting frame (24) is fixed at the middle position of the base frame (21) on one side close to the adjustment mechanism (1), the first light source mounting frame (25) is fixed at the other side of the glass tube directly opposite to the first camera mounting frame (23), and the second light source mounting frame (26) is fixed at the other side of the glass tube directly opposite to the second camera mounting frame (24).

9. The automatic glass tube inspection machine according to claim 6, characterized in that: The inspection machine further comprises an electrical cabinet (5), an air conditioner (8) and an internal control module. The electrical cabinet (5) is used to provide protection and isolation for electrical equipment, the air conditioner (8) is used to dissipate heat for the automatic glass tube inspection machine, and the control module is used to control the coordinated operation of various modules of the automatic glass tube inspection machine.

10. The automatic glass tube inspection machine according to claim 6, characterized in that: The automatic glass tube inspection machine is used to execute the method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Detection equipment and detection method for large sealing ring

    CN120404762A