Trapezoidal workpiece anti-reflection method based on main contour matching

By obtaining the factors affecting reflection and building a BP neural network model, trapezoidal workpieces are processed to reduce reflection, and the precise matching and classification of weld detection is achieved, the measurement accuracy problem caused by trapezoidal workpiece reflection is solved, and the accuracy of weld detection is improved.

CN119205684APending Publication Date: 2024-12-27BEIJING CHUANGXIANG ZHIKONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301232.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the weld detection process, the measurement accuracy of the trapezoidal workpiece is difficult to ensure due to the reflection phenomenon, especially when the irradiation angle between the light source and the weld is different, it is difficult for the prior art to effectively deal with it.

Method used

By obtaining data on reflective factors, determining the optimal atomization characteristic parameters, spraying the workpiece to be detected, building a BP neural network model, obtaining standard contours without reflection, and matching and classification through the contour correlation value, dynamic update detection Area to extract weld profile.

Benefits of technology

It effectively reduces the impact of reflection, improves the accuracy and accuracy of weld detection, can correctly classify the existence of welds, and dynamically adjusts the detection area to extract the complete weld profile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205684A_ABST
    Figure CN119205684A_ABST
Patent Text Reader

Abstract

The invention discloses a trapezoidal workpiece anti-reflection method based on main contour matching, and relates to the technical field of welding seam detection. The method comprises the following steps: carrying out spraying treatment on a to-be-detected workpiece by using an optimal atomization characteristic parameter, obtaining a contour of the to-be-detected workpiece under a non-reflective condition in a treatment process as a standard contour, collecting image data of the to-be-detected workpiece as a real-time contour, and carrying out matching comparison on the real-time contour data and the standard contour data to obtain a contour correlation degree value; setting a contour correlation degree threshold value, classifying contour matching results according to the obtained contour correlation degree value, positioning any point on a center line of a welding seam as an initial position point o1 when the welding seam exists, taking a circular area which takes the initial position point o1 as a circle center and takes epsilon as a radius as a key detection area, and performing binarization processing on the key detection area to obtain a contour correlation degree threshold value; and extracting the processed weld contour, dynamically updating the key detection area, and carrying out iteration on the initial position point until the weld contour of the complete to-be-detected workpiece is extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of weld detection, and in particular to a trapezoidal workpiece anti-reflection method based on main contour matching. Background Art

[0002] Laser vision-based weld inspection technology has become a common method used in weld inspection-related industries. Weld inspection generally includes weld profile information inspection and weld quality inspection. Only by obtaining accurate weld profile information and using visual recognition technology to distinguish the weld from the parent material can the quality of the weld be objectively judged.

[0003] At present, most welding robots and grinding robots at home and abroad use CDD cameras or CMOS cameras to receive the light reflected by the active light source on the surface of the object to be tested, and obtain the contour feature points of the weld after a series of processing. In the process of weld detection, when there is reflection on the object to be tested, its measurement accuracy is difficult to guarantee, especially for trapezoidal workpieces, whose welds are distributed in space at different tilt states, making the illumination angles between the light source and each position point of the weld different, which makes it more prone to reflection. To this end, we propose an anti-reflection method for trapezoidal workpieces based on main contour matching. Summary of the invention

[0004] The main purpose of the present invention is to provide a trapezoidal workpiece anti-reflection method based on main contour matching, which can effectively solve the problems in the background technology.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] The anti-reflection method of trapezoidal workpiece based on main contour matching includes:

[0007] Acquire the reflection influencing factor data, determine the optimal atomization characteristic parameters according to the acquired data, perform spray processing on the workpiece to be detected with the optimal atomization characteristic parameters, and obtain the contour of the workpiece to be detected without reflection during the processing as the standard contour, wherein the reflection influencing factors include the illumination intensity Lx of the detection camera, the distance d from the geometric center of the workpiece to be detected, the angle θ from the geometric center of the workpiece to be detected, and the area s of the workpiece to be detected; the atomization characteristic parameters include atomization pressure, average particle size of water droplets, atomization flow rate, and effective range;

