A method and device for visual inspection of fillet welds using structured light polarization under strong reflection

By using a visual inspection platform consisting of a polarization camera and a filter under strong reflective conditions of aluminum alloy, combined with polarization image difference denoising and probabilistic Hough transform fitting methods, the problems of frame rate drop and poor accuracy in visual inspection under strong reflective conditions of aluminum alloy are solved, and efficient fillet weld recognition is achieved.

CN119934968BActive Publication Date: 2025-09-23WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411904767.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-09-23
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

Existing visual inspection methods for highly reflective materials such as aluminum alloys have problems with decreased recognition frame rate and poor weld recognition accuracy. This is mainly due to multiple reflections and mirror reflection interference caused by strong reflections, which the existing algorithms take a long time to process effectively.

Method used

By acquiring light stripe images at multiple polarization angles and using a visual inspection platform composed of a polarization camera and a filter, the polarization image difference denoising algorithm and the probabilistic Hough transform fitting structured light stripe cluster support vector machine classification fitting method are combined to remove the reflection noise and fit a straight line to determine the position of the fillet weld.

Benefits of technology

It improves the detection accuracy and recognition speed under strong reflective conditions of aluminum alloy, reduces image calculation time, and accurately detects the position of fillet welds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119934968B_ABST
    Figure CN119934968B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for visual detection of fillet weld structured light polarization under strong reflection. The method comprises acquiring a plurality of first light stripe images and a second light stripe image of an aluminum alloy under strong reflection; the plurality of first light stripe images are polarized structured light stripe images of the fillet weld at a plurality of polarization angles; the second light stripe image is a polarized structured light stripe image of the fillet weld without polarization; performing noise removal of reflected stripes on the plurality of first light stripe images to obtain a corresponding third light stripe image, thereby enabling processing of stripe images at a plurality of polarization angles and improving the adaptability of a denoising algorithm; furthermore, screening all third light stripe images according to the second light stripe image to obtain a fourth light stripe image, thereby reducing image calculation time; then performing linear fitting on the fourth light stripe image, and taking the intersection of the plurality of straight lines as the fillet weld position; thereby enabling detection of the fillet weld position through the denoised image and improving detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weld visual inspection, and in particular to a method and device for visual inspection of fillet welds with structured light polarization under strong reflection. Background Art

[0002] Aluminum alloys, due to their light weight, high strength, and excellent corrosion resistance, are widely used in aerospace, automotive, and construction industries. However, compared to less reflective metals like carbon steel and stainless steel, highly reflective materials like aluminum and magnesium alloys face significant limitations in visual inspection technology, making existing methods less effective with these materials. Aluminum alloys' strong reflectivity can generate reflective streaks that interfere with the imaging of laser or visual sensors. For example, due to the reflective properties of aluminum alloys, lasers can reflect multiple times off the surface (multipath reflection), interfering with the imaging of visual sensors. This can lead to ranging errors and even prevent accurate determination of an object's distance or position. When a laser or light source shines on an aluminum alloy surface, the reflected light may be directly reflected by the sensor as specular reflection. This strong specular reflection creates glare or interference streaks, preventing the sensor from accurately capturing the object's true shape or features. Conventional methods for processing images containing reflective streaks can cause the streaks to blend with the laser streaks, resulting in poor line fitting and reduced weld recognition accuracy.

[0003] In the existing technology, a point cloud denoising algorithm is generally used to remove the reflective points of the battery core welds. However, the existing algorithm takes a long time, resulting in a decrease in the recognition frame rate, which in turn leads to the technical problem of unsatisfactory recognition of the structured light of the fillet welds.

[0004] Therefore, it is urgent to propose a method and device for polarization visual detection of fillet weld structured light under strong reflection to solve the technical problem in the prior art that the existing algorithm takes a long time, resulting in a decrease in recognition frame rate, and further leading to unsatisfactory recognition of fillet weld structured light. Summary of the Invention

[0005] In view of this, it is necessary to provide a method and device for polarization visual detection of fillet weld structured light under strong reflection, so as to solve the technical problem in the prior art that the existing algorithm takes a long time, resulting in a decrease in recognition frame rate, and further leading to unsatisfactory recognition of fillet weld structured light.

[0006] In order to solve the above problems, the present invention provides a method for visual inspection of fillet welds using structured light polarization under strong reflection, comprising:

