Polarization visual detection method and device for structured light of fillet weld under strong reflection

By adopting polarization visual detection method under strong reflective conditions, the reflective noise of aluminum alloy corner weld structure light is removed, and the image is screened and fitted to determine the position of corner welds, which solves the problem of unsatisfactory identification in the prior art and achieves efficient and accurate corner weld detection.

CN119934968AActive Publication Date: 2025-05-06WUHAN UNIV OF TECH

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has problems of frame rate reduction and unsatisfactory identification in the identification of strongly reflective materials such as aluminum alloys, mainly due to the low noise removal efficiency caused by the long algorithm time.

Method used

The light polarization visual detection method of the corner weld structure under strong reflection is used to obtain light stripes images of multiple polarization angles, remove noise from the reflective stripes, filter out high-quality images, and perform linear fitting to determine the position of the corner weld.

Benefits of technology

It improves the adaptability and recognition accuracy of the denoising algorithm, reduces image calculation time, and realizes accurate detection of the fillet weld structure light under strong reflective conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119934968A_ABST
    Figure CN119934968A_ABST
Patent Text Reader

Abstract

The invention relates to a light polarization visual detection method and device for a fillet weld structure under strong reflection. The method comprises the following steps: acquiring a plurality of first light stripe images and second light stripe images of aluminum alloy under strong reflection; the plurality of first light stripe images are fillet weld polarization structure light stripe images at a plurality of polarization angles; the second light stripe image is a non-polarized fillet weld polarization structure light stripe image; the plurality of first light stripe images are subjected to noise removal of reflective stripes to obtain corresponding third light stripe images, so that the stripe images at a plurality of polarization angles can be processed, and the adaptability of a denoising algorithm is improved; all the third light stripe images are screened according to the second light stripe image to obtain a fourth light stripe image, so that the image calculation time is shortened; then performing straight line fitting on the fourth light stripe image, and taking an intersection point of a plurality of straight lines as a fillet weld position; therefore, the fillet weld position can be detected through the denoised image, and the detection precision is improved.
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 weld structured light polarization under strong reflection. Background Art

[0002] Aluminum alloys are widely used in aerospace, automobile manufacturing, and construction due to their light weight, high strength, and excellent corrosion resistance. However, compared with other metals with low reflective effects such as carbon steel and stainless steel, there are significant limitations in the application of highly reflective materials such as aluminum alloys and magnesium alloys in visual inspection technology, and existing methods are less effective under these materials: the strong reflection of aluminum alloys will generate reflective stripes and interfere with the imaging of laser or visual sensors. For example, due to the reflective properties of aluminum alloys, the laser may be reflected multiple times on the surface (multi-path reflection), thereby interfering with the imaging of the visual sensor, which will cause ranging errors and even fail to accurately judge the distance or position of the object; when the laser or light source is irradiated on the surface of aluminum alloys, the reflected light may be directly reflected to the sensor in the form of specular reflection. This strong specular reflection will form glare or interference stripes, causing the sensor to be unable to accurately capture the true shape or characteristics of the object. When conventional methods are used to process images containing reflective stripes, the reflective stripes and laser stripes are mixed with each other, resulting in poor straight line fitting and reduced weld recognition accuracy.

[0003] In the prior art, a point cloud denoising algorithm is generally used to remove reflective points on the welds of battery cells. 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 weld.

[0004] Therefore, it is urgent to propose a method and device for polarization visual detection of corner weld structured light under strong reflection to solve the technical problem that the existing algorithm in the prior art takes a long time, resulting in a decrease in recognition frame rate, and then leading to unsatisfactory recognition of corner 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 corner weld structured light under strong reflection, so as to solve the technical problem that the existing algorithm in the prior art takes a long time, resulting in a decrease in recognition frame rate, and further leading to unsatisfactory recognition of corner weld structured light.

[0006] In order to solve the above problems, the present invention provides a method for visual inspection of fillet weld structured light polarization under strong reflection, comprising: Acquire a plurality of first light fringe images and a second light fringe image of the aluminum alloy under strong reflection; the plurality of first light fringe images are polarization structure light fringe images of fillet welds at a plurality of polarization angles; the second light fringe image is a polarization structure light fringe image of a fillet weld without polarization; removing noise of reflected light fringes from the plurality of first light fringes images to obtain a third light fringes image corresponding to each first light fringes image; Filter all third light fringe images according to the second light fringe image to obtain a fourth light fringe image; 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.

