Method for detecting appearance defects of a metal bellows

By combining a side vision system and a feeding mechanism with image processing technology, the automated detection of appearance defects in metal corrugated pipes has been achieved. This solves the shortcomings of manual inspection, improves inspection efficiency and product quality, and reduces labor costs.

CN116748163BActive Publication Date: 2026-04-28RES INST OF ZHEJIANG UNIV TAIZHOU
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
RES INST OF ZHEJIANG UNIV TAIZHOU
Filing Date
2023-07-28
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In the existing technology, the detection of appearance defects in metal corrugated pipes relies on manual visual inspection, which has problems such as high visual requirements, high labor intensity, low efficiency and high randomness of manual judgment, resulting in unstable product quality and potential safety hazards.

Method used

The system employs a side vision system and a feeding mechanism in conjunction with inspection grippers to achieve automated non-contact inspection through image acquisition and processing. It utilizes four sets of vision imaging acquisition modules to acquire images of the corrugated pipe at different positions, and combines the Hough circle finding algorithm and grayscale threshold binarization technology to automatically sort good and defective products.

Benefits of technology

It has enabled automated detection of appearance defects in metal bellows, reducing manual workload, improving detection efficiency, ensuring product quality, and reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116748163B_ABST
    Figure CN116748163B_ABST
Patent Text Reader

Abstract

The application discloses a kind of appearance defect detection methods of metal bellows, including host computer, side visual system, feeding frame, feeding mechanism, detection mobile module, mobile wheel group, detection visual system, discharging mechanism and discharging frame, host computer is electrically connected with side visual system, feeding mechanism, detection mobile module, detection visual system, discharging mechanism respectively, the application realizes the automation non-contact optical detection to the appearance of semi-finished metal bellows, according to appearance detection result to bellows is sorted, rejects good product, solve the drawbacks existing in manual detection, to ensure product quality;Meanwhile, the application greatly reduces manual workload, reduces labor cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of testing and relates to a method for detecting appearance defects in metal bellows. Background Technology

[0002] Metal corrugated pipes are a type of pipe with a regular, wavy shape. They are used for connecting pipes to other pipes or connecting pipes to equipment in situations where it is inconvenient to install them with fixed elbows. During the manufacturing process, metal corrugated pipes may have black or gray defects in their appearance. If these corrugated pipes with black or gray defects are not removed and enter the market, they are easily oxidized during use, leading to thinning of the pipe wall and even the appearance of leaks. This seriously affects the quality of the corrugated pipe products and also poses significant safety hazards.

[0003] Currently, manual visual inspection is commonly used to fully inspect annealed corrugated pipes. The semi-finished corrugated pipes with black and gray defects are picked out manually. Manual inspection has the following shortcomings: (1) High visual requirements; (2) High labor intensity, which is harmful to the eyes; (3) Manual judgment is highly random, and the quality of corrugated pipes cannot be guaranteed; (4) Low efficiency, the continuous working time cannot be too long, which affects production efficiency; (5) The increasingly high labor costs also bring great pressure to enterprises. Summary of the Invention

[0004] In order to overcome the shortcomings of the prior art, the present invention provides a method for detecting appearance defects in metal bellows.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for detecting appearance defects in metal bellows, comprising the following steps:

[0006] Step 1: Transform the image coordinates located by the side vision system into the physical coordinates of the loading mechanism;

[0007] Step 2: Transport the loading frame containing the corrugated pipe to be inspected to the loading area where the loading mechanism is located. The host computer inputs the length, width, and height parameters of the loading frame, as well as the outer diameter and length parameters of the corrugated pipe to be inspected inside the loading frame.

[0008] Step 3: The side vision system acquires images of the corrugated pipe to be inspected for visual positioning detection, obtains the positioning coordinates of the corrugated pipe to be inspected, and sends the positioning coordinates to the feeding mechanism;

[0009] Step 4: Based on the length parameters of the corrugated pipe to be inspected, adjust the distance between the two sets of feeding gripper mechanisms. The host computer controls the feeding motion module to move the feeding gripper to the positioning coordinate position in Step 3. The feeding gripper picks up the corrugated pipe to be inspected and moves it to the upper discharge position after picking it up.

[0010] Step 5: The host computer starts the detection and clamping moving module, which controls the detection gripper to move until the detection gripper's sensor determines that the detection gripper has reached the upper discharge position. The detection and clamping moving module then stops moving, the detection gripper clamps the corrugated pipe to be tested, the feeding gripper releases the corrugated pipe to be tested, and the feeding mechanism returns to the starting position.

[0011] Step 6: The detection gripper moving module controls the detection gripper to move in the reverse direction to straighten the bellows to be tested;

[0012] Step 7: The host computer starts the moving module, which moves the corrugated pipe to be tested toward the inspection vision system. The corrugated pipe position detection sensor detects that the corrugated pipe to be tested has reached the inspection preparation position. The moving module continues to move, and the host computer starts the cylinder to control the roller to move from the initial position to the designated position to support and restrict the corrugated pipe to be tested. The moving module moves the corrugated pipe to be tested to the inspection position.

[0013] Step 8: The start of the mobile module is triggered by the host computer to collect images from four sets of visual imaging acquisition modules. The four sets of visual imaging acquisition modules collect images of different positions on the circumference and axis of the corrugated pipe under test and perform appearance inspection. The appearance inspection results are then sent to the unloading mechanism.

[0014] Step 9: The moving module moves the measured corrugated pipe to the lower discharge position, the moving module stops running, and the host computer triggers the four sets of vision imaging acquisition modules to stop acquiring images;

[0015] Step 10: The host computer controls the unloading mechanism to move to the lower discharge position. The unloading mechanism picks up the tested corrugated pipe from the detection gripper and places the tested corrugated pipe in the good product frame or the defective product frame according to the appearance inspection results.

[0016] Step 11: End of steps.

[0017] Furthermore, the corrugated pipe to be inspected is placed in the loading frame, with the shooting direction of the side vision system facing the loading frame, and the side panel of the loading frame facing the side vision system is made of transparent material.

[0018] Furthermore, the feeding motion module is connected to the feeding gripper mechanism. The feeding motion module is set as a spatial motion module, which controls the movement of the feeding gripper mechanism in three directions in space. The host computer controls the feeding gripper mechanism to move from the feeding start position to the feeding position of the corrugated pipe to be inspected through the feeding motion module. After the corrugated pipe is clamped, the feeding gripper mechanism and the clamped corrugated pipe move to the upper discharge position.

[0019] Furthermore, the four sets of visual imaging acquisition modules are spatially distributed as follows: on the plane containing the circumference of the corrugated pipe, the four sets of visual imaging acquisition modules are arranged in a ring around the central axis of the corrugated pipe, and the included angle between adjacent visual imaging acquisition modules is 90°. The detection direction of the four sets of visual imaging acquisition modules is towards the corrugated pipe. On the plane containing the axial direction of the corrugated pipe, the four sets of visual imaging acquisition modules are spaced apart from each other by a set distance along the axial direction of the corrugated pipe.

[0020] Furthermore, the transformation of the image coordinates of the side vision system to the physical coordinates of the feeding mechanism in step 1 specifically includes the following steps:

[0021] Step 1.1: Place the empty loading frame into the inspection area of ​​the side vision system;

[0022] The detection surface of the loading frame is parallel to the shooting surface of the side vision system; the object distance of the side vision system reaches the set value and the focus is clear; the shooting surface of the side vision system is parallel to the XZ plane of the loading gripper.

[0023] Step 1.2: The host computer controls the feeding mechanism to clamp the pipe and move it to 9 points within the feeding frame and records the actual coordinates of the 9 points. The side vision system collects 9 images of the 9 points. The distribution of the superimposed feature patterns in the 9 images is consistent with the distribution of the pipe moving to the 9 points within the feeding frame.

[0024] The pipe is rigid and straight, the length of the pipe matches the feeding frame, and the outer diameter is the same as the corrugated pipe to be inspected;

[0025] Step 1.3: Using the Hough circle algorithm, find the circles in the detection area of ​​each of the 9 images and obtain the center pixel coordinates. The center pixel coordinates are the image pixel coordinates of the points in the 9 images, and the image pixel coordinates of the points correspond one-to-one with the actual coordinates.

[0026] Step 1.4: Obtain the transformation matrix between the image pixel coordinates and the actual coordinates of the same point;

[0027] Step 1.5: Use the transformation matrix obtained in Step 4 to convert the image pixel coordinates of the 9 points into the physical coordinates of the 9 points in the feeding mechanism 3;

[0028] Step 1.6: Compare the physical coordinates of the 9 points obtained in Step 5 with the actual coordinates of the 9 points to obtain statistical data. If the statistical data is within the threshold range, the transformation matrix is ​​deemed valid, the transformation matrix is ​​saved, and the 9-point calibration process ends; otherwise, the 9-point calibration transformation is deemed abnormal, and Step 1.2 is executed again for recalibration.

[0029] Furthermore, in step 6, whether the corrugated pipe under test is straightened is determined by whether the motor of the clamping and moving module reaches the set torque value. If the motor reaches the set torque value, it is determined that the corrugated pipe under test has been straightened. If the motor does not reach the set torque value, it is determined that the corrugated pipe under test has not been straightened, and the motor continues to move until the torque value is reached.

[0030] Furthermore, in step 8, the visual imaging acquisition module acquires images continuously at a certain frequency, and the appearance detection of a single frame image includes the following steps:

[0031] Step 8.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white.