[0007] Acquire multiple first light fringe images and second light fringe images of the aluminum alloy under strong reflection; the multiple first light fringe images are polarization structured light fringe images of the fillet weld at multiple polarization angles; the second light fringe image is a polarization structured light fringe image of the fillet weld without polarization;

[0008] performing noise removal of reflected light fringes on the plurality of first light fringe images to obtain a third light fringe image corresponding to each first light fringe image;

[0009] screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image;

[0010] Linear fitting is performed on the fourth light fringe image to obtain a plurality of straight lines, and intersections of the plurality of straight lines are used as fillet weld positions.

[0011] In a possible implementation, removing noise of reflected light fringes from the plurality of first light fringe images to obtain a third light fringe image corresponding to each first light fringe image includes:

[0012] Converting the plurality of first light fringe images to obtain a grayscale value array corresponding to each first light fringe image;

[0013] Compare the grayscale values ​​in all grayscale value arrays to determine the target location where reflective noise exists;

[0014] The pixel value of the target position in the plurality of first light streak images is set to zero to obtain a third light streak image corresponding to each first light streak image.

[0015] In a possible implementation, comparing the grayscale values ​​in all grayscale value arrays to determine the target position where the reflection noise exists includes:

[0016] Compare the grayscale values ​​at the same position in all grayscale value arrays to determine the maximum and minimum grayscale values ​​corresponding to each position;

[0017] According to all grayscale maximum values ​​and all grayscale minimum values, get the maximum value array and the minimum value array;

[0018] Difference is performed on the maximum value array and the minimum value array to obtain a difference array;

[0019] The target position where the value in the difference array is greater than the preset value is determined to have reflection noise.

[0020] In a possible implementation, the filtering all third light streak images according to the second light streak image to obtain a fourth light streak image includes:

[0021] respectively calculating a peak signal-to-noise ratio of each of the third light fringe images and the second light fringe image;

[0022] The third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios is determined as the fourth light fringe image.

[0023] In a possible implementation, performing straight line fitting on the fourth light fringe image to obtain a plurality of straight lines includes:

[0024] performing straight line detection on the fourth light streak image based on probabilistic Hough transform to obtain a plurality of initial straight lines;

[0025] Classify according to the slope of each initial straight line to obtain a set of slope straight lines with different slopes;

[0026] Determine the point where each slope straight line is concentrated based on the starting point and the end point of each initial straight line;

[0027] Performing line fitting on each point in the set of slope straight lines to obtain multiple straight lines. In a possible implementation, performing line fitting on each point in the set of slope straight lines to obtain multiple straight lines includes:

[0028] Training a preset SVM model according to the points in each slope straight line concentration to obtain a target SVM model;

[0029] According to the target SVM model, straight line fitting is performed on the points in each slope straight line set to obtain multiple straight lines.

[0030] In a possible implementation, taking the intersection of the plurality of straight lines as the fillet weld position includes:

[0031] Obtaining at least one set of two intersecting straight lines according to the slopes of the plurality of straight lines;

[0032] The two straight lines are calculated to obtain a corresponding intersection point, and the intersection point is used as the position of the fillet weld.

[0033] In a possible implementation, before respectively calculating the peak signal-to-noise ratio of each of the third light fringe images and the second light fringe image, the method further includes:

[0034] Preprocessing is performed on all the third light fringe images to obtain all the preprocessed third light fringe images.

[0035] In one possible implementation, the peak signal-to-noise ratio is calculated as follows:

[0036]

[0037] Where, PSNR is the peak signal-to-noise ratio, I max is the maximum possible value of the third light fringe image pixel, MSEis the mean square error, which represents the square of the average pixel difference between the third light fringe image and the second light fringe image.

[0038] On the other hand, the present invention also provides a device for visually inspecting fillet welds using structured light polarization under strong reflection, comprising:

[0039] An image acquisition module is configured to acquire a plurality of first light streak images and a second light streak image of the aluminum alloy under strong reflection; the plurality of first light streak images are polarized structured light streak images of the fillet weld at a plurality of polarization angles; and the second light streak image is a polarized structured light streak image of the fillet weld without polarization;

[0040] a noise removal module, configured to remove noise of reflected light stripes from the plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image;

[0041] an image selection module, configured to screen all third light streak images according to the second light streak image to obtain a fourth light streak image;

