A method and system for identifying weld areas of automobile parts

By pre-processing, brightness correction, color enhancement and parallax matching fusion processing on the images of automobile parts, the target weld image is generated, which solves the problem of inaccurate weld area identification in the prior art, and achieves the accurate extraction of weld features and the improvement of recognition efficiency.

CN119784753AInactive Publication Date: 2025-04-08NANCHANG HONGDU AUTOMOTIVE FITTING MFG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510273262.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing weld area identification technology during the welding process of automobile parts is not obvious and there is interference information and noise in the image, resulting in the weld area being unable to be accurately identified, affecting the welding efficiency.

Method used

By obtaining the images of automobile parts, pre-processing, brightness adaptive correction, color enhancement, pixel point search and center point extraction, weld feature images are obtained, and the target weld image is generated through parallax matching and fusion processing, and finally the preset recognition model is used to identify the weld area.

Benefits of technology

It effectively avoids image overwhitening and exposure problems, suppresses interference information and noise, highlights the details of weld features, realizes accurate extraction of weld features and improves image matching accuracy, and improves the accuracy and efficiency of model recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784753A_ABST
    Figure CN119784753A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for identifying weld areas of automobile parts. The method comprises preprocessing images of automobile welding parts; performing adaptive brightness correction on processed images, and performing color enhancement on brightness-corrected images in RGB space; performing pixel point search and center point extraction on color-enhanced images; performing parallax matching on two color-enhanced images of different viewing angles; fusing matching images with weld feature images, inputting training images into a preset recognition model for training, and inputting target weld images into the trained preset recognition model for recognition, so as to output weld area recognition results. The present invention can avoid the problems of over-whitening and overexposure of images, and can also suppress interference information and noise and highlight detailed information of weld features, and can also realize accurate extraction of weld features and improve image matching accuracy at the same time, thereby improving the accuracy and efficiency of model recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image recognition, and in particular relates to a method and system for recognizing weld areas of automobile parts. Background Art

[0002] Automobile parts are specifically components of an automobile body. For some of the automobile parts, they are made of several small parts that are welded together. However, with the development of automation, welding robots are widely used in welding operations. During the welding process, the welding robot identifies the weld area and the welded parts to perform subsequent welding processes. However, during the welding process of the welding robot, it is necessary to identify the weld area in real time so that the welding position can be located. Therefore, during the operation of the welding robot, it is necessary to obtain the image of the automobile parts in real time and identify the position and distribution of the weld area in the image. However, for the existing weld area recognition process, since the weld position is not obvious and automobile parts are generally metal parts, there will be more interference information and noise in the image, which makes it impossible to accurately identify the weld area, thereby affecting the welding efficiency. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a method and system for identifying weld areas of automobile parts, which are used to solve the technical problems in the prior art.

[0004] On the one hand, the present invention provides the following technical solution, a method for identifying a weld area of ​​an automobile component, comprising: Acquire an image of an automobile welding component, and preprocess the image of the automobile welding component to obtain a processed image; Performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in an RGB space to obtain a color-enhanced image; Performing pixel point search and center point extraction on the color enhanced image to obtain a weld feature image; Acquire two color-enhanced images at different viewing angles, and perform parallax matching on the two color-enhanced images at different viewing angles to obtain a matching image; The matching image is fused with the weld feature image to obtain a target weld image, a training image is acquired, the training image is input into a preset recognition model for training, the target weld image is input into the trained preset recognition model for recognition, and a weld area recognition result is output.

[0005] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention first obtains an image of an automobile welding component, pre-processes the image of the automobile welding component to obtain a processed image; then performs brightness adaptive correction on the processed image to obtain a brightness corrected image, performs color enhancement on the brightness corrected image in RGB space to obtain a color enhanced image; then performs pixel point search and center point extraction on the color enhanced image to obtain a weld feature image; then obtains two color enhanced images of different viewing angles, performs parallax matching on the two color enhanced images of different viewing angles to obtain a matching image; finally, the matching image is compared with the The weld feature image is fused to obtain a target weld image, a training image is obtained, the training image is input into a preset recognition model for training, and the target weld image is input into the trained preset recognition model for recognition to output a weld area recognition result. The present invention first corrects and enhances the image to avoid the problems of image over-whitening and exposure, while also suppressing interference information and noise and highlighting the detailed information of the weld features. The image is then subjected to center point extraction and parallax matching, thereby achieving accurate extraction of weld features and improving image matching accuracy, thereby improving the accuracy and efficiency of model recognition.

[0006] Preferably, the step of performing adaptive brightness correction on the processed image to obtain a brightness corrected image comprises: Calculate the first grayscale difference of the processed image : ; In the formula, Indicates the number of pixels in the processed image. Indicates the first The gray value of the pixel, , Respectively represent the maximum grayscale value and minimum grayscale value of pixels in the processed image; Based on the first grayscale difference Calculate the second grayscale difference : ; Based on the first grayscale difference Difference with the second grayscale Calculate judgment threshold : ; Based on the judgment threshold Calculate brightness correction factor : ; In the formula, is the bias factor, is the image bit depth, is the adjustment factor; Based on the brightness correction factor Perform adaptive brightness correction on the processed image to obtain a brightness-corrected image.