[0008] The process of obtaining the optimal atomization characteristic parameters includes the following steps:

[0009] Construct the reflection influencing factor data sequence E = {e1, e2, ..., e u} and atomization characteristic parameter data sequence F = {f1, f2, ..., f v}, where eu Expressed as the value of the reflection influencing factor of the uth item; f v It is expressed as the vth atomization characteristic parameter value;

[0010] Perform spray treatment on the workpiece to be inspected, obtain the contour image of the workpiece to be inspected during the treatment process, and obtain the reflective area S in the contour image f , calculate the reflective area ratio, where Where Ra is the reflective area ratio; S a is the field of view of the visual inspection camera;

[0011] The data sequence of reflection influencing factors and atomization characteristic parameter data sequence of a single processing process are used as input, and the proportion of reflection area under the working condition is used as output to build a BP neural network model, and the established neural network model is trained. According to the training results and the error of the actual alarm results, the number of hidden layers of the model is adjusted until the accuracy is not lower than the expected value;

[0012] Use the trained BP neural network model to output the mapping relationship between the reflection influencing factor data sequence and the atomization characteristic parameter data sequence and the reflection area ratio value f: (E, F) → Ra;

[0013] According to the obtained mapping relationship f, the atomization characteristic parameter data when the data of each reflection influencing factor is a fixed value and Ra meets the requirements is output as the optimal atomization characteristic parameter value.

[0014] The BP neural network model is a three-layer structure of an input layer with m neurons, a hidden layer with s neurons, and an output layer with one neuron, wherein the number of neurons m in the input layer is equal to the input parameter type, and the number of neurons s in the hidden layer is determined according to the following formula:

[0015]

[0016] In the formula, Expressed as a pair The value is rounded up; a is a constant from 1 to 9.

[0017] The formula for calculating the expected value is,

[0018]

[0019] Among them, E(Y) represents the expected value; N represents the number of neural network input samples; f(X q ) represents the output function of the neural network; X q Represents the qth output sample of the neural network

[0020] The image data of the workpiece to be detected is collected as the real-time profile, and the real-time profile data is matched and compared with the standard profile data to obtain the profile correlation value, wherein the calculation formula of the profile correlation value is:

[0021]

[0022] Where, R(i) is the contour relevance value; i is the number of points in the real-time contour, and i=1, 2, ..., N-1; N is the total number of points; f(i) is the contour data of the i-th point in the real-time contour; is the average value of the contour data of the i-th point in the real-time contour; x is the number of points in the standard contour; h(x) is the contour data of the x-th point in the standard contour; is the average value of the contour data of the xth point of the standard contour;

[0023] The contour correlation threshold is set, and the contour matching results are classified into three types according to the obtained contour correlation value: no weld, partial weld, and complete weld. The classification principle is:

[0024] When the profile correlation value is 0.8≤|R(i)|≤1, it is judged that a complete weld exists;

[0025] When the profile correlation value is -0.8<R(i)<0, it is judged that there is a partial weld;

[0026] When the profile correlation value is 0<R(i)<0.8, it is judged that there is no weld;

[0027] When the weld exists, any point on the center line of the weld is taken as the initial position point o1, and the circular area with the initial position point o1 as the center and ε as the radius is taken as the key detection area, where the value of ε is determined according to the following formula:

[0028]

[0029] In the formula, x e ,y e are the horizontal and vertical coordinate values ​​of the detected weld end position respectively; b ,y b They are the horizontal and vertical coordinate values ​​of the detected weld starting point respectively;

[0030] The key monitoring area is binarized, the processed weld contour is extracted, the key detection area is dynamically updated, and the initial position point is iterated until the complete weld contour of the workpiece to be detected is extracted.

[0031] The present invention has the following beneficial effects:

[0032] Compared with the prior art, by acquiring data of reflection influencing factors, determining optimal atomization characteristic parameters according to the acquired data, spraying the workpiece to be inspected with the optimal atomization characteristic parameters, acquiring the contour of the workpiece to be inspected in the non-reflective state during the processing as the standard contour, collecting image data of the workpiece to be inspected as the real-time contour, matching and comparing the real-time contour data with the standard contour data, acquiring a contour correlation value, setting a contour correlation threshold, and classifying the contour matching results into three types: no weld, partial weld, and complete weld according to the acquired contour correlation value, locating when the weld exists, any point on the center line of the weld is taken as the initial position point o1, and a circular area with the initial position point o1 as the center and ε as the radius is taken as the key detection area, binarizing the key monitoring area, extracting the processed weld contour, dynamically updating the key detection area, and iterating the initial position point until the weld contour of the complete workpiece to be inspected is extracted. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of the anti-reflection method of a trapezoidal workpiece based on main contour matching of the present invention;

[0034] Figure 2 It is a control block diagram of the weld contour extraction process of the workpiece to be inspected in the solution of the present invention;

[0035] Figure 3 It is a structural diagram of the neural network model constructed in the solution of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described below in conjunction with specific implementation methods, wherein the accompanying drawings are only used for exemplary descriptions and represent only schematic diagrams rather than actual drawings, and should not be understood as limiting the present invention. In order to better illustrate the specific implementation methods of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product.

[0037] The anti-reflection method of trapezoidal workpiece based on main contour matching includes:

[0038] Acquire the data of reflection influencing factors, determine the optimal atomization characteristic parameters according to the acquired data, perform spray processing on the workpiece to be inspected with the optimal atomization characteristic parameters, and obtain the contour of the workpiece to be inspected without reflection during the processing as the standard contour;

[0039] Collect the image data of the workpiece to be inspected as the real-time contour, match and compare the real-time contour data with the standard contour data, and obtain the contour correlation value;

[0040] A contour correlation threshold is set, and the contour matching result is classified into three types: no weld, partial weld, and complete weld according to the obtained contour correlation value;

[0041] Positioning: When a weld exists, any point on the center line of the weld is taken as the initial position point o1, and the circular area with the initial position point o1 as the center and ε as the radius is taken as the key detection area;

[0042] Binarization is performed on the key monitoring area, the processed weld contour is extracted, the key detection area is dynamically updated, and the initial position point is iterated until the complete weld contour of the workpiece to be detected is extracted.

[0043] The specific implementation process of the technical solution of the present invention includes the following steps:

[0044] Step 1: Acquire the data of reflection influencing factors, determine the optimal atomization characteristic parameters according to the acquired data, spray the workpiece to be inspected with the optimal atomization characteristic parameters, and obtain the contour of the workpiece to be inspected without reflection during the processing as the standard contour, wherein the reflection influencing factors include the illumination intensity Lx of the detection camera, the distance d from the geometric center of the workpiece to be inspected, the angle θ from the geometric center of the workpiece to be inspected, and the area s of the workpiece to be inspected; the atomization characteristic parameters include atomization pressure, average particle size of water droplets, atomization flow rate, and effective range;

[0045] The process of obtaining the optimal atomization characteristic parameters includes the following steps:

[0046] Step 11: Construct the reflection influencing factor data sequence E = {e1, e2, ..., e u} and atomization characteristic parameter data sequence F = {f1, f2, ..., f v}, where e u Expressed as the value of the reflection influencing factor of the uth item; f v It is expressed as the vth atomization characteristic parameter value;

[0047] Step 12: Perform spray treatment on the workpiece to be inspected, obtain the contour image of the workpiece to be inspected during the treatment process, and obtain the reflective area S in the contour image. f , calculate the reflective area ratio, where Where Ra is the reflective area ratio; S a is the field of view of the visual inspection camera;

[0048] Step 13: Take the data sequence of reflection influencing factors and the data sequence of atomization characteristic parameters of a single processing process as input, and take the proportion of the reflection area under the working condition as output to build a BP neural network model, train the established neural network model, and adjust the number of hidden layers of the model according to the training results and the errors of the actual alarm results until the accuracy is not lower than the expected value, wherein the BP neural network model is a three-layer structure of an input layer with m neurons, a hidden layer with s neurons, and an output layer with one neuron, wherein the number of neurons m in the input layer is equal to the input parameter type, and the number of neurons s in the hidden layer is determined according to the following formula, which is:

[0049]

[0050] In the formula, Expressed as a pair The value is rounded up; a is a constant from 1 to 9.

[0051] In this embodiment, the reflection influencing factor data sequence includes four types of data, including the illumination intensity Lx of the detection camera, the distance d from the geometric center of the workpiece to be detected, the angle θ from the geometric center of the workpiece to be detected, and the area s of the workpiece to be detected; the atomization characteristic parameter data sequence includes four types of data, including atomization pressure, average particle size of water droplets, atomization flow rate, and effective range; therefore, the BP neural network model constructed in this scheme is a three-layer structure with an input layer of 8 neurons, a hidden layer of s neurons, and an output layer of one neuron. When a=3, according to the formula It can be calculated that s = 6, so we can get Figure 3 The BP neural network model structure shown;

[0052] The formula for calculating the expected value is,

[0053]

[0054] Among them, E(Y) represents the expected value; N represents the number of neural network input samples; f(X q ) represents the output function of the neural network; X q represents the qth output sample of the neural network;

[0055] Step 14: Use the trained BP neural network model to output the mapping relationship between the reflection influencing factor data sequence and the atomization characteristic parameter data sequence and the reflection area ratio value f: (E, F) → Ra;

[0056] Step 15: Output the atomization characteristic parameter data when the data of each reflection influencing factor is a fixed value and Ra meets the requirements according to the obtained mapping relationship f as the optimal atomization characteristic parameter value.

[0057] Step 2: Collect the image data of the workpiece to be inspected as the real-time contour, match and compare the real-time contour data with the standard contour data, and obtain the contour correlation value, where the calculation formula of the contour correlation value is:

[0058]

[0059] Where, R(i) is the contour relevance value; i is the number of points in the real-time contour, and i=1, 2, ..., N-1; N is the total number of points; f(i) is the contour data of the i-th point in the real-time contour; is the average value of the contour data of the i-th point in the real-time contour; x is the number of points in the standard contour; h(x) is the contour data of the x-th point in the standard contour; is the average value of the contour data of the xth point of the standard contour;

[0060] Step 3: Set the contour correlation threshold, and classify the contour matching results into three types: no weld, partial weld, and complete weld according to the obtained contour correlation value. The classification principle is:

[0061] When the profile correlation value is 0.8≤|R(i)|≤1, it is judged that a complete weld exists;

[0062] When the profile correlation value is -0.8<R(i)<0, it is judged that there is a partial weld;

[0063] When the profile correlation value is 0<R(i)<0.8, it is judged that there is no weld;

[0064] Step 4: Positioning When a weld exists, any point on the center line of the weld is taken as the initial position point o1, and the circular area with the initial position point o1 as the center and ε as the radius is taken as the key detection area, where the value of ε is determined according to the following formula:

[0065]

[0066] In the formula, x e ,y e are the horizontal and vertical coordinate values ​​of the detected weld end position respectively; b ,y b They are the horizontal and vertical coordinate values ​​of the detected weld starting point respectively;

[0067] Step 5: Binarize the key monitoring area, extract the processed weld contour, dynamically update the key detection area, and iterate the initial position point until the complete weld contour of the workpiece to be detected is extracted.

[0068] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A trapezoidal workpiece anti-reflection method based on main contour matching, characterized in that: include: Acquire the data of reflection influencing factors, determine the optimal atomization characteristic parameters according to the acquired data, perform spray processing on the workpiece to be inspected with the optimal atomization characteristic parameters, and obtain the contour of the workpiece to be inspected without reflection during the processing as the standard contour; Collecting image data of the workpiece to be inspected as a real-time profile, matching and comparing the real-time profile data with the standard profile data, and obtaining a profile correlation value; A contour correlation threshold is set, and the contour matching result is classified into three types: no weld, partial weld, and complete weld according to the obtained contour correlation value; Positioning: When a weld exists, any point on the center line of the weld is taken as the initial position point o1, and the circular area with the initial position point o1 as the center and ε as the radius is taken as the key detection area; The key monitoring area is binarized, the processed weld contour is extracted, the key detection area is dynamically updated, and the initial position point is iterated until the complete weld contour of the workpiece to be detected is extracted.