[0042] The straight line fitting module is used to perform straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and use the intersection of the plurality of straight lines as the position of the fillet weld.

[0043] The beneficial effects of the present invention are as follows: a plurality of first light stripe images and a second light stripe image of an aluminum alloy under strong reflection are obtained; the plurality of first light stripe images are polarization structure light stripe images of a fillet weld at a plurality of polarization angles; the second light stripe image is a polarization structure light stripe image of a fillet weld without polarization; the noise of the reflection stripes is removed from the plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image, so that the stripe images of a plurality of polarization angles can be processed, thereby improving the adaptability of the denoising algorithm; further, all the third light stripe images can be screened according to the second light stripe image to obtain a fourth light stripe image, thereby reducing the time for image calculation; then, a straight line fitting is performed on the fourth light stripe image to obtain a plurality of straight lines, and the intersection of the plurality of straight lines is used as the position of the fillet weld; thus, the position of the fillet weld can be detected through the denoised image, thereby improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic flow chart of an embodiment of the method for structured light polarization visual inspection of fillet welds under strong reflection provided by the present invention;

[0045] Figure 2 A schematic structural diagram of an embodiment of the polarized structured light visual detection platform provided by the present invention;

[0046] Figure 3A schematic structural diagram of an embodiment of the present invention showing multiple polarization angles and unpolarized light stripe images;

[0047] Figure 4 A schematic structural diagram of an embodiment of a denoised light streak image with multiple polarization angles provided by the present invention;

[0048] Figure 5 For the present invention Figure 1 A schematic flow chart of an embodiment of step S102;

[0049] Figure 6 For the present invention Figure 5 A schematic flow chart of an embodiment of step S502;

[0050] Figure 7 For the present invention Figure 1 A schematic flow chart of an embodiment of step S104;

[0051] Figure 8 A schematic diagram of the structure of an embodiment of the fitting straight line provided by the present invention;

[0052] Figure 9 This is a schematic structural diagram of an embodiment of the device for visually inspecting fillet welds under strong reflections, provided by the present invention;

[0053] Figure 10 This is a schematic structural diagram of an embodiment of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0054] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0055] like Figure 1 As shown, a specific embodiment of the present invention discloses a method for structured light polarization visual inspection of fillet welds under strong reflection, comprising:

[0056] S101, acquiring a plurality of first light fringe images and a second light fringe image of an aluminum alloy under strong reflection; the plurality of first light fringe images are polarized structured light fringe images of a fillet weld at a plurality of polarization angles; and the second light fringe image is a polarized structured light fringe image of a fillet weld without polarization;

[0057] S102, removing noise from reflected light stripes from the plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image;

[0058] S103, screening all third light stripe images according to the second light stripe image to obtain a fourth light stripe image;

[0059] S104 , performing straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and using the intersection of the plurality of straight lines as the position of the fillet weld.

[0060] It should be understood that the multiple first light stripe images and second light stripe images obtained in step S101 can be images obtained based on an image acquisition device, or can be images retrieved from a storage medium that have been historically stored. A polarized structured light visual detection platform can be provided, which includes a polarization camera, a single-line structured light laser, and a bracket. The embodiment of the present invention requires multiple images with different polarization angles to locate the location of the reflective noise, but the input of multiple images increases the burden on the algorithm. In order to balance the denoising effect and computing speed of the algorithm, the embodiment of the present invention uses a polarization camera with polarization angles of 0°, 45°, 90°, and 135° as an example to collect polarized structured light stripe images of fillet welds with polarization angles of 0°, 45°, 90°, and 135°. The irradiation angle of the single-line structured light laser, the angle of the camera, and the thickness of the structured light emitted by the laser can all be adjusted. Before capturing images, a filter needs to be installed on the lens of the polarization camera; the focal length and appropriate aperture size need to be adjusted; the angle and height of the camera need to be adjusted so that it is perpendicular to the detection plane and the lens is about 100 mm away from the detection plane; and the angle between the structured light laser and the camera needs to be adjusted to 30°~50°.