[0007] Preferably, the brightness correction factor The step of performing adaptive brightness correction on the processed image to obtain a brightness corrected image comprises: Performing brightness adjustment on the processed image to obtain a brightness adjusted image: ; In the formula, Respectively represent the brightness adjustment image and the processed image The brightness at To process the maximum brightness of the image, Indicates brightness adjusts the brightness of the image. represents the gain factor; Based on the brightness correction factor Performing brightness correction on the brightness-adjusted image to obtain a brightness-corrected image: ; In the formula, To correct the image for brightness The brightness at is the control factor, for The brightness of the neighboring pixels.

[0008] Preferably, the step of performing color enhancement on the brightness-corrected image in RGB space to obtain a color-enhanced image comprises: The brightness correction image is subjected to wavelength radiation transformation in RGB space to obtain RGB channel radiation values. : ; In the formula, is Planck's constant, is the speed of light, is the wavelength, is the Boltzmann constant, Correct the grayscale values ​​of the image for brightness; Based on RGB channel radiance value Calculate the R channel color value separately , G channel color value and B channel color value : ; ; ; In the formula, is the normalization factor, represents the visible wavelength range, , , Respectively represent the human eye's response to wavelength in R, G, and B channels the perceived intensity of light at For the R channel color value , G channel color value and B channel color value Perform linear transformation enhancement to obtain the R channel enhancement value , G channel enhancement value and B channel enhancement value : ; In the formula, are the first to sixth linear weights respectively; Based on R channel enhancement value , G channel enhancement value and B channel enhancement value Determine the color enhancement image : .

[0009] Preferably, the step of performing pixel point search and center point extraction on the color enhanced image to obtain a weld feature image comprises: performing region of interest extraction, morphological processing and image segmentation on the color enhanced image in sequence to obtain a target image; Identify the upper contour point of the target image to obtain an upper contour point set, search in the horizontal and vertical directions with the upper contour point in the upper contour point set as the center, and calculate the center point of the pixel points in the same direction : ; ; In the formula, Indicates the pixel point searched with the upper contour point as the center and the first pixel in the set composed of the upper contour point. pixels, Indicate point Gray value of If the upper contour point has a center point in both the horizontal and vertical directions, the average value of the center points in the two directions is taken as the final center point and stored in the final center point set; if the upper contour point has a center point in the horizontal or vertical direction, the corresponding center point is taken as the final center point and stored in the final center point set; Sort all the final center points in the final center point set according to the order of the upper contour points to obtain a sorted point set, and calculate the final judgment value of each final center point in the sorted point set : ; In the formula, Respectively represent the order of points in the set The horizontal coordinate of the final center point; The final judgment value The final center point greater than the first judgment threshold is stored in the first point set, and the final judgment value The final center point that is smaller than the second judgment threshold is stored in the second point set; Performing straight line fitting on the points in the first point set and the points in the second point set respectively to obtain a first straight line and a second straight line; The intersection point between the first straight line and the second straight line is obtained to obtain the target center point, a set rectangular window is determined with the target center point as the center and the contour points of the target image as the boundary, and the image corresponding to the set rectangular window is used as the weld feature image.

[0010] Preferably, the step of performing parallax matching on two color-enhanced images of different viewing angles to obtain a matching image comprises: Two color-enhanced images of different viewing angles are used as a reference image and an image to be matched, respectively, a rectangular window is determined with each pixel point as the center in the reference image, and a circular window is determined with each pixel point as the center in the image to be matched; Calculate a first matching value based on the rectangular window and the circular window : ; In the formula, are the number of pixels of the rectangular window and the circular window respectively. is the Hamming distance calculation, Represents the pixels in the image to be matched The bit string, The disparity between the image to be matched and the reference image is The bit string of the pixel point; Based on the first matching value Calculate the second match value : ; In the formula, Represents the pixels in the reference image The bit string, The disparity between the reference image and the image to be matched is The bit string of the pixel point, are the first and second matching weights respectively, To set the pixel number threshold; Calculate the third matching value between the reference image and the image to be matched : ; In the formula, Represents the pixels in the reference image The gray value in the R channel, G channel, or B channel, Indicates that the disparity between the reference image and the image to be matched is The gray value of the pixel in the R channel, G channel or B channel; Based on the second matching value Matches the third value Calculate the fourth matching value : ; In the formula, represent the first control parameter and the second control parameter respectively; Based on the fourth matching value A matching disparity is calculated, and a matching image is determined based on the matching disparity.