[0007] 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: Converting the plurality of first light fringe images to obtain a grayscale value array corresponding to each first light fringe image; Compare the gray values ​​in all gray value arrays to determine the target position where the reflection 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 of the first light streak images.

[0008] In a possible implementation, comparing the magnitudes of the grayscale values ​​in all grayscale value arrays to determine the target position where the reflection noise exists includes: Compare 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; According to all grayscale maximum values ​​and all grayscale minimum values, obtain 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 as having reflection noise.

[0009] In a possible implementation manner, the 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; 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.

[0010] In a possible implementation manner, 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 fringe 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 in each slope straight line concentration according to the starting point and the end point of each initial straight line; Performing straight line fitting on the points in each of the slope straight line sets to obtain multiple straight lines. In a possible implementation, performing straight line fitting on the points in each of the slope straight line sets to obtain multiple straight lines includes: The preset SVM model is trained 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.

[0011] In a possible implementation, taking 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.

[0012] In a possible implementation manner, 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: Preprocessing is performed on all the third light fringe images to obtain all the third light fringe images after preprocessing.

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

[0014] In the formula, 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.

[0015] On the other hand, the present invention also provides a device for visually inspecting fillet weld structured light polarization under strong reflection, comprising: An image acquisition module is used to acquire a plurality of first light stripe images and a second light stripe image of the aluminum alloy under strong reflection; the plurality of first light stripe images are polarization structure light stripe images of fillet welds at a plurality of polarization angles; the second light stripe image is a polarization structure light stripe image of a fillet weld without polarization; a noise removal module, configured to remove noise of reflected light fringes from the plurality of first light fringes images, to obtain a third light fringes image corresponding to each first light fringes 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; 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.

[0016] 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 of the plurality of first light stripe images is removed to obtain a third light stripe image corresponding to each first light stripe image, so that the stripe images at 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 the fourth light stripe image is linearly fitted to obtain a plurality of straight lines, and the intersection of the plurality of 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of an embodiment of the process of the structured light polarization visual inspection method for fillet welds under strong reflection provided by the present invention; Figure 2 A schematic diagram of the structure of an embodiment of the polarization structured light vision detection platform provided by the present invention; Figure 3 A schematic diagram of an embodiment of the structure of multiple polarization angles and unpolarized light stripe images provided by the present invention; Figure 4 A schematic diagram of the structure of an embodiment of a light streak image with multiple polarization angles after denoising provided by the present invention; Figure 5 For the present invention Figure 1 A schematic flow chart of an embodiment of step S102; Figure 6 For the present invention Figure 5 A schematic flow chart of an embodiment of step S502; Figure 7 For the present invention Figure 1 A schematic flow chart of an embodiment of step S104; Figure 8 A schematic diagram of the structure of an embodiment of the fitting straight line provided by the present invention; Fig. 9A schematic structural diagram of an embodiment of a device for visually inspecting fillet weld structured light polarization under strong reflection provided by the present invention; Fig.10 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] The preferred embodiments of the present invention are 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, but are not used to limit the scope of the present invention.

[0019] like Figure 1 As shown, a specific embodiment of the present invention discloses a method for visually inspecting fillet weld structured light polarization under strong reflection, comprising: 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 polarization structure light fringe images of a fillet weld at a plurality of polarization angles; the second light fringe image is a polarization structure light fringe image of a fillet weld without polarization; S102, removing noise of reflected light stripes from a plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image; S103, screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image; S104, performing straight line fitting on the fourth light fringe image to obtain a plurality of straight lines, and taking intersections of the plurality of straight lines as fillet weld positions.

