Sealing high-speed welding seam searching process applying CCD visual sensor
By calibrating and image preprocessing of the CCD vision sensor and calculating the weld position in combination with the edge detection algorithm, the problems of inaccurate weld positioning and insufficient stability of high-speed welding in the prior art are solved, and efficient and stable sealing welding is achieved.
Patent Information
- Application Number
- CN202510223533.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-30
AI Technical Summary
The existing weld positioning technology based on CCD vision sensors has problems such as degradation in image quality and inaccurate identification in complex welding environments, and it is difficult to meet the real-time and stability requirements of high-speed seal welding.
By calibrating the CCD vision sensor, setting key parameters such as exposure time and gain, collecting and preprocessing images, using edge detection algorithms to extract weld edge profiles, calculate weld position coordinates, and controlling the sealing equipment to perform welding.
It improves the accuracy and speed of weld positioning, ensures the efficiency and stability of the sealing welding process, and realizes real-time monitoring and adjustment of welding quality.
Smart Images

Figure CN120055608A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic control, and specifically relates to a high-speed seam searching process for sealing using a CCD vision sensor. Background Art
[0002] In the field of welding technology, especially during the high-speed seam searching process for sealing, accurately positioning the weld seam location and ensuring welding quality have always been the key points of technological improvement. Traditional weld seam positioning methods mainly rely on manual marking or mechanical sensors. These methods are not only inefficient but also often difficult to ensure the accuracy and stability of positioning when facing complex or irregular weld seams. With the rapid development of machine vision technology, CCD vision sensors, due to their high resolution, high sensitivity, and good environmental adaptability, have gradually been applied to weld seam positioning and tracking. By collecting image information of the weld seam area and using image processing algorithms for analysis, accurate identification of the weld seam location can be achieved, and then the movement of the welding equipment can be guided to realize automatic welding.
[0003] However, existing weld seam positioning technologies based on CCD vision sensors still have some problems and deficiencies. On the one hand, due to the complex and changeable welding environment, factors such as lighting conditions, smoke, and spatter may interfere with image acquisition, resulting in a decrease in image quality and thus affecting the accuracy of weld seam recognition. On the other hand, the forms of weld seams are diverse, such as straight lines, curves, intersections, etc. Different forms of weld seams require different image processing algorithms for matching and recognition, which undoubtedly increases the complexity and implementation difficulty of the technology. In addition, the existing weld seam positioning technologies still need to be improved in terms of real-time performance and stability to meet the requirements of high-speed sealing welding. For this reason, we propose a high-speed seam searching process for sealing using a CCD vision sensor. Summary of the Invention
[0004] To solve the above technical problems, a high-speed seam searching process for sealing using a CCD vision sensor is provided, and this technical solution solves the above problems.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A high-speed seam searching process for sealing using a CCD vision sensor, comprising:
[0007] Calibrate the CCD vision sensor, set the key parameters of the sensor according to the equipment operating environment and accuracy requirements, and calculate the pixel equivalent through a standard size template. The key parameters include: exposure time and gain;
[0008] Use the CCD vision sensor to collect images of the sealing area to obtain images with weld seam information;
[0009] Perform preprocessing on the collected images, and the preprocessing includes: grayscale conversion, noise reduction, and contrast enhancement;
[0010] Process the preprocessed image through an edge detection algorithm to extract the edge contour of the weld seam. Based on the extracted edge contour, calculate the position coordinates of the weld seam in the actual space through an algorithm;
[0011] Based on the calculated coordinates, control the actuator of the sealing device to complete the welding of the weld seam according to the predetermined welding path.
[0012] Preferably, the method for calibrating the CCD vision sensor is as follows:
[0013] Use a professional illuminometer to measure the light intensity at multiple representative positions in the actual environment where the device operates, record the light intensity values at these positions, and take the average value as the ambient light intensity;
[0014] Make a preliminary estimate of the exposure time. Based on the preliminary estimated exposure time as the starting value, conduct several shooting tests. After each shooting, observe the image brightness and detail performance, and adjust the exposure time, setting it to 5%-10% of the current exposure time;
[0015] Among them, the formula for the preliminary estimate of the exposure time is:
[0016]
[0017] In the formula, t exp represents the preliminarily estimated exposure time, k represents a specific constant of the camera, provided by the sensor manufacturer, L represents the ambient light intensity, A represents the camera aperture size, which is a fixed value if the aperture is not adjustable, and G represents the initially set gain value.
[0018] Preferably, the grayscale conversion is performed using the weighted average method. Among them, the formula for the weighted balance average method is:
[0019] Gray = 0.299R + 0.587G + 0.114B
[0020] In the formula, Gray represents the gray value of the corresponding pixel point in the converted grayscale image, and R, G, and B respectively represent the red, green, and blue component values of the image pixel;
[0021] The noise reduction uses the Gaussian filtering algorithm, and the Gaussian filtering template matrix is:
[0022]
[0023] Realize noise reduction through convolution with the image pixels;
[0024] Histogram equalization algorithm is used to enhance the contrast by redistributing the gray values of the image pixels to make the gray histogram evenly distributed. Among them, the method steps of enhancing the contrast by using the histogram equalization algorithm are as follows:
[0025] Assume that the input image gray level range is [0, L gray -1], where L gray represents the total number of gray levels. Assume that the size of the image is M×N, that is, the image contains M rows and N columns of pixels. For each gray level κ (κ = 0, 1,..., L gray -1), count the number of times n it appears in the image κ ;
[0026] Based on the counted number of times the gray level appears, calculate the probability of each gray level appearing in the image. The calculation formula is as follows:
[0027]
[0028] In the formula, p κ represents the probability of each gray level appearing in the image;
[0029] The cumulative distribution function c κ represents the cumulative probability that the pixels with gray levels less than or equal to κ appear in the image. The calculation formula is as follows:
[0030]
[0031] According to the cumulative distribution function, map each gray level in the original image to a new gray level. The mapping formula is as follows:
[0032]
[0033] In the formula, s k represents the new gray level, represents the floor operation;
[0034] Traverse each pixel of the original image, and according to the obtained gray level mapping relationship, replace the original gray level of each pixel with the corresponding new gray level, so as to generate an equalized image.
[0035] Preferably, the specific steps of edge detection are as follows:
[0036] Use a Gaussian filter to smooth the image and calculate the gradient magnitude and direction of each pixel point;
[0037] Among them, the expression of the Gaussian function is:
[0038]
[0039] Wherein, G(x,y) represents the value of the Gaussian function at the point with coordinates (x,y) in the image plane, σ represents the standard deviation of the Gaussian function, is the exponential part of the Gaussian function, x 2 +y 2 represents the square of the Euclidean distance between a certain point and the central pixel, is the normalization coefficient;
[0040] Let the original image be I(x,y), and the image after Gaussian filtering is obtained through a convolution operation:
[0041]
[0042] Wherein, S(x,y) represents the pixel value at the position with image coordinates (x,y) after Gaussian filtering, (I*G)(x,y) is the representation of the convolution operation, I represents the original image, G represents the Gaussian filter, I(x+i,y+i) represents the pixel value at the position with coordinates (x+i,y+i) in the original image, and G(i,j) represents the coefficient value at the position with coordinates (i,j) in the Gaussian filter;
[0043] Among them, the method for calculating the gradient magnitude and direction of each pixel point is:
[0044] Use the Sobel operator to calculate the gradients of the image in the x and y directions. Among them, the convolution kernels of the Sobel operator in the x and y directions are respectively:
[0045]
[0046] The gradients of the image in the x and y directions are respectively:
[0047]
[0048] The calculation formulas for the gradient magnitude G(x,y) and the gradient direction θ(x,y) are:
[0049]
[0050] Perform non-maximum suppression on the gradient magnitude to remove non-edge pixels;
[0051] Determine the true edge points through double-threshold detection and edge tracking. The double-threshold detection uses two thresholds: the low threshold T L and the high threshold T H , and T L <T H ;
[0052] For the pixel points where the gradient magnitude G(x,y) is greater than the high threshold T H , mark them as strong edge points;
[0053] For the pixel points where the gradient magnitude G(x, y) is between the low threshold T L and the high threshold T H , mark them as weak edge points;
[0054] For the pixel points where the gradient magnitude G(x, y) is less than the low threshold T L , mark them as non-edge points.
[0055] Preferably, after extracting the weld edge contour, the least squares method is used for contour fitting:
[0056] Let the straight line equation be y = kx + b, and given the coordinates (x i , y i ) of n edge points, i = 1, 2,..., n, solve the values of k and b by minimizing the objective function:
[0057]
[0058] Among them, the solution formula for the k value is:
[0059]
[0060] After fitting, it can more accurately represent the weld edge contour.
[0061] Preferably, when controlling the actuator of the sealing device to weld according to the predetermined welding path, the PID control algorithm is adopted, and the output formula is:
[0062]
[0063] In the formula, u(t) represents the output of the controller, K p represents the proportional coefficient, K i represents the integral coefficient, K d represents the differential coefficient, e(t) represents the error value at the current moment, that is, the deviation value between the actual weld position and the predetermined welding path. By adjusting the values of K p , K i , K d , the actuator is made to track the predetermined welding path.
[0064] Preferably, during the welding process, the welding quality is monitored in real time through a CCD vision sensor, and the monitoring contents include the weld width, height, and surface flatness;
[0065] For the weld width monitoring, calculate the pixel distance between the weld edges through the image processing algorithm, and then convert it to the actual width according to the camera calibration parameters. The formula is:
[0066]
[0067] Where ω represents the actual width of the weld, (x 1 , x 2 ) represents the pixel coordinates of the weld edge in the image, Z represents the distance from the camera to the object, and f x represents the focal length of the camera in the x direction;
[0068] When abnormal welding quality is detected, the abnormalities include: the weld width exceeding the preset threshold range, then the welding parameters are adjusted in a timely manner and welding is stopped.
[0069] Preferably, calculating the position coordinates of the weld in the actual space by an algorithm specifically includes:
[0070] The coordinate transformation algorithm is based on the camera calibration parameters. The camera calibration parameters are obtained by photographing a calibration plate with known dimensions. The coordinate transformation formula is:
[0071]
[0072] Where (X, Y) represents the actual space coordinates, (x, y) represents the image pixel coordinates, and (c x , c y ) represents the coordinates of the camera optical center in the image plane, and f x , f y respectively represent the focal lengths of the camera in the x and y directions, and Z represents the distance from the camera to the object.
[0073] Preferably, the execution mechanism of the sealing device includes a welding head, a driving device, and a motion platform;
[0074] The welding head is connected to the driving device, and the driving device is installed on the motion platform;
[0075] The driving device uses a servo motor. The servo motor rotates to drive the welding head to move along a predetermined welding path; the motion platform uses a high-precision linear guide and ball screw to ensure the motion accuracy and stability of the motion platform.
[0076] Preferably, it includes a data storage and analysis system. During the entire process, the image data collected by the CCD vision sensor, the calculated weld position coordinate data, welding parameter data, and welding quality monitoring data are stored;
[0077] The data storage uses a database management system to analyze the stored data, and summarize the laws in the welding process through data analysis to optimize the welding process parameters.
[0078] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0079] The high-speed weld seam searching process for sealing proposed by the present invention performs weld seam positioning through a high-precision CCD vision sensor, greatly improving the accuracy and speed of positioning, making the sealing welding process more efficient and stable. The sensor calibration and image preprocessing steps ensure the quality of the acquired images, laying a solid foundation for subsequent edge detection and weld seam coordinate calculation. Through image processing algorithms, the edge contour of the weld seam is effectively extracted, and the position coordinates of the weld seam in the actual space are accurately calculated by the algorithm. This not only improves the welding accuracy but also makes the presetting and adjustment of the welding path more flexible and precise. The real-time monitoring and quality control during the welding process further ensure the stability and reliability of the welding quality. Brief Description of the Drawings
[0080] Figure 1 It is a method step diagram of the high-speed weld seam searching process for sealing. Detailed Embodiments
[0081] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments in the following description are only examples, and those skilled in the art can think of other obvious variations.
[0082] Referring to Figure 1 As shown, a high-speed weld seam searching process for sealing using a CCD vision sensor includes:
[0083] Calibrating the CCD vision sensor is a crucial starting step. Since the equipment operating environment is complex and variable, different lighting conditions, temperatures, vibrations, and other factors will affect the performance of the sensor. Therefore, it is necessary to carefully set the key parameters of the sensor according to the specific equipment operating environment and accuracy requirements. Among them, the exposure time determines the light accumulation time of the image sensor. An appropriate exposure time can make the weld seam features clearly imaged, avoiding being too bright or too dark; the gain is used to adjust the signal amplification factor to ensure that the image signal is within a reasonable range. Through a standard size template, the pixel equivalent is accurately calculated, providing an accurate basis for subsequent position measurement.
[0084] Next, use the CCD vision sensor to collect images of the sealing area to obtain images with weld seam information. The collected images often have various interferences, so preprocessing needs to be performed on them. Grayscale processing converts the color image into a grayscale image, simplifying the subsequent processing process; noise reduction removes the noise points in the image through filtering and other methods to improve the image quality; contrast enhancement makes the difference between the weld seam and the background more obvious, facilitating subsequent processing.
[0085] By processing the preprocessed image through an edge detection algorithm, the edge contour of the weld can be accurately extracted. Based on the extracted edge contour, the position coordinates of the weld in the actual space can be calculated through a specific algorithm. Finally, based on the calculated coordinates, the actuator of the sealing device is controlled to complete the welding of the weld according to the predetermined welding path, realizing efficient and accurate sealing operation.
[0086] The method for calibrating the CCD vision sensor is as follows:
[0087] Use a professional illuminometer to measure the light intensity at multiple representative positions in the actual environment where the equipment operates, record the light intensity values at these positions, and take the average value as the ambient light intensity;
[0088] Make a preliminary estimate of the exposure time. Based on the initially estimated exposure time as the starting value, conduct several shooting tests. After each shooting, observe the image brightness and detail performance, and adjust the exposure time, setting it to 5%-10% of the current exposure time;
[0089] Among them, the formula for the preliminary estimate of the exposure time is:
[0090]
[0091] In the formula, t exp represents the initially estimated exposure time, k represents a specific constant of the camera, provided by the sensor manufacturer, L represents the ambient light intensity, A represents the camera aperture size, which is a fixed value if the aperture is not adjustable, and G represents the initially set gain value.
[0092] Measuring the ambient light intensity with a professional illuminometer can accurately grasp the lighting conditions during the actual operation of the equipment, providing a reliable basis for subsequent parameter setting. Based on the formula to initially estimate the exposure time and then optimize it through shooting tests, the appropriate exposure time can be quickly found in a complex environment, ensuring that the CCD vision sensor obtains clear and detailed images, and improving the accuracy of the weld search process.
[0093] The grayscale processing adopts the weighted average method. Among them, the formula for the weighted balanced average method is:
[0094] Gray = 0.299R + 0.587G + 0.114B
[0095] In the formula, Gray represents the grayscale value of the corresponding pixel point in the converted grayscale image, and R, G, and B respectively represent the red, green, and blue component values of the image pixel;
[0096] The noise reduction adopts the Gaussian filtering algorithm, and the Gaussian filtering template matrix is:
[0097]
[0098] Noise reduction is achieved by convolving with image pixels;
[0099] Histogram equalization algorithm is used to enhance the contrast, redistributing the gray values of the image pixels to make the gray histogram evenly distributed. Among them, the method steps of using the histogram equalization algorithm to enhance the contrast are as follows:
[0100] Assume that the input image gray level range is [0, L gray -1], where L gray represents the total number of gray levels. Assume that the size of the image is M×N, that is, the image contains M rows and N columns of pixels. For each gray level κ (κ = 0, 1,..., L gray -1), count the number of times n it appears in the image κ ;
[0101] Based on the counted number of times the gray level appears, calculate the probability of each gray level appearing in the image. The calculation formula is as follows:
[0102]
[0103] In the formula, p κ represents the probability of each gray level appearing in the image;
[0104] The cumulative distribution function c κ represents the cumulative probability of pixels with gray levels less than or equal to κ appearing in the image. The calculation formula is as follows:
[0105]
[0106] According to the cumulative distribution function, map each gray level in the original image to a new gray level. The mapping formula is as follows:
[0107]
[0108] In the formula, s k represents the new gray level, represents the floor operation;
[0109] Traverse each pixel of the original image. According to the obtained gray level mapping relationship, replace the original gray level of each pixel with the corresponding new gray level, thereby generating an equalized image.
[0110] The grayscale processing adopts the weighted average method, which can comprehensively consider the different effects of the red, green, and blue components on human vision, better conform to the characteristics of human vision, and the converted grayscale image can better retain the details and features of the image. The Gaussian filtering algorithm convolves the Gaussian filter template matrix with the image pixels, effectively removing the Gaussian noise in the image, and maximizing the retention of the edge information of the image while smoothing the image. The histogram equalization algorithm redistributes the gray values of the image pixels, making the gray histogram evenly distributed, significantly enhancing the image contrast, making the image details clearer, and making it easier to extract and analyze the subsequent weld edge contours, improving the accuracy of the entire weld search process.
[0111] The specific steps of edge detection are as follows:
[0112] Smooth the image using a Gaussian filter and calculate the gradient magnitude and direction of each pixel point;
[0113] Among them, the expression of the Gaussian function is:
[0114]
[0115] In the formula, G(x, y) represents the value of the Gaussian function at the point with coordinates (x, y) in the image plane, σ represents the standard deviation of the Gaussian function, is the exponential part of the Gaussian function, x 2 +y 2 represents the square of the Euclidean distance between a certain point and the central pixel, is the normalization coefficient;
[0116] Let the original image be I(x, y), and the image after Gaussian filtering is obtained through convolution operation:
[0117]
[0118] In the formula, S(x, y) represents the pixel value at the position with image coordinates (x, y) after Gaussian filtering, (I*G)(x, y) is the representation of the convolution operation, I represents the original image, G represents the Gaussian filter, I(x + i, y + i) represents the pixel value at the position with coordinates (x + i, y + i) in the original image, and G(i, j) represents the coefficient value at the position with coordinates (i, j) in the Gaussian filter;
[0119] Among them, the method for calculating the gradient magnitude and direction of each pixel point is:
[0120] Use the Sobel operator to calculate the gradients of the image in the x and y directions. Among them, the convolution kernels of the Sobel operator in the x and y directions are respectively:
[0121]
[0122] The gradients of the image in the x and y directions are respectively:
[0123]
[0124] The calculation formulas for the gradient magnitude G(x,y) and the gradient direction θ(x,y) are:
[0125]
[0126] Perform non-maximum suppression on the gradient magnitude to remove non-edge pixels;
[0127] Determine the true edge points through double-threshold detection and edge tracking. The double-threshold detection uses two thresholds: the low threshold T L and the high threshold T H , and T L < T H ;
[0128] For the pixel points where the gradient magnitude G(x,y) is greater than the high threshold T H , mark them as strong edge points;
[0129] For the pixel points where the gradient magnitude G(x,y) is between the low threshold T L and the high threshold T H , mark them as weak edge points;
[0130] For the pixel points where the gradient magnitude G(x,y) is less than the low threshold T L , mark them as non-edge points. Smoothing the image with a Gaussian filter can effectively remove noise interference, laying a foundation for accurate edge detection. At the same time, when calculating the gradient magnitude and direction, using the Sobel operator can quickly and accurately capture the gradient changes of the image in the x and y directions, and then obtain reliable gradient magnitude and direction. Non-maximum suppression removes non-edge pixels, significantly reducing false detections. Double-threshold detection distinguishes strong, weak, and non-edge points through high and low thresholds, and combines edge tracking to determine the true edges, which not only retains important edge information but also effectively suppresses the pseudo-edges generated by noise, significantly improving the accuracy of weld edge contour extraction.
[0131] After extracting the weld edge contour, use the least squares method for contour fitting:
[0132] Let the straight line equation be y = kx + b. Given the coordinates (x i , y i ) of n edge points, i = 1, 2,..., n, solve the values of k and b by minimizing the objective function:
[0133]
[0134] Among them, the solution formula for the value of k is:
[0135]
[0136] It represents the weld edge contour more accurately after fitting.
[0137] Using the least squares method for contour fitting can comprehensively consider the information of numerous edge points. By minimizing the objective function, the parameters of the straight-line equation are accurately solved, and the discrete edge points are fitted into a smooth and continuous straight line, effectively removing measurement errors and noise interference, representing the weld edge contour more accurately, and providing a reliable basis for subsequent weld position calculation.
[0138] When controlling the actuator of the sealing device to weld along the predetermined welding path, the PID control algorithm is adopted, and the output formula is:
[0139]
[0140] In the formula, u(t) represents the output of the controller, K p represents the proportional coefficient, K i represents the integral coefficient, K d represents the differential coefficient, e(t) represents the error value at the current moment, that is, the deviation value between the actual weld position and the predetermined welding path. By adjusting the values of K p , K i , K d , the actuator is enabled to track the predetermined welding path. Adopting the PID control algorithm can comprehensively adjust according to the deviation between the actual weld position and the predetermined path in terms of proportion, integral, and differential. The proportional link responds quickly to the deviation, the integral link eliminates the cumulative error, and the differential link predicts the change trend. The three-pronged approach enables the actuator to accurately track the predetermined path, ensuring the welding quality and efficiency.
[0141] During the welding process, the welding quality is monitored in real time through a CCD vision sensor. The monitoring contents include the weld width, height, and surface flatness;
[0142] For the monitoring of the weld width, the pixel distance between the weld edges is calculated through an image processing algorithm and then converted into the actual width according to the camera calibration parameters. The formula is:
[0143]
[0144] In the formula, ω represents the actual weld width, (x 1 , x 2 ) represents the pixel coordinates of the weld edges in the image, Z represents the distance from the camera to the object, and f x represents the focal length of the camera in the x direction;
[0145] When welding quality anomalies are detected, the anomalies include: the weld width exceeding the preset threshold range, then the welding parameters are adjusted in a timely manner and welding is stopped. The welding quality is monitored in real time using a CCD vision sensor, which can promptly detect problems with the weld width, height, and surface flatness. The weld width is calculated through an image processing algorithm and converted according to the calibration parameters, with accurate data. Once an anomaly occurs, the parameters are immediately adjusted and welding is stopped, effectively avoiding the production of defective products, saving costs, and ensuring stable and reliable welding quality.
[0146] Calculating the position coordinates of the weld in the actual space through the algorithm specifically includes:
[0147] The coordinate transformation algorithm is based on the camera calibration parameters. The camera calibration parameters are obtained by photographing a calibration plate with known dimensions. The coordinate transformation formula is:
[0148]
[0149] In the formula, (X,Y) represents the actual space coordinates, (x,y) represents the image pixel coordinates, (c x ,c y ) represents the coordinates of the camera optical center in the image plane, f x , f y respectively represent the focal lengths of the camera in the x and y directions, and Z represents the distance from the camera to the object.
[0150] Using the coordinate transformation algorithm in combination with the camera calibration parameters to calculate the actual space position coordinates of the weld can accurately map the image pixel coordinates to the actual space. Photographing the calibration plate to obtain the parameters ensures the accuracy of the coordinate transformation. This formula comprehensively considers various factors of the camera and can efficiently and accurately determine the weld position, providing a reliable basis for subsequent welding execution.
[0151] The execution mechanism of the sealing device includes a welding head, a driving device, and a moving platform;
[0152] The welding head is connected to the driving device, and the driving device is installed on the moving platform;
[0153] The driving device uses a servo motor. The servo motor rotates to drive the welding head to move along a predetermined welding path; the moving platform uses a high-precision linear guide rail and a ball screw to ensure the motion accuracy and stability of the moving platform. The design advantages of the execution mechanism of the sealing device are obvious. The servo motor drives the welding head with precise control and can move strictly along the predetermined path, ensuring the accuracy of the welding trajectory; the moving platform composed of a high-precision linear guide rail and a ball screw ensures high precision and stability of the motion, reduces vibration deviation, and comprehensively improves the welding quality and work efficiency.
[0154] It includes a data storage and analysis system, which stores the image data collected by the CCD vision sensor, the calculated weld position coordinate data, the welding parameter data, and the welding quality monitoring data during the entire process.
[0155] The data storage uses a database management system to analyze the stored data. By analyzing the data, the rules in the welding process are summarized, and the welding process parameters are optimized. The data storage and analysis system is crucial in the process. It uses the database management system to store various types of key data, providing a complete basis for subsequent analysis. By analyzing the data, the rules of the welding process can be accurately understood, so as to optimize the process parameters targeted, continuously improve the welding quality, and help the production to be efficient and stable.
[0156] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection required by the present invention is defined by the appended claims and their equivalents.
Claims
1. A high-speed welding seam finding process for sealing using a CCD visual sensor, characterized in that: include: Calibrate the CCD vision sensor, set the key parameters of the sensor according to the equipment operating environment and accuracy requirements, and calculate the pixel equivalent through the standard size template. The key parameters include: exposure time and gain; Use CCD visual sensor to collect images of the sealing area and obtain images with weld information; Preprocessing the collected images, including grayscale conversion, noise reduction and contrast enhancement; The preprocessed image is processed by edge detection algorithm to extract the edge contour of the weld, and the position coordinates of the weld in the actual space are calculated by the algorithm based on the extracted edge contour; Based on the calculated coordinates, the sealing equipment actuator is controlled to complete the weld according to the predetermined welding path.
2. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: The method for calibrating the CCD vision sensor is: Use a professional light meter to measure the light intensity at several representative locations in the actual environment where the equipment is running, record the light intensity values at these locations, and take the average value as the ambient light intensity; Make a preliminary estimate of the exposure time, and use the estimated exposure time as the starting value to conduct several shooting tests. After each shot, observe the image brightness and detail performance, and adjust the exposure time to 5%-10% of the current exposure time. Among them, the formula for preliminary estimation of exposure time is: Where, t exp It represents the preliminary estimated exposure time, k represents the camera-specific constant provided by the sensor manufacturer, L represents the ambient light intensity, A represents the camera aperture size, and is a fixed value if the aperture is not adjustable, and G represents the initially set gain value.
3. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: Grayscale processing adopts weighted average method, where the formula of weighted balanced average method is: Gray=0.299R+0.587G+0.114B In the formula, Gray represents the gray value of the corresponding pixel in the converted grayscale image, and R, G, and B represent the red, green, and blue component values of the image pixel respectively; The noise reduction adopts Gaussian filtering algorithm, and the Gaussian filtering template matrix is: Noise reduction is achieved by convolution with image pixels; The contrast enhancement method uses a histogram equalization algorithm to redistribute the grayscale values of image pixels so that the grayscale histogram is evenly distributed. The steps of using the histogram equalization algorithm to enhance the contrast are as follows: Assume that the grayscale range of the input image is [0, L gray -1], where L gray Represents the total number of gray levels. Assume that the image size is M×N, that is, the image contains M rows and N columns of pixels. For each gray level κ (κ=0,1,...,L gray -1), count the number of times it appears in the image n κ ; Based on the statistical number of gray levels, the probability of each gray level appearing in the image is calculated, where the calculation formula is: In the formula, p κ Represents the probability of each gray level appearing in the image; Cumulative distribution function c κ It represents the cumulative probability of pixels with gray level less than or equal to κ appearing in the image, and the calculation formula is: According to the cumulative distribution function, each gray level in the original image is mapped to a new gray level. The mapping formula is: In the formula, s k represents the new gray level, Indicates a round-down operation; Traverse each pixel of the original image, and replace the original gray level of each pixel with the corresponding new gray level according to the obtained gray level mapping relationship, so as to generate a balanced image.
4. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: The specific steps of edge detection are: Use Gaussian filter to smooth the image and calculate the gradient magnitude and direction of each pixel; The expression of Gaussian function is: In the formula, G(x,y) represents the Gaussian function value at the point with coordinates (x,y) in the image plane, σ represents the standard deviation of the Gaussian function, is the exponential part of the Gaussian function, x 2 +y 2 Represents the square of the Euclidean distance between a point and the center pixel, is the normalization coefficient; Let the original image be I(x,y), and the image after Gaussian filtering is obtained through convolution operation: Where S(x,y) represents the pixel value at the image coordinate (x,y) after Gaussian filtering, (I*G)(x,y) is the representation of the convolution operation, I represents the original image, G represents the Gaussian filter, I(x+i,y+i) represents the pixel value at the coordinate (x+i,y+i) in the original image, and G(i,j) represents the coefficient value at the coordinate (i,j) in the Gaussian filter; The method for calculating the gradient magnitude and direction of each pixel is: The Sobel operator is used to calculate the gradient of the image in the x and y directions, where the convolution kernels of the Sobel operator in the x and y directions are: The gradients of the image in the x and y directions are: The calculation formula for the gradient amplitude G(x,y) and the gradient direction θ(x,y) is: Perform non-maximum suppression on the gradient amplitude to remove non-edge pixels; The real edge point is determined by dual threshold detection and edge tracking. The dual threshold detection uses two thresholds: the low threshold T L and high threshold T H , and T L <T H ; For the gradient magnitude G(x,y) greater than the high threshold T H Pixel points are marked as strong edge points; For the gradient magnitude G(x,y) between the low threshold T L and high threshold T H The pixels between are marked as weak edge points; For the gradient magnitude G(x,y) less than the low threshold T L Pixels are marked as non-edge points.
5. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: After extracting the weld edge contour, the least squares method is used for contour fitting: Assume the equation of the line is y=kx+b, and the coordinates of n edge points (x i ,y i ), i = 1, 2, ..., n, and the values of k and b are solved by minimizing the objective function: The solution formula for the k value is: After fitting, the weld edge contour is more accurately represented.
6. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: When controlling the sealing equipment actuator to weld according to the predetermined welding path, the PID control algorithm is used, and the output formula is: Where u(t) represents the controller output, K p Represents the proportionality coefficient, K i Indicates the integral coefficient, K d represents the differential coefficient, e(t) represents the error value at the current moment, that is, the deviation between the actual weld position and the predetermined welding path. By adjusting K p , K i , K d value, so that the actuator tracks the predetermined welding path.
7. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: During the welding process, the welding quality is monitored in real time through CCD visual sensors, including weld width, height, and surface flatness; For weld width monitoring, the pixel distance between weld edges is calculated by image processing algorithm and then converted into actual width according to camera calibration parameters. The formula is: Where ω represents the actual width of the weld, (x1, x2) represents the pixel coordinates of the weld edge in the image, Z represents the distance from the camera to the object, and f x Indicates the focal length of the camera in the x direction; When abnormal welding quality is monitored, the abnormality includes: the weld width exceeds the preset threshold range, the welding parameters are adjusted in time and the welding is stopped.
8. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: The position coordinates of the weld in actual space calculated by the algorithm include: The coordinate conversion algorithm is based on the camera calibration parameters. The camera calibration parameters are obtained by shooting a calibration plate of known size. The coordinate conversion formula is: In the formula, (X, Y) represents the actual space coordinates, (x, y) represents the image pixel coordinates, (c x ,c y ) represents the coordinates of the camera optical center on the image plane, f x 、f y They represent the focal length of the camera in the x and y directions respectively, and Z represents the distance from the camera to the object.
9. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: The sealing equipment actuator includes a welding head, a driving device and a motion platform; The welding head is connected to the driving device, and the driving device is installed on the motion platform; The driving device adopts a servo motor, which drives the welding head to move along the predetermined welding path through the rotation of the servo motor; the motion platform adopts high-precision linear guides and ball screws to ensure the motion accuracy and stability of the motion platform.
10. The high-speed welding seam finding process for sealing using a CCD visual sensor according to claim 1 is characterized in that: It includes a data storage and analysis system, which stores the image data collected by the CCD vision sensor, the calculated weld position coordinate data, welding parameter data and welding quality monitoring data during the entire process; The data is stored in a database management system to analyze the stored data, summarize the rules of the welding process through data analysis, and optimize the welding process parameters.
Citation Information
Cited By
Intelligent planning method for welding path of welding seam
CN120972763A
Contact net cantilever robot assembling method based on hand-eye-force integration
CN121607896A
Self-adaptive welding method and device based on machine vision and self-adaptive welding system
CN121696493A