[0011] Preferably, the fourth matching value The steps of calculating the matching disparity and determining the matching image based on the matching disparity include: The fourth matching value Perform update processing according to the search direction to obtain the updated matching value : ; In the formula, The parallax is Pixels The fourth matching value of The parallax is Pixels In search direction The fourth matching value of the previous pixel on , They represent the parallax as Pixels In search direction The fourth matching value of the previous pixel on , The parallax is Pixels In search direction The fourth matching value of the previous pixel on , For variable parallax, are respectively a first compensation value and a second compensation value; Update matching value based on Determine the pixel The final matching value : ; Based on the fourth matching value Determine the function to be optimized : ; In the formula, The parallax is Pixels The fourth matching value of Represents pixel The final parallax, Represents pixel and pixel The color difference between the next adjacent pixel points, Represents pixel Neighborhood range Pixels within and pixel The color difference between the next adjacent pixel points, represents probability calculation; For the function to be optimized Minimize the processing to obtain the final parallax , based on the final disparity The final matching value Determine matching parallax : ; In the formula, They represent the parallax as Pixels The final matching value of Based on matching parallax Identify matching images.

[0012] In a second aspect, the present invention provides the following technical solution: a system for identifying weld areas of automobile parts, the system comprising: A processing module, used for acquiring an image of an automobile welding component, and preprocessing the image of the automobile welding component to obtain a processed image; A correction and enhancement module, used for performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in an RGB space to obtain a color-enhanced image; An extraction module, used for performing pixel search and center point extraction on the color enhanced image to obtain a weld feature image; A matching module is used to obtain two color-enhanced images of different viewing angles, and perform parallax matching on the two color-enhanced images of different viewing angles to obtain a matching image; The recognition module is used to fuse the matching image with the weld feature image to obtain a target weld image, obtain a training image, input the training image into a preset recognition model for training, input the target weld image into the trained preset recognition model for recognition, and output a weld area recognition result.

[0013] In a third aspect, the present invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for identifying weld areas of automotive parts when executing the computer program.

[0014] In a fourth aspect, the present invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned method for identifying weld areas of automotive parts. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A flow chart of a method for identifying weld areas of automotive parts provided in Embodiment 1 of the present invention; Figure 2 A structural block diagram of a welding seam area recognition system for automobile parts provided in the second embodiment of the present invention; Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.

[0017] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0018] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.

[0019] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0020] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0021] In the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0022] Embodiment 1 In the first embodiment of the present invention, Figure 1 As shown, a method for identifying weld areas of automobile parts includes: S1. Acquire an image of an automobile welding component, and preprocess the image of the automobile welding component to obtain a processed image; Specifically, the automobile welding parts image here is specifically an image of an automobile part to be welded by a welding robot or an image in the welding process. At the same time, when obtaining the automobile welding parts image, it is necessary to shoot from multiple perspectives, specifically, it can be shot from the front, left, and right, and the preprocessing process specifically includes image rotation, cropping, filtering, etc. The above preprocessing process is a common step in the prior art, so it will not be repeated here. S2, performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in an RGB space to obtain a color-enhanced image; Specifically, the step of performing adaptive brightness correction on the processed image to obtain a brightness corrected image includes: S211, calculating the first grayscale difference of the processed image : ; In the formula, Indicates the number of pixels in the processed image. Indicates the first The gray value of the pixel, , Respectively represent the maximum grayscale value and minimum grayscale value of pixels in the processed image; Specifically, the first grayscale difference is used to reflect the grayscale change of the image.

[0023] S212: Based on the first grayscale difference Calculate the second grayscale difference : ; Specifically, the second grayscale difference is used to reflect the importance of the average grayscale value of the image.

[0024] S213: Based on the first grayscale difference Difference with the second grayscale Calculate judgment threshold : ; Specifically, the judgment threshold is used to reflect the brightness state of the image.

[0025] S214: Based on the judgment threshold Calculate brightness correction factor : ; In the formula, is the bias factor, is the image bit depth, is the adjustment factor; Specifically, when When , the image brightness is normal, when When , the brightness of the image is abnormal, so the correction strength is adaptively adjusted according to the brightness state of the image. The bias factor is specifically the bias coefficient. The adjustment factor is used to adjust the grayscale of the image to ensure the grayscale balance of the image.

[0026] S215: Based on the brightness correction factor Performing adaptive brightness correction on the processed image to obtain a brightness-corrected image; Wherein, the step S215 includes: S2151, performing brightness adjustment on the processed image to obtain a brightness adjusted image: ; In the formula, Respectively represent the brightness adjustment image and the processed image The brightness at To process the maximum brightness of the image, Indicates brightness adjusts the brightness of the image. represents the gain factor; Specifically, the brightness of the image can be adjusted through the maximum brightness value to achieve a global mapping effect.

[0027] S2152: Based on the brightness correction factor Performing brightness correction on the brightness-adjusted image to obtain a brightness-corrected image: ; In the formula, To correct the image for brightness The brightness at is the control factor, for The brightness of the neighboring pixels; Specifically, the control factor is specifically used to control the contrast.

[0028] The step of performing color enhancement on the brightness-corrected image in the RGB space to obtain a color-enhanced image comprises: S221, performing wavelength radiation transformation on the brightness correction image in RGB space to obtain RGB channel radiation values : ; In the formula, is Planck's constant, is the speed of light, is the wavelength, is the Boltzmann constant, Corrects the grayscale values ​​of the image for brightness.