[0061] In a specific embodiment of the present invention, Figure 2 As shown, a polarization structured light visual detection platform can be built. The platform can include a polarization camera, a filter, a laser and an aluminum alloy. There are aluminum alloy fillet welds on the aluminum alloy, and there can be laser stripes generated by the laser. The polarization structure and resolution of the polarization camera can be based on Figure 2 Set up and collect multiple first light stripe images in four polarization directions through the polarization structured light visual detection platform, such as Figure 3 As shown, the polarized structured light stripe image of the fillet weld I 0° 、 I 45° 、 I 90° 、 I 135° And the second light stripe image, that is, the polarized structured light stripe image of the fillet weld without polarization I original ; Due to the collected I 0°~135° as well as I original The resolutions are 1224×1024 and 2448×2048 respectively. In order to better perform subsequent image processing, it is necessary to use I original and I0°~135° The resolution is the same, so it is compressed by the reshape function in opencv I original The resolution is increased to 1224×1024, and the images used in the subsequent process are all compressed images. After completing the image acquisition, in order to ensure accurate extraction of the weld position information, it is necessary to remove the noise of the reflected stripes from the multiple first light stripe images collected by the polarization image difference denoising algorithm to obtain the third light stripe image corresponding to each first light stripe image, as shown in the figure. Figure 4 As shown, Figure 4 After being processed by polarization image difference denoising algorithm I 0°~135° Then, PSNR is used to filter all third light fringe images according to the second light fringe image to obtain the fourth light fringe image; finally, the fourth light fringe image is fitted with a straight line using the support vector machine classification fitting algorithm based on the probabilistic Hough transform fitting structured light fringe cluster to obtain multiple straight lines, and the intersection point is merged to obtain the position of the aluminum alloy fillet weld.

[0062] Compared with the prior art, the present embodiment provides a method for obtaining multiple first light stripe images and second light stripe images of aluminum alloy under strong reflection; the multiple first light stripe images are polarization structure light stripe images of fillet welds at multiple polarization angles; the second light stripe image is a polarization structure light stripe image of a non-polarized fillet weld; the multiple first light stripe images are subjected to noise removal of reflection stripes to obtain a third light stripe image corresponding to each first light stripe image, so that stripe images at multiple polarization angles can be processed, thereby improving the adaptability of the denoising algorithm; further, all third light stripe images can be screened according to the second light stripe image to obtain a fourth light stripe image, thereby reducing the time for image calculation; then, the fourth light stripe image is subjected to linear fitting to obtain multiple straight lines, and the intersection of the multiple straight lines is used as the fillet weld position; thus, the fillet weld position can be detected through the denoised image, thereby improving the detection accuracy.

[0063] After image acquisition is completed, in order to ensure accurate extraction of weld position information, the acquired image needs to be processed to a certain extent. In some embodiments of the present invention, such as Figure 5 As shown, step S102 includes:

[0064] S501, transforming a plurality of first light streak images to obtain a grayscale value array corresponding to each first light streak image;

[0065] S502, comparing the gray values ​​in all gray value arrays to determine the target position where the reflection noise exists;

[0066] S503 : Setting the pixel value at the target position in the plurality of first light streak images to zero to obtain a third light streak image corresponding to each first light streak image.

[0067] In a specific embodiment of the present invention, a plurality of first light streak images are transformed, that is, the collected I 0° 、 I 45° 、 I 90° 、 I 135° Converted into grayscale value arrays composed of grayscale values G 0° 、 G 45° 、 G 90° 、 G 135° Then, the target position of the reflected noise can be obtained by comparing the grayscale values ​​in each array. Specifically, in some embodiments of the present invention, Figure 6 As shown, step S502 includes:

[0068] S601, comparing the grayscale values ​​at the same position in all grayscale value arrays to determine the maximum grayscale value and the minimum grayscale value corresponding to each position;

[0069] S602, obtaining a maximum value array and a minimum value array according to all grayscale maximum values ​​and all grayscale minimum values;

[0070] S603, performing a difference operation on the maximum value array and the minimum value array to obtain a difference array;

[0071] S604: Determine the target position where the value in the difference array is greater than the preset value as having reflection noise.

[0072] In a specific embodiment of the present invention, the characteristics of the polarization camera give it advantages in detecting and analyzing these reflections. For mirror reflections, they often appear in the form of metal reflections in visual inspection. These reflections generally have a certain polarization, and the light intensity will be weakened when passing through polarizers at different angles; and the laser structured light that the present invention needs to detect often has no polarization or has a weak polarization. Most of the light is diffuse reflection, and the light intensity will not be significantly weakened when passing through polarizers at different angles. By comparing the grayscale values ​​in the corner weld images at different polarization angles, it is determined whether the light intensity of the point has changed due to the change in polarization angle, thereby determining whether the point is reflective noise caused by metal mirror reflection. The detection process is as follows: Figure 7 As shown, compare the gray value array G 0°~135°The grayscale value of the pixel at the same position in the image is selected and the maximum and minimum values ​​corresponding to each position are selected to form a maximum value array consisting of the maximum and minimum values ​​of each position. G max and minimum value array G min , the specific operation steps are shown in formulas (1) and (2):