[0032] Step 8.2: Based on the imaging area of ​​the corrugated pipe in the field of view, extract the detection area image. The length of the detection area image is the same as the length of the imaging area of ​​the corrugated pipe, the width is 1.5 times the width of the imaging area of ​​the corrugated pipe, and the center is at the center of the imaging area of ​​the corrugated pipe.

[0033] Step 8.3: Reduce the size of the detection area image extracted in Step 8.2 by 1 / 4 to obtain a reduced image. The gray value of each pixel in the reduced image is the average of the gray values ​​of the four adjacent pixels above, below, left, and right in the original image before reduction.

[0034] Step 8.4: Perform grayscale threshold binarization on the reduced image to obtain a grayscale image. Compare whether the grayscale value of each pixel in the grayscale image is greater than a set value. If yes, set the grayscale value of this pixel to 255; otherwise, set the grayscale value of this pixel to 0.

[0035] Step 8.5: Extract the outer contour of the grayscale image to obtain the outer contour set. The outer contour includes the overall imaging contour of the corrugated pipe edge and the interference contour with a small number of points.

[0036] Step 8.6: Traverse the outer contour set and extract the overall imaging contour of the bellows edge. The overall imaging contour of the bellows edge is the contour with the most points.

[0037] Step 8.7: Calculate the minimum bounding rectangle of the overall imaging profile of the bellows edge, and obtain the parameters of the minimum bounding rectangle, including the center, rotation angle, length and width of the minimum bounding rectangle;

[0038] Step 8.8: Extract the detection area image of the object to be tested from the detection area image in Step 8.2 based on the minimum bounding rectangle parameter and the field of view setting spacing value;

[0039] Step 8.9: Perform median filtering on the image of the detection area of ​​the object to be tested to obtain a median-filtered image;

[0040] Step 8.10: Perform grayscale threshold binarization on the median-filtered image to obtain a grayscale binarized image. Compare whether the grayscale value of the pixel in the grayscale binarized image is greater than the set value. If yes, set the grayscale value of this pixel to 255. If no, set the grayscale value of this pixel to 0.

[0041] Step 8.11: Perform morphological closing operation on the grayscale binarized image to filter out black regions with connected regions whose area is smaller than the set area value, and obtain a new region image;

[0042] Step 8.12: Extract the contours of the new region image to obtain a contour set, which includes an outer contour set and an inner contour set contained within the closed outer contour.

[0043] Step 8.13: Traverse the contour set in Step 8.12, extract the outer contour and inner contour with the most points, and record the number of points on the outer contour and the inner contour. The outer contour and inner contour are the imaging contours of the detection area of ​​the object to be measured.

[0044] Step 8.14: Determine whether the number of outer contour points obtained in Step 8.13 is greater than the set number of outer contour points. If yes, it is determined that there is a gray-black defect and the gray-black defect is adhered to the boundary. If no, proceed to Step 8.15.

[0045] Step 8.15: Determine whether the number of inner contour points obtained in step 8.13 is greater than the set number of inner contour points. If yes, it is determined that there is a black and gray defect; if no, it is determined that there is no black and gray defect.

[0046] Furthermore, the value is set to 30 in step 8.4.

[0047] Furthermore, in step 8.8, the center of the detection area image of the object to be tested is the center of the minimum bounding rectangle, the length is 4 times the length of the minimum bounding rectangle, the width is the field of view setting spacing, the attitude angle is the rotation angle of the minimum bounding rectangle, and the field of view setting spacing value is determined according to the pixel spacing corresponding to the imaging of the radial 1 / 4 annular surface of the corrugated pipe.

[0048] Furthermore, in step 8.11, the area setting value is set to the area of ​​4 pixels.

[0049] In summary, the advantages of this invention are:

[0050] This invention enables automated, non-contact optical inspection of the appearance of semi-finished metal corrugated pipes. Simultaneously, the corrugated pipes are sorted based on the appearance inspection results, eliminating defective products and overcoming the drawbacks of manual inspection, thereby ensuring product quality. At the same time, this invention greatly reduces the amount of manual labor and lowers labor costs. Attached Figure Description

[0051] Figure 1This is a schematic diagram of the appearance defect detection device of the present invention.

[0052] Figure 2 This is a schematic diagram of the appearance defect detection device of the present invention.

[0053] Figure 3 This is a schematic diagram of the moving wheel assembly and detection vision system of the present invention.

[0054] Figure 4 This is a schematic diagram of the moving wheel assembly and detection vision system of the present invention.

[0055] Figure 5 This is a flowchart of the detection method of the present invention.

[0056] Figure 6 This is a flowchart of the single-frame image detection and localization process of the side vision system of the present invention.

[0057] Figure 7 This is a flowchart of the appearance detection process for a single frame image using the detection vision system of the present invention. Detailed Implementation

[0058] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0059] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0060] In this embodiment of the invention, all directional indicators (such as up, down, left, right, front, back, lateral, longitudinal, etc.) are only used to explain the relative positional relationship and movement of each component in a specific posture. If the specific posture changes, the directional indicator will also change accordingly.

[0061] Due to installation errors and other reasons, the parallel relationship referred to in the embodiments of the present invention may actually be an approximate parallel relationship, and the perpendicular relationship may actually be an approximate perpendicular relationship.

[0062] Example 1:

[0063] like Figure 1-4As shown, a device for detecting appearance defects in metal corrugated pipes includes a host computer, a side vision system 1, a feeding frame 2, a feeding mechanism 3, a detection moving module 4, a moving wheel set 5, a detection vision system 6, a unloading mechanism 7, and an unloading frame 8. The host computer is electrically connected to the side vision system 1, the feeding mechanism 3, the detection moving module 4, the detection vision system 6, and the unloading mechanism 6, respectively.

[0064] The corrugated pipe to be inspected is placed in the loading frame 2. The shooting direction of the side vision system 1 is facing the loading frame 2. The side plate of the loading frame 2 facing the side vision system 1 is made of transparent material so that the side vision system 1 can capture images of the corrugated pipe in the loading frame 2 and realize the visual positioning and detection of the corrugated pipe.

[0065] The side vision system 1 acquires an image of the inspection surface of the loading frame 2, which includes an image of the corrugated pipe to be inspected. The side vision system 1 performs visual positioning detection on the image. The visual positioning detection includes detecting whether the loading frame is tilted, detecting the coordinates of the corrugated pipe image to be inspected, and converting the corrugated pipe image coordinates into the physical coordinates of the loading mechanism.

[0066] The feeding mechanism 3 includes a feeding motion module and a feeding gripper mechanism 34, which are connected. The feeding motion module is a spatial motion module that controls the movement of the feeding gripper mechanism 34 in three directions within space. The host computer controls the feeding gripper mechanism 34 to move from the feeding start position to the gripping coordinate of the corrugated pipe to be inspected through the feeding motion module. This gripping coordinate position is the feeding position. After the corrugated pipe is gripped, the feeding gripper mechanism 34 and the gripped corrugated pipe move to the upper discharge position. The feeding gripper mechanism 34 docks with the detection motion module 4 at the upper discharge position. In this embodiment, the upper discharge position is the same as the feeding start position, but this is not limited. In other embodiments, the two can be different.

[0067] The feeding gripper mechanism 34 includes a feeding gripper and a feeding photoelectric switch. The feeding photoelectric switch is used to determine whether the feeding gripper has moved to the feeding position. The feeding gripper mechanism 34 uses the feeding gripper to pick up the corrugated pipe to be inspected.

[0068] In this embodiment, the feeding gripper mechanism 34 includes two sets, and the two sets of feeding gripper mechanisms 34 operate independently to be suitable for gripping corrugated pipes of different lengths.

[0069] The feeding motion module includes a first feeding direction motion module 31, a second feeding direction motion module 32, and a third feeding direction motion module 33. Two sets of feeding gripper mechanisms 34 are respectively installed on the two sets of third feeding direction motion modules 33. The two sets of third feeding direction motion modules 33 drive the feeding gripper mechanisms 34 to move along the third direction. The two sets of third feeding direction motion modules 33 are respectively installed on the two sets of second feeding direction motion modules 32. The two sets of second feeding direction motion modules 32 drive the two sets of third feeding direction motion modules 33 to move along the second direction. The two sets of second feeding direction motion modules 32 are installed on the first feeding direction motion module 31. The first feeding direction motion module 31 drives the two sets of second feeding direction motion modules 32 to move synchronously along the first direction. The first feeding direction motion module 31 is installed on a bracket (not shown in the figure).

[0070] like Figure 1 The first direction is defined as the X direction, the second direction as the Y direction, and the third direction as the Z direction.

[0071] The detection moving module 4 includes a moving module 41, a detection gripping component 42, and a bellows position detection sensor 43. The detection gripping component 42 includes two sets, which are respectively installed on the moving module 41. The moving module 41 controls the two sets of detection gripping components 42 to move synchronously.

[0072] The detection gripping assembly 42 includes a detection gripping moving module 421, a detection gripper 422, and a detection gripper judgment sensor 423. The detection gripper 422 is installed in the detection gripping moving module 421, and the detection gripper judgment sensor 423 is installed in the detection gripper 422. The detection gripping moving module 421 controls the movement of the detection gripper 422.

[0073] The detection gripper judgment sensor 423 is used to determine whether the detection gripper 422 has reached the upper discharge position. When the detection gripper 422 is detected to have reached the upper discharge position, the detection gripping moving module 421 stops running.

[0074] The detection gripper 422 picks up the bellows on the feeding gripper mechanism 34 located at the upper discharge position.