[0029] S222, based on RGB channel radiation value Calculate the R channel color value separately , G channel color value and B channel color value : ; ; ; In the formula, is the normalization factor, represents the visible wavelength range, , , Respectively represent the human eye's response to wavelength in R, G, and B channels the perceived intensity of light at Specifically, the visible wavelength range here is set to , the normalization factor is used to ensure that the final color value of each channel has an appropriate amplitude and unit so that it is within the appropriate range.

[0030] S223, the R channel color value , G channel color value and B channel color value Perform linear transformation enhancement to obtain the R channel enhancement value , G channel enhancement value and B channel enhancement value : ; In the formula, are the first to sixth linear weights respectively; Specifically, here They are 0.5, 0.3, 0.18, 0.81, 0, and 0.01 respectively.

[0031] S224, based on R channel enhancement value , G channel enhancement value and B channel enhancement value Determine the color enhancement image : .

[0032] S3, performing pixel point search and center point extraction on the color enhanced image to obtain a weld feature image; Wherein, the step S3 comprises: S31, performing region of interest extraction, morphological processing and image segmentation on the color enhanced image in sequence to obtain a target image; Specifically, the above-mentioned region of interest extraction, morphological processing and image segmentation are commonly used methods in the prior art, and thus will not be described in detail.

[0033] S32, identifying the upper contour point of the target image to obtain an upper contour point set, searching in the horizontal and vertical directions with the upper contour point in the upper contour point set as the center, and calculating the center point of the pixel points in the same direction : ; ; In the formula, Indicates the pixel point searched with the upper contour point as the center and the first pixel in the set composed of the upper contour point. pixels, Indicate point Gray value of Specifically, the target image is a plurality of images including the weld area, and the upper contour point is a pixel point located above in the target image.

[0034] S33, if the upper contour point has a center point in both the horizontal and vertical directions, then the average value of the center points in the two directions is taken as the final center point and stored in the final center point set; if the upper contour point has a center point in the horizontal or vertical direction, then the corresponding center point is taken as the final center point and stored in the final center point set; Specifically, if there are no other pixel points above a certain upper contour point in the vertical direction or horizontal direction, then there is no center point on the upper contour in that direction; if the upper contour point has a center point in both directions, then the center points in the two directions are averaged to obtain the final center point; if the upper contour point has a center point in a certain direction, then the center point in the corresponding direction is used as the final center point.

[0035] S34, sorting all the final center points in the final center point set according to the order of the upper contour points to obtain a sorted point set, and calculating the final judgment value of each final center point in the sorted point set : ; In the formula, Respectively represent the order of points in the set The horizontal coordinate of the final center point; Specifically, the above final judgment value may be equal to the slope of the point in the sorting point set.

[0036] S35, the final judgment value The final center point greater than the first judgment threshold is stored in the first point set, and the final judgment value The final center point that is smaller than the second judgment threshold is stored in the second point set.

[0037] S36. Perform straight line fitting on the points in the first point set and the points in the second point set respectively to obtain a first straight line and a second straight line.

[0038] S37, finding the intersection point between the first straight line and the second straight line to obtain the target center point, determining a set rectangular window with the target center point as the center and the contour points of the target image as the boundary, and using the image corresponding to the set rectangular window as the weld feature image; Specifically, the contour points here specifically refer to the boundary points of the weld. By determining a rectangular window, that is, setting the rectangular window, it is ensured that the window can fully reflect the weld area in the weld feature image.

[0039] S4, obtaining two color-enhanced images at different viewing angles, and performing parallax matching on the two color-enhanced images at different viewing angles to obtain a matching image; Specifically, step S4 includes: S41, using two color-enhanced images of different viewing angles as a reference image and an image to be matched respectively, determining a rectangular window with each pixel as the center in the reference image and determining a circular window with each pixel as the center in the image to be matched.

[0040] S42: Calculate a first matching value based on the rectangular window and the circular window : ; In the formula, are the number of pixels of the rectangular window and the circular window respectively. is the Hamming distance calculation, Represents the pixels in the image to be matched The bit string, The disparity between the image to be matched and the reference image is The bit string of the pixel point.

[0041] S43, based on the first matching value Calculate the second match value : ; In the formula, Represents the pixels in the reference image The bit string, The disparity between the reference image and the image to be matched is The bit string of the pixel point, are the first and second matching weights respectively, To set the pixel number threshold; Specifically, when , it indicates that the image has rich textures and features, so only the reference image can be used as the basis for calculation.

[0042] S44: Calculate a third matching value between the reference image and the image to be matched : ; In the formula, Represents the pixels in the reference image The gray value in the R channel, G channel, or B channel, Indicates that the disparity between the reference image and the image to be matched is The gray value of the pixel in the R channel, G channel or B channel; Specifically, the parallax here It can be preset, and each pixel has a corresponding parallax.

[0043] S45, based on the second matching value Matches the third value Calculate the fourth matching value : ; In the formula, represent the first control parameter and the second control parameter respectively; Specifically, the first control parameter and the second control parameter may be adjusted according to the result during calculation.