[0073] (1)

[0074] (2)

[0075] In the formula, the max() function represents the maximum value among multiple values; the min() function represents the minimum value among multiple values; ( i , j ) is the position of the corresponding pixel, where i represents the row position of the pixel, j Indicates the column position of the pixel; n k ° Indicates the polarization angle of the polarization image; k Indicates the number of polarization angles.

[0076] The obtained array G max and arrays G min Difference to get difference array D , the size of the array is the same as G max 、 G min as well as I 0°~135° The size of is consistent and can be regarded as a distribution diagram of the light intensity change caused by the change of polarization angle at each pixel. The calculation process is shown in formula (3):

[0077] (3)

[0078] By difference array D The value in is used to judge the degree of light intensity change at each position. If the value is greater than the preset value threshold, it can be determined that there is reflection noise at the corresponding target position. The specific preset value can be set according to actual conditions, and the embodiment of the present invention is not limited here.

[0079] Furthermore, multiple first light stripe images can be I 0°~135° Mean and difference array DThe pixel value corresponding to the target position is set to zero, and the third light streak image corresponding to each first light streak image is obtained, that is, four fillet weld images after polarization denoising. The calculation process is shown in formula (4):

[0080] (4)

[0081] Where, D ( i , j ) is the polarization image located at ( i , j ) in the difference array D The corresponding target position in .

[0082] In order to reduce the running time of subsequent image processing programs, in some embodiments of the present invention, step S103 includes:

[0083] respectively calculating the peak signal-to-noise ratio of each third light fringe image and the second light fringe image;

[0084] The third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios is determined as the fourth light fringe image.

[0085] In a specific embodiment of the present invention, the fillet weld image processing method of determining light intensity changes by using a threshold in step S102 has certain errors, resulting in some minor noise points still existing in the background of the fillet weld image. Therefore, in some embodiments of the present invention, before respectively calculating the peak signal-to-noise ratio of each third light fringe image and the second light fringe image, the following steps are further included:

[0086] All third light fringe images are preprocessed to obtain all preprocessed third light fringe images.

[0087] In a specific embodiment of the present invention, all third light fringe images may be preprocessed, wherein the preprocessing process may be to remove all third light fringe images by Otsu binarization. I 0°~135° The noise in the background is removed, thereby obtaining all the third light stripe images after preprocessing.

[0088] After preprocessing, the preprocessed I 0° 、 I 45° 、 I 90° 、 I 135° and I originalThe PSNR (peak signal-to-noise ratio) is proportional to the denoising effect. The higher the PSNR value, the better the denoising effect. The peak signal-to-noise ratio is calculated as shown in formula (5):

[0089] (5)

[0090] Where, PSNR is the peak signal-to-noise ratio, I max is the maximum possible value of the third light fringe image pixel, MSE is the mean square error, which represents the square of the average pixel difference between the third light fringe image and the second light fringe image. The calculation of MSE is shown in formula (6):

[0091] (6)

[0092] Where, I ( i , j ) is the third light stripe image at the pixel position ( i , j ), K ( i , j ) is the second light stripe image at the pixel position ( i , j ), m and n Divided into the width and height of the image.

[0093] Then the third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios can be determined as the fourth light fringe image, that is, the third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios can be selected. I original The image with the highest PSNR value I n The fourth light fringe image is the subject of the next image processing.

[0094] Selected fourth light stripe image I n After image preprocessing, most of the noise has been filtered out, but the noise around the weld is relatively large and difficult to remove. In order to more accurately identify the position of the fillet weld, in some embodiments of the present invention, such as Figure 7 As shown, step S104 includes:

[0095] S701, performing line detection on the fourth light streak image based on probabilistic Hough transform to obtain multiple initial lines;

[0096] S702, classifying according to the slope of each initial straight line to obtain a set of slope straight lines with different slopes;