[0075] To facilitate the inspection of the bellows' appearance by the vision system 6, two sets of inspection gripping moving modules 421 move in opposite directions to straighten the bellows. The torque value set by the motor of the inspection gripping moving module 421 is used to determine whether the bellows is straightened. The moving module 41 moves the inspection gripping component 42 with the straightened bellows to the location of the vision system 6. The bellows position detection sensor 43 is used to detect whether the bellows has reached the inspection preparation position.

[0076] The movable wheel set 5 is located between the detection movable module 4 and the detection vision system 6. The movable wheel set 5 includes two sets, which are symmetrically distributed vertically in the Z direction. The center line between the two sets of movable wheel sets 5 is collinear or approximately collinear with the center line of the bellows on the detection gripping assembly 42.

[0077] The movable wheel set 5 includes rollers 51, a cylinder 52 that controls the up and down movement of the rollers, and a roller position detection sensor 53. The roller position detection sensor 53 detects whether the rollers 51 have reached the initial position. When the rollers 51 are in the initial position, the distance between the two sets of rollers 51 is greater than the diameter of the bellows. The detection preparation position is located in front of the movable wheel set 5. Therefore, when the rollers 51 are in the initial position, the bellows reaches the detection preparation position, which can avoid the collision problem of the bellows and rollers 51.

[0078] The host computer controls the cylinder 52 to move down to the designated position according to the diameter of the bellows. The bellows continues to move between the two sets of rollers 51. As the bellows moves, the rollers 51 rotate, reducing the resistance on the bellows. The two sets of rollers 51 support and restrict the bellows in the Z direction, suppressing the bellows from shaking during movement, and ensuring that the image captured by the vision system 6 is clear.

[0079] The detection vision system 6 includes four sets of visual imaging acquisition modules 61. Each visual imaging acquisition module 61 includes an area array camera, a fixed-focus lens, and a dome light source. The four sets of visual imaging acquisition modules 61 are spatially distributed as follows: On the XZ plane (i.e., the plane containing the circumference of the corrugated pipe), the four sets of visual imaging acquisition modules 61 are evenly distributed in a ring around the central axis of the corrugated pipe, and the included angle between adjacent visual imaging acquisition modules 61 is 90°. The detection direction of the four sets of visual imaging acquisition modules 61 is towards the corrugated pipe. On the XY or YZ plane (i.e., the plane containing the axial direction of the corrugated pipe), the four sets of visual imaging acquisition modules 61 are spaced a certain distance apart from each other along the axial direction of the corrugated pipe to avoid interference from the lighting of the four sets of visual imaging acquisition modules 61.

[0080] The moving module 41 passes through the inspection preparation position and the moving wheel set 5 to reach the position of the inspection vision system 6, which is the inspection position. The four sets of vision imaging acquisition modules 61 acquire images of the corrugated pipe at different positions around the circumference and axis at the inspection position, and perform appearance inspection to determine whether there are defects in the appearance of the current corrugated pipe. According to the judgment result, the corrugated pipe is divided into good products and defective products. The moving module 41 restores the inspected corrugated pipe to its state before straightening and moves it to the lower discharge position. When the moving module 41 is at the lower discharge position, it docks with the unloading mechanism 7. The unloading frame 8 includes a good product frame 81 and a defective product frame 82. According to the judgment result, the host computer controls the unloading mechanism 7 to clamp and move the good corrugated pipe to the good product unloading position and place it in the good product frame 81, or clamp and move the defective corrugated pipe to the defective product unloading position and place it in the defective product frame 82.

[0081] The structure of the feeding mechanism 7 is the same as that of the feeding mechanism 3, and will not be described in detail here.

[0082] The moving direction of the moving module 41 and the detection and gripping moving module 421 is the Y direction.

[0083] The first direction motion module 31 for feeding, the second direction motion module 32 for feeding, the third direction motion module 33 for feeding, the moving module 41, and the detection and clamping moving module 421 adopt a transmission structure of ball screw and linear guide. The transmission structure of ball screw and linear guide is an existing structure, and this application does not improve the transmission structure. Therefore, the structure of the first direction motion module 31 for feeding and the second direction motion module 32 for feeding will not be described in detail here.

[0084] In other embodiments, the feeding motion module, the moving module 41, and the detection and clamping moving module 421 can be implemented by using a linear hydraulic cylinder with a hydraulic circuit, a motor with a conveyor belt, or other transmission methods. The present invention does not limit their specific transmission methods. This embodiment only provides one technical solution.

[0085] The installation device for the structure is omitted in the attached drawings of this application. The installation device can be a conventional mounting bracket, mounting plate, etc. The installation device is not an improvement of this application and will not be described in detail here.

[0086] like Figure 5-7 As shown, this application provides a method for detecting appearance defects in metal bellows, including the following steps:

[0087] Step 1: Transform the image coordinates located by the side vision system 1 into the physical coordinates of the feeding mechanism;

[0088] Step 2: Transport the loading frame 2 containing the corrugated pipes to be inspected to the loading area where the loading mechanism is located. The host computer inputs the length, width, and height parameters of the loading frame 2, as well as the outer diameter and length parameters of the corrugated pipes to be inspected inside the loading frame 2.

[0089] There are no restrictions on the input method; you can enter the information manually or by scanning a QR code.

[0090] Steps 1 and 2 above are preparations for detecting appearance defects in metal bellows. Generally, the length of the loading frame 2 is matched with the length of the bellows to prevent the bellows from moving in the direction of the loading frame 2 and becoming difficult to clamp.

[0091] Step 3: The side vision system 1 acquires the image of the corrugated pipe to be inspected for visual positioning detection, obtains the positioning coordinates of the corrugated pipe to be inspected, and sends the positioning coordinates to the feeding mechanism;

[0092] Step 4: Based on the length parameters of the corrugated pipe to be inspected, adjust the distance between the two sets of feeding gripper mechanisms 34. The host computer controls the feeding motion module to move the feeding gripper to the positioning coordinate position in Step 3. The feeding gripper picks up the corrugated pipe to be inspected and moves it to the upper discharge position after picking it up.

[0093] Step 5: The host computer starts the detection and clamping moving module 421. The detection and clamping moving module 421 controls the detection gripper 422 to move until the detection gripper judgment sensor 423 judges that the detection gripper 422 has reached the upper discharge position. The detection and clamping moving module 421 stops moving, the detection gripper 422 clamps the corrugated pipe to be tested, the feeding gripper releases the corrugated pipe to be tested, and the feeding mechanism returns to the starting position.

[0094] The starting position of the detection gripper 422 is located at the two ends of the detection gripping moving module 421 that are far apart from each other. When the detection gripping moving module 421 controls the detection gripper 422 to move, it moves towards the center of the two sets of detection gripping moving modules 421.

[0095] Step 6: The detection clamping moving module 421 controls the detection gripper 422 to move in the reverse direction to straighten the bellows to be tested;

[0096] Whether the corrugated pipe under test is straightened is determined by whether the motor of the clamping and moving module 421 reaches the set torque value. If the motor reaches the set torque value, it is determined that the corrugated pipe under test has been straightened. If the motor does not reach the set torque value, it is determined that the corrugated pipe under test has not been straightened. The motor continues to move until the torque value is reached.

[0097] Step 7: The host computer starts the moving module 41, which moves the corrugated pipe to be tested toward the inspection vision system 6. The corrugated pipe position detection sensor 43 detects that the corrugated pipe to be tested has reached the inspection preparation position. The moving module 41 continues to move. The host computer starts the cylinder 52 to control the roller 51 to move from the initial position to the designated position to support and restrict the corrugated pipe to be tested. The moving module 41 moves the corrugated pipe to be tested to the inspection position.

[0098] Step 8: The start of the moving module 41 is triggered by the host computer to collect images by four sets of visual imaging acquisition modules 61. The four sets of visual imaging acquisition modules 61 collect images of different positions of the circumference and axis of the corrugated pipe under test and perform appearance inspection. The appearance inspection results are sent to the unloading mechanism.

[0099] Step 9: The moving module 41 moves the measured corrugated pipe to the lower discharge position, the moving module 41 stops running, and the host computer triggers the four sets of visual imaging acquisition modules 61 to stop acquiring images.

[0100] Step 10: The host computer controls the unloading mechanism to move to the lower discharge position. The unloading mechanism picks up the tested corrugated pipe from the detection gripper 422 and places the tested corrugated pipe in the good product frame 81 or the defective product frame 82 according to the appearance inspection results.

[0101] Step 11: End of steps.

[0102] The appearance defect detection device prepared according to the above method includes a host computer, a side vision system 1, a feeding frame 2, a feeding mechanism 3, a detection moving module 4, a moving wheel group 5, a detection vision system 6, a unloading mechanism 7, and an unloading frame 8. The host computer is electrically connected to the side vision system 1, the feeding mechanism 3, the detection moving module 4, the detection vision system 6, and the unloading mechanism 6, respectively.

[0103] The corrugated pipe to be inspected is placed in the loading frame 2. The shooting direction of the side vision system 1 is facing the loading frame 2. The side plate of the loading frame 2 facing the side vision system 1 is made of transparent material so that the side vision system 1 can capture images of the corrugated pipe in the loading frame 2 and realize the visual positioning and detection of the corrugated pipe.

[0104] The side vision system 1 acquires an image of the inspection surface of the loading frame 2, which includes an image of the corrugated pipe to be inspected. The side vision system 1 performs visual positioning detection on the image, which includes detecting whether the loading frame is tilted, detecting the coordinates of the corrugated pipe image to be inspected, and converting the corrugated pipe image coordinates into the physical coordinates of the loading mechanism.