[0044] S46, based on the fourth matching value calculating a matching disparity, and determining a matching image based on the matching disparity; Wherein, step S46 includes: S461: the fourth matching value Perform update processing according to the search direction to obtain the updated matching value : ; In the formula, The parallax is Pixels The fourth matching value of The parallax is Pixels In search direction The fourth matching value of the previous pixel on , They represent the parallax as Pixels In search direction The fourth matching value of the previous pixel on , The parallax is Pixels In search direction The fourth matching value of the previous pixel on , For variable parallax, are respectively a first compensation value and a second compensation value; Specifically, the search direction includes four directions: up, down, left, and right. The value range is 1-4, and the four values ​​represent a direction respectively.

[0045] S462, based on the updated matching value Determine the pixel The final matching value : ; Specifically, the updated matching values ​​calculated in the above four search directions are averaged to obtain the final matching value.

[0046] S463: Based on the fourth matching value Determine the function to be optimized : ; In the formula, The parallax is Pixels The fourth matching value of Represents pixel The final parallax, Represents pixel and pixel The color difference between the next adjacent pixel points, Represents pixel Neighborhood range Pixels within and pixel The color difference between the next adjacent pixel points, Represents probability calculation.

[0047] S464: Optimize the function to be optimized Minimize the processing to obtain the final parallax , based on the final disparity The final matching value Determine matching parallax : ; In the formula, They represent the parallax as Pixels The final matching value.

[0048] S465, based on matching parallax Identify matching images.

[0049] S5, fusing the matching image with the weld feature image to obtain a target weld image, acquiring a training image, inputting the training image into a preset recognition model for training, inputting the target weld image into the trained preset recognition model for recognition, and outputting a weld area recognition result; Specifically, the matching image is fused with the weld feature image so that the weld feature can fuse the parallax information to improve the accuracy of subsequent recognition. The preset recognition model here is specifically the YOLOV5 model. The target weld image is input into the preset recognition model for recognition, and the position, shape, size and other information of the weld can be obtained.

[0050] The method for identifying weld areas of automobile parts provided in the first embodiment of the present invention first obtains an image of an automobile welding part, pre-processes the image of the automobile welding part to obtain a processed image; then performs adaptive brightness correction on the processed image to obtain a brightness-corrected image, performs color enhancement on the brightness-corrected image in RGB space to obtain a color-enhanced image; then performs pixel point search and center point extraction on the color-enhanced image to obtain a weld feature image; then obtains two color-enhanced images of different viewing angles, performs parallax matching on the two color-enhanced images of different viewing angles to obtain a matching image; and finally performs a matching image on the matching image. The image is fused with the weld feature image to obtain a target weld image, a training image is obtained, the training image is input into a preset recognition model for training, and the target weld image is input into the trained preset recognition model for recognition to output a weld area recognition result. The present invention first corrects and enhances the image to avoid the problems of image over-whitening and exposure, while also suppressing interference information and noise and highlighting the detailed information of the weld features. Then, the image is subjected to center point extraction and parallax matching, thereby achieving accurate extraction of weld features and improving image matching accuracy, thereby improving the accuracy and efficiency of model recognition.

[0051] Embodiment 2 like Figure 2 As shown, in the second embodiment of the present invention, a system for identifying weld areas of automobile parts is provided, and the system comprises: Processing module 1, used for acquiring an image of an automobile welding component, and preprocessing the image of the automobile welding component to obtain a processed image; Correction and enhancement module 2, used for performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in RGB space to obtain a color-enhanced image; Extraction module 3, used for performing pixel search and center point extraction on the color enhanced image to obtain a weld feature image; A matching module 4 is used to obtain two color-enhanced images of different viewing angles, and perform parallax matching on the two color-enhanced images of different viewing angles to obtain a matching image; The recognition module 5 is used to fuse the matching image with the weld feature image to obtain a target weld image, obtain a training image, input the training image into a preset recognition model for training, input the target weld image into the trained preset recognition model for recognition, and output a weld area recognition result; The correction enhancement module 2 comprises: The first difference submodule is used to calculate the first grayscale difference of the processed image : ; In the formula, Indicates the number of pixels in the processed image. Indicates the first The gray value of the pixel, , Respectively represent the maximum grayscale value and minimum grayscale value of pixels in the processed image; The second difference submodule is used to calculate the grayscale difference based on the first grayscale difference. Calculate the second grayscale difference : ; A threshold submodule is used to Difference with the second grayscale Calculate judgment threshold : ; A correction factor submodule is used to determine the threshold value based on the Calculate brightness correction factor : ; In the formula, is the bias factor, is the image bit depth, is the adjustment factor; A correction submodule is used to correct the brightness based on the brightness correction factor Perform adaptive brightness correction on the processed image to obtain a brightness-corrected image.

[0052] The correction submodule comprises: An adjustment unit, configured to perform brightness adjustment on the processed image to obtain a brightness adjusted image: ; In the formula, Respectively represent the brightness adjustment image and the processed image The brightness at To process the maximum brightness of the image, Indicates brightness adjusts the brightness of the image. represents the gain factor; A correction unit for correcting the brightness of the image based on the brightness correction factor Performing brightness correction on the brightness-adjusted image to obtain a brightness-corrected image: ; In the formula, To correct the image for brightness The brightness at is the control factor, for The brightness of the neighboring pixels.