[0097] S703, determining points where slope lines with different slopes are concentrated based on the starting point and end point of each initial straight line;

[0098] S704 , performing straight line fitting on points in the slope straight lines with different slopes to obtain multiple straight lines.

[0099] In a specific embodiment of the present invention, a classification fitting method of support vector machine based on probabilistic Hough transform fitting structured light fringe cluster is proposed to fit the straight line of fillet weld structured light. The specific process is as follows: Figure 8 As shown, the fourth light stripe image I n For the image selected to calculate PSNR, the fourth light stripe image I n Perform probabilistic Hough transform to detect straight lines, so that multiple initial straight lines can be obtained, such as Figure 8 The fitted straight lines a and b in the figure can be roughly divided into two categories: those close to the horizontal and those close to the vertical. The initial straight lines are classified by judging the slope to obtain a set of slope straight lines with different slopes. The slope straight lines with different slopes can include a set of horizontal straight lines and a set of vertical straight lines. Since the probabilistic Hough transform outputs the starting point and end point of the straight line, and the detected straight line and the true straight line are not the straight line of the weld structured light in most cases, the points in the data set can be regarded as the points on the straight line of the weld structured light.

[0100] In some embodiments of the present invention, step S704 includes:

[0101] The preset SVM model is trained according to the points concentrated in the slope straight lines with different slopes to obtain the target SVM model;

[0102] According to the target SVM model, straight line fitting is performed on the points in the slope straight line set with different slopes to obtain multiple straight lines.

[0103] In a specific embodiment of the present invention, SVM fitting can be performed separately for points within a set of slope lines with different slopes. Since this process is relatively simple for the computational task of the pre-set SVM model, there is no need to train the pre-set SVM model with additional data. Instead, the pre-set SVM model is trained using a pre-classified set of slope lines with different slopes to obtain a target SVM model. The target SVM model is then used to perform line fitting for the points within the set of slope lines with different slopes. Finally, the slope of the line and the position of a point are output. The position of each line in the graph is calculated using the slope and the position of the point. The principle of a support vector machine (SVM) is to separate data points of different categories by finding the optimal line. The SVM attempts to find the line that minimizes error and ensures that the majority of data points lie near this line. The model exhibits a certain degree of robustness, resisting the influence of outliers to a certain extent. The SVM fits a line by maximizing the distance between the support vector and the hyperplane, rather than simply fitting all data points using the least squares method.

[0104] In some embodiments of the present invention, step S104 includes:

[0105] According to the slopes of the plurality of straight lines, at least one set of two intersecting straight lines is obtained;

[0106] Calculate the two straight lines to obtain the corresponding intersection point, and use the intersection point as the position of the fillet weld.

[0107] In a specific embodiment of the present invention, the multiple fitted straight lines can be considered as the straight lines where the structured light stripes of the fillet weld are located. The slopes of the multiple straight lines can be used to obtain at least one set of two intersecting straight lines, so that the corresponding intersection point can be calculated through the two obtained straight lines. The intersection point is considered to be the location of the fillet weld detected by the image.

[0108] Compared with ordinary cameras, the polarization camera of the embodiment of the present invention has the advantage of being able to obtain reflection information. According to the reflection information obtained, the required reflection denoising algorithm is designed. For highly reflective materials such as aluminum alloy, traditional cameras and algorithms cannot handle reflection noise well. However, by utilizing the advantages of polarization cameras and combining them with corresponding algorithms, reflection noise can be well overcome. The polarization image difference denoising algorithm used in the embodiment of the present invention combines four pictures with different polarization angles. According to the characteristics of different light intensities of reflection noise at different polarization angles, a denoising algorithm for reflection noise is designed. It is helpful for the feature point extraction algorithm of subsequent images. The embodiment of the present invention uses four polarization images for preprocessing at the same time, and finally screens out the pictures with the best denoising effect based on PSNR comparison, thus ensuring the denoising effect in a relatively objective, accurate and stable manner. A classification fitting method of support vector machine based on probabilistic Hough transform fitting of structured light fringe clusters is proposed, which opens up a new straight line fitting method for fillet welds, and the result of fitting the straight line is relatively accurate.

