Cylinder barrel hole site welding alignment method
Through a two-step alignment method, the angle and concentricity deviation are calculated by using the robotic arm and industrial cameras to adjust the position of the cylinder and welding block, solving the problem of difficult to ensure the accuracy and consistency of hole position in traditional manual welding, and achieving efficient Cylinder welding.
Patent Information
- Application Number
- CN202411546903.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the cylinder manufacturing industry, traditional manual welding methods are difficult to ensure the accuracy and consistency of hole positions, resulting in low production efficiency and low welding quality. The existing technology has the problem of inaccurate placement in welding tool positioning.
Using a two-step alignment method, first correct the cylinder tube attitude and move the hole position directly above. Then, take images through the robotic arm and industrial camera, calculate the angle and concentricity deviation, adjust the position of the welding block, and ensure the cylinder tube hole position and The concentricity of the hole position of the welding block is within the preset range, thereby improving alignment accuracy and welding efficiency.
It effectively improves the alignment accuracy of the cylinder bore position, improves welding efficiency, reduces welding error rate, and ensures the stability and consistency of welding quality.
Smart Images

Figure CN119141053A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of machine vision detection welding, and in particular to a cylinder bore welding alignment method. Background Art
[0002] In industrial automation production, robot welding is widely used in industries such as manufacturing, construction, energy, medical machinery, consumer goods, and underwater welding. Robot welding can stabilize and improve welding quality, and reflect the welding quality in numerical form; at the same time, it can effectively improve labor productivity, reduce the labor intensity of workers, and can work in harmful environments.
[0003] However, robot welding requires the objects to be welded to be accurately aligned before effective welding can be carried out. In the cylinder manufacturing industry, how to accurately dock the welding blocks, the traditional method uses manual docking and machine vision to align at one time. In addition, due to the limitations of the operator's skills and physical strength, the traditional manual welding method is difficult to ensure the accuracy and consistency of the hole position, and the production efficiency is not high. The improvement of the automation and intelligence of robots can greatly improve production efficiency and welding accuracy.
[0004] Patent No. CN2023110832075 discloses a copper melting welding process for the inner hole of a hydraulic cylinder barrel, which relates to the field of welding technology. The welding process includes a cylinder bottom welding step, a ring groove welding step and a ring groove overlap step. The cylinder bottom welding step is to weld the inner wall of the cylinder bottom end of the hydraulic cylinder inner hole in the direction from the cylinder bottom end of the hydraulic cylinder barrel to the cylinder mouth end, until it is welded to a preset distance from the annular groove, and a first weld bead is formed. The ring groove welding step is specifically to weld the annular groove and form a second weld bead. The ring groove overlap step is specifically to continue welding the inner wall of the cylinder bottom end of the inner hole after the cylinder bottom welding step, and a third weld bead is formed, one end of the third weld bead overlaps the first weld bead, and the other end overlaps the second weld bead, so as to realize the transition of the inner wall of the cylinder bottom end and the annular groove. Compared with the prior art, the welding process disclosed in the above invention greatly reduces the number of pores in the welded finished product, greatly reduces the rework rate, and significantly improves the welding quality.
[0005] Patent No. CN2023100286737 discloses a positioning device for a drum welding robot, including a positioning assembly and an expansion assembly; the positioning assembly includes a mounting plate and a cylinder and a positioning shaft respectively arranged on both sides of the mounting plate in the thickness direction, the mounting plate has a limiting portion on one end surface facing the positioning shaft, the movable end of the cylinder is connected to one end of the positioning shaft, and the end of the positioning shaft away from the cylinder is provided with a widening portion, the diameter of the widening portion is larger than the diameter of the positioning shaft; the expansion assembly is relatively slidably connected to the positioning shaft, one end of the expansion assembly abuts against the limiting portion, and the other end is an elastic end, and the elastic end extends toward the widening portion. The above invention can ensure that the positioning shaft will not move during the welding process.
[0006] Although the above patents use welding tools to locate the hole positions when welding the cylinder barrel, in the actual production process, since the cylinder barrel is a cylinder, it is difficult to place the welding block accurately above the cylinder barrel at one time. Summary of the invention
[0007] The purpose of the present invention is to provide a cylinder bore welding alignment method, which can be achieved through a two-step alignment method, namely, the first step is to correct the cylinder posture so that the cylinder bore is moved to the top; the second step is to align the welding block so that the concentricity of the cylinder bore and the welding block bore is within a preset concentricity; so as to effectively improve the alignment accuracy of the cylinder bore, improve the cylinder welding efficiency, and reduce the cylinder welding error rate.
[0008] The present invention utilizes the following technical solutions:
[0009] A cylinder bore welding alignment method comprises the following steps in sequence:
[0010] S1: The robot arm places the cylinder on the welding platform for clamping;
[0011] S2: The robotic arm drives the industrial camera to the designated shooting position above the cylinder to shoot images and obtain the cylinder bore image;
[0012] S3: extracting two horizontal boundaries of the cylinder wall and the hole center from the cylinder hole image, calculating the distance difference from the hole center to the two boundaries, and converting the distance difference into an angle;
[0013] S4: judging the calculated angle and the set angle range to generate an angle judgment result;
[0014] S5: If the angle is not within the set angle range, the angle deviation value is calculated, and the cylinder is rotated according to the angle deviation value by using the welding platform, and the process returns to step S3 to continue the angle judgment; if the angle is within the set angle range, the robot arm places the welding block;
[0015] S6: moving the robot arm to a designated shooting position of the welding block to shoot an image, so as to obtain an image of a hole position of the welding block;
[0016] S7: extracting four boundaries and the hole center of the welding block from the welding block hole image;
[0017] S8: Move the robot arm again to above the welding block hole position, take an image of the welding block hole position, and obtain a composite hole position image including the welding block hole position and the cylinder bore hole position;
[0018] S9: Calculate the concentricity of the welding block hole and the cylinder bore from the composite hole image, and compare them with the preset concentricity range to generate a concentricity judgment result;
[0019] S10: If the concentricity is not within the preset concentricity range, the concentricity deviation value is calculated, and the robot arm moves the welding block according to the concentricity deviation value and turns to S7; if the concentricity is within the set concentricity range, the alignment is completed and welding starts;
[0020] S11: The robot arm is moved to photograph the welded welding block and the cylinder to obtain a combined image;
[0021] S12: performing image processing on the combined image to verify the alignment of the two holes and correct the preset concentricity range.
[0022] Preferably, in step S2 and step S6, the designated shooting position is the cylinder bore or the welding block bore, and the industrial camera of the robot arm is perpendicular to the horizontal axial section of the cylinder or the horizontal section of the welding block.
[0023] Preferably, in step S3, the distance difference is converted into an angle by the following image processing algorithm:
[0024] S301: Correcting the illumination and color of the cylinder bore image using an image correction algorithm to obtain a corrected cylinder image;
[0025] S302: graying the corrected cylinder image using an image binarization algorithm to obtain a cylinder grayscale image;
[0026] S303: filtering and denoising the cylinder grayscale image using an image filtering algorithm to obtain a denoised cylinder image;
[0027] S304: Using a sub-pixel algorithm to extract the two horizontal boundaries l1, l2 of the cylinder and the hole center O in the cylinder image after denoising c ;
[0028] S305: The distances from the hole center to the two boundaries are measured as x1 and x2 respectively, and the distance difference is |x1-x2|. Since the radius of the cylinder is R, the distance difference is converted into an angle θ: α represents the coefficient of variation.
[0029] Preferably, in step S4 and step S5, the angle range is set as: (θ min ,θ max ), θ min Indicates the minimum angle, θ max Indicates the maximum angle; if the angle is less than the minimum angle, the angle deviation value is: Δθ1∈(Δθ min ,Δθ max ), Δθ min =θ min -θ, Δθ min Indicates the minimum angle deviation value, Δθ max =θ max -θ, Δθ max Indicates the maximum angle deviation value; if the angle is greater than the maximum angle, the angle deviation value is: Δθ2∈(Δθ ′ min ,Δθ ′ max ), Δθ ′ min =θ-θ max , Δθ ′ min Indicates the minimum angle deviation value, Δθ ′ max =θ-θ min , Δθ ′ max Indicates the maximum angle deviation value.
[0030] Preferably, in step S7, the process of processing the welding block hole position image using the following image processing algorithm is as follows:
[0031] S701: Correcting the illumination and color of the welding block hole image using an image correction algorithm to obtain a corrected welding block image;
[0032] S702: graying the corrected welding block image using an image binarization algorithm to obtain a welding block grayscale image;
[0033] S703: filtering and denoising the welding block grayscale image using an image filtering algorithm to obtain a denoised welding block image;
[0034] S704: Using a sub-pixel algorithm to extract the four boundaries L1, L2, L3, L4 of the welding block and the hole center O in the denoised welding block image w .
[0035] Preferably, in step S9, the process of processing the composite hole position image using the following image processing algorithm and extracting the welding block hole position and the cylinder bore hole position is as follows:
[0036] S901: Correct the illumination and color of the composite hole position image using an image correction algorithm to obtain a corrected composite hole position image;
[0037] S902: graying the corrected composite hole position image using an image binarization algorithm to obtain a composite hole position grayscale image;
[0038] S903: filtering and denoising the composite hole position grayscale image using an image filtering algorithm to obtain a denoised composite hole position image;
[0039] S904: Using a sub-pixel algorithm to extract the hole center O of the welding block in the denoised composite hole image w and hole radius r w , and the bore center O of the cylinder c ; and calculate the hole radius r of the cylinder hole in the cylinder hole image in step S3 c ; Cylinder bore center O c is the center of the hole overlap area, that is, the center of the overlapped part of the hole range of the welding block and the hole range of the cylinder in the hole image after denoising;
[0040] S905: Calculate the hole area S of the welding block respectively w =πr w 2 , the hole area S of the cylinder c =πr c 2 , the distance d between the centers of the two holes and the overlapping area S z :
[0041]
[0042] Then calculate the concentricity μ:
[0043] S906: The concentricity is judged against a preset concentricity range to generate a concentricity judgment result.
[0044] Preferably, in step S10, the preset concentricity range is: (ε, 1), ε represents the lower limit of concentricity; if the concentricity μ<ε, the concentricity deviation value ρ∈(ρ min ,ρ max ), ρ min Indicates the minimum concentricity deviation, ρ min =ε-μ;ρ max Indicates the maximum deviation of concentricity, ρ max =1-μ.
[0045] Preferably, in step S12, the process of verifying the alignment of the two hole positions in the combined image to correct the preset concentricity range is as follows:
[0046] S121: binarizing the combined image using an image binarization algorithm, and extracting a hole overlap region in the combined image using an adaptive threshold algorithm;
[0047] The hole overlap area is the common intersection area when two holes are stacked up and down;
[0048] S122: segmenting the hole overlap region using an image segmentation algorithm to obtain a hole segmentation image;
[0049] S123: Calculate the hole overlap area S in the hole segmentation image n , and overlap area S z Compare to distinguish good welding products from bad welding products;
[0050] S124: According to the overlapping area S z , hole overlap area S n The preset concentricity range is corrected by the concentricity μ; when the cylinder barrel and the welding block are welded, the welding parts of the robot arm vibrate, resulting in concentricity deviation. Therefore, the concentricity μ is corrected according to the welding oscillation coefficient σ to obtain the corrected concentricity μ ′ : Then according to the corrected concentricity μ ′ Correct the lower limit of concentricity ε to correct the preset concentricity range (ε ′ ,1):
[0051] ε ′ Indicates the corrected lower limit of concentricity.
[0052] The present invention adopts a two-step alignment method, namely, the first step is to correct the cylinder posture so that the cylinder hole is moved to the top; the second step is to align the welding block so that the concentricity of the cylinder hole and the welding block hole is within a preset concentricity; so as to effectively improve the alignment accuracy of the cylinder hole, improve the cylinder welding efficiency, and reduce the cylinder welding error rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1It is the principle block diagram of the cylinder bore welding alignment method;
[0055] Figure 2 This is the side view of the cylinder bore welding;
[0056] Figure 3 This is the front view analysis diagram of the cylinder bore welding;
[0057] Figure 4 This is the actual structural diagram of the cylinder bore welding;
[0058] Figure 5 It is a flow chart of the cylinder bore welding alignment method;
[0059] Figure 6 This is a diagram showing the hole overlap area. DETAILED DESCRIPTION
[0060] The present invention is described in detail below with reference to the accompanying drawings and embodiments:
[0061] like Figure 1-Figure 6 As shown, a cylinder bore welding alignment method according to the present invention comprises the following steps in sequence:
[0062] S1: The robot arm places the cylinder on the welding platform for clamping;
[0063] S2: The robotic arm drives the industrial camera to the designated shooting position above the cylinder to shoot images and obtain the cylinder bore image;
[0064] In the present invention, the designated shooting position is the cylinder bore, and the industrial camera on the robot arm is perpendicular to the horizontal axial section of the cylinder;
[0065] S3: extracting two horizontal boundaries of the cylinder wall and the hole center from the cylinder hole image, calculating the distance difference from the hole center to the two boundaries, and converting the distance difference into an angle;
[0066] In the present invention, the distance difference is converted into an angle by the following image processing algorithm:
[0067] S301: Correcting the illumination and color of the cylinder bore image using an image correction algorithm to obtain a corrected cylinder image;
[0068] S302: graying the corrected cylinder image using an image binarization algorithm to obtain a cylinder grayscale image;
[0069] S303: filtering and denoising the cylinder grayscale image using an image filtering algorithm to obtain a denoised cylinder image;
[0070] S304: Using a sub-pixel algorithm to extract the two horizontal boundaries l1, l2 of the cylinder and the hole center O in the cylinder image after denoisingc ;
[0071] S305: The distances from the hole center to the two boundaries are measured as x1 and x2 respectively, and the distance difference is |x1-x2|. Since the radius of the cylinder is R, the distance difference is converted into an angle θ: α represents the coefficient of deviation;
[0072] In this embodiment, the image correction algorithm, image binarization algorithm, image filtering algorithm and sub-pixel algorithm are all commonly used technical means in the field, and will not be described in detail here;
[0073] S4: The calculated angle θ is compared with the set angle range to generate an angle judgment result;
[0074] S5: If the angle θ is not within the set angle range, the angle deviation value is calculated, and the cylinder is rotated according to the angle deviation value by using the welding platform, and the process returns to step S3 to continue the angle judgment; if the angle θ is within the set angle range, the welding block is placed by the robot arm, and then the process goes to step S6;
[0075] In the present invention, the angle range is set as follows: (θ min ,θ max ), θ min Indicates the minimum angle, θ max Indicates the maximum angle;
[0076] If the angle θ is less than the minimum angle θ min , then the angle deviation is: Δθ1∈(Δθ min ,Δθ max ), Δθ min =θ min -θ, Δθ min Indicates the minimum angle deviation value, Δθ max =θ max -θ, Δθ max Indicates the maximum angle deviation value;
[0077] If the angle θ is greater than the maximum angle θ max , then the angle deviation is: Δθ2∈(Δθ ′ min ,Δθ ′ max ), Δθ ′ min =θ-θ max , Δθ ′ min Indicates the minimum angle deviation value, Δθ ′ max =θ-θ min , Δθ ′ maxIndicates the maximum angle deviation value;
[0078] S6: moving the robot arm to a designated shooting position above the welding block to shoot an image and obtain an image of the welding block hole position;
[0079] In the present invention, the designated shooting position is the welding block hole position, and the industrial camera on the robot arm is perpendicular to the horizontal section of the welding block;
[0080] S7: extracting four boundaries and the hole center of the welding block from the welding block hole image;
[0081] In the present invention, the process of extracting the boundary and hole center of the welding block using the image processing algorithm is as follows:
[0082] S701: Correcting the illumination and color of the welding block hole image using an image correction algorithm to obtain a corrected welding block image;
[0083] S702: graying the corrected welding block image using an image binarization algorithm to obtain a welding block grayscale image;
[0084] S703: filtering and denoising the welding block grayscale image using an image filtering algorithm to obtain a denoised welding block image;
[0085] S704: Using a sub-pixel algorithm to extract the four boundaries L1, L2, L3, L4 of the welding block and the hole center O in the denoised welding block image w ;
[0086] In this embodiment, the image correction algorithm, image binarization algorithm, image filtering algorithm and sub-pixel algorithm are all commonly used technical means in the field, and will not be described in detail here;
[0087] S8: Move the robot arm again to above the welding block hole position, take an image of the welding block hole position, and obtain a composite hole position image including the welding block hole position and the cylinder bore hole position;
[0088] S9: Calculate the concentricity of the welding block hole and the cylinder bore from the composite hole image, and compare them with the preset concentricity range to generate a concentricity judgment result;
[0089] In the present invention, the following image processing algorithm is used to process the composite hole position image, and the process of extracting the welding block hole position and the cylinder bore hole position is as follows:
[0090] S901: Correct the illumination and color of the composite hole position image using an image correction algorithm to obtain a corrected composite hole position image;
[0091] S902: graying the corrected composite hole position image using an image binarization algorithm to obtain a composite hole position grayscale image;
[0092] S903: filtering and denoising the composite hole position grayscale image using an image filtering algorithm to obtain a denoised composite hole position image;
[0093] S904: Using a sub-pixel algorithm to extract the hole center O of the welding block in the denoised composite hole image w and hole radius r w , and the bore center O of the cylinder c ; and calculate the hole radius r of the cylinder hole in the cylinder hole image in step S3 c ; Cylinder bore center O c is the center of the hole overlap area, that is, the center of the overlapped part of the hole range of the welding block and the hole range of the cylinder in the hole image after denoising;
[0094] S905: Calculate the hole area S of the welding block in the denoised hole image w =πr w 2 , cylinder bore area S c =πr c 2 , the distance d between the centers of the two holes and the overlapping area S z :
[0095]
[0096] Then calculate the concentricity μ:
[0097] S906: judging the concentricity with a preset concentricity range to generate a concentricity judgment result;
[0098] In this embodiment, the image correction algorithm, image binarization algorithm, image filtering algorithm and sub-pixel algorithm are all commonly used technical means in the field, and will not be described in detail here;
[0099] S10: If the concentricity is not within the preset concentricity range, the concentricity deviation value is calculated, and then the welding block is moved by the robot according to the concentricity deviation value, and the process goes to S7; if the concentricity is within the set concentricity range, the alignment is completed and welding starts;
[0100] In the present invention, when calculating the concentricity of two holes, it is necessary to take two images, namely, the welding block hole image obtained in step S6 and the composite hole image obtained in step S8, and the composite hole image is taken through the hole of the welding block; the preset concentricity range is: (ε, 1), ε represents the lower limit of concentricity; if the concentricity μ<ε, the concentricity deviation value ρ∈(ρ min ,ρ max ), ρ min Indicates the minimum concentricity deviation, ρmin =ε-μ;ρ max Indicates the maximum deviation of concentricity, ρ max =1-μ;
[0101] S11: moving the robot arm to photograph the welded welding block and the cylinder to obtain a combined image;
[0102] S12: performing image processing on the combined image to verify the alignment of the two holes and correct the preset concentricity range;
[0103] In the present invention, the process of verifying the alignment of two hole positions in the combined image and correcting the preset concentricity range is as follows:
[0104] S121: binarizing the combined image using an image binarization algorithm, and extracting the range of the hole position overlap area in the combined image in combination with an adaptive threshold algorithm;
[0105] S122: segmenting the hole overlap region using an image segmentation algorithm to obtain a hole segmentation image;
[0106] S123: Calculate the hole overlap area S in the hole segmentation image n , and overlap area S z Compare to distinguish good welding products from bad ones;
[0107] S124: According to the overlapping area S z , hole overlap area S n The preset concentricity range is corrected by the concentricity μ; when the cylinder barrel and the welding block are welded, the welding parts of the robot arm vibrate, resulting in concentricity deviation. Therefore, the concentricity μ is corrected according to the welding oscillation coefficient σ to obtain the corrected concentricity μ ′ : Then according to the corrected concentricity μ ′ Correct the lower limit of concentricity ε to correct the preset concentricity range (ε ′ ,1):
[0108] ε ′ Indicates the corrected lower limit of concentricity;
[0109] In this embodiment, the image segmentation algorithm, the image binarization algorithm and the adaptive threshold algorithm are all commonly used technical means in the field, and will not be described in detail here;
[0110] Example:
[0111] The robot arm places the cylinder on the welding platform for clamping, and drives the industrial camera to the designated shooting position of the cylinder (the cylinder hole position and the industrial camera of the robot arm is perpendicular to the upper section of the center position of the cylinder), and shoots the cylinder hole position image; the illumination and color of the cylinder hole position image are corrected by the image correction algorithm to obtain the corrected cylinder image; the image binarization algorithm is used to grayscale the corrected cylinder image to obtain the cylinder grayscale image; the image filtering algorithm is used to filter and denoise the cylinder grayscale image to obtain the denoised cylinder image; the sub-pixel algorithm is used to extract the two boundaries l1, l2 of the cylinder and the hole center O in the denoised cylinder image. c ; The distances from the hole center to the two boundaries are x1 and x2 respectively, then the distance difference is |x1-x2|. Since the radius of the cylinder is R, the distance difference is converted into an angle θ;
[0112] The calculated angle is compared with the set angle range to generate an angle judgment result: if the angle is not within the set angle range, the angle deviation value is calculated, and the welding platform rotates the cylinder according to the angle deviation value, and uses the image processing algorithm to process the cylinder bore image and perform angle conversion; if the angle is within the set angle range, the robotic arm places the welding block; the robotic arm is moved to the designated shooting position of the welding block (the welding block hole position and the industrial camera of the robotic arm is perpendicular to the upper section of the center position of the welding block) to capture the image to obtain the welding block hole position image; the image correction algorithm is used to correct the illumination and color of the welding block hole position image to obtain the corrected welding block image; the image binarization algorithm is used to grayscale the corrected welding block image to obtain the welding block grayscale image; the image filtering algorithm is used to filter and denoise the welding block grayscale image to obtain the denoised welding block image; the sub-pixel algorithm is used to extract the four boundaries L1, L2, L3, L4 of the welding block and the hole center O in the denoised welding block image. w ;
[0113] The robot arm is moved again through the welding block hole to capture the image of the cylinder hole to obtain a composite hole image; the illumination and color of the composite hole image are corrected by using an image correction algorithm to obtain a corrected composite hole image; the corrected composite hole image is grayed by using an image binarization algorithm to obtain a composite hole gray image; the composite hole gray image is filtered and denoised by using an image filtering algorithm to obtain a denoised composite hole image; the hole center O of the welding block in the denoised composite hole image is extracted by using a sub-pixel algorithm w and hole radius r w and the bore center O of the cylinder c and hole radius r c ; Calculate the hole area S of the welding block respectively w , the hole area S of the cylinder c, the distance d between the centers of the two holes and the overlapping area S z ; The concentricity is judged against the preset concentricity range (ε, 1) to generate a concentricity judgment result: if the concentricity is not within the preset concentricity range, the concentricity deviation value is calculated, and the robot moves the welding block according to the concentricity deviation value, and extracts the four boundaries and hole center of the welding block from the welding block hole image; if the concentricity is within the set concentricity range, the alignment is completed and welding begins;
[0114] The mobile robot arm takes pictures of the welded welding block and cylinder to obtain a combined image; the combined image is binarized using an image binarization algorithm, and the hole overlap area (the common intersection area when two holes are stacked up and down) in the combined image is extracted in combination with an adaptive threshold algorithm; the hole overlap area is segmented using an image segmentation algorithm to obtain a hole segmentation image; the hole overlap area S in the hole segmentation image is calculated n , and overlap area S z Compare to distinguish good welding products from bad ones; then according to the overlapping area S z , hole overlap area S n The preset concentricity range is corrected by the concentricity μ; when the cylinder barrel and the welding block are welded, the welding parts of the robot arm vibrate, resulting in concentricity deviation. Therefore, the concentricity μ is corrected according to the welding oscillation coefficient σ to obtain the corrected concentricity μ ′ .
Claims
1. A cylinder bore welding alignment method, characterized in that: The method comprises the following steps in sequence; S1: The robot arm places the cylinder on the welding platform for clamping; S2: The robotic arm drives the industrial camera to the designated shooting position above the cylinder to shoot images and obtain the cylinder bore image; S3: extracting two horizontal boundaries of the cylinder wall and the hole center from the cylinder hole image, calculating the distance difference from the hole center to the two boundaries, and converting the distance difference into an angle; S4: judging the calculated angle and the set angle range to generate an angle judgment result; S5: If the angle is not within the set angle range, the angle deviation value is calculated, and the cylinder is rotated according to the angle deviation value by using the welding platform, and the process returns to step S3 to continue the angle judgment; if the angle is within the set angle range, the robot arm places the welding block; S6: moving the robot arm to a designated shooting position of the welding block to shoot an image, so as to obtain an image of a hole position of the welding block; S7: extracting four boundaries and the hole center of the welding block from the welding block hole image; S8: Move the robot arm again to above the welding block hole position, capture an image of the welding block hole position, and obtain a composite hole position image including the welding block hole position and the cylinder bore hole position; S9: Calculate the concentricity of the welding block hole and the cylinder bore from the composite hole image, and compare them with the preset concentricity range to generate a concentricity judgment result; S10: If the concentricity is not within the preset concentricity range, the concentricity deviation value is calculated, and the robot arm moves the welding block according to the concentricity deviation value and turns to S7; if the concentricity is within the set concentricity range, the alignment is completed and welding starts.
2. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S2 and step S6, the designated shooting position is a hole position of the cylinder or a hole position of the welding block, and the industrial camera of the robot arm is perpendicular to the horizontal axial section of the cylinder or the horizontal section of the welding block.
3. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S3, the distance difference is converted into an angle by the following image processing algorithm: S301: Correcting the illumination and color of the cylinder bore image using an image correction algorithm to obtain a corrected cylinder image; S302: graying the corrected cylinder image using an image binarization algorithm to obtain a cylinder grayscale image; S303: filtering and denoising the cylinder grayscale image using an image filtering algorithm to obtain a denoised cylinder image; S304: Using a sub-pixel algorithm to extract the two horizontal boundaries l1, l2 of the cylinder and the hole center O in the cylinder image after denoising c ; S305: The distances from the hole center to the two boundaries are measured as x1 and x2 respectively, and the distance difference is |x1-x2|. Since the radius of the cylinder is R, the distance difference is converted into an angle θ: α represents the coefficient of variation.
4. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S4 and step S5, the angle range is set as: (θ min ,θ max ), θ min Indicates the minimum angle, θ max Indicates the maximum angle; if the angle is less than the minimum angle, the angle deviation value is: Δθ1∈(Δθ min ,Δθ max ), Δθ min =θ min -θ, Δθ min Indicates the minimum angle deviation value, Δθ max =θ max -θ, Δθ max Indicates the maximum angle deviation value; if the angle is greater than the maximum angle, the angle deviation value is: Δθ2∈(Δθ ′ min ,Δθ ′ max ), Δθ ′ min =θ-θ max , Δθ ′ min Indicates the minimum angle deviation value, Δθ ′ max =θ-θ min , Δθ ′ max Indicates the maximum angle deviation value.
5. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S7, the process of processing the welding block hole position image using the following image processing algorithm is as follows: S701: Correcting the illumination and color of the welding block hole image using an image correction algorithm to obtain a corrected welding block image; S702: graying the corrected welding block image using an image binarization algorithm to obtain a welding block grayscale image; S703: filtering and denoising the welding block grayscale image using an image filtering algorithm to obtain a denoised welding block image; S704: Using a sub-pixel algorithm to extract the four boundaries L1, L2, L3, L4 of the welding block and the hole center O in the denoised welding block image w .
6. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S9, the composite hole position image is processed using the following image processing algorithm, and the process of extracting the welding block hole position and the cylinder bore hole position is as follows: S901: Correct the illumination and color of the composite hole position image using an image correction algorithm to obtain a corrected composite hole position image; S902: graying the corrected composite hole position image using an image binarization algorithm to obtain a composite hole position grayscale image; S903: filtering and denoising the composite hole position grayscale image using an image filtering algorithm to obtain a denoised composite hole position image; S904: Using a sub-pixel algorithm to extract the hole center O of the welding block in the denoised composite hole image w and hole radius r w , and the bore center O of the cylinder c ; and calculate the hole radius r of the cylinder hole in the cylinder hole image in step S3 c ; Cylinder bore center O c is the center of the hole overlap area, that is, the center of the overlapped part of the hole range of the welding block and the hole range of the cylinder in the hole image after denoising; S905: Calculate the hole area S of the welding block in the denoised hole image w =πr w 2 , the hole area S of the cylinder c =πr c 2 , the distance d between the centers of the two holes and the overlapping area S z : Then calculate the concentricity μ: S906: The concentricity is judged against a preset concentricity range to generate a concentricity judgment result.
7. The cylinder bore welding alignment method according to claim 1, characterized in that: In step S10, the preset concentricity range is: (ε, 1), ε represents the lower limit of concentricity; if the concentricity μ<ε, the concentricity deviation value ρ∈(ρ min ,ρ max ), ρ min Indicates the minimum concentricity deviation, ρ min =ε-μ;ρ max Indicates the maximum deviation of concentricity, ρ max =1-μ.
8. The cylinder bore welding alignment method according to claim 1, characterized in that: The welding alignment method also includes welding verification steps: S11: moving the robot arm to photograph the welded welding block and the cylinder to obtain a combined image; S12: performing image processing on the combined image to verify the alignment of the two holes and correct the preset concentricity range.
9. The cylinder bore welding alignment method according to claim 8, characterized in that: In step S12, the alignment of the two holes in the combined image is verified to correct the preset concentricity range. S121: binarizing the combined image using an image binarization algorithm, and extracting a hole overlap region in the combined image using an adaptive threshold algorithm; S122: segmenting the hole overlap region using an image segmentation algorithm to obtain a hole segmentation image; S123: Calculate the hole overlap area S in the hole segmentation image n , and overlap area S z Compare to distinguish good welding products from bad welding products; S124: According to the overlapping area S z , hole overlap area S n The preset concentricity range is corrected by the concentricity μ; when the cylinder barrel and the welding block are welded, the welding parts of the robot arm vibrate, resulting in concentricity deviation. Therefore, the concentricity μ is corrected according to the welding oscillation coefficient σ to obtain the corrected concentricity μ ′ : Then according to the corrected concentricity μ ′ Correct the lower limit of concentricity ε to correct the preset concentricity range (ε ′ ,1): ε ′ Indicates the corrected lower limit of concentricity.