[0053] The correction enhancement module 2 also includes: The radiation submodule is used to perform wavelength radiation transformation on the brightness correction image in RGB space to obtain RGB channel radiation values. : ; In the formula, is Planck's constant, is the speed of light, is the wavelength, is the Boltzmann constant, Correct the grayscale values ​​of the image for brightness; Color submodule for radiance values ​​based on RGB channels Calculate the R channel color value separately , G channel color value and B channel color value : ; ; ; In the formula, is the normalization factor, represents the visible wavelength range, , , Respectively represent the human eye's response to wavelength in R, G, and B channels the perceived intensity of light at The enhancement submodule is used to enhance the color value of the R channel , G channel color value and B channel color value Perform linear transformation enhancement to obtain the R channel enhancement value , G channel enhancement value and B channel enhancement value : ; In the formula, are the first to sixth linear weights respectively; Enhanced output submodule for enhancing the value based on the R channel , G channel enhancement value and B channel enhancement value Determine the color enhancement image : .

[0054] The extraction module 3 comprises: An image processing submodule, used for sequentially performing region of interest extraction, morphological processing and image segmentation on the color enhanced image to obtain a target image; The recognition submodule is used to identify the upper contour point of the target image to obtain an upper contour point set, search in the horizontal and vertical directions respectively with the upper contour point in the upper contour point set as the center, and calculate the center point of the pixel points in the same direction : ; ; In the formula, Indicates the pixel point searched with the upper contour point as the center and the first pixel in the set composed of the upper contour point. pixels, Indicate point Gray value of The final center point submodule is used to take the average of the center points in the two directions as the final center point and store it in the final center point set if the upper contour point has a center point in both the horizontal and vertical directions; if the upper contour point has a center point in the horizontal or vertical direction, take the corresponding center point as the final center point and store it in the final center point set; A sorting submodule is used to sort all the final center points in the final center point set according to the order of the upper contour points to obtain a sorted point set, and calculate the final judgment value of each final center point in the sorted point set : ; In the formula, Respectively represent the order of points in the set The horizontal coordinate of the final center point; Point collection submodule is used to convert the final judgment value The final center point greater than the first judgment threshold is stored in the first point set, and the final judgment value The final center point that is smaller than the second judgment threshold is stored in the second point set; A fitting submodule, used to perform straight line fitting on the points in the first point set and the points in the second point set respectively, so as to obtain a first straight line and a second straight line; The feature extraction submodule is used to obtain the intersection point between the first straight line and the second straight line to obtain the target center point, determine a set rectangular window with the target center point as the center and the contour points of the target image as the boundary, and use the image corresponding to the set rectangular window as the weld feature image.

[0055] The matching module 4 comprises: A window submodule, used to use two color-enhanced images of different viewing angles as a reference image and an image to be matched, respectively, to determine a rectangular window with each pixel as the center in the reference image and to determine a circular window with each pixel as the center in the image to be matched; A first matching submodule, configured to calculate a first matching value based on the rectangular window and the circular window : ; In the formula, are the number of pixels of the rectangular window and the circular window respectively. is the Hamming distance calculation, Represents the pixels in the image to be matched The bit string, The disparity between the image to be matched and the reference image is The bit string of the pixel point; A second matching submodule is used to match the first matching value based on Calculate the second match value : ; In the formula, Represents the pixels in the reference image The bit string, The disparity between the reference image and the image to be matched is The bit string of the pixel point, are the first and second matching weights respectively, To set the pixel number threshold; The third matching submodule is used to calculate the third matching value between the reference image and the image to be matched : ; In the formula, Represents the pixels in the reference image The gray value in the R channel, G channel, or B channel, Indicates that the disparity between the reference image and the image to be matched is The gray value of the pixel in the R channel, G channel or B channel; A fourth matching submodule is used to match the second matching value based on the Matches the third value Calculate the fourth matching value : ; In the formula, represent the first control parameter and the second control parameter respectively; A matching output submodule is used to output a matching value based on the fourth matching value. A matching disparity is calculated, and a matching image is determined based on the matching disparity.

[0056] The matching output submodule comprises: An updating unit, configured to update the fourth matching value Perform update processing according to the search direction to obtain the updated matching value : ; In the formula, The parallax is Pixels The fourth matching value of The parallax is Pixels In search direction The fourth matching value of the previous pixel on , They represent the parallax as Pixels In search direction The fourth matching value of the previous pixel on , The parallax is Pixels In search direction The fourth matching value of the previous pixel on , For variable parallax, are respectively a first compensation value and a second compensation value; Final matching unit, used to update matching values ​​based on Determine the pixel The final matching value : ; A function unit for providing a function based on a fourth matching value Determine the function to be optimized : ; In the formula, The parallax is Pixels The fourth matching value of Represents pixel The final parallax, Represents pixel and pixel The color difference between the next adjacent pixel points, Represents pixel Neighborhood range Pixels within and pixel The color difference between the next adjacent pixel points, represents probability calculation; A disparity unit is used to optimize the function Minimize the processing to obtain the final parallax , based on the final disparity The final matching value Determine matching parallax : ; In the formula, They represent the parallax as Pixels The final matching value of Output unit for matching disparity based Identify matching images.