[0020] It should be understood that the multiple first light stripe images and second light stripe images obtained in step S101 may be images obtained according to an image acquisition device, or may be images called from historical storage media. A polarized structured light visual detection platform may be provided, and the detection platform may include 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 find the location of the reflective noise, but the input of multiple images will increase the burden of the algorithm. In order to balance the denoising effect and operation 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 polarization structured light stripe images of corner 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 collecting images, the lens of the polarization camera needs to be installed with a filter; adjust the focal length and the appropriate aperture size; adjust the angle and height of the camera so that it is perpendicular to the detection plane and the lens is about 100 mm away from the detection plane; adjust the angle between the structured light laser and the camera to 30°~50°.

[0021] In a specific embodiment of the present invention, Figure 2 As shown, a polarization structured light visual inspection platform can be built. The platform may include a polarization camera, a filter, a laser, and an aluminum alloy. The aluminum alloy has an aluminum alloy fillet weld and laser stripes generated by a laser. The polarization structure and resolution of the polarization camera can be determined based on Figure 2 The polarization structured light visual detection platform is used to collect multiple first light stripe images in four polarization directions, 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 non-polarized fillet weld polarization structure light stripe image 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 I 0°~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 the 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, such as Figure 4 As shown, Figure 4 After being processed by the polarization image difference denoising algorithm I 0°~135° Then, PSNR is used to screen all the 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 probability Hough transform fitting structured light fringe cluster to obtain multiple straight lines, and the intersection is merged to obtain the position of the aluminum alloy fillet weld.

[0022] 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 fillet weld that is not polarized; the noise of the reflection stripes of the multiple first light stripe images is removed to obtain a third light stripe image corresponding to each first light stripe image, so that the stripe images of multiple 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, the fourth light stripe image is linearly fitted to obtain multiple straight lines, and the intersection of the multiple straight lines is used as the fillet weld position; thereby, the fillet weld position can be detected through the denoised image, thereby improving the detection accuracy.

[0023] After completing the image acquisition, in order to ensure accurate extraction of the weld position information, the acquired image needs to be processed to a certain extent. In some embodiments of the present invention, for example Figure 5 As shown, step S102 includes: S501, transforming a plurality of first light fringe images to obtain a gray value array corresponding to each first light fringe image; S502, comparing the magnitudes of the gray values ​​in all gray value arrays to determine the target position where the reflection noise exists; 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.

[0024] 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 light 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: S601, compare 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; S602, obtaining a maximum value array and a minimum value array according to all grayscale maximum values ​​and all grayscale minimum values; S603, performing a difference operation on the maximum value array and the minimum value array to obtain a difference array; S604: Determine the target position where the value in the difference array is greater than the preset value as having reflection noise.

[0025] 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 inspections. These reflections generally have a certain polarization property. When passing through polarizers at different angles, the light intensity will be weakened. However, the laser structured light that the present invention needs to detect often has no polarization or has a weak polarization property. Most of the light is diffusely reflected, 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 at that point has changed due to the change in polarization angle, thereby determining whether the point is a reflection 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 values ​​of pixels at the same position in the image are calculated 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): (1) (2) 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.

[0026] For the obtained array G max and arrays G minDifference to get the difference array D , the size of the array is 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 for each pixel. The calculation process is shown in formula (3): (3) 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 the actual situation, and the embodiment of the present invention is not limited here.

[0027] Furthermore, multiple first light stripe images can be I 0°~135° Center and difference array D The pixel value corresponding to the target position is set to zero, and the third light fringe image corresponding to each first light fringe image is obtained, that is, four fillet weld images after polarization denoising. The calculation process is shown in formula (4): (4) In the formula, D ( i , j ) is the polarization image located at ( i , j ) in the difference array D The corresponding target position in .

[0028] In order to reduce the running time of the subsequent image processing program, in some embodiments of the present invention, step S103 includes: respectively calculating the peak signal-to-noise ratio of each third light fringe image and the second light fringe image; 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.

[0029] In a specific embodiment of the present invention, the fillet weld image processing method of judging the light intensity change by a threshold value in step S102 has a certain error, resulting in that the background of the fillet weld image still has some noise points with less influence. 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 is also included: All third light fringe images are preprocessed to obtain all third light fringe images after preprocessing.

[0030] 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 points in the background are removed, thereby obtaining all the third light streak images after preprocessing.