[0109] In order to better implement the method for visual inspection of fillet welds with structured light polarization under strong reflection in the embodiment of the present invention, based on the method for visual inspection of fillet welds with structured light polarization under strong reflection, the embodiment of the present invention also provides a device for visual inspection of fillet welds with structured light polarization under strong reflection, such as Figure 9 As shown, the structured light polarization visual inspection device 900 for fillet welds under strong reflection includes:

[0110] Image acquisition module 901 is used to acquire multiple first light streak images and second light streak images of the aluminum alloy under strong reflection; the multiple first light streak images are polarized structured light streak images of the fillet weld at multiple polarization angles; the second light streak image is a polarized structured light streak image of the fillet weld without polarization;

[0111] A noise removal module 902 is configured to remove noise from reflected light streaks on the plurality of first light streak images to obtain a third light streak image corresponding to each first light streak image;

[0112] An image selection module 903 is configured to filter all third light streak images according to the second light streak image to obtain a fourth light streak image;

[0113] The straight line fitting module 904 is configured to perform straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and use the intersection of the plurality of straight lines as the position of the fillet weld.

[0114] The structured light polarization visual detection device 900 for corner welds under strong reflection provided in the above embodiment can implement the technical solution described in the embodiment of the structured light polarization visual detection method for corner welds under strong reflection. The specific implementation principles of the above modules or units can be found in the corresponding contents in the embodiment of the structured light polarization visual detection method for corner welds under strong reflection, and will not be repeated here.

[0115] like Figure 10 As shown, the present invention also provides an electronic device 1000. The electronic device 1000 includes a processor 1001, a memory 1002 and a display 1003. Figure 10 Only some of the components of the electronic device 1000 are shown, but it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0116] In some embodiments, the memory 1002 may be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. In other embodiments, the memory 1002 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1000.

[0117] Furthermore, the memory 1002 may include both an internal storage unit of the electronic device 1000 and an external storage device. The memory 1002 is used to store application software installed in the electronic device 1000 and various data.

[0118] In some embodiments, the processor 1001 can be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run the program code or process data stored in the memory 1002, such as the structured light polarization visual inspection method of fillet welds under strong reflection in the present invention.

[0119] In some embodiments, display 1003 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1003 is used to display information about electronic device 1000 and to display a visual user interface. Components 1001-1003 of electronic device 1000 communicate with each other via a system bus.

[0120] In some embodiments of the present invention, when the processor 1001 executes the structured light polarization visual inspection program for fillet welds under strong reflection in the memory 1002, the following steps may be implemented:

[0121] Acquire multiple first light fringe images and second light fringe images of the aluminum alloy under strong reflection; the multiple first light fringe images are polarized structured light fringe images of the fillet weld at multiple polarization angles; the second light fringe image is a polarized structured light fringe image of the fillet weld without polarization;

[0122] performing noise removal of reflected light fringes on the plurality of first light fringe images to obtain a third light fringe image corresponding to each first light fringe image;

[0123] screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image;

[0124] Linear fitting is performed on the fourth light fringe image to obtain multiple straight lines, and the intersection of the multiple straight lines is used as the position of the fillet weld.

[0125] It should be understood that, when the processor 1001 executes the structured light polarization visual inspection program for fillet welds under strong reflection in the memory 1002 , in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.

[0126] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 1000 mentioned. The electronic device 1000 may be a portable electronic device such as a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, or laptop computer. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The portable electronic devices mentioned above may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1000 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0127] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by the processor, it can implement the steps or functions of the method for visual detection of structured light polarization of corner welds under strong reflection provided by the above-mentioned method embodiments.

[0128] Those skilled in the art will appreciate that all or part of the process flow of the above-described method embodiment can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0129] The above is a detailed introduction to the method and device for visual detection of structured light polarization of corner welds under strong reflection provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for visual inspection of fillet welds using structured light polarization under strong reflection, characterized in that: include: Acquire multiple first light fringe images and second light fringe images of the aluminum alloy under strong reflection; the multiple first light fringe images are polarization structured light fringe images of the fillet weld at multiple polarization angles; the second light fringe image is a polarization structured light fringe image of the fillet weld without polarization; performing noise removal of reflected light fringes on the plurality of first light fringe images to obtain a third light fringe image corresponding to each first light fringe image; screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image; Performing straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and using intersections of the plurality of straight lines as fillet weld positions; The step of screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image includes: respectively calculating a peak signal-to-noise ratio of each of the third light fringe images and the second light fringe image; determining the third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios as the fourth light fringe image; The peak signal-to-noise ratio is calculated as follows: Where, PSNR is the peak signal-to-noise ratio, I max is the maximum possible value of the third light fringe image pixel, MSE is the mean square error, which represents the square of the average pixel difference between the third light fringe image and the second light fringe image.