[0057] In some other embodiments of the present invention, the embodiments of the present invention provide the following technical solutions: a computer, comprising a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101; when the processor 101 executes the computer program, the method for identifying the weld area of ​​an automotive component as described above is implemented.

[0058] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0059] Among them, the memory 102 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 102 may be inside or outside the data processing device. In a specific embodiment, the memory 102 is a non-volatile memory. In a specific embodiment, the memory 102 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0060] The memory 102 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101 .

[0061] The processor 101 implements the above-mentioned automobile component weld area recognition method by reading and executing the computer program instructions stored in the memory 102 .

[0062] In some embodiments, the computer may further include a communication interface 103 and a bus 100. Figure 3 As shown, the processor 101, the memory 102, and the communication interface 103 are connected via a bus 100 and communicate with each other.

[0063] The communication interface 103 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present invention. The communication interface 103 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0064] The bus 100 includes hardware, software or both, and couples the components of the computer device to each other. The bus 100 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.

[0065] The computer can execute the automobile component weld area recognition method of the present invention based on the obtained automobile component weld area recognition system, thereby realizing automobile component weld area recognition.

[0066] In some further embodiments of the present invention, in combination with the above-mentioned method for identifying the weld area of ​​an automobile component, the embodiments of the present invention provide the following technical solutions: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned method for identifying the weld area of ​​an automobile component when executed by a processor.

[0067] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0068] More specific examples of readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0069] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0070] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0071] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for identifying weld areas of automobile parts, characterized in that: include: Acquire an image of an automobile welding component, and preprocess the image of the automobile welding component to obtain a processed image; Performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in an RGB space to obtain a color-enhanced image; Performing pixel point search and center point extraction on the color enhanced image to obtain a weld feature image; Acquire two color-enhanced images at different viewing angles, and perform parallax matching on the two color-enhanced images at different viewing angles to obtain a matching image; The matching image is fused with the weld feature image to obtain a target weld image, a training image is acquired, the training image is input into a preset recognition model for training, the target weld image is input into the trained preset recognition model for recognition, and a weld area recognition result is output.

2. The method for identifying weld areas of automobile parts according to claim 1, characterized in that: The step of performing adaptive brightness correction on the processed image to obtain a brightness corrected image comprises: Calculate the first grayscale difference of the processed image : ; In the formula, Indicates the number of pixels in the processed image. Indicates the first The gray value of the pixel, , Respectively represent the maximum grayscale value and minimum grayscale value of pixels in the processed image; Based on the first grayscale difference Calculate the second grayscale difference : ; Based on the first grayscale difference Difference with the second grayscale Calculate judgment threshold : ; Based on the judgment threshold Calculate brightness correction factor : ; In the formula, is the bias factor, is the image bit depth, is the adjustment factor; Based on the brightness correction factor Perform adaptive brightness correction on the processed image to obtain a brightness-corrected image.

3. The method for identifying weld areas of automobile parts according to claim 2, characterized in that: The brightness correction factor based on The step of performing adaptive brightness correction on the processed image to obtain a brightness corrected image comprises: Performing brightness adjustment on the processed image to obtain a brightness adjusted image: ; In the formula, Respectively represent the brightness adjustment image and the processed image The brightness at To process the maximum brightness of the image, Indicates brightness adjusts the brightness of the image. represents the gain factor; Based on the brightness correction factor Performing brightness correction on the brightness-adjusted image to obtain a brightness-corrected image: ; In the formula, To correct the image for brightness The brightness at is the control factor, for The brightness of the neighboring pixels.