[0031] After preprocessing, the preprocessed I 0° , I 45° , I 90° , I 135° and I original The 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): (5) In the formula, 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): (6) In the formula, I ( i , j ) is the third light fringe image at pixel position ( i , j ), K ( i , j ) is the second light fringe image at the pixel position ( i , j ), m and n Divided into the width and height of the image.

[0032] 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 object of the next image processing.

[0033] Selected fourth light fringe image I nAfter 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, Figure 7 As shown, step S104 includes: S701, performing straight line detection on the fourth light fringe image based on probabilistic Hough transform to obtain a plurality of initial straight lines; S702, classifying according to the slope of each initial straight line to obtain a set of slope straight lines with different slopes; S703, determining points where slope straight lines with different slopes are concentrated according to the starting point and the end point of each initial straight line; S704 , performing straight line fitting on points in the slope straight line sets with different slopes respectively to obtain multiple straight lines.

[0034] In a specific embodiment of the present invention, a classification fitting method of support vector machine based on probability 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 streak image I n For the image selected for calculating PSNR, for the fourth light streak 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 for the detected initial straight lines, 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, where 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 detection outputs the starting point and the end point of the straight line, and the detected straight line and the real 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.

[0035] In some embodiments of the present invention, step S704 includes: The preset SVM model is trained according to the points in the slope straight lines with different slopes to obtain the target SVM model; 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.

[0036] In a specific embodiment of the present invention, SVM fitting can be performed on the points in the slope straight line set with different slopes respectively. Since the process is relatively simple for the preset SVM model calculation task, there is no need to use additional data to train the preset SVM model separately. Instead, the preset SVM model is trained using the classified slope straight line set with different slopes to obtain the target SVM model, and then the points in the slope straight line set with different slopes are fitted with straight lines by the target SVM model, and finally the slope of the straight line and the position of a point are output, and the position of each straight line in the figure is calculated by the slope and the position of a point. The principle of support vector machine (SVM) is to separate data points of different categories by finding the best straight line. SVM tries to find the line that minimizes the error and ensures that most data points are located near this line. The model has a certain robustness and can resist the influence of outliers to a certain extent. SVM fits the straight line by maximizing the interval from the support vector to the hyperplane, rather than simply fitting it by the least squares method of all data points.

[0037] In some embodiments of the present invention, step S104 includes: According to the slopes of the plurality of straight lines, at least one set of two intersecting straight lines is obtained; Calculate the two straight lines to obtain the corresponding intersection point, and use the intersection point as the position of the fillet weld.

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

[0039] 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 obtained reflection information, the required reflection denoising algorithm is designed. For highly reflective materials such as aluminum alloy, traditional cameras and algorithms cannot handle reflection noise well, but by utilizing the advantages of polarization cameras and combining corresponding algorithms, the 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, and designs a denoising algorithm for reflection noise according to the characteristics of different light intensities of reflection noise at different polarization angles. 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 compares and screens the pictures with the best denoising effect based on PSNR, which guarantees the denoising effect more objectively, accurately and stably. A classification fitting method of support vector machine based on probabilistic Hough transform fitting structured light fringe cluster 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.

[0040] In order to better implement the method for visual inspection of fillet welds under strong reflection with structured light polarization in the embodiment of the present invention, based on the method for visual inspection of fillet welds under strong reflection with structured light polarization, the embodiment of the present invention also provides a device for visual inspection of fillet welds under strong reflection with structured light polarization, such as Fig. 9 As shown, the structured light polarization visual inspection device 900 for fillet welds under strong reflection includes: An image acquisition module 901 is used 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 polarization structure light streak images of fillet welds at a plurality of polarization angles; the second light streak image is a polarization structure light streak image of a fillet weld without polarization; A noise removal module 902 is used to remove noise of reflected light stripes from a plurality of first light stripe images to obtain a third light stripe image corresponding to each first light stripe image; An image selection module 903 is used to screen all third light streak images according to the second light streak image to obtain a fourth light streak image; The straight line fitting module 904 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.

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

[0042] like Fig.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. Fig.10 Only some components of the electronic device 1000 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0043] 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.

[0044] 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.

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