[0105] The feeding mechanism 3 includes a feeding motion module and a feeding gripper mechanism 34, which are connected. The feeding motion module is a spatial motion module that controls the movement of the feeding gripper mechanism 34 in three directions within space. The host computer controls the feeding gripper mechanism 34 to move from the feeding start position to the gripping coordinate of the corrugated pipe to be inspected through the feeding motion module. This gripping coordinate position is the feeding position. After the corrugated pipe is gripped, the feeding gripper mechanism 34 and the gripped corrugated pipe move to the upper discharge position. The feeding gripper mechanism 34 docks with the detection motion module 4 at the upper discharge position. In this embodiment, the upper discharge position is the same as the feeding start position, but this is not limited. In other embodiments, the two can be different.

[0106] The feeding gripper mechanism 34 includes a feeding gripper and a feeding photoelectric switch. The feeding photoelectric switch is used to determine whether the feeding gripper has moved to the feeding position. The feeding gripper mechanism 34 uses the feeding gripper to pick up the corrugated pipe to be inspected.

[0107] In this embodiment, the feeding gripper mechanism 34 includes two sets, and the two sets of feeding gripper mechanisms 34 operate independently to be suitable for gripping corrugated pipes of different lengths.

[0108] The feeding motion module includes a first feeding direction motion module 31, a second feeding direction motion module 32, and a third feeding direction motion module 33. Two sets of feeding gripper mechanisms 34 are respectively installed on the two sets of third feeding direction motion modules 33. The two sets of third feeding direction motion modules 33 drive the feeding gripper mechanisms 34 to move along the third direction. The two sets of third feeding direction motion modules 33 are respectively installed on the two sets of second feeding direction motion modules 32. The two sets of second feeding direction motion modules 32 drive the two sets of third feeding direction motion modules 33 to move along the second direction. The two sets of second feeding direction motion modules 32 are installed on the first feeding direction motion module 31. The first feeding direction motion module 31 drives the two sets of second feeding direction motion modules 32 to move synchronously along the first direction. The first feeding direction motion module 31 is installed on a bracket (not shown in the figure).

[0109] like Figure 1 The first direction is defined as the X direction, the second direction as the Y direction, and the third direction as the Z direction.

[0110] The detection moving module 4 includes a moving module 41, a detection gripping component 42, and a bellows position detection sensor 43. The detection gripping component 42 includes two sets, which are respectively installed on the moving module 41. The moving module 41 controls the two sets of detection gripping components 42 to move synchronously.

[0111] The detection gripping assembly 42 includes a detection gripping moving module 421, a detection gripper 422, and a detection gripper judgment sensor 423. The detection gripper 422 is installed in the detection gripping moving module 421, and the detection gripper judgment sensor 423 is installed in the detection gripper 422. The detection gripping moving module 421 controls the movement of the detection gripper 422.

[0112] The detection gripper judgment sensor 423 is used to determine whether the detection gripper 422 has reached the upper discharge position. When the detection gripper 422 is detected to have reached the upper discharge position, the detection gripping moving module 421 stops running.

[0113] The detection gripper 422 picks up the bellows on the feeding gripper mechanism 34 located at the upper discharge position.

[0114] To facilitate the inspection of the bellows' appearance by the vision system 6, two sets of inspection gripping moving modules 421 move in opposite directions to straighten the bellows. The torque value set by the motor of the inspection gripping moving module 421 is used to determine whether the bellows is straightened. The moving module 41 moves the inspection gripping component 42 with the straightened bellows to the location of the vision system 6. The bellows position detection sensor 43 is used to detect whether the bellows has reached the inspection preparation position.

[0115] The movable wheel set 5 is located between the detection movable module 4 and the detection vision system 6. The movable wheel set 5 includes two sets, which are symmetrically distributed vertically in the Z direction. The center line between the two sets of movable wheel sets 5 is collinear or approximately collinear with the center line of the bellows on the detection gripping assembly 42.

[0116] The movable wheel set 5 includes rollers 51, a cylinder 52 that controls the up and down movement of the rollers, and a roller position detection sensor 53. The roller position detection sensor 53 detects whether the rollers 51 have reached the initial position. When the rollers 51 are in the initial position, the distance between the two sets of rollers 51 is greater than the diameter of the bellows. The detection preparation position is located in front of the movable wheel set 5. Therefore, when the rollers 51 are in the initial position, the bellows reaches the detection preparation position, which can avoid the collision problem of the bellows and rollers 51.

[0117] The host computer controls the cylinder 52 to move down to the designated position according to the diameter of the bellows. The bellows continues to move between the two sets of rollers 51. As the bellows moves, the rollers 51 rotate, reducing the resistance on the bellows. The two sets of rollers 51 support and restrict the bellows in the Z direction, suppressing the bellows from shaking during movement, and ensuring that the image captured by the vision system 6 is clear.

[0118] The detection vision system 6 includes four sets of visual imaging acquisition modules 61. Each visual imaging acquisition module 61 includes an area array camera, a fixed-focus lens, and a dome light source. The four sets of visual imaging acquisition modules 61 are spatially distributed as follows: On the XZ plane (i.e., the plane containing the circumference of the corrugated pipe), the four sets of visual imaging acquisition modules 61 are evenly distributed in a ring around the central axis of the corrugated pipe, and the included angle between adjacent visual imaging acquisition modules 61 is 90°. The detection direction of the four sets of visual imaging acquisition modules 61 is towards the corrugated pipe. On the XY or YZ plane (i.e., the plane containing the axial direction of the corrugated pipe), the four sets of visual imaging acquisition modules 61 are spaced a certain distance apart from each other along the axial direction of the corrugated pipe to avoid interference from the lighting of the four sets of visual imaging acquisition modules 61.

[0119] The moving module 41 passes through the inspection preparation position and the moving wheel set 5 to reach the position of the inspection vision system 6, which is the inspection position. The four sets of vision imaging acquisition modules 61 acquire images of the corrugated pipe at different positions around the circumference and axis at the inspection position, and perform appearance inspection to determine whether there are defects in the appearance of the current corrugated pipe. According to the judgment result, the corrugated pipe is divided into good products and defective products. The moving module 41 restores the inspected corrugated pipe to its state before straightening and moves it to the lower discharge position. When the moving module 41 is at the lower discharge position, it docks with the unloading mechanism 7. The unloading frame 8 includes a good product frame 81 and a defective product frame 82. According to the judgment result, the host computer controls the unloading mechanism 7 to clamp and move the good corrugated pipe to the good product unloading position and place it in the good product frame 81, or clamp and move the defective corrugated pipe to the defective product unloading position and place it in the defective product frame 82.

[0120] The structure of the feeding mechanism 7 is the same as that of the feeding mechanism 3, and will not be described in detail here.

[0121] The moving direction of the moving module 41 and the detection and gripping moving module 421 is the Y direction.

[0122] The first direction motion module 31 for feeding, the second direction motion module 32 for feeding, the third direction motion module 33 for feeding, the moving module 41, and the detection and clamping moving module 421 adopt a transmission structure of ball screw and linear guide. The transmission structure of ball screw and linear guide is an existing structure, and this application does not improve the transmission structure. Therefore, the structure of the first direction motion module 31 for feeding and the second direction motion module 32 for feeding will not be described in detail here.

[0123] In other embodiments, the feeding motion module, the moving module 41, and the detection and clamping moving module 421 can be implemented by using a linear hydraulic cylinder with a hydraulic circuit, a motor with a conveyor belt, or other transmission methods. The present invention does not limit their specific transmission methods. This embodiment only provides one technical solution.

[0124] The installation device for the structure is omitted in the attached drawings of this application. The installation device can be a conventional mounting bracket, mounting plate, etc. The installation device is not an improvement of this application and will not be described in detail here.

[0125] In step 1, the image coordinates of the side vision system 1 are transformed into the physical coordinates of the feeding mechanism 3. In this embodiment, a 9-point calibration is used to achieve the coordinate transformation, which specifically includes the following steps:

[0126] Step 1.1: Place the empty loading frame into the detection area of ​​the side vision system 1;

[0127] The detection surface of the loading frame is parallel to the shooting surface of the side vision system 1; the object distance of the side vision system 1 reaches the set value and the focus is clear; the shooting surface of the side vision system is parallel to the XZ plane of the loading gripper.

[0128] Step 1.2: The host computer controls the feeding mechanism to clamp the pipe and move it to 9 points within the feeding frame 2 and records the actual coordinates of the 9 points. The side vision system 1 collects 9 images of the 9 points. The distribution of the superimposed feature patterns in the 9 images is consistent with the distribution of the pipe moving to the 9 points within the feeding frame 2.

[0129] The pipe is rigid and straight, the length of the pipe matches the feeding frame, and the outer diameter is the same as the corrugated pipe to be inspected;

[0130] Step 1.3: Using the Hough circle algorithm, find the circles in the detection area of ​​each of the 9 images and obtain the center pixel coordinates. The center pixel coordinates are the image pixel coordinates of the points in the 9 images, and the image pixel coordinates of the points correspond one-to-one with the actual coordinates.

[0131] Step 1.4: Obtain the transformation matrix between the image pixel coordinates and the actual coordinates of the same point;

[0132] Step 1.5: Use the transformation matrix obtained in Step 4 to convert the image pixel coordinates of the 9 points into the physical coordinates of the 9 points in the feeding mechanism 3;