4. The method for identifying weld areas of automobile parts according to claim 1, characterized in that: The step of performing color enhancement on the brightness-corrected image in the RGB space to obtain a color-enhanced image comprises: The brightness correction image is subjected to wavelength radiation transformation in RGB space to obtain RGB channel radiation values. : ; In the formula, is Planck's constant, is the speed of light, is the wavelength, is the Boltzmann constant, Correct the grayscale values ​​of the image for brightness; Based on RGB channel radiance value Calculate the R channel color value separately , G channel color value and B channel color value : ; ; ; In the formula, is the normalization factor, represents the visible wavelength range, , , Respectively represent the human eye's response to wavelength in R, G, and B channels the perceived intensity of light at For the R channel color value , G channel color value and B channel color value Perform linear transformation enhancement to obtain the R channel enhancement value , G channel enhancement value and B channel enhancement value : ; In the formula, are the first to sixth linear weights respectively; Based on R channel enhancement value , G channel enhancement value and B channel enhancement value Determine the color enhancement image : 。 5. The method for identifying weld areas of automobile parts according to claim 1, characterized in that: The step of performing pixel point search and center point extraction on the color enhanced image to obtain a weld feature image comprises: performing region of interest extraction, morphological processing and image segmentation on the color enhanced image in sequence to obtain a target image; Identify the upper contour point of the target image to obtain an upper contour point set, search in the horizontal and vertical directions with the upper contour point in the upper contour point set as the center, and calculate the center point of the pixel points in the same direction : ; ; In the formula, Indicates the pixel point searched with the upper contour point as the center and the first pixel in the set composed of the upper contour point. pixels, Indicate point Gray value of If the upper contour point has a center point in both the horizontal and vertical directions, the average value of the center points in the two directions is taken as the final center point and stored in the final center point set; if the upper contour point has a center point in the horizontal or vertical direction, the corresponding center point is taken as the final center point and stored in the final center point set; Sort all the final center points in the final center point set according to the order of the upper contour points to obtain a sorted point set, and calculate the final judgment value of each final center point in the sorted point set : ; In the formula, Respectively represent the first The horizontal coordinate of the final center point; The final judgment value The final center point greater than the first judgment threshold is stored in the first point set, and the final judgment value The final center point that is smaller than the second judgment threshold is stored in the second point set; Performing straight line fitting on the points in the first point set and the points in the second point set respectively to obtain a first straight line and a second straight line; The intersection point between the first straight line and the second straight line is obtained to obtain the target center point, a set rectangular window is determined with the target center point as the center and the contour points of the target image as the boundary, and the image corresponding to the set rectangular window is used as the weld feature image.

6. The method for identifying weld areas of automobile parts according to claim 1, characterized in that: The step of performing disparity matching on two color-enhanced images of different viewing angles to obtain a matching image comprises: Two color-enhanced images of different viewing angles are used as a reference image and an image to be matched, respectively, a rectangular window is determined with each pixel point as the center in the reference image, and a circular window is determined with each pixel point as the center in the image to be matched; Calculate a first matching value based on the rectangular window and the circular window : ; In the formula, are the number of pixels of the rectangular window and the circular window respectively. is the Hamming distance calculation, Represents the pixels in the image to be matched The bit string, The disparity between the image to be matched and the reference image is The bit string of the pixel point; Based on the first matching value Calculate the second match value : ; In the formula, Represents the pixels in the reference image The bit string, The disparity between the reference image and the image to be matched is The bit string of the pixel point, are the first and second matching weights respectively, To set the pixel number threshold; Calculate the third matching value between the reference image and the image to be matched : ; In the formula, Represents the pixels in the reference image The gray value in the R channel, G channel, or B channel, Indicates that the disparity between the reference image and the image to be matched is The gray value of the pixel in the R channel, G channel or B channel; Based on the second matching value Matches the third value Calculate the fourth matching value : ; In the formula, represent the first control parameter and the second control parameter respectively; Based on the fourth matching value A matching disparity is calculated, and a matching image is determined based on the matching disparity.

7. The method for identifying weld areas of automobile parts according to claim 6, characterized in that: based on the fourth matching value The steps of calculating the matching disparity and determining the matching image based on the matching disparity include: The fourth matching value Perform update processing according to the search direction to obtain the updated matching value : ; In the formula, The parallax is Pixels The fourth matching value of The parallax is Pixels In search direction The fourth matching value of the previous pixel on , They represent the parallax as Pixels In search direction The fourth matching value of the previous pixel on , The parallax is Pixels In search direction The fourth matching value of the previous pixel on , For variable parallax, are respectively a first compensation value and a second compensation value; Update matching value based on Determine the pixel The final matching value : ; Based on the fourth matching value Determine the function to be optimized : ; In the formula, The parallax is Pixels The fourth matching value of Represents pixel The final parallax, Represents pixel and pixel The color difference between the next adjacent pixel points, Represents pixel Neighborhood range Pixels within and pixel The color difference between the next adjacent pixel points, represents probability calculation; For the function to be optimized Minimize the processing to obtain the final parallax , based on the final disparity The final matching value Determine matching parallax : ; In the formula, They represent the parallax as Pixels The final matching value of Based on matching parallax Identify matching images.

8. A welding seam area recognition system for automobile parts, characterized in that: The system comprises: A processing module, used for acquiring an image of an automobile welding component, and preprocessing the image of the automobile welding component to obtain a processed image; A correction and enhancement module, used for performing adaptive brightness correction on the processed image to obtain a brightness-corrected image, and performing color enhancement on the brightness-corrected image in an RGB space to obtain a color-enhanced image; An extraction module, used for performing pixel search and center point extraction on the color enhanced image to obtain a weld feature image; A matching module is used to obtain two color-enhanced images of different viewing angles, and perform parallax matching on the two color-enhanced images of different viewing angles to obtain a matching image; The recognition module is used to fuse the matching image with the weld feature image to obtain a target weld image, obtain a training image, input the training image into a preset recognition model for training, input the target weld image into the trained preset recognition model for recognition, and output a weld area recognition result.

9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for identifying the weld area of ​​an automobile component according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for identifying the weld area of ​​an automobile component according to any one of claims 1 to 7 is implemented.