[0046] In some embodiments, the display 1003 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 1003 is used to display information of the electronic device 1000 and to display a visual user interface. The components 1001-1003 of the electronic device 1000 communicate with each other via a system bus.

[0047] In some embodiments of the present invention, when the processor 1001 executes the structured light polarization visual inspection program of fillet welds under strong reflection in the memory 1002, the following steps may be implemented: Acquire multiple first light stripe images and second light stripe images of the aluminum alloy under strong reflection; the multiple first light stripe images are fillet weld polarization structure light stripe images at multiple polarization angles; the second light stripe image is a fillet weld polarization structure light stripe image without polarization; removing noise of reflected light fringes from a 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; 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.

[0048] It should be understood that: when the processor 1001 executes the strong reflection corner weld structured light polarization visual detection program in the memory 1002, in addition to the above functions, other functions can also be realized. For details, please refer to the description of the corresponding method embodiment above.

[0049] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1000 mentioned, and the electronic device 1000 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices 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 a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0050] Correspondingly, 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 a processor, it can implement the steps or functions of the method for polarized visual detection of corner weld structured light under strong reflection provided by the above-mentioned method embodiments.

[0051] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0052] 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, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. 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 weld structured light polarization under strong reflection, characterized in that: include: Acquire a plurality of first light fringe images and a second light fringe image of the aluminum alloy under strong reflection; the plurality of first light fringe images are polarization structure light fringe images of fillet welds at a plurality of polarization angles; the second light fringe image is a polarization structure light fringe image of a fillet weld without polarization; removing noise of reflected light fringes from the plurality of first light fringes images to obtain a third light fringes image corresponding to each first light fringes image; Filter all third light fringe images according to the second light fringe image to obtain a fourth light fringe image; 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.

2. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 1, characterized in that: The step of 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: Converting the plurality of first light fringe images to obtain a grayscale value array corresponding to each first light fringe image; Compare the gray values ​​in all gray value arrays to determine the target position where the reflection 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 of the first light streak images.

3. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 2, characterized in that: The step of comparing the magnitudes of the grayscale values ​​in all grayscale value arrays to determine the target position where the reflection noise exists includes: Compare 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; According to all grayscale maximum values ​​and all grayscale minimum values, obtain 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 as having reflection noise.

4. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 1, characterized in that: The step of screening all third light fringe images according to the second light fringe image to obtain a fourth light fringe image comprises: respectively calculating a peak signal-to-noise ratio of each of the third light fringe images and the second light fringe image; 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.

5. The method for visual inspection of fillet weld 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 fringe 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 in each slope straight line concentration according to 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.

6. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 5, characterized in that: The points in each slope straight line set are respectively fitted to obtain a plurality of straight lines, including: The preset SVM model is trained 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.

7. The method for visual inspection of fillet weld 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 comprises: 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.

8. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 4, characterized in that: 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: Preprocessing is performed on all the third light fringe images to obtain all the third light fringe images after preprocessing.

9. The method for visual inspection of fillet weld structured light polarization under strong reflection according to claim 4, characterized in that: The peak signal-to-noise ratio is calculated as follows: In the formula, 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.

10. A device for visual inspection of fillet weld structured light polarization under strong reflection, characterized in that: include: An image acquisition module is used to acquire a plurality of first light stripe images and a second light stripe image of the aluminum alloy under strong reflection; the plurality of first light stripe images are polarization structure light stripe images of fillet welds at a plurality of polarization angles; the second light stripe image is a polarization structure light stripe image of a fillet weld without polarization; a noise removal module, configured to remove noise of reflected light fringes from the plurality of first light fringes images, to obtain a third light fringes image corresponding to each first light fringes 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; 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.

Citation Information

Patent Citations

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

    CN113723494A

  • Weld seam tracking extraction method based on line laser structured light vision sensing

    CN114654465A

  • Structured light three-dimensional measurement method and device for polarization self-rotation filtering

    CN118482665A

  • Welding seam veining structure nondestructive detection system

    CN206756683U

  • Methods for testing welds

    DE102021002917A1

Cited By

  • Metal surface weld feature positioning method and system based on polarization imaging

    CN120931952A

  • A method and system for locating weld features on a metal surface based on polarized imaging

    CN120931952B