2. The anti-reflection method for trapezoidal workpieces based on main contour matching according to claim 1, characterized in that: The reflection influencing factors include the illumination intensity Lx of the detection camera, the distance d from the geometric center of the workpiece to be detected, the angle θ from the geometric center of the workpiece to be detected, and the area s of the workpiece to be detected; The atomization characteristic parameters include atomization pressure, average particle size of water droplets, atomization flow rate, and effective range.

3. The anti-reflection method for trapezoidal workpieces based on main contour matching according to claim 1, characterized in that: The calculation formula of the profile correlation value is: Where, R(i) is the contour relevance value; i is the number of points in the real-time contour, and i=1, 2, ..., N-1; N is the total number of points; f(i) is the contour data of the i-th point in the real-time contour; is the average value of the contour data of the i-th point in the real-time contour; x is the number of points in the standard contour; h(x) is the contour data of the x-th point in the standard contour; It is the average value of the contour data of the xth point of the standard contour.

4. The anti-reflection method for trapezoidal workpieces based on main contour matching according to claim 3, characterized in that: When the profile correlation value is 0.8≤|R(i)|≤1, it is judged that a complete weld exists; When the profile correlation value is -0.8<R(i)<0, it is judged that there is a partial weld; When the profile correlation value is 0<R(i)<0.8, it is determined that there is no weld.

5. The anti-reflection method for trapezoidal workpieces based on main contour matching according to claim 1, characterized in that: The process of obtaining the optimal atomization characteristic parameters includes the following steps: Construct the reflection influencing factor data sequence E = {e1, e2, ..., e u } and atomization characteristic parameter data sequence F = {f1, f2, ..., f v }, where e u Expressed as the value of the reflection influencing factor of the uth item; f v It is expressed as the vth atomization characteristic parameter value; Perform spray treatment on the workpiece to be inspected, obtain the contour image of the workpiece to be inspected during the treatment process, and obtain the reflective area S in the contour image f , calculate the reflective area ratio, where Where Ra is the reflective area ratio; S a is the field of view of the visual inspection camera; The data sequence of reflection influencing factors and atomization characteristic parameter data sequence of a single processing process are used as input, and the proportion of reflection area under the working condition is used as output to build a BP neural network model, and the established neural network model is trained. According to the training results and the error of the actual alarm results, the number of hidden layers of the model is adjusted until the accuracy is not lower than the expected value; Use the trained BP neural network model to output the mapping relationship between the reflection influencing factor data sequence and the atomization characteristic parameter data sequence and the reflection area ratio value f: (E, F) → Ra; According to the obtained mapping relationship f, the atomization characteristic parameter data when the data of each reflection influencing factor is a fixed value and Ra meets the requirements is output as the optimal atomization characteristic parameter value.

6. The anti-reflection method for trapezoidal workpieces based on main contour matching according to claim 5, characterized in that: The BP neural network model is a three-layer structure of an input layer with m neurons, a hidden layer with s neurons, and an output layer with one neuron, wherein the number of neurons m in the input layer is equal to the input parameter type, and the number of neurons s in the hidden layer is determined according to the following formula: In the formula, Expressed as a pair The value is rounded up; a is a constant from 1 to 9.

7. The anti-reflection method for a trapezoidal workpiece based on main contour matching according to claim 5, characterized in that: The formula for calculating the expected value is, Among them, E(Y) represents the expected value; N represents the number of neural network input samples; f(X q ) represents the output function of the neural network; X q Represents the qth output sample of the neural network.

8. The anti-reflection method for a trapezoidal workpiece based on main contour matching according to claim 1, characterized in that: The value of ε is determined according to the following formula: In the formula, x e ,y e are the horizontal and vertical coordinate values ​​of the detected weld end position respectively; b ,y b They are the horizontal and vertical coordinate values ​​of the detected weld starting point respectively.