2. The method for detecting fillet welds by structured light polarization under strong reflection according to claim 1, characterized in that: The step of removing noise of reflected light stripes from the plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image includes: Converting the plurality of first light fringe images to obtain a grayscale value array corresponding to each first light fringe image; Compare the grayscale values ​​in all grayscale value arrays to determine the target location where reflective noise exists; The pixel value of the target position in the plurality of first light streak images is set to zero to obtain a third light streak image corresponding to each first light streak image.

3. The method for visual inspection of fillet welds using structured light polarization under strong reflection according to claim 2, characterized in that: The step of comparing the grayscale values ​​in all grayscale value arrays to determine the target location where the reflection noise exists includes: Compare the grayscale values ​​at the same position in all grayscale value arrays to determine the maximum and minimum grayscale values ​​corresponding to each position; According to all grayscale maximum values ​​and all grayscale minimum values, get the maximum value array and the minimum value array; Difference is performed on the maximum value array and the minimum value array to obtain a difference array; The target position where the value in the difference array is greater than the preset value is determined to have reflection noise.

4. The method for visual inspection of fillet welds using structured light polarization under strong reflection according to claim 1, characterized in that: The performing straight line fitting on the fourth light fringe image to obtain a plurality of straight lines includes: performing straight line detection on the fourth light streak image based on probabilistic Hough transform to obtain a plurality of initial straight lines; Classify according to the slope of each initial straight line to obtain a set of slope straight lines with different slopes; Determine the point where each slope straight line is concentrated based on the starting point and the end point of each initial straight line; Linear fitting is performed on the points in each slope straight line set to obtain multiple straight lines.

5. The method for visual inspection of fillet welds using structured light polarization under strong reflection according to claim 4, characterized in that: The points in each slope straight line set are respectively fitted with straight lines to obtain a plurality of straight lines, including: Training a preset SVM model according to the points in each slope straight line concentration to obtain a target SVM model; According to the target SVM model, straight line fitting is performed on the points in each slope straight line set to obtain multiple straight lines.

6. The method for detecting fillet welds by structured light polarization under strong reflection according to claim 1, characterized in that: The method of using the intersection of the plurality of straight lines as the fillet weld position includes: Obtaining at least one set of two intersecting straight lines according to the slopes of the plurality of straight lines; The two straight lines are calculated to obtain a corresponding intersection point, and the intersection point is used as the position of the fillet weld.

7. The method for visual inspection of fillet welds using structured light polarization under strong reflection according to claim 1, characterized in that: Before respectively calculating the peak signal-to-noise ratio of each of the third light fringe image and the second light fringe image, the method further includes: Preprocessing is performed on all the third light fringe images to obtain all the preprocessed third light fringe images.

8. A device for visual inspection of fillet weld structured light polarization under strong reflection, characterized in that: include: An image acquisition module is configured to acquire a plurality of first light streak images and a second light streak image of the aluminum alloy under strong reflection; the plurality of first light streak images are polarized structured light streak images of the fillet weld at a plurality of polarization angles; and the second light streak image is a polarized structured light streak image of the fillet weld without polarization; a noise removal module, configured to remove noise of reflected light stripes from the plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image; an image selection module, configured to screen all third light streak images according to the second light streak image to obtain a fourth light streak image; a straight line fitting module, configured to perform straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and use the intersection of the plurality of straight lines as the position of the fillet weld; The step of screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image includes: respectively calculating a peak signal-to-noise ratio of each of the third light fringe images and the second light fringe image; determining the third light fringe image corresponding to the maximum value among all peak signal-to-noise ratios as the fourth light fringe image; The peak signal-to-noise ratio is calculated as follows: Where, PSNR is the peak signal-to-noise ratio, I max is the maximum possible value of the third light fringe image pixel, MSE is the mean square error, which represents the square of the average pixel difference between the third light fringe image and the second light fringe image.

Citation Information

Patent Citations

  • Laser vision stripe classification and welding seam feature extraction method under uncertain interference source

    CN113723494A

  • Welding seam veining structure nondestructive detection system

    CN206756683U