[0133] Step 1.6: Compare the physical coordinates of the 9 points obtained in Step 5 with the actual coordinates of the 9 points to obtain statistical data. If the statistical data is within the threshold range, the transformation matrix is ​​deemed valid, the transformation matrix is ​​saved, and the 9-point calibration process ends; otherwise, the 9-point calibration transformation is deemed abnormal, and Step 1.2 is executed again for recalibration.

[0134] The method for obtaining the transformation matrix in step 1.4 is as follows:

[0135] The pixel coordinates of the point image are set to (x n ,y n The actual coordinates of the point are set as (X). n ,Y n Z n The transformation matrix is ​​set as follows: Where n is the point number, n = 1, 2...9, the pixel coordinates of the point image and the actual coordinates of the point are known parameters, and the pixel coordinates of the point image, the actual coordinates of the point, and the transformation matrix satisfy formula (1).

[0136]

[0137] Based on formula (1), formulas (2) and (3) can be obtained.

[0138] ax n +by n +c=X n (2)

[0139] dx n +ey n +f=Y n (3)

[0140] Substituting the image pixel coordinates and the actual coordinates of the 9 points into formula (2), we obtain the following 9 sets of formulas.

[0141] ax1+by1+c=X1 ax4+by4+c=X4 ax7+by7+c=X7

[0142] ax2+by2+c=X2 ax5+by5+c=X5 ax8+by8+c=X8

[0143] ax3+by3+c=X3 ax6+by6+c=X6 ax9+by9+c=X9

[0144] Using the least squares method to calculate the above formula, we obtain formula (4): S(a,b,c)=[(ax1+by1+c)-X1] 2 +[(ax² + by² + c) - X²] 2 +[(ax³+by³+c)-X³] 2 +......+[(ax9+by9+c)-X9]; (4)

[0145] Taking the partial derivative with respect to S(a,b,c) and setting the first derivative to 0, we obtain...

[0146]

[0147] According to formula (5), the parameters a, b, and c are obtained; similarly, d, e, and f are obtained, and then the transformation matrix is ​​obtained.

[0148]

[0149] In this embodiment, the coordinate systems of the unified side vision system 1 and the feeding mechanism 33 are established as follows: Figure 1 The XYZ coordinates shown indicate that, in this coordinate system, the detection surface of the loading frame and the imaging surface of the side vision system 1 are parallel and located in the XZ plane. Therefore, the pixel coordinates of the image detected by the side vision system 1 are set as (x... n ,z n The actual coordinates of the point are set as (X). n Z n ,Y n ),and

[0150]

[0151] In step 2, the side vision system 1 acquires the image of the corrugated pipe under inspection by trigger acquisition, that is, the host computer triggers the side vision system 1 to acquire a frame of image through the communication interface.

[0152] Step 2 involves visual positioning detection of the acquired images of the corrugated pipe to be inspected, including detecting whether the loading frame is tilted and obtaining the coordinates of the corrugated pipe to be inspected. The specific steps for visual positioning detection of a single frame image are as follows:

[0153] Step 2.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white.

[0154] Step 2.2: Obtain the edge points on both sides of the loading frame using the edge search method to obtain the height, width, and center coordinate parameters of the loading frame detection surface;

[0155] Step 2.3: Compare the obtained width parameter with the width parameter of the loading frame 2 input in Step 2. If the ratio is within the range of 0.98 to 1.02, it is determined that the loading frame is placed accurately, and Step 2.4 is executed; if the ratio is not within the range of 0.98 to 1.02, it is determined that the loading frame is placed tilted, and a prompt is made that it needs to be repositioned, and the step ends.

[0156] Step 2.4: Extract the image of the detection area of ​​the loading frame based on the obtained height, width, and center coordinate parameters;

[0157] Step 2.5: Use the Hough circle finding algorithm to extract the target circle within the loading frame from the image of the detection area of ​​the loading frame, and obtain the center coordinates and radius of the target circle;

[0158] The radius of the target circle is within the range of 0.9 to 1.1 of the outer diameter radius input in step 2; the target circle is not smaller than the threshold number of curves that intersect at a point in the Hough circle-finding algorithm (which is considered a circle).

[0159] Step 2.6: Convert the center coordinates to the physical coordinates of the feeding mechanism 3;

[0160] Step 2.7: Based on the gripping order from top to bottom and from left to right, send all the physical coordinates obtained in Step 2.6 to the loading mechanism 3 accordingly;

[0161] Step 2.8: End of steps.

[0162] The edge lookup method in step 2.2 specifically includes the following steps:

[0163] Step 2.2.1: Divide the acquired grayscale image horizontally into several sub-regions of equal width;

[0164] Step 2.2.2: For each row of each sub-region, extract and process the edge points on both sides of the loading frame by traversing each pixel from both sides to the middle;

[0165] Step 2.2.3: Store the extracted edge points into set A of the left edge points of the loading frame and set B of the right edge points of the loading frame, respectively;

[0166] Step 2.2.4: Based on the pixel coordinates of the left edge point set A of the loading frame, calculate the mean μ and standard deviation σ of the abscissa. Remove outlier pixels whose abscissas do not satisfy [μ-σ, μ+σ] from the left edge point set A of the loading frame to obtain the left clustered edge point set A'. Process the right edge point set B of the loading frame in the same way to obtain the right clustered edge point set B'.

[0167] Step 2.2.5: Use the least squares method to fit a straight line to the set of left-side clustered edge points A' to obtain the straight line X. A =α,X A =α is the horizontal coordinate position of the left edge of the loading frame.

[0168] X A =α minimizes the sum of squared distances from all pixels in set A' to the line, where α is a constant.

[0169] Step 2.2.6: Use the least squares method to fit a straight line to the set of right-side clustered edge points B' to obtain the straight line X. B =β,X B =β is the horizontal coordinate position of the left edge of the loading frame.

[0170] XB = β minimizes the sum of squared distances from all pixels in set B' to the line, where β is a constant.

[0171] Step 2.2.7: Obtain the width, height, and center coordinates of the detection surface of the feeding frame.

[0172] The detection surface width is set to W. j W j =|X A -X B |=|α-β|;

[0173] The detection surface height is the difference between the maximum and minimum ordinate values ​​of pixels in set A' or B'.

[0174] The center coordinates are obtained based on the width and height of the feed frame detection surface;

[0175] The edge point processing method in step 2.2.2 specifically includes the following steps:

[0176] Step S.1: Project the sub-region to generate projection lines, calculate the average concentration of each projection line, and obtain the average concentration waveform of the projection lines; where the average concentration is the average gray value of each projection line.

[0177] Step S.2: Differentiate the average concentration waveform of the projected lines to obtain the differential waveform;

[0178] Step S.3: Filter the differential waveform to remove peak values ​​smaller than a set threshold, and obtain the filtered waveform;

[0179] Step S.4: Extract the left projection waveform point corresponding to the first peak from the left to the middle direction and the right projection waveform point corresponding to the first peak from the right to the middle direction in the filtered waveform;

[0180] The left projection waveform point corresponds to the average horizontal coordinate of the left edge point of the loading frame in the sub-region, and the right projection waveform point corresponds to the average horizontal coordinate of the right edge point of the loading frame in the sub-region.

[0181] Step S.5: For each row of the sub-region, iterate through the three pixels before and after the average x-coordinate of the left edge point of the loading frame, from smallest to largest. Compare the grayscale value difference between two adjacent pixels and select the pixel with the smaller coordinate among the two adjacent pixels with the largest difference as the edge point. Then, store the edge points of each row into the left edge point set of the loading frame of each sub-region, thus obtaining the left edge point set A of the loading frame of each sub-region.

[0182] Step S.6: For each row of the sub-region, traverse the three pixels before and after the average value of the horizontal coordinate of the right edge point of the loading frame from large to small. Compare the gray value difference between two adjacent pixels. Select the pixel with the larger coordinate among the two adjacent pixels with the largest difference as the edge point. Then store the edge points of each row into the right edge point set of the loading frame of each sub-region to obtain the right edge point set B of the loading frame of each sub-region.

[0183] In the above, projection processing refers to scanning vertically relative to the search direction (i.e., horizontal) of the extracted edge.

[0184] In step 2.5, the Hough circle-finding algorithm is used to analyze the image of the detection area of ​​the feeding frame. The principle is as follows:

[0185] For a fixed point (x0, y0), all circles passing through that fixed point are uniformly defined as:

[0186]

[0187] In the above formula Let r be the coordinates of the circle's center, r be the radius of the circle, and θ be the angle of inclination of the fixed point (x0, y0) relative to the center of the circle. Therefore, each set... It represents a circle passing through the point (x0, y0).

[0188] For a fixed point (x0, y0), in a three-dimensional rectangular coordinate system, drawing all the circles passing through it will yield a three-dimensional curve.

[0189] Perform the above operation on all pixels of the image in the detection area of ​​the loading frame. If the curves obtained after performing the above operation on two different pixels are in space... If they intersect, it means that the two pixels are on the same circle.

[0190] The more curves that intersect at a single point, the more points the circle represented by that intersection is considered to consist of. A threshold for the number of curves is set, and when curves with a number not less than the threshold intersect at a single point, it is determined to be the target circle.

[0191] In step 4, based on the input length parameter of the bellows to be inspected, the method for adjusting the spacing between the two sets of feeding gripper mechanisms 34 is as follows:

[0192] Let the length of the corrugated pipe to be inspected be L, the distance between the gripping position of the feeding claw mechanism 34 along the length of the corrugated pipe and the end face of the corrugated pipe be l, and the distance between the two sets of feeding claw mechanisms 34 be l0. Therefore, l0 = L - 2 × l. Taking the center of the two sets of feeding claw mechanisms 34 as the starting point, the moving distance of a single feeding claw mechanism 34 is...

[0193] In step 8, the visual imaging acquisition module 61 acquires images continuously at a certain frequency. The appearance detection of a single frame image includes the following steps:

[0194] Step 8.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white.

[0195] Step 8.2: Based on the imaging area of ​​the corrugated pipe in the field of view, extract the detection area image. The length of the detection area image is the same as the length of the imaging area of ​​the corrugated pipe, the width is 1.5 times the width of the imaging area of ​​the corrugated pipe, and the center is at the center of the imaging area of ​​the corrugated pipe.

[0196] Step 8.3: Reduce the size of the detection area image extracted in Step 8.2 by 1 / 4 to obtain a reduced image. The gray value of each pixel in the reduced image is the average of the gray values ​​of the four adjacent pixels above, below, left, and right in the original image before reduction.

[0197] Step 8.4: Perform grayscale threshold binarization on the reduced image to obtain a grayscale image. Compare whether the grayscale value of each pixel in the grayscale image is greater than a set value. If yes, set the grayscale value of this pixel to 255; otherwise, set the grayscale value of this pixel to 0.

[0198] The set value is 30.

[0199] Step 8.5: Extract the outer contour of the grayscale image to obtain the outer contour set. The outer contour includes the overall imaging contour of the corrugated pipe edge and the interference contour with a small number of points.

[0200] Step 8.6: Traverse the outer contour set and extract the overall imaging contour of the bellows edge. The overall imaging contour of the bellows edge is the contour with the most points.

[0201] Step 8.7: Calculate the minimum bounding rectangle of the overall imaging profile of the bellows edge, and obtain the parameters of the minimum bounding rectangle, including the center, rotation angle, length and width of the minimum bounding rectangle;

[0202] Step 8.8: Extract the detection area image of the object to be tested from the detection area image in Step 8.2 based on the minimum bounding rectangle parameter and the field of view setting spacing value;

[0203] The center of the detection area image of the object under test is the center of the minimum bounding rectangle, the length is 4 times the length of the minimum bounding rectangle, the width is the field of view setting interval, and the attitude angle is the rotation angle of the minimum bounding rectangle. The field of view setting interval value is determined according to the pixel spacing corresponding to the imaging of the radial 1 / 4 circular surface of the corrugated pipe.

[0204] Step 8.9: Perform median filtering on the image of the detection area of ​​the object to be tested to obtain a median-filtered image;

[0205] While filtering out noise interference signals in the detection area of ​​the test object, it can protect the edges of the corrugated tube imaging from being blurred.

[0206] Step 8.10: Perform grayscale threshold binarization on the median-filtered image to obtain a grayscale binarized image. Compare whether the grayscale value of the pixel in the grayscale binarized image is greater than the set value. If yes, set the grayscale value of this pixel to 255. If no, set the grayscale value of this pixel to 0.

[0207] Step 8.11: Perform morphological closing operation on the grayscale binarized image to filter out black regions with connected regions whose area is smaller than the set area value, and obtain a new region image;

[0208] The area setting is set to the area of ​​4 pixels;

[0209] Step 8.12: Extract the contours of the new region image to obtain a contour set, which includes an outer contour set and an inner contour set contained within the closed outer contour.

[0210] Step 8.13: Traverse the contour set in Step 8.12, extract the outer contour and inner contour with the most points, and record the number of points on the outer contour and the inner contour. The outer contour and inner contour are the imaging contours of the detection area of ​​the object to be measured.

[0211] Step 8.14: Determine whether the number of outer contour points obtained in Step 8.13 is greater than the set number of outer contour points. If yes, it is determined that there is a gray-black defect and the gray-black defect is adhered to the boundary. If no, proceed to Step 8.15.

[0212] Step 8.15: Determine whether the number of inner contour points obtained in step 8.13 is greater than the set number of inner contour points. If yes, it is determined that there is a black and gray defect; if no, it is determined that there is no black and gray defect.

[0213] This application also provides a coordinate transformation method for detecting appearance defects in metal bellows, specifically including the following steps:

[0214] Step 1.1: Place the empty loading frame into the detection area of ​​the side vision system 1;

[0215] The detection surface of the loading frame is parallel to the shooting surface of the side vision system 1; the object distance of the side vision system 1 reaches the set value and the focus is clear; the shooting surface of the side vision system is parallel to the XZ plane of the loading gripper.

[0216] Step 1.2: The host computer controls the feeding mechanism to clamp the pipe and move it to 9 points within the feeding frame 2 and records the actual coordinates of the 9 points. The side vision system 1 collects 9 images of the 9 points. The distribution of the superimposed feature patterns in the 9 images is consistent with the distribution of the pipe moving to the 9 points within the feeding frame 2.

[0217] The pipe is rigid and straight, the length of the pipe matches the feeding frame, and the outer diameter is the same as the corrugated pipe to be inspected;

[0218] Step 1.3: Using the Hough circle algorithm, find the circles in the detection area of ​​each of the 9 images and obtain the center pixel coordinates. The center pixel coordinates are the image pixel coordinates of the points in the 9 images, and the image pixel coordinates of the points correspond one-to-one with the actual coordinates.

[0219] Step 1.4: Obtain the transformation matrix between the image pixel coordinates and the actual coordinates of the same point;

[0220] Step 1.5: Use the transformation matrix obtained in Step 4 to convert the image pixel coordinates of the 9 points into the physical coordinates of the 9 points in the feeding mechanism 3;

[0221] Step 1.6: Compare the physical coordinates of the 9 points obtained in Step 5 with the actual coordinates of the 9 points to obtain statistical data. If the statistical data is within the threshold range, the transformation matrix is ​​deemed valid, the transformation matrix is ​​saved, and the 9-point calibration process ends; otherwise, the 9-point calibration transformation is deemed abnormal, and Step 1.2 is executed again for recalibration.

[0222] The method for obtaining the transformation matrix in step 1.4 is as follows:

[0223] Let the pixel coordinates of the point image be (xn, yn), the actual coordinates of the point be (Xn, Yn, Zn), and the transformation matrix be set to... Where n is the point number, n = 1, 2...9, the pixel coordinates of the point image and the actual coordinates of the point are known parameters, and the pixel coordinates of the point image, the actual coordinates of the point, and the transformation matrix satisfy formula (1).

[0224]

[0225] Based on formula (1), formulas (2) and (3) can be obtained.

[0226] axn +by n +c=X n (2)

[0227] dx n +ey n +f=Y n (3)

[0228] Substituting the image pixel coordinates and the actual coordinates of the 9 points into formula (2), we obtain the following 9 sets of formulas.

[0229] ax1+by1+c=X1 ax4+by4+c=X4 ax7+by7+c=X7

[0230] ax2+by2+c=X2 ax5+by5+c=X5 ax8+by8+c=X8

[0231] ax3+by3+c=X3 ax6+by6+c=X6 ax9+by9+c=X9

[0232] Using the least squares method to calculate the above formula, we obtain formula (4): S(a,b,c)=[(ax1+by1+c)-X1] 2 +[(ax² + by² + c) - X²] 2 +[(ax³+by³+c)-X³] 2 +......+[(ax9+by9+c)-X9]; (4)

[0233] Taking the partial derivative with respect to S(a,b,c) and setting the first derivative to 0, we obtain...

[0234]

[0235] According to formula (5), the parameters a, b, and c are obtained; similarly, d, e, and f are obtained, and then the transformation matrix is ​​obtained.

[0236] This application also provides an image-based visual positioning detection method for detecting appearance defects in metal bellows. The image-based visual positioning detection includes detecting whether the loading frame is tilted and obtaining the coordinates of the bellows to be inspected. The visual positioning detection of a single frame image specifically includes the following steps:

[0237] Step 2.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white.

[0238] Step 2.2: Obtain the edge points on both sides of the loading frame using the edge search method to obtain the height, width, and center coordinate parameters of the loading frame detection surface;

[0239] Step 2.3: Compare the obtained width parameter with the width parameter of the loading frame 2 input in Step 2. If the ratio is within the range of 0.98 to 1.02, it is determined that the loading frame is placed accurately, and Step 2.4 is executed; if the ratio is not within the range of 0.98 to 1.02, it is determined that the loading frame is placed tilted, and a prompt is made that it needs to be repositioned, and the step ends.

[0240] Step 2.4: Extract the image of the detection area of ​​the loading frame based on the obtained height, width, and center coordinate parameters;

[0241] Step 2.5: Use the Hough circle finding algorithm to extract the target circle within the loading frame from the image of the detection area of ​​the loading frame, and obtain the center coordinates and radius of the target circle;

[0242] The radius of the target circle is within the range of 0.9 to 1.1 of the outer diameter radius input in step 2; the target circle is not smaller than the threshold number of curves that intersect at a point in the Hough circle-finding algorithm (which is considered a circle).

[0243] Step 2.6: Convert the center coordinates to the physical coordinates of the feeding mechanism 3;

[0244] Step 2.7: Based on the gripping order from top to bottom and from left to right, send all the physical coordinates obtained in Step 2.6 to the loading mechanism 3 accordingly;

[0245] Step 2.8: End of steps.

[0246] The edge lookup method in step 2.2 specifically includes the following steps:

[0247] Step 2.2.1: Divide the acquired grayscale image horizontally into several sub-regions of equal width;

[0248] Step 2.2.2: For each row of each sub-region, extract and process the edge points on both sides of the loading frame by traversing each pixel from both sides to the middle;

[0249] Step 2.2.3: Store the extracted edge points into set A of the left edge points of the loading frame and set B of the right edge points of the loading frame, respectively;

[0250] Step 2.2.4: Based on the pixel coordinates of the left edge point set A of the loading frame, calculate the mean μ and standard deviation σ of the abscissa. Remove outlier pixels whose abscissas do not satisfy [μ-σ, μ+σ] from the left edge point set A of the loading frame to obtain the left clustered edge point set A'. Process the right edge point set B of the loading frame in the same way to obtain the right clustered edge point set B'.

[0251] Step 2.2.5: Use the least squares method to fit a straight line to the set of left-side clustered edge points A' to obtain the straight line X. A =α,X A =α is the horizontal coordinate position of the left edge of the loading frame.

[0252] X A =α minimizes the sum of squared distances from all pixels in set A' to the line, where α is a constant.

[0253] Step 2.2.6: Use the least squares method to fit a straight line to the set of right-side clustered edge points B' to obtain the straight line X. B =β,X B =β is the horizontal coordinate position of the left edge of the loading frame.

[0254] X B =β minimizes the sum of squared distances from all pixels in set B' to the line, where β is a constant.

[0255] Step 2.2.7: Obtain the width, height, and center coordinates of the detection surface of the feeding frame.

[0256] The detection surface width is set to W. j W j =|X A -X B |=|α-β|;

[0257] The detection surface height is the difference between the maximum and minimum ordinate values ​​of pixels in set A' or B'.

[0258] The center coordinates are obtained based on the width and height of the feed frame detection surface;

[0259] The edge point processing method in step 2.2.2 specifically includes the following steps:

[0260] Step S.1: Project the sub-region to generate projection lines, calculate the average concentration of each projection line, and obtain the average concentration waveform of the projection lines; where the average concentration is the average gray value of each projection line.

[0261] Step S.2: Differentiate the average concentration waveform of the projected lines to obtain the differential waveform;

[0262] Step S.3: Filter the differential waveform to remove peak values ​​smaller than a set threshold, and obtain the filtered waveform;

[0263] Step S.4: Extract the left projection waveform point corresponding to the first peak from the left to the middle direction and the right projection waveform point corresponding to the first peak from the right to the middle direction in the filtered waveform;

[0264] The left projection waveform point corresponds to the average horizontal coordinate of the left edge point of the loading frame in the sub-region, and the right projection waveform point corresponds to the average horizontal coordinate of the right edge point of the loading frame in the sub-region.

[0265] Step S.5: For each row of the sub-region, iterate through the three pixels before and after the average x-coordinate of the left edge point of the loading frame, from smallest to largest. Compare the grayscale value difference between two adjacent pixels and select the pixel with the smaller coordinate among the two adjacent pixels with the largest difference as the edge point. Then, store the edge points of each row into the left edge point set of the loading frame of each sub-region, thus obtaining the left edge point set A of the loading frame of each sub-region.

[0266] Step S.6: For each row of the sub-region, traverse the three pixels before and after the average value of the horizontal coordinate of the right edge point of the loading frame from large to small. Compare the gray value difference between two adjacent pixels. Select the pixel with the larger coordinate among the two adjacent pixels with the largest difference as the edge point. Then store the edge points of each row into the right edge point set of the loading frame of each sub-region to obtain the right edge point set B of the loading frame of each sub-region.

[0267] In the above, projection processing refers to scanning vertically relative to the search direction (i.e., horizontal) of the extracted edge.

[0268] In step 2.5, the Hough circle-finding algorithm is used to analyze the image of the detection area of ​​the feeding frame. The principle is as follows:

[0269] For a fixed point (x0, y0), all circles passing through that fixed point are uniformly defined as:

[0270]

[0271] In the above formula Let r be the coordinates of the circle's center, r be the radius of the circle, and θ be the angle of inclination of the fixed point (x0, y0) relative to the center of the circle. Therefore, each set... It represents a circle passing through the point (x0, y0).

[0272] For a fixed point (x0, y0), in a three-dimensional rectangular coordinate system, drawing all the circles passing through it will yield a three-dimensional curve.

[0273] Perform the above operation on all pixels of the image in the detection area of ​​the loading frame. If the curves obtained after performing the above operation on two different pixels are in space... If they intersect, it means that the two pixels are on the same circle.

[0274] The more curves that intersect at a single point, the more points the circle represented by that intersection is considered to consist of. A threshold for the number of curves is set, and when curves with a number not less than the threshold intersect at a single point, it is determined to be the target circle.

[0275] This application also includes an image appearance detection method, in which four sets of visual imaging acquisition modules 61 continuously acquire images of different positions around the circumference and axial direction of the corrugated pipe under test at a certain frequency and perform appearance detection. The appearance detection of a single frame image includes the following steps:

[0276] Step 8.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white.

[0277] Step 8.2: Based on the imaging area of ​​the corrugated pipe in the field of view, extract the detection area image. The length of the detection area image is the same as the length of the imaging area of ​​the corrugated pipe, the width is 1.5 times the width of the imaging area of ​​the corrugated pipe, and the center is at the center of the imaging area of ​​the corrugated pipe.

[0278] Step 8.3: Reduce the size of the detection area image extracted in Step 8.2 by 1 / 4 to obtain a reduced image. The gray value of each pixel in the reduced image is the average of the gray values ​​of the four adjacent pixels above, below, left, and right in the original image before reduction.

[0279] Step 8.4: Perform grayscale threshold binarization on the reduced image to obtain a grayscale image. Compare whether the grayscale value of each pixel in the grayscale image is greater than a set value. If yes, set the grayscale value of this pixel to 255; otherwise, set the grayscale value of this pixel to 0.

[0280] The set value is 30.

[0281] Step 8.5: Extract the outer contour of the grayscale image to obtain the outer contour set. The outer contour includes the overall imaging contour of the corrugated pipe edge and the interference contour with a small number of points.

[0282] Step 8.6: Traverse the outer contour set and extract the overall imaging contour of the bellows edge. The overall imaging contour of the bellows edge is the contour with the most points.

[0283] Step 8.7: Calculate the minimum bounding rectangle of the overall imaging profile of the bellows edge, and obtain the parameters of the minimum bounding rectangle, including the center, rotation angle, length and width of the minimum bounding rectangle;

[0284] Step 8.8: Extract the detection area image of the object to be tested from the detection area image in Step 8.2 based on the minimum bounding rectangle parameter and the field of view setting spacing value;

[0285] The center of the detection area image of the object under test is the center of the minimum bounding rectangle, the length is 4 times the length of the minimum bounding rectangle, the width is the field of view setting interval, and the attitude angle is the rotation angle of the minimum bounding rectangle. The field of view setting interval value is determined according to the pixel spacing corresponding to the imaging of the radial 1 / 4 circular surface of the corrugated pipe.

[0286] Step 8.9: Perform median filtering on the image of the detection area of ​​the object to be tested to obtain a median-filtered image;

[0287] While filtering out noise interference signals in the detection area of ​​the test object, it can protect the edges of the corrugated tube imaging from being blurred.

[0288] Step 8.10: Perform grayscale threshold binarization on the median-filtered image to obtain a grayscale binarized image. Compare whether the grayscale value of the pixel in the grayscale binarized image is greater than the set value. If yes, set the grayscale value of this pixel to 255. If no, set the grayscale value of this pixel to 0.

[0289] Step 8.11: Perform morphological closing operation on the grayscale binarized image to filter out black regions with connected regions whose area is smaller than the set area value, and obtain a new region image;

[0290] The area setting is set to the area of ​​4 pixels;

[0291] Step 8.12: Extract the contours of the new region image to obtain a contour set, which includes an outer contour set and an inner contour set contained within the closed outer contour.

[0292] Step 8.13: Traverse the contour set in Step 8.12, extract the outer contour and inner contour with the most points, and record the number of points on the outer contour and the inner contour. The outer contour and inner contour are the imaging contours of the detection area of ​​the object to be measured.

[0293] Step 8.14: Determine whether the number of outer contour points obtained in Step 8.13 is greater than the set number of outer contour points. If yes, it is determined that there is a gray-black defect and the gray-black defect is adhered to the boundary. If no, proceed to Step 8.15.

[0294] Step 8.15: Determine whether the number of inner contour points obtained in step 8.13 is greater than the set number of inner contour points. If yes, it is determined that there is a black and gray defect; if no, it is determined that there is no black and gray defect.

[0295] The visual imaging acquisition module 61 includes an area array camera, a fixed-focus lens, and a dome light source. The four sets of visual imaging acquisition modules 61 are spatially distributed as follows: On the XZ plane (i.e., the plane where the circumference of the corrugated pipe is located), the four sets of visual imaging acquisition modules 61 are evenly distributed in a ring around the central axis of the corrugated pipe, and the included angle between adjacent visual imaging acquisition modules 61 is 90°. The detection direction of the four sets of visual imaging acquisition modules 61 is towards the corrugated pipe. On the XY or YZ plane (i.e., the plane where the axial direction of the corrugated pipe is located), the four sets of visual imaging acquisition modules 61 are spaced a certain distance apart from each other along the axial direction of the corrugated pipe to avoid interference between the light emitted by the four sets of visual imaging acquisition modules 61.

[0296] Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort should fall within the scope of protection of the present invention.

Claims

1. A method for detecting appearance defects in metal bellows, characterized in that: Includes the following steps: Step 1: Transform the image coordinates located by the side vision system into the physical coordinates of the loading mechanism; Step 2: Transport the loading frame containing the corrugated pipe to be inspected to the loading area where the loading mechanism is located. The host computer inputs the length, width, and height parameters of the loading frame, as well as the outer diameter and length parameters of the corrugated pipe to be inspected inside the loading frame. Step 3: The side vision system acquires images of the corrugated pipe to be inspected for visual positioning detection, obtains the positioning coordinates of the corrugated pipe to be inspected, and sends the positioning coordinates to the feeding mechanism; Step 4: Based on the length parameters of the corrugated pipe to be inspected, adjust the distance between the two sets of feeding gripper mechanisms. The host computer controls the feeding motion module to move the feeding gripper to the positioning coordinate position in Step 3. The feeding gripper picks up the corrugated pipe to be inspected and moves it to the upper discharge position after picking it up. Step 5: The host computer starts the detection and clamping moving module, which controls the detection gripper to move until the detection gripper's sensor determines that the detection gripper has reached the upper discharge position. The detection and clamping moving module then stops moving, the detection gripper clamps the corrugated pipe to be tested, the feeding gripper releases the corrugated pipe to be tested, and the feeding mechanism returns to the starting position. Step 6: The detection gripper moving module controls the detection gripper to move in the reverse direction to straighten the bellows to be tested; Step 7: The host computer starts the moving module, which moves the corrugated pipe to be tested toward the inspection vision system. The corrugated pipe position detection sensor detects that the corrugated pipe to be tested has reached the inspection preparation position. The moving module continues to move, and the host computer starts the cylinder to control the roller to move from the initial position to the designated position to support and restrict the corrugated pipe to be tested. The moving module moves the corrugated pipe to be tested to the inspection position. Step 8: The start of the mobile module is triggered by the host computer to collect images from four sets of visual imaging acquisition modules. The four sets of visual imaging acquisition modules collect images of different positions on the circumference and axis of the corrugated pipe under test and perform appearance inspection. The appearance inspection results are then sent to the unloading mechanism. In step 8, the visual imaging acquisition module continuously acquires images, and the appearance detection of a single frame image includes the following steps: Step 8.1: Acquire a single-channel, 8-bit grayscale image with 256 grayscale levels ranging from 0 to 255, where 0 represents black and 255 represents white. Step 8.2: Based on the imaging area of ​​the corrugated pipe in the field of view, extract the detection area image. The length of the detection area image is the same as the length of the imaging area of ​​the corrugated pipe, the width is 1.5 times the width of the imaging area of ​​the corrugated pipe, and the center is at the center of the imaging area of ​​the corrugated pipe. Step 8.3: Reduce the size of the detection area image extracted in Step 8.2 by 1 / 4 to obtain a reduced image. The gray value of each pixel in the reduced image is the average of the gray values ​​of the four adjacent pixels above, below, left, and right in the original image before reduction. Step 8.4: Perform grayscale threshold binarization on the reduced image to obtain a grayscale image. Compare whether the grayscale value of each pixel in the grayscale image is greater than a set value. If yes, set the grayscale value of this pixel to 255; otherwise, set the grayscale value of this pixel to 0. Step 8.5: Extract the outer contour of the grayscale image to obtain the outer contour set. The outer contour includes the overall imaging contour of the corrugated pipe edge and the interference contour with a small number of points. Step 8.6: Traverse the outer contour set and extract the overall imaging contour of the corrugated pipe edge. The overall imaging contour of the corrugated pipe edge is the contour with the most points. Step 8.7: Calculate the minimum bounding rectangle of the overall imaging profile of the bellows edge, and obtain the parameters of the minimum bounding rectangle, including the center, rotation angle, length and width of the minimum bounding rectangle; Step 8.8: Extract the detection area image of the object to be tested from the detection area image in Step 8.2 based on the minimum bounding rectangle parameter and the field of view setting spacing value; Step 8.9: Perform median filtering on the image of the detection area of ​​the object to be tested to obtain a median-filtered image; Step 8.10: Perform grayscale threshold binarization on the median filtered image to obtain a grayscale binarized image. Compare whether the grayscale value of the pixel in the grayscale binarized image is greater than the set value. If yes, set the grayscale value of this pixel to 255. If no, set the grayscale value of this pixel to 0. Step 8.11: Perform morphological closing operation on the grayscale binarized image to filter out black regions with connected regions whose area is smaller than the set area value, and obtain a new region image; Step 8.12: Extract the contours of the new region image to obtain a contour set, which includes an outer contour set and an inner contour set contained within the closed outer contour. Step 8.13: Traverse the contour set in Step 8.12, extract the outer contour and inner contour with the most points, and record the number of points on the outer contour and the inner contour. The outer contour and inner contour are the imaging contours of the detection area of ​​the object to be measured. Step 8.14: Determine whether the number of outer contour points obtained in Step 8.13 is greater than the set number of outer contour points. If yes, it is determined that there is a gray-black defect and the gray-black defect is adhered to the boundary. If no, proceed to Step 8.

15. Step 8.15: Determine whether the number of inner contour points obtained in step 8.13 is greater than the set number of inner contour points. If yes, then determine that there is a black and gray defect; if no, then determine that there is no black and gray defect. Step 9: The moving module moves the measured corrugated pipe to the lower discharge position, the moving module stops running, and the host computer triggers the four sets of vision imaging acquisition modules to stop acquiring images; Step 10: The host computer controls the unloading mechanism to move to the lower discharge position. The unloading mechanism picks up the tested corrugated pipe from the detection gripper and places the tested corrugated pipe in the good product frame or the defective product frame according to the appearance inspection results. Step 11: End of steps.

2. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: The corrugated pipe to be inspected is placed in the loading frame, and the shooting direction of the side vision system is facing the loading frame. The side panel of the loading frame facing the side vision system is made of transparent material.

3. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: The feeding motion module is connected to the feeding gripper mechanism. The feeding motion module is set as a spatial motion module, which controls the movement of the feeding gripper mechanism in three directions in space. The host computer controls the feeding gripper mechanism to move from the feeding start position to the feeding position of the corrugated pipe to be inspected through the feeding motion module. After the corrugated pipe is clamped, the feeding gripper mechanism and the clamped corrugated pipe move to the upper discharge position.

4. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: The four sets of visual imaging acquisition modules are spatially distributed as follows: on the plane containing the circumference of the corrugated pipe, the four sets of visual imaging acquisition modules are arranged in a ring around the central axis of the corrugated pipe, and the included angle between adjacent visual imaging acquisition modules is 90°. The detection direction of the four sets of visual imaging acquisition modules is towards the corrugated pipe. On the plane containing the axial direction of the corrugated pipe, the four sets of visual imaging acquisition modules are spaced a set distance apart from each other along the axial direction of the corrugated pipe.

5. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: The transformation of the image coordinates of the side vision system to the physical coordinates of the feeding mechanism in step 1 specifically includes the following steps: Step 1.1: Place the empty loading frame into the inspection area of ​​the side vision system; The detection surface of the loading frame is parallel to the shooting surface of the side vision system; the object distance of the side vision system reaches the set value and the focus is clear; the shooting surface of the side vision system is parallel to the XZ plane of the loading gripper. Step 1.2: The host computer controls the feeding mechanism to clamp the pipe and move it to 9 points within the feeding frame and records the actual coordinates of the 9 points. The side vision system collects 9 images of the 9 points. The distribution of the superimposed feature patterns in the 9 images is consistent with the distribution of the pipe moving to the 9 points within the feeding frame. The pipe is rigid and straight, the length of the pipe matches the feeding frame, and the outer diameter is the same as the corrugated pipe to be inspected; Step 1.3: Using the Hough circle algorithm, find the circles in the detection area of ​​each of the 9 images and obtain the center pixel coordinates. The center pixel coordinates are the image pixel coordinates of the points in the 9 images, and the image pixel coordinates of the points correspond one-to-one with the actual coordinates. Step 1.4: Obtain the transformation matrix between the image pixel coordinates and the actual coordinates of the same point; Step 1.5: Use the transformation matrix obtained in Step 4 to convert the image pixel coordinates of the 9 points into the physical coordinates of the 9 points in the feeding mechanism; Step 1.6: Compare the physical coordinates of the 9 points obtained in Step 5 with the actual coordinates of the 9 points to obtain statistical data. If the statistical data is within the threshold range, the transformation matrix is ​​deemed valid, the transformation matrix is ​​saved, and the 9-point calibration process ends; otherwise, the 9-point calibration transformation is deemed abnormal, and Step 1.2 is executed again for recalibration.

6. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: In step 6, whether the corrugated pipe under test is straightened is determined by whether the motor of the clamping and moving module reaches the set torque value. If the motor reaches the set torque value, it is determined that the corrugated pipe under test has been straightened. If the motor does not reach the set torque value, it is determined that the corrugated pipe under test has not been straightened. The motor continues to move until the torque value is reached.

7. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: The value is set to 30 in step 8.

4.

8. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: In step 8.8, the center of the detection area image of the object to be tested is the center of the minimum bounding rectangle, the length is 4 times the length of the minimum bounding rectangle, the width is the field of view setting interval, the attitude angle is the rotation angle of the minimum bounding rectangle, and the field of view setting interval value is determined according to the pixel spacing corresponding to the imaging of the radial 1 / 4 circular surface of the corrugated pipe.

9. The method for detecting appearance defects in a metal bellows according to claim 1, characterized in that: In step 8.11, the area setting value is set to the area of ​​4 pixels.

Citation Information

Patent Citations

  • Product surface defect detection method and device and storage medium

    CN110517265A

  • Corrugated pipe surface defect detection method and system

    CN114612434A