Weld seam positioning method, device, system and storage medium
By changing the relative position of the light source equipment and the workpiece to be welded, the grayscale difference between the image area is improved, and the problem of low weld positioning accuracy in metal sheet welding is solved, and higher weld recognition accuracy and positioning accuracy are achieved, improving the quality and efficiency of welding.
Patent Information
- Application Number
- CN202411409506.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The existing weld positioning method has low grayscale difference during the welding process of metal sheets, resulting in low weld positioning accuracy, increasing the possibility of misjudgment.
By changing the relative position of the light source device and the workpiece to be welded, changing the exposure angle of the workpiece to be welded, the grayscale difference between different image areas is improved, thereby improving the identification accuracy and positioning accuracy of the weld. The specific method includes controlling the image acquisition device to scan in a preset direction, obtaining image information on the non-exposed side of the workpiece to be welded, determining the edge line data of the workpiece based on the image information, and thus obtaining the area information of the weld.
It improves the identification accuracy and positioning accuracy of the weld, reduces the possibility of misjudgment, and improves the accuracy and yield of welding.
Smart Images

Figure CN118905515B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new energy manufacturing processes, and in particular to a weld positioning method, device, system and storage medium. Background Art
[0002] In the field of battery manufacturing, there is a scenario where two plates are welded. During the welding process, it is necessary to obtain the welding position coordinates to guide the welding robot to perform welding.
[0003] In the related art, the edge lines of the two plates to be welded are obtained respectively by vertically exposing the two plates to be welded, and then the weld position is obtained. However, the plates used for automobile bodies and battery boxes are mostly metal plates. Under vertical exposure conditions, the plate surface and the cut surface appear grayish white, and the grayscale difference is small, which increases the possibility of misjudgment and the positioning accuracy of the weld is not high.
[0004] It should be noted that the above statements are only used to provide background technical information related to the present application and do not necessarily constitute prior art. Summary of the invention
[0005] In view of this, the purpose of the present application is to propose a weld positioning method, device, system and storage medium, which can specifically solve the problem of low positioning accuracy of existing welds.
[0006] Based on the above-mentioned purpose, in a first aspect, the present application proposes a weld positioning method, which is applied to the weld positioning system described in any one of the first aspects, and the method includes: controlling an image acquisition device to scan in a preset direction, and obtaining image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device, wherein the preset direction is a direction close to the weld with a preset area as a starting position, and the preset area represents an area far away from the weld; based on the image information, determining the edge line data of the first workpiece and the edge line data of the second workpiece, the edge line data including coordinate data representing the boundary line between the workpiece to be welded and the weld; obtaining the area information of the weld according to the edge line data of the first workpiece and the edge line data of the second workpiece, the area information including the position coordinates of the area where the weld is located, and the position coordinates including the center coordinates of the weld.
[0007] In the above embodiment, according to the number of the plurality of feature points being less than or equal to the second preset value, a reminder message is output, and the reminder message indicates that there are defects on the surface of the workpiece to be welded. On the one hand, the reminder message can be used to remind the staff to proceed to the next step of processing, and at the same time, distorted feature points can be excluded to improve the authenticity of edge fitting.
[0008] In some embodiments, determining the edge line data of the first workpiece and the edge line data of the second workpiece based on the image information includes: obtaining a plurality of feature points based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value; and fitting the plurality of feature points based on the number of the plurality of feature points being greater than a second preset value to obtain the edge line data of the first workpiece and the edge line data of the second workpiece.
[0009] In the above embodiment, first, based on the fact that the difference in pixel values between two adjacent points in the image information is greater than a first preset value, multiple feature points are obtained, which can improve the efficiency of edge resolution; then, based on the fact that the number of the multiple feature points is greater than a second preset value, the feature points that do not meet the fitting conditions are screened out, and then the multiple feature points are fitted to obtain the edge line data of the first workpiece and the edge line data of the second workpiece. In this way, the obtained edge line data is more accurate.
[0010] In some embodiments, the method further includes: outputting a reminder message according to the number of the plurality of feature points being less than or equal to the second preset value, wherein the reminder message indicates that there are defects on the surface of the workpiece to be welded.
[0011] In the above embodiment, according to the number of the plurality of feature points being less than or equal to the second preset value, a reminder message is output, and the reminder message indicates that there are defects on the surface of the workpiece to be welded. On the one hand, the reminder message can be used to remind the staff to proceed to the next step of processing, and at the same time, distorted feature points can be excluded to improve the authenticity of edge fitting.
[0012] In some embodiments, the regional information of the weld is obtained based on the edge line data of the first workpiece and the edge line data of the second workpiece, including: fitting the feature points in the edge line data of the first workpiece to obtain first feature line coordinate information, the first feature line is the edge line of the first workpiece; fitting the feature points in the edge line data of the second workpiece to obtain second feature line coordinate information, the second feature line is the edge line of the second workpiece; and obtaining the regional information of the weld based on the first feature line coordinate information and the second feature line coordinate information.
[0013] The above embodiment can obtain the regional information of the weld by processing and extracting the edge line data of the first workpiece and the edge line data of the second workpiece, thereby guiding the welding system to perform precise welding and improve welding accuracy.
[0014] In some embodiments, the multiple feature points are multiple feature points that characterize the edge line of a first workpiece. After the multiple feature points are obtained based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method further includes: obtaining a first feature sub-line based on the multiple feature points, the first feature sub-line characterizing a portion of the edge line of the first workpiece; obtaining coordinate information of the first feature sub-line, and determining the position of a first detection frame containing the first feature sub-line based on the coordinate information of the first feature sub-line; determining the position of a second detection frame based on the position of the first detection frame and a preset axis, the second detection frame and the first detection frame being symmetrical about the preset axis; and determining that the multiple feature points are correctly identified based on the presence of a feature line matching the first feature sub-line in the second detection frame.
[0015] The above-mentioned embodiment can provide a fool-proof measure, which can greatly improve the yield rate of the straight-line joint welds of welding workpieces and reduce product scrapping and downtime costs caused by misjudgment of visual inspection.
[0016] In some embodiments, the method further includes: taking the mapping position of the coordinate information of the first feature sub-line in the second detection frame as the detection starting position, performing pixel value difference detection within a first preset range of the second detection frame to obtain a first detection result; when the first detection result indicates that there is a feature line matching the first feature sub-line within the first preset range, determining that the multiple feature points are correctly identified; when the first detection result indicates that there is no feature line matching the first feature sub-line within the first preset range, determining that the multiple feature points are incorrectly identified.
[0017] The above-mentioned embodiment detects the difference in pixel values within the first preset range of the second detection frame to determine whether there is a characteristic line in the second detection frame that matches the first characteristic sub-line in the first detection frame. This can reduce the detection error of the edge line of the first workpiece, improve the detection accuracy, and greatly improve the yield rate of the straight line splicing weld of the welding workpiece.
[0018] In some embodiments, the multiple feature points are multiple feature points that characterize the edge line of the second workpiece. After the multiple feature points are obtained based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method further includes: obtaining a second feature sub-line based on the multiple feature points, the second feature sub-line characterizing a portion of the edge line of the second workpiece; obtaining coordinate information of the second feature sub-line, and determining the position of a third detection frame containing the second feature sub-line based on the coordinate information of the second feature sub-line; obtaining the length of the weld edge of the second workpiece, and determining the position of a fourth detection frame based on the position of the third detection frame and the length of the weld edge of the second workpiece, the fourth detection frame being obtained by translating the third detection frame along the weld edge of the second workpiece by a target distance, the target distance being the length of the weld edge of the second workpiece; and determining that the multiple feature points are correctly identified based on the presence of a feature line matching the second feature sub-line in the fourth detection frame.
[0019] The above embodiment detects the presence of a characteristic line matching the second characteristic sub-line in the fourth detection frame, and determines that the identification of multiple characteristic points is correct, and then it is considered that the assembly position of the workpiece to be welded meets the requirements, the weld meets the process requirements, and welding can continue. A fool-proof measure can be provided, which can greatly improve the yield rate of the straight-line splicing weld of the welding workpiece, and reduce product scrapping and downtime costs caused by misjudgment of visual inspection.
[0020] In some embodiments, the method further includes: using the mapping position of the coordinate information of the second feature sub-line within the fourth detection frame as the detection starting position, performing pixel value difference detection within a second preset range of the fourth detection frame to obtain a second detection result; when the second detection result indicates that there is a feature line matching the second feature sub-line within the second preset range, determining that the multiple feature points are correctly identified; when the second detection result indicates that there is no feature line matching the second feature sub-line within the second preset range, determining that the multiple feature points are incorrectly identified.
[0021] The above-mentioned embodiment detects the difference in pixel values within the second preset range of the fourth detection frame to determine whether there is a characteristic line in the fourth detection frame that matches the second characteristic sub-line in the third detection frame. This can reduce the detection error of the second workpiece edge line, improve the detection accuracy, and greatly improve the yield rate of straight-line spliced welds of welded workpieces.
[0022] In some embodiments, after obtaining the center coordinates of the weld, the method further includes: determining that the center coordinates of the weld are correct based on that the deviation between the center coordinates of the weld and the preset value is within a third preset range; and determining that the center coordinates of the weld are incorrect based on that the deviation between the center coordinates of the weld and the preset value is outside the third preset range.
[0023] The above embodiment can improve the positioning accuracy of the weld center coordinates by comparing the detected weld center coordinates with the preset values, and improve the yield rate of the welds of the straight-line joints of the welding workpieces.
[0024] In some embodiments, after obtaining the first characteristic line, the method further includes: determining a welding reference line based on the position coordinates of the weld edge of the second workpiece; obtaining a weld width based on a width between the welding reference line and the first characteristic line; determining that welding conditions are met based on the weld width being less than or equal to a preset width, and generating welding guidance information.
[0025] The above embodiment compares the calculated weld width with the preset width, and generates welding guidance information when it is determined that the welding conditions are met. This can prevent mistakes before welding, reduce defects such as holes and sagging caused by the overlap gap of the workpiece, and improve the yield rate of the straight-line splicing weld of the welding workpiece.
[0026] In some embodiments, after obtaining the welding guidance information, the method further includes: controlling a welding robot to reach a designated position for welding according to the welding guidance information, wherein the welding guidance information includes welding guidance information of one or more welds.
[0027] The above-mentioned embodiment can realize the diversity of welding rhythm by including welding guidance information of one or more welds, and can control the welding robot to weld one or more welds at one welding time according to actual conditions, thereby improving welding flexibility.
[0028] In the second aspect, the present application proposes a weld positioning device, the device comprising: a control module, used to control an image acquisition device to scan in a preset direction, and obtain image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device, the preset direction is a direction close to the weld with a preset area as a starting position, and the preset area represents an area away from the weld; an image processing module, used to determine the edge line data of the first workpiece and the edge line data of the second workpiece based on the image information, the edge line data including coordinate data representing the boundary line between the workpiece to be welded and the weld; a positioning module, used to obtain the area information of the weld based on the edge line data of the first workpiece and the edge line data of the second workpiece, the area information including the position coordinates of the area where the weld is located, and the position coordinates including the center coordinates of the weld.
[0029] In a third aspect, the present application proposes a weld positioning system, the system comprising: a light source device, the light source device is used to expose a target area of a workpiece to be welded, the workpiece to be welded comprises a first workpiece and a second workpiece, a weld is provided between the first workpiece and the second workpiece, a plane formed by the first workpiece, the weld and the second workpiece along a first direction is a welding surface, the light source device is arranged on one side of the welding surface to form an exposure side; wherein the target area comprises an area of the target workpiece corresponding to the exposure side, the target workpiece is one of the first workpiece and the second workpiece; an image acquisition device, the image acquisition device is arranged on the non-exposure side of the welding surface, the image acquisition device is used to acquire image information of the non-exposure side of the workpiece to be welded; a host computer, the host computer is electrically connected to the light source device and the image acquisition device, the host computer is used to implement the weld positioning method as described in any one of the first aspects.
[0030] This embodiment changes the exposure angle of the workpiece to be welded by changing the relative position of the light source device and the workpiece to be welded, so that there is a clear boundary between the two workpieces to be welded and the weld formed therebetween after exposure, so as to improve the grayscale difference between different image areas, thereby improving the recognition accuracy of the edge lines of the workpiece to be welded and the weld, and can improve the positioning accuracy of the weld area.
[0031] In some embodiments, the light source device includes a first light source and a second light source, and the first light source and the second light source are respectively arranged on both sides of the target workpiece along the second direction, and the light source emission direction of the light source device is toward the target workpiece and parallel to the welding surface; wherein the second direction is a direction perpendicular to the first direction.
[0032] The light emitted by the first light source and the second light source are both directed toward the target workpiece, and the effect of exposing the target workpiece from two opposite directions can be achieved. The light emitted by the first light source and the second light source is parallel to the welding surface, which can reduce the possibility of light entering the non-exposed side and causing the surface of the first workpiece and the second workpiece to reflect light, and further improve the distinction between the first workpiece and the second workpiece on the non-exposed side.
[0033] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the program is executed by a processor to implement any method described in the first aspect.
[0034] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application. In addition, the same reference numerals are used to represent the same parts in all the drawings.
[0036] Figure 1 A schematic diagram showing a welding plate after exposure in the related art;
[0037] Figure 2 A schematic diagram showing the three-dimensional structure of the weld positioning system of the present application is shown;
[0038] Figure 3 A side view showing the weld positioning system of the present application;
[0039] Figure 4 A front view of the weld positioning system of the present application is shown;
[0040] Figure 5 A top view showing the weld positioning system of the present application;
[0041] Figure 6 A schematic diagram showing an effect of image information collected by the image collection device according to an embodiment of the present application;
[0042] Figure 7 A flow chart showing the steps of the weld positioning method according to an embodiment of the present application is shown;
[0043] Figure 8 A schematic diagram of a feature point detection process provided by an embodiment of the present application is shown;
[0044] Fig. 9 A diagram showing the effect of the edge fitting process of the second workpiece in the embodiment of the present application;
[0045] Fig.10 A diagram showing the effect of the edge fitting process of the first workpiece in an embodiment of the present application;
[0046] Fig.11 A schematic structural diagram of a weld positioning device according to an embodiment of the present application is shown;
[0047] Fig.12 A schematic diagram of the structure of a host computer provided in one embodiment of the present application is shown;
[0048] Fig.13 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0049] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0051] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0053] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0054] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0055] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application 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 embodiments of the present application.
[0056] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "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, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0057] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0058] In the field of battery manufacturing, it involves welding two plates (workpieces to be welded). During the welding process, it is necessary to obtain the welding position coordinates to guide the welding robot to perform welding. In the related technology, the two plates to be welded are vertically exposed to obtain the edge lines of the two plates respectively. For example, the plates to be welded include plate 1 and plate 2. After plate 1 and plate 2 are in place, plate 1 and plate 2 are vertically exposed at the same time. However, most of the plates used for automobile bodies and battery boxes are metal plates. Under vertical exposure conditions, the surface and cut surface of the plate appear grayish white, and the grayscale difference is small, which will result in the following image: Figure 1 The state after exposure is shown by Figure 1 It can be clearly seen that after plates 1 and 2 are exposed at the same time, the grayscale of plates 1 and 2 is close, and the grayscale of the weld between the two is also very close to that of plates 1 and 2, which will result in a smaller grayscale difference between the weld and plates 1 and 2, thereby affecting the detection accuracy of the weld and the weld position, increasing the possibility of misjudgment, and the positioning accuracy of the weld is not high.
[0059] The battery may be a battery product such as a battery module, a battery pack or a battery cell. The embodiment of the present application takes a battery production line as an example. In one example, the present embodiment is a scenario of positioning a weld before welding two plates during battery welding. Specifically, the use scenario of the present embodiment includes welding two plates of regular shapes, and the weld formed is a straight seam.
[0060] In order to solve the above problems, this embodiment changes the exposure angle of the workpiece to be welded by changing the relative position of the light source device and the workpiece to be welded, so that there is a clear boundary between the two workpieces to be welded and the weld formed therebetween after exposure, so as to improve the grayscale difference between different image areas, and then by controlling the image acquisition device to scan in a preset direction to obtain image information of the non-exposed side of the workpiece to be welded, and then obtaining the area information of the weld based on the image information, which can improve the recognition accuracy of the edge lines and welds of the workpieces to be welded, and can improve the positioning accuracy of the weld area.
[0061] Figure 2 The three-dimensional structure schematic diagram of the weld positioning system of the present application is shown. Figure 2 In an embodiment of the present application, the weld positioning system includes a light source device 101 and an image acquisition device 102. The light source device 101 is used to expose the target area of the workpiece to be welded, and the image acquisition device 102 is used to acquire image information of the workpiece to be welded after exposure.
[0062] In this embodiment, the workpieces to be welded include a first workpiece 103 and a second workpiece 104. There is a weld between the first workpiece 103 and the second workpiece 104. The plane formed by the first workpiece 103, the weld and the second workpiece 104 along the first direction is the welding surface. Figure 2 The first direction refers to the direction of transition from the first workpiece 103 to the second workpiece 104. After the first workpiece 103 and the second workpiece 104 are aligned, a weld is formed between the first workpiece 103 and the second workpiece 104. The position information of the weld is located to determine the area where the weld is located, so as to guide the welding system to weld and fix the first workpiece 103 and the second workpiece 104.
[0063] The light source device 101 is arranged on one side of the welding surface to form an exposure side, so that the other side of the welding surface forms a non-exposure side. The image acquisition device 102 is arranged on the non-exposure side of the welding surface, and the image acquisition device 102 is used to collect image information of the non-exposure side of the workpiece to be welded.
[0064] In one example, the image acquisition device 102 and the light source device 101 are respectively arranged on both sides of the welding surface. For example, taking the welding surface as a reference surface, the welding surface has a first side and a second side. If the image acquisition device 102 is arranged on the first side of the welding surface, the light source device 101 is arranged on the second side of the welding surface; if the image acquisition device 102 is arranged on the second side of the welding surface, the light source device 101 is arranged on the first side of the welding surface. In this way, the side of the welding surface where the light source device 101 is located forms an exposure side, and the side of the welding surface where the image acquisition device 102 is located forms a non-exposure side. That is, in this embodiment, by respectively arranging the light source device 101 and the image acquisition device 102 on opposite sides of the welding surface, the light on the exposure side can pass through the weld. Since the workpiece to be welded on the non-exposure side is not exposed, the contrast between the edge of the workpiece and the weld is greatly increased, which can improve the detection accuracy of the edge contour of the workpiece to be welded.
[0065] The target area includes the area corresponding to the target workpiece on the exposure side, and the target workpiece is one of the first workpiece 103 and the second workpiece 104. That is, in this embodiment, one of the first workpiece 103 and the second workpiece 104 can be used as the target workpiece, and when exposing, the target workpiece is selected for exposure, and the specific exposure area is the target area. Figure 2 As shown, assuming that the second workpiece 104 is the target area, the first side of the second workpiece 104 is the side where the image acquisition device 102 is located, and the second side of the second workpiece 104 is the side where the light source device 101 is located, then the target area is the area space where the second side of the second workpiece 104 is located. In an example, Figure 2 As shown, the first workpiece 103 and the second workpiece 104 are two workpieces with different surface areas, and the length of the welding edge of the first workpiece 103 is greater than the length of the welding edge of the second workpiece 104. A cavity is formed between the bottom of the second workpiece 104 and the first workpiece 103. Then, the exposure angle of the light source device 101 can be made to correspond to the cavity, thereby realizing exposure of the second side of the second workpiece 104. It should be noted that Figure 2 This is only an exemplary illustration. In one example, the first workpiece 103 and the second workpiece 104 may also be plates of other shapes. The difference between the first workpiece 103 and the second workpiece 104 is increased by exposing only one of the first workpiece 103 and the second workpiece 104. The above-mentioned method of exposing only one of the first workpiece 103 and the second workpiece 104 can further increase the grayscale difference between the first workpiece 103 and the second workpiece 104 in the captured image, thereby improving the detection accuracy of the weld and the detection accuracy of the edge of the workpiece to be welded.
[0066] In this embodiment, the image acquisition device 102 includes an industrial camera, such as a 2D camera, which has a high frame rate and can continuously capture image details. The light source device 101 can be a light source of different colors, and the specific light source color can be adjusted according to actual needs. In an example, the light source device 101 can be an LED strip blue light source, which has the advantages of high light intensity and uniform lighting, and the strip light source can reduce shadows and unnecessary reflections, which is helpful for image recognition processing.
[0067] In an application scenario, the light source device 101 can be set to a normally open mode. After the first workpiece 103 and the second workpiece 104 are aligned, the image acquisition device 102 can be controlled to move to a specified position to form Figure 2 The positional relationship shown is then used to expose the lower side of the second workpiece 104 through the light source device 101, and the image acquisition device 102 acquires images of the upper sides of the first workpiece 103 and the second workpiece 104.
[0068] In one example, a welding conductive nozzle is usually used to protect the weld during welding. The welding conductive nozzle is a hollow structure. Figure 3 A side view of the weld locating system of the present application is shown. Figure 4 A front view of the weld locating system of the present application is shown. Figure 5 FIG. 2 shows a top view of the weld positioning system of the present application. Figure 3~Figure 5 The hollow copper nozzle 105 of the pressing plate is shown, and the hollow copper nozzle 105 of the pressing plate is arranged on the non-exposed side of the welding surface, that is, the hollow copper nozzle 105 of the pressing plate and the image acquisition device 102 are located on the same side of the welding surface.
[0069] In an embodiment of the present application, the light source device 101 includes a first light source 1011 and a second light source 1012. The first light source 1011 and the second light source 1012 are respectively arranged on both sides of the target workpiece along the second direction. The light source emission direction of the light source device 101 is toward the target workpiece and parallel to the welding surface; wherein the second direction is a direction perpendicular to the first direction.
[0070] The light source device 101 includes a first light source 1011 and a second light source 1012, which can expose the target area from two opposite directions, thereby improving the exposure effect. Figure 2 As shown, the first direction is along the first workpiece 103, the weld, and the second workpiece 104, and the second direction is perpendicular to the first direction. Figure 3The second direction may also refer to the direction of the second light source 1012, the second workpiece 104, and the first light source. In addition, in this embodiment, taking the target workpiece as the second workpiece 104 as an example, the light source emission direction of the light source device 101 is toward the target workpiece, that is, the light emitted by the first light source 1011 and the second light source 1012 are both toward the second workpiece 104, so that the effect of exposing the second workpiece 104 from two opposite directions can be achieved.
[0071] The light emitted by the first light source 1011 and the second light source is parallel to the welding surface, which can reduce the possibility of light entering the non-exposed side and causing reflection on the surface of the first workpiece 103 and the second workpiece 104, and further improve the distinction between the first workpiece 103 and the second workpiece 104 on the non-exposed side.
[0072] Figure 6 A schematic diagram showing the effect of image information collected by the image collection device 102 in the embodiment of the present application is shown. Figure 6 As shown, since the image acquisition device 102 acquires the image of the non-exposed side, the surfaces of the first workpiece 103 and the second workpiece 104 are not transparent and appear black when not exposed. Since the light on the exposed side is strong, Figure 6 The upper and lower regions of the second workpiece 104 ( Figure 6 The middle white area) presents high brightness, and the edge lines of the first workpiece 103 and the second workpiece 104 can be clearly displayed. No matter the transition from the first workpiece 103 to the high brightness area or from the second workpiece 104 to the high brightness area, there is a high grayscale difference, which can greatly improve the edge line detection accuracy of the workpieces to be welded, thereby improving the weld positioning accuracy.
[0073] In the embodiment of the present application, the system further includes: a host computer, the host computer is electrically connected to the light source device 101 and the image acquisition device 102, and the host computer is used to implement the weld positioning method provided in the present embodiment. That is, the host computer is used to control the image acquisition device 102 to scan in a preset direction, and obtain the image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device 102, the preset direction is the direction close to the weld with the preset area as the starting position, and the preset area represents the area away from the weld; based on the image information, the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104 are determined, and the edge line data include the coordinate data representing the boundary line between the workpiece to be welded and the weld; the area information of the weld is obtained according to the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104, and the area information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld.
[0074] In this embodiment, the preset direction is the direction close to the weld with the preset area as the starting position, and the preset area represents the area far away from the weld. That is, the host computer controls the image acquisition device 102 to gradually scan from the position far away from the weld toward the weld. Figure 6 For example, Figure 6 In the figure, the middle position where the first workpiece 103 and the second workpiece 104 are adjacent is the position of the weld, and the position away from the weld can be the position of the left area of the first workpiece 103, or the position of the right area of the second workpiece 104. Therefore, the image acquisition device 102 can be controlled to scan in the area corresponding to the first workpiece 103 in the direction of "from left to right", or the image acquisition device 102 can be controlled to scan in the area corresponding to the second workpiece 104 in the direction of "from right to left", and then the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104 are respectively extracted, and the edge line data includes coordinate data representing the boundary line between the workpiece to be welded and the weld, that is, the boundary line of the first workpiece 103 close to the weld and the boundary line of the second workpiece 104 close to the weld can be obtained. In this way, the regional information of the weld can be obtained according to the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104, and the regional information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld. Among them, the weld obtained in this embodiment is a straight weld, so its position coordinates can be a regular quadrilateral area, and the position coordinates of the area where the weld is located can be the coordinates of any point in the quadrilateral area. The coordinate position includes the center coordinate of the weld, and then the welding system that is about to perform the welding action is guided by the center coordinate to find the welding point and improve the welding quality.
[0075] The above embodiment changes the exposure angle of the workpiece to be welded by changing the relative position of the light source device 101 and the workpiece to be welded, so that there is a clear boundary between the two workpieces to be welded and the weld formed therebetween after exposure, so as to improve the grayscale difference between different areas in the image, thereby improving the recognition accuracy of the edges of the workpiece to be welded and the weld, and can improve the positioning accuracy of the weld area.
[0076] The embodiment of the present application provides a weld positioning method, which is applied to the above-mentioned weld positioning system. Figure 7 The flowchart of the steps of the weld locating method of the embodiment of the present application is shown. The execution subject of the embodiment of the present application may be an electronic device capable of executing the weld locating method, and the electronic device may include but is not limited to a terminal or a server. In one example, the execution subject of the present embodiment is a host computer. Figure 7 The method comprises the following steps S701 to S703:
[0077] S701, controlling the image acquisition device to scan in a preset direction, and obtaining image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device.
[0078] The preset direction is a direction approaching the weld with the preset area as the starting position, and the preset area represents an area away from the weld. In other words, the host computer controls the image acquisition device 102 to gradually scan from a position away from the weld toward the weld.
[0079] S702 : Determine edge line data of the first workpiece and edge line data of the second workpiece based on the image information.
[0080] The edge data includes coordinate data representing the boundary line between the workpiece to be welded and the weld. Figure 6 For example, the edge data of the first workpiece 103 may include the coordinates of the boundary line between the first workpiece 103 and the weld. The edge data of the second workpiece 104 may include the coordinates of the boundary line between the second workpiece 104 and the weld, and the coordinates of the boundary line between the second workpiece 104 and the high brightness area ( Figure 6 The coordinates of this embodiment may include coordinates in a coordinate system established with the center of the image as a preset zero point, the direction from the first workpiece 103 to the second workpiece 104 as the X-axis, and the weld direction as the Y-axis.
[0081] S703 , obtaining regional information of the weld according to the edge line data of the first workpiece and the edge line data of the second workpiece.
[0082] The area information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld.
[0083] by Figure 6 For example, Figure 6In the figure, the middle position where the first workpiece 103 and the second workpiece 104 are adjacent is the position of the weld, and the position away from the weld can be the position of the left area of the first workpiece 103, or the position of the right area of the second workpiece 104. Therefore, the image acquisition device 102 can be controlled to scan in the area corresponding to the first workpiece 103 in the direction of "from left to right", or the image acquisition device 102 can be controlled to scan in the area corresponding to the second workpiece 104 in the direction of "from right to left", and then the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104 are respectively extracted, and the edge line data includes coordinate data representing the boundary line between the workpiece to be welded and the weld, that is, the boundary line of the first workpiece 103 close to the weld and the boundary line of the second workpiece 104 close to the weld can be obtained. In this way, the regional information of the weld can be obtained according to the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104, and the regional information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld. Among them, the weld obtained in this embodiment is a straight weld, so its position coordinates can be a regular quadrilateral area, and the position coordinates of the area where the weld is located can be the coordinates of any point in the quadrilateral area. The coordinate position includes the center coordinate of the weld, and then the welding system that is about to perform the welding action is guided by the center coordinate to find the welding point and improve the welding quality.
[0084] The edge line data includes coordinate data representing the boundary line between the workpiece to be welded and the weld. The regional information of the weld can be obtained by fitting according to the weld edge coordinates of the first workpiece 103 and the weld edge coordinates of the second workpiece 104. For example, the length of the weld edge of the first workpiece 103 is determined according to the coordinates of each point of the weld edge coordinates of the first workpiece 103, and the length of the weld edge of the second workpiece 104 is determined according to the coordinates of each point of the weld edge coordinates of the second workpiece 104. The length of the weld is determined according to the shorter weld edge of the length of the weld edge of the first workpiece 103 and the length of the weld edge of the second workpiece 104. The width of the weld is obtained according to the difference in the X-axis direction between the weld edge coordinates of the first workpiece 103 and the weld edge coordinates of the second workpiece 104, and then the weld area can be obtained. After the weld area is determined, the center coordinates of the weld can be obtained.
[0085] The image information of the above-mentioned embodiment is obtained based on the weld positioning system. In the image information, there is a clear boundary between the first workpiece 103 and the second workpiece 104 and the weld formed therebetween, which is more conducive to the detection of the weld. By controlling the image acquisition device 102 to scan in a preset direction, the accuracy of the edge data can be improved, thereby greatly improving the accuracy of obtaining the edge contour of the workpiece to be welded, improving the recognition accuracy of the weld, and improving the positioning accuracy of the weld area.
[0086] In the embodiment of the present application, step S702 determines the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104 based on the image information, including: obtaining multiple feature points based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value; fitting the multiple feature points based on the number of the multiple feature points being greater than a second preset value to obtain the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104.
[0087] In this embodiment, the first preset value refers to a pixel difference value, and the first preset value can be used to determine the boundary of the first workpiece 103 or the second workpiece 104. Figure 6 As shown, the grayscale of the first workpiece 103 is relatively large, and the high brightness area ( Figure 6 When one pixel is located in the first workpiece 103 area and the other pixel is located in the high brightness area ( Figure 6 When the pixel difference between the two is large, the boundary of the first workpiece 103 can be determined according to the difference between the two pixels. Therefore, the first preset value in this embodiment can be customized according to parameters such as the material or color of the workpiece.
[0088] When it is detected that the difference in pixel values between two adjacent points is greater than a first preset value, multiple feature points can be obtained. These feature points can be used to fit the workpiece boundary line. In a feasible example, the first preset value is 5, for example.
[0089] In one example, the second preset value refers to a preset number of feature points, which can be used to detect whether there are scratches or foreign matter on the surface of the workpiece. The second preset value can be customized according to the edge length or detection accuracy of the workpiece. For example, the second preset value can be 5. When the number of multiple feature points is greater than the second preset value, it means that the number of feature points has reached the preset number, which can be used for fitting to obtain the edge of the first workpiece 103 or the edge of the second workpiece 104, so that the fitted edge is more accurate.
[0090] In the above embodiment, first, based on the fact that the difference in pixel values between two adjacent points in the image information is greater than a first preset value, multiple feature points are obtained, which can improve the efficiency of edge resolution; then, based on the fact that the number of the multiple feature points is greater than a second preset value, the feature points that do not meet the fitting conditions are screened out, and then the multiple feature points are fitted to obtain the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104. In this way, the obtained edge line data is more accurate.
[0091] In the embodiment of the present application, the above method also includes outputting a reminder message based on the number of multiple feature points being less than or equal to a second preset value, wherein the reminder message indicates that there are defects on the surface of the workpiece to be welded.
[0092] When the number of multiple feature points is less than or equal to the second preset value, the number of characterization feature points is insufficient, and the feature line fitted according to the current number of feature points may be the difference in pixel values between two adjacent points caused by scratches or foreign matter on the workpiece surface.
[0093] The reminder information may be a text message or a voice message to remind the operator that there are defects on the surface of the workpiece to be welded. The defects on the surface of the welded workpiece may be scratches or foreign matter on the surface of the workpiece to be welded.
[0094] In the above embodiment, according to the number of the plurality of feature points being less than or equal to the second preset value, a reminder message is output, and the reminder message indicates that there are defects on the surface of the workpiece to be welded. On the one hand, the reminder message can be used to remind the staff to proceed to the next step of processing, and at the same time, distorted feature points can be excluded to improve the authenticity of edge fitting.
[0095] In an embodiment of the present application, regional information of the weld is obtained based on edge data of the first workpiece 103 and edge data of the second workpiece 104, including: fitting feature points in the edge data of the first workpiece 103 to obtain first feature line coordinate information, the first feature line is the edge of the first workpiece 103; fitting feature points in the edge data of the second workpiece 104 to obtain second feature line coordinate information, the second feature line is the edge of the second workpiece 104; regional information of the weld is obtained based on the first feature line coordinate information and the second feature line coordinate information.
[0096] After extracting the edge data of the first workpiece 103, the feature points in the edge data may be fitted to obtain a first feature line, i.e., the edge of the first workpiece 103. In one example, the first feature line may be obtained by least squares method or straight line fitting. Similarly, after extracting the edge data of the second workpiece 104, the feature points in the edge data of the second workpiece 104 may be fitted to obtain a second feature line, i.e., the edge of the second workpiece 104. In one example, the second feature line may be obtained by least squares method or straight line fitting.
[0097] The first feature line coordinate information and the second feature line coordinate information refer to the coordinates of the first feature line and the second feature line in the image coordinate system, for example, Figure 6 The coordinates in the coordinate system are established with the center of the image as the origin, the direction from the first workpiece 103 to the second workpiece 104 as the X-axis, and the weld direction as the Y-axis.
[0098] After obtaining the coordinate information of the first characteristic line and the coordinate information of the second characteristic line, the regional information of the weld can be obtained according to the two characteristic lines. For example, the length of the weld edge of the first workpiece 103 is determined according to the coordinates of each point of the weld edge coordinates of the first workpiece 103, the length of the weld edge of the second workpiece 104 is determined according to the coordinates of each point of the weld edge coordinates of the second workpiece 104, the length of the weld is determined according to the shorter weld edge of the length of the weld edge of the first workpiece 103 and the length of the weld edge of the second workpiece 104, the width of the weld is obtained according to the difference in the X-axis direction between the weld edge coordinates of the first workpiece 103 and the weld edge coordinates of the second workpiece 104, and then the weld area can be obtained. After determining the weld area, the center coordinates of the weld can be obtained.
[0099] The above embodiment can obtain the regional information of the weld by processing and extracting the edge data of the first workpiece 103 and the edge data of the second workpiece 104, thereby guiding the welding system to perform precise welding and improve welding accuracy.
[0100] In the embodiment of the present application, the multiple feature points are multiple feature points that characterize the edge line of the first workpiece 103. After the multiple feature points are obtained based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method further includes the following steps: based on the multiple feature points, a first feature sub-line is obtained, the first feature sub-line characterizing a portion of the edge line of the first workpiece 103; coordinate information of the first feature sub-line is obtained, and based on the coordinate information of the first feature sub-line, a position of a first detection frame including the first feature sub-line is determined; based on the position of the first detection frame and a preset axis, a position of the second detection frame is determined, the second detection frame and the first detection frame are symmetrical about the preset axis; based on the presence of a feature line in the second detection frame that matches the first feature sub-line, it is determined that the multiple feature points are correctly identified.
[0101] In this embodiment, the first detection frame is a preset detection area for detecting feature points of the first workpiece 103 , and each area of the first workpiece 103 in the image is detected by moving the first detection frame. Figure 8 A schematic diagram of a feature point detection process provided by an embodiment of the present application is shown as follows: Figure 8 As shown, area A in the figure represents the position of the first detection frame. From the position of area A in the figure, it can be seen that area A includes both part of the first workpiece 103 and part of the high-brightness area. The first characteristic sub-line can be obtained according to the feature points contained in area A. The first characteristic sub-line represents a part of the edge line of the first workpiece 103. Then, the coordinate information of the first characteristic sub-line can be obtained according to the position of the first characteristic sub-line in the coordinate system. After obtaining the coordinate information of the first characteristic sub-line, the position of the first detection frame including the first characteristic sub-line can be determined.
[0102] Since the edge line of this embodiment includes a straight line, the edge line is symmetrical with respect to the coordinate origin. If after detecting the first characteristic sub-line, no sub-line corresponding to the first characteristic sub-line is detected at the corresponding position in the image, it means that the first characteristic sub-line may not be the edge line of the welding workpiece, for example, it may be a scratch or foreign matter on the surface of the workpiece. Therefore, after determining the position of the first detection frame containing the first characteristic sub-line, this embodiment determines the position of the second detection frame according to the position of the first detection frame and the preset axis. The second detection frame and the first detection frame are symmetrical about the preset axis, wherein the preset axis is the X-axis of the coordinate system, and the second detection frame is as follows: Figure 8 The detection frame represented by the B area in the second detection frame. According to the presence of a feature line matching the first feature sub-line in the second detection frame, it is determined that the multiple feature points are correctly identified. It is considered that the assembly position of the workpiece to be welded meets the requirements, the weld meets the process requirements, and welding can continue.
[0103] The above-mentioned embodiment can provide a fool-proof measure, which can greatly improve the yield rate of the straight-line joint welds of welding workpieces and reduce product scrapping and downtime costs caused by misjudgment of visual inspection.
[0104] In an embodiment of the present application, the above method also includes: using the mapping position of the coordinate information of the first feature sub-line in the second detection frame as the detection starting position, detecting the pixel value difference within the first preset range of the second detection frame, and obtaining a first detection result; when the first detection result indicates that there is a feature line matching the first feature sub-line within the first preset range, determining that the multiple feature points are correctly identified; when the first detection result indicates that there is no feature line matching the first feature sub-line within the first preset range, determining that the multiple feature points are incorrectly identified.
[0105] The mapping position of the coordinate information of the first characteristic sub-line in the second detection frame can be obtained by the symmetric coordinates of the coordinates of the first characteristic sub-line about the X-axis. The mapping position of the coordinate information of the first characteristic sub-line in the second detection frame is used as the detection starting position, and the pixel value difference is detected within the first preset range of the second detection frame to obtain a first detection result, and then it can be detected whether there is a characteristic line matching the first characteristic sub-line in the second detection frame, wherein the first preset range represents the first preset range of the mapping point of any characteristic point of the first characteristic sub-line in the second detection frame, wherein the first preset range is, for example, ±1.5mm, and then the characteristic line matching the first characteristic sub-line within the error range can be retrieved in the second detection frame.
[0106] When the first detection result indicates that there is a feature line matching the first feature sub-line within the first preset range, it indicates that there is a feature line matching the first feature sub-line within the second detection frame, and it is determined that the multiple feature points are correctly identified. When the first detection result indicates that there is no feature line matching the first feature sub-line within the first preset range, it indicates that there is no feature line matching the first feature sub-line within the second detection frame, and it is determined that the multiple feature points are incorrectly identified. The first feature sub-line may be caused by scratches or foreign matter on the surface of the welding workpiece.
[0107] The above embodiment detects the difference in pixel values within the first preset range of the second detection frame to determine whether there is a characteristic line in the second detection frame that matches the first characteristic sub-line in the first detection frame. This can reduce the detection error of the edge line of the first workpiece 103, improve the detection accuracy, and greatly improve the yield rate of straight-line spliced welds of welded workpieces.
[0108] In the embodiment of the present application, the multiple feature points are multiple feature points that characterize the edge line of the second workpiece 104. After the multiple feature points are obtained based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method of the present embodiment also includes: obtaining a second feature sub-line based on the multiple feature points, the second feature sub-line characterizing a portion of the edge line of the second workpiece 104; obtaining coordinate information of the second feature sub-line, and determining the position of a third detection frame containing the second feature sub-line based on the coordinate information of the second feature sub-line; obtaining the length of the weld edge of the second workpiece 104, and determining the position of a fourth detection frame based on the position of the third detection frame and the length of the weld edge of the second workpiece 104, the fourth detection frame being obtained by translating the third detection frame along the weld edge of the second workpiece 104 by a target distance, the target distance being the length of the weld edge of the second workpiece 104; and determining that the multiple feature points are correctly identified based on the presence of a feature line in the fourth detection frame that matches the second feature sub-line.
[0109] like Figure 8 As shown, the third detection frame is, for example, Figure 8 The detection frame represented by the C area in the figure, as can be seen from the position of the C area in the figure, the C area includes both part of the second workpiece 104 and part of the high-brightness area. The second characteristic sub-line can be obtained according to the feature points contained in the C area. The second characteristic sub-line represents a part of the edge line of the second workpiece 104, and then the coordinate information of the second characteristic sub-line can be obtained according to the position of the second characteristic sub-line in the coordinate system. After obtaining the coordinate information of the second characteristic sub-line, the position of the third detection frame containing the second characteristic sub-line can be determined.
[0110] The length of the weld edge of the second workpiece 104 can be obtained by an image detection algorithm, such as by identifying the length of the weld edge of the second workpiece 104 in the image. After obtaining the length of the weld edge of the second workpiece 104, the position of the fourth detection frame is determined according to the position of the third detection frame and the length of the weld edge of the second workpiece 104. The fourth detection frame is obtained by translating the third detection frame along the weld edge of the second workpiece 104 by a target distance. The target distance is the length of the weld edge of the second workpiece 104. Figure 8 Taking the image shown as an example, the detection frame represented by the C region is translated downward along the Y axis by the length of the weld edge of the second workpiece 104 to obtain the D region, which is the position of the fourth detection frame. Then, by detecting whether there is a feature line matching the second feature sub-line in the fourth detection frame, it can be detected whether the feature points of the second workpiece 104 are correctly identified. In the case that there is a feature line matching the second feature sub-line in the fourth detection frame, it is determined that the multiple feature points representing the edge line of the second workpiece 104 are correctly identified.
[0111] It should be noted that, in the above embodiment, the length of the weld edge of the second workpiece 104 is less than the length of the first weld edge, so the position of the fourth inspection frame is determined by the position of the third inspection frame and the length of the weld edge of the second workpiece 104. When the length of the weld edge of the second workpiece 104 is the same as or greater than the length of the weld edge of the first workpiece 103, the position of the fourth inspection frame can also be obtained by the position of the third inspection frame and the symmetric relationship of the X axis.
[0112] The above embodiment detects the presence of a characteristic line matching the second characteristic sub-line in the fourth detection frame, and determines that the identification of multiple characteristic points is correct, and then it is considered that the assembly position of the workpiece to be welded meets the requirements, the weld meets the process requirements, and welding can continue. A fool-proof measure can be provided, which can greatly improve the yield rate of the straight-line splicing weld of the welding workpiece, and reduce product scrapping and downtime costs caused by misjudgment of visual inspection.
[0113] In an embodiment of the present application, the above method also includes: taking the mapping position of the coordinate information of the second feature sub-line in the fourth detection frame as the detection starting position, detecting the pixel value difference within the second preset range of the fourth detection frame, and obtaining a second detection result; when the second detection result indicates that there is a feature line matching the second feature sub-line within the second preset range, determining that the multiple feature points are correctly identified; when the second detection result indicates that there is no feature line matching the second feature sub-line within the second preset range, determining that the multiple feature points are incorrectly identified.
[0114] The mapping position of the coordinate information of the second characteristic sub-line in the fourth detection frame can be obtained by translating the coordinates of the second characteristic sub-line by a target distance, and the target distance is the length of the weld edge of the second workpiece 104. The mapping position of the coordinate information of the second characteristic sub-line in the fourth detection frame is used as the detection starting position, and the pixel value difference is detected within the second preset range of the fourth detection frame to obtain a second detection result, and then it can be detected whether there is a characteristic line matching the second characteristic sub-line in the fourth detection frame, wherein the second preset range represents the second preset range of the mapping point of any characteristic point of the second characteristic sub-line in the fourth detection frame, wherein the second preset range is, for example, ±2mm, and then the characteristic line matching the second characteristic sub-line within the error range can be retrieved in the fourth detection frame.
[0115] In the case where the second detection result indicates that there is a feature line matching the second feature sub-line within the second preset range, it indicates that there is a feature line matching the second feature sub-line within the fourth detection frame, and it is determined that the multiple feature points are correctly identified. In the case where the second detection result indicates that there is no feature line matching the second feature sub-line within the second preset range, it indicates that there is no feature line matching the second feature sub-line within the fourth detection frame, and it is determined that the multiple feature points are incorrectly identified. The second feature sub-line may be caused by scratches or foreign matter on the surface of the welding workpiece.
[0116] The above-mentioned embodiment detects the difference in pixel values within the second preset range of the fourth detection frame to determine whether there is a characteristic line in the fourth detection frame that matches the second characteristic sub-line in the third detection frame. This can reduce the detection error of the edge line of the second workpiece 104, improve the detection accuracy, and greatly improve the yield rate of the straight-line spliced welds of the welded workpieces.
[0117] In an embodiment of the present application, after obtaining the center coordinates of the weld, the method also includes: determining that the center coordinates of the weld are correct based on the deviation between the center coordinates of the weld and the preset value being within a third preset range; determining that the center coordinates of the weld are incorrect based on the deviation between the center coordinates of the weld and the preset value being outside the third preset range.
[0118] In this embodiment, the preset value refers to the weld coordinates that meet the welding process requirements under an ideal state. The preset value can be obtained based on experiments or simulations. After obtaining the center coordinates of the weld, the center coordinates with deviations exceeding the third preset range can be screened out based on whether the deviation between the center coordinates of the weld and the preset value is within a third preset range, thereby improving the positioning accuracy of the center coordinates of the weld. In an example, the third preset range is, for example, ±3mm, that is, when the deviation between the center coordinates of the weld and the preset value is within ±3mm, the center coordinates of the weld are determined to be correct; and when the deviation between the center coordinates of the weld and the preset value exceeds ±3mm, the center coordinates of the weld are determined to be incorrect.
[0119] The above embodiment can improve the positioning accuracy of the weld center coordinates by comparing the detected weld center coordinates with the preset values, and improve the yield rate of the welds of the straight-line joints of the welding workpieces.
[0120] In an embodiment of the present application, after obtaining the first characteristic line, the method further includes: determining a welding reference line based on the position coordinates of the welding edge of the second workpiece 104; obtaining a weld width based on a width between the welding reference line and the first characteristic line; determining that the welding conditions are met based on the weld width being less than or equal to a preset width, and generating welding guide information.
[0121] In the above embodiment, after the edge data of the second workpiece 104 is obtained, the position coordinates of the weld edge of the second workpiece 104 can be obtained. The weld edge of the second workpiece 104 is the edge of the second workpiece 104 adjacent to the weld. Figure 6 and Figure 8 It can be seen that the length of the weld edge of the second workpiece 104 is less than that of the first workpiece 103, and it is easier to identify in the image, so the weld edge of the second workpiece 104 can be used as a welding reference edge. From the above embodiment, it can be seen that the first characteristic line is the weld edge of the first workpiece 103, and the weld width can be obtained based on the width between the welding reference line and the first characteristic line.
[0122] The preset width in this embodiment refers to the width of an ideal weld obtained through experiments or simulations. When the weld width is less than or equal to the preset width, it is determined that the welding conditions are met, the assembly position and the weld size meet the requirements, and welding can be continued, thereby generating welding guidance information.
[0123] The welding guidance information may include the area information of the above-mentioned weld, including the center position of the weld and the control instructions for controlling the welding robot to perform welding, thereby guiding the welding robot to move to the corresponding welding point for welding.
[0124] The above embodiment compares the calculated weld width with the preset width, and generates welding guidance information when it is determined that the welding conditions are met. This can prevent mistakes before welding, reduce defects such as holes and sagging caused by the overlap gap of the workpiece, and improve the yield rate of the straight-line splicing weld of the welding workpiece.
[0125] In an embodiment of the present application, after obtaining the welding guidance information, the method further includes: controlling the welding robot to reach a designated position for welding according to the welding guidance information, wherein the welding guidance information includes welding guidance information of one or more welds.
[0126] In one example, the weld guidance information includes welding guidance information of one or more welds, that is, after obtaining the information of one weld, the welding robot can be immediately controlled to weld the weld, or after obtaining multiple welds, the welding robot can be controlled to weld the multiple welds in sequence.
[0127] The welding guidance information may include the area coordinates, center coordinates, weld width information, welding control instructions, and other information used to guide the welding robot.
[0128] The above-mentioned embodiment can realize the diversity of welding rhythm by including welding guidance information of one or more welds, and can control the welding robot to weld one or more welds at one welding time according to actual conditions, thereby improving welding flexibility.
[0129] The method of the embodiment of the present application is explained below through a specific example. Fig. 9 The effect diagram of the edge fitting process of the second workpiece 104 in the embodiment of the present application is shown. Fig.10 A diagram showing the effect of the edge fitting process of the first workpiece 103 according to an embodiment of the present application is shown.
[0130] In one example, the image acquisition device 102 is controlled to gradually scan from a position away from the weld toward the weld. Figure 6 For example, the image acquisition device 102 can be controlled to scan the area corresponding to the first workpiece 103 in the direction of "from left to right", and the image acquisition device 102 can also be controlled to scan the area corresponding to the second workpiece 104 in the direction of "from right to left", and then the edge data of the first workpiece 103 and the edge data of the second workpiece 104 are respectively extracted. The edge data includes coordinate data representing the boundary line between the workpiece to be welded and the weld, that is, the boundary line of the first workpiece 103 close to the weld and the boundary line of the second workpiece 104 close to the weld can be obtained. In this way, the regional information of the weld can be obtained based on the edge data of the first workpiece 103 and the edge data of the second workpiece 104. The regional information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld.
[0131] Specifically, through Fig. 9 The edge line fitting process effect diagram of the second workpiece 104 is shown, and the edge line data of the second workpiece 104 is obtained. Fig. 9 In the figure, the images of the E and F regions on the left are regions with obvious grayscale differences. By scanning the images in the E and F regions, multiple feature points representing the edge of the second workpiece can be identified, and then the following is fitted: Fig. 9 The characteristic lines are shown on the right. Fig. 9 As shown in the left figure, the second workpiece 104 and the highlighted area ( Fig. 9The method further comprises scanning in the vertical direction of the boundary between the second workpiece 104 and the white part in area E in the middle. Since the grayscale value difference between the second workpiece 104 and the highlighted area is relatively large, the detection efficiency can be improved. By sequentially detecting the difference in pixel values between two adjacent points, when the difference in pixel values between the two adjacent points is greater than a first preset value, a plurality of feature points representing the edge line of the second workpiece 104 are obtained, thereby improving the detection efficiency of the edge line data of the second workpiece 104.
[0132] Similarly, through Fig.10 The edge line fitting process effect diagram of the first workpiece 103 is shown, and the edge line data of the first workpiece 103 is obtained. Fig.10 In the figure, the images of the E region and the F region on the left are regions with obvious grayscale differences. By scanning the images in the E region and the F region, multiple feature points representing the edge of the first workpiece can be identified, and then the following is fitted: Fig.10 The characteristic lines are shown on the right. Fig.10 As shown in the left figure, the left figure can represent the first workpiece 103 and the highlight area ( Fig.10 The first workpiece 103 is scanned in the vertical direction of the boundary with the white part in area E in the middle. Since the grayscale value difference between the first workpiece 103 and the highlighted area is large, the detection efficiency can be improved. By sequentially detecting the difference in pixel values between two adjacent points, when the difference in pixel values between the two adjacent points is greater than a first preset value, multiple feature points of the first workpiece 103 are obtained, which can improve the detection efficiency of the edge data of the first workpiece 103.
[0133] In one example, after detecting the difference in pixel values between two adjacent points and the first preset value to obtain multiple feature points, a reminder message is output when the number of multiple feature points is less than or equal to the second preset value, and the reminder message indicates that there are defects on the surface of the workpiece to be welded. When the number of multiple feature points is less than or equal to the second preset value, the number of characteristic feature points is insufficient, and the characteristic line obtained by fitting the current number of feature points may be the difference in pixel values between two adjacent points caused by scratches or foreign matter on the surface of the workpiece. On the one hand, the reminder message can be used to remind the staff to proceed to the next step, and at the same time, the distorted feature points can be excluded to improve the authenticity of the edge line fitting.
[0134] In one example, the multiple feature points are multiple feature points that characterize the edge of the first workpiece 103. After the multiple feature points are obtained based on the difference in pixel values between two adjacent points in the image information being greater than a first preset value, this embodiment also performs a pixel value difference detection within a first preset range of the second detection frame to determine whether there is a feature line in the second detection frame that matches the first feature sub-line in the first detection frame, which can reduce the detection error of the edge of the first workpiece 103, improve the detection accuracy, and significantly improve the yield rate of the straight-line spliced weld of the welded workpiece. Figure 8As shown, the A region in the figure represents the position of the first detection frame. It can be seen from the position of the A region in the figure that the A region includes both a part of the first workpiece 103 and a part of the high-brightness region. According to the feature points contained in the A region, the first feature subline can be obtained. The first feature subline represents a part of the edge line of the first workpiece 103. Then, the coordinate information of the first feature subline can be obtained according to the position of the first feature subline in the coordinate system. After obtaining the coordinate information of the first feature subline, the position of the first detection frame containing the first feature subline can be determined. The mapping position of the coordinate information of the first feature subline in the second detection frame can be obtained by the symmetric coordinates of the coordinates of the first feature subline about the X axis. With the mapping position of the coordinate information of the first feature subline in the second detection frame as the detection start position, the pixel value difference is detected within the first preset range of the second detection frame to obtain the first detection result, and then it can be detected whether there is a feature line matching the first feature subline in the second detection frame, wherein the first preset range represents the first preset range of the mapping points of any feature point of the first feature subline in the second detection frame, wherein the first preset range is, for example, ±1.5mm, and then the feature line matching the first feature subline within the error range can be retrieved in the second detection frame. When the first detection result indicates that there is a feature line matching the first feature sub-line within the first preset range, it indicates that there is a feature line matching the first feature sub-line within the second detection frame, and it is determined that the multiple feature points are correctly identified. When the first detection result indicates that there is no feature line matching the first feature sub-line within the first preset range, it indicates that there is no feature line matching the first feature sub-line within the second detection frame, and it is determined that the multiple feature points are incorrectly identified. The first feature sub-line may be caused by scratches or foreign matter on the surface of the welding workpiece.
[0135] Similarly, by detecting the presence of a feature line matching the second feature sub-line in the fourth detection frame, it can be determined that multiple feature points are correctly identified, and it is considered that the assembly position of the workpiece to be welded meets the requirements, the weld meets the process requirements, and welding can continue. This can provide a fool-proof measure, which can greatly improve the yield rate of the straight-line splicing weld of the welded workpiece, and reduce product scrapping and downtime costs caused by misjudgment of visual inspection.
[0136] like Figure 8 As shown, the third detection frame is, for example, Figure 8The detection frame represented by the C area in the figure, as can be seen from the position of the C area in the figure, the C area includes both part of the second workpiece 104 and part of the high-brightness area. The second characteristic sub-line can be obtained based on the feature points contained in the C area. The second characteristic sub-line represents a part of the edge line of the second workpiece 104. Then, the coordinate information of the second characteristic sub-line can be obtained based on the position of the second characteristic sub-line in the coordinate system. After obtaining the coordinate information of the second characteristic sub-line, the position of the third detection frame containing the second characteristic sub-line can be determined. The length of the weld edge of the second workpiece 104 can be obtained by an image detection algorithm, such as by identifying the length of the weld edge of the second workpiece 104 in the image. After obtaining the length of the weld edge of the second workpiece 104, the position of the fourth detection frame is determined based on the position of the third detection frame and the length of the weld edge of the second workpiece 104. The fourth detection frame is obtained by translating the third detection frame along the weld edge of the second workpiece 104 by a target distance. The target distance is the length of the weld edge of the second workpiece 104, and is expressed as Figure 8 Taking the image shown as an example, the detection frame represented by the C region is translated downward along the Y axis by the length of the weld edge of the second workpiece 104, and the D region can be obtained, and the D region is the position of the fourth detection frame. Then, by detecting whether there is a feature line matching the second feature sub-line in the fourth detection frame, it can be detected whether the feature points of the second workpiece 104 are correctly identified. In the case that there is a feature line matching the second feature sub-line in the fourth detection frame, it is determined that the multiple feature points representing the edge line of the second workpiece 104 are correctly identified. With the mapping position of the coordinate information of the second feature sub-line in the fourth detection frame as the detection start position, the pixel value difference is detected within the second preset range of the fourth detection frame to obtain the second detection result, and then it can be detected whether there is a feature line matching the second feature sub-line in the fourth detection frame, wherein the second preset range represents the second preset range of the mapping point of any feature point of the second feature sub-line in the fourth detection frame, wherein the second preset range is, for example, ±2mm, and then the feature line matching the second feature sub-line within the error range can be retrieved in the fourth detection frame. In the case where the second detection result indicates that there is a feature line matching the second feature sub-line within the second preset range, it indicates that there is a feature line matching the second feature sub-line within the fourth detection frame, and it is determined that the multiple feature points are correctly identified. In the case where the second detection result indicates that there is no feature line matching the second feature sub-line within the second preset range, it indicates that there is no feature line matching the second feature sub-line within the fourth detection frame, and it is determined that the multiple feature points are incorrectly identified. The second feature sub-line may be caused by scratches or foreign matter on the surface of the welding workpiece.
[0137] After obtaining the regional information of the weld, the deviation of the weld center coordinate obtained by detection is compared with the preset value. When the deviation of the weld center coordinate and the preset value is within ±3mm, the weld center coordinate is determined to be correct; if the deviation of the weld center coordinate and the preset value exceeds ±3mm, the weld center coordinate is determined to be incorrect. This can improve the positioning accuracy of the weld center coordinate and improve the yield rate of the straight-line splicing weld of the welded workpiece.
[0138] The above embodiment changes the exposure angle of the workpiece to be welded by changing the relative position of the light source device 101 and the workpiece to be welded, so that there is a clear boundary between the two workpieces to be welded and the weld formed therebetween after exposure, so as to improve the grayscale difference between different image areas, and greatly improve the accuracy of obtaining the edge contour of the workpiece to be welded.
[0139] At the same time, based on the image information obtained by the weld positioning system, the image acquisition device 102 is controlled to scan in a preset direction, and a plurality of feature points are obtained based on the fact that the difference in pixel values between two adjacent points in the image information is greater than a first preset value, so as to improve the efficiency of edge resolution; and then, based on the fact that the number of the plurality of feature points is greater than a second preset value, the feature points that do not meet the fitting conditions are screened out, and then the plurality of feature points are fitted to obtain edge data of the first workpiece 103 and edge data of the second workpiece 104. In this way, the accuracy of the edge data can be improved, thereby improving the recognition accuracy of the edges of the workpieces to be welded and the welds, and the positioning accuracy of the weld area can be improved.
[0140] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0141] The application embodiment provides a weld positioning device, which is used to perform the weld positioning method described in the above embodiment, such as Fig.11 As shown, the weld positioning device 1100 includes:
[0142] The control module 1101 is used to control the image acquisition device 102 to scan in a preset direction and obtain image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device 102, wherein the preset direction is a direction close to the weld with a preset area as a starting position, and the preset area represents an area away from the weld;
[0143] An image processing module 1102 is used to determine the edge line data of the first workpiece 103 and the edge line data of the second workpiece 104 based on the image information, wherein the edge line data includes coordinate data representing the boundary line between the workpiece to be welded and the weld;
[0144] The positioning module 1103 is used to obtain the area information of the weld according to the edge data of the first workpiece 103 and the edge data of the second workpiece 104, wherein the area information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld.
[0145] The weld positioning device provided in the above-mentioned embodiment of the present application and the weld positioning method provided in the embodiment of the present application are based on the same application concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0146] The embodiment of the present application also provides a host computer corresponding to the weld locating method provided in the above embodiment to execute the above weld locating method.
[0147] Please refer to Fig.12 , which shows a schematic diagram of a host computer provided by some embodiments of the present application. Fig.12 As shown, the host computer 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, and the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and the processor 200 executes the method provided in any of the aforementioned embodiments of the present application when running the computer program.
[0148] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0149] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs, and the processor 200 executes the programs after receiving the execution instructions. The weld locating method disclosed in any implementation of the embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.
[0150] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.
[0151] The host computer provided in the embodiment of the present application and the weld positioning method provided in the embodiment of the present application are based on the same application concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0152] The present application also provides a computer-readable storage medium corresponding to the weld positioning method provided in the above embodiment. Fig.13 , which shows a computer-readable storage medium 30, which may be a CD, on which a program product is stored, which may be an operating system, application software, game, tool software, etc. The program product includes a computer program, which usually exists in source code or compiled binary form. When the computer program is run by a processor, it will execute the weld positioning method provided by any of the aforementioned embodiments.
[0153] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0154] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the weld positioning method provided in the embodiments of the present application are based on the same application concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0155] It should be noted that:
[0156] In the above text, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0158] The embodiments of the present application are described above in conjunction with the accompanying drawings, which are only specific implementation modes of the present application. However, the present application is not limited to the above-mentioned specific implementation modes. The above-mentioned specific implementation modes are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A weld positioning method, characterized in that: The method comprises: Controlling an image acquisition device to scan in a preset direction, and acquiring image information of a non-exposed side of a workpiece to be welded acquired by the image acquisition device, wherein the workpiece to be welded comprises a first workpiece and a second workpiece, a weld is provided between the first workpiece and the second workpiece, a plane formed by the first workpiece, the weld and the second workpiece along a first direction is a welding surface, a light source device is arranged on one side of the welding surface to form an exposed side, and the other side of the welding surface is the non-exposed side, and the first direction refers to a direction of transition from the first workpiece to the second workpiece; the preset direction is a direction close to the weld with a preset area as a starting position, and the preset area represents an area away from the weld; Based on the image information, determine edge line data of the first workpiece and edge line data of the second workpiece, wherein the edge line data includes coordinate data representing a boundary line between the workpiece to be welded and the weld; Obtaining area information of the weld according to the edge line data of the first workpiece and the edge line data of the second workpiece, wherein the area information includes position coordinates of an area where the weld is located, and the position coordinates include center coordinates of the weld; Wherein, the method further comprises: Perform pixel value difference detection within a first preset range of the second detection frame to determine whether there is a feature line in the second detection frame that matches the first feature sub-line in the first detection frame, so as to determine whether the plurality of feature points representing the edge line of the first workpiece are correctly identified or incorrectly identified; The first detection frame is a preset detection area for detecting a first workpiece feature point, and the second detection frame and the first detection frame are symmetrical about a preset axis.
2. The method according to claim 1, characterized in that The step of determining the edge line data of the first workpiece and the edge line data of the second workpiece based on the image information includes: According to the difference in pixel values between two adjacent points in the image information being greater than a first preset value, a plurality of feature points are obtained; According to the number of the plurality of feature points being greater than a second preset value, the plurality of feature points are fitted to obtain edge line data of the first workpiece and edge line data of the second workpiece.
3. The method according to claim 2, characterized in that The method further comprises: According to the number of the plurality of characteristic points being less than or equal to the second preset value, a warning message is output, wherein the warning message indicates that there are defects on the surface of the workpiece to be welded.
4. The method according to claim 1, characterized in that: Obtaining the area information of the weld according to the edge line data of the first workpiece and the edge line data of the second workpiece includes: Fitting feature points in the edge line data of the first workpiece to obtain first feature line coordinate information, where the first feature line is the edge line of the first workpiece; Fitting the feature points in the edge line data of the second workpiece to obtain coordinate information of a second feature line, where the second feature line is the edge line of the second workpiece; The area information of the weld is obtained according to the first characteristic line coordinate information and the second characteristic line coordinate information.
5. The method according to claim 2, characterized in that: The plurality of feature points are a plurality of feature points characterizing the edge line of the first workpiece. After the plurality of feature points are obtained according to the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method further comprises: Based on the plurality of feature points, a first feature sub-line is obtained, wherein the first feature sub-line represents a portion of the first workpiece edge line; Acquire coordinate information of the first characteristic sub-line, and determine a position of a first detection frame including the first characteristic sub-line based on the coordinate information of the first characteristic sub-line; Determine the position of the second detection frame according to the position of the first detection frame and a preset axis, wherein the second detection frame is symmetrical to the first detection frame about the preset axis; According to the presence of a feature line matching the first feature sub-line in the second detection frame, it is determined that the multiple feature points are correctly identified.
6. The method according to claim 1, characterized in that The detecting of pixel value differences within a first preset range of the second detection frame to determine whether there is a feature line in the second detection frame that matches the first feature sub-line in the first detection frame includes: Taking the mapping position of the coordinate information of the first characteristic sub-line in the second detection frame as the detection start position, performing pixel value difference detection in a first preset range of the second detection frame to obtain a first detection result; When the first detection result indicates that there is a feature line matching the first feature sub-line within the first preset range, determining that the plurality of feature points are correctly identified; When the first detection result indicates that there is no feature line matching the first feature sub-line within the first preset range, it is determined that the multiple feature points are incorrectly recognized.
7. The method according to claim 2, characterized in that The plurality of feature points are a plurality of feature points characterizing the edge line of the second workpiece. After the plurality of feature points are obtained according to the difference in pixel values between two adjacent points in the image information being greater than a first preset value, the method further comprises: Based on the plurality of feature points, a second feature sub-line is obtained, wherein the second feature sub-line represents a portion of the second workpiece edge line; Acquire coordinate information of the second characteristic sub-line, and determine a position of a third detection frame including the second characteristic sub-line based on the coordinate information of the second characteristic sub-line; Obtaining the length of the weld edge of the second workpiece, and determining the position of a fourth detection frame according to the position of the third detection frame and the length of the weld edge of the second workpiece, wherein the fourth detection frame is obtained by translating the third detection frame along the weld edge of the second workpiece by a target distance, and the target distance is the length of the weld edge of the second workpiece; According to the presence of a feature line matching the second feature sub-line in the fourth detection frame, it is determined that the plurality of feature points are correctly identified.
8. The method according to claim 7, characterized in that The method further comprises: Taking the mapping position of the coordinate information of the second characteristic sub-line in the fourth detection frame as the detection start position, performing pixel value difference detection in a second preset range of the fourth detection frame to obtain a second detection result; When the second detection result indicates that there is a feature line matching the second feature sub-line within the second preset range, determining that the plurality of feature points are correctly identified; When the second detection result indicates that there is no feature line matching the second feature sub-line within the second preset range, it is determined that the multiple feature points are incorrectly recognized.
9. The method according to claim 1, characterized in that: After obtaining the center coordinates of the weld, the method further includes: Determining that the center coordinate of the weld is correct according to that a deviation between the center coordinate of the weld and a preset value is within a third preset range; According to the fact that the deviation between the central coordinate of the weld and the preset value exceeds a third preset range, it is determined that the central coordinate of the weld is incorrect.
10. The method according to claim 4, characterized in that After obtaining the first characteristic line, the method further includes: Determining a welding reference line based on the position coordinates of the welding edge of the second workpiece; Obtaining a weld width based on a width between the welding reference line and the first characteristic line; According to the weld width being less than or equal to the preset width, it is determined that the welding condition is met, and welding guide information is generated.
11. The method according to claim 10, characterized in that After obtaining the welding guidance information, the method further includes: The welding robot is controlled to reach a designated position for welding according to the welding guidance information, wherein the welding guidance information includes welding guidance information of one or more welds.
12. A weld positioning device, characterized in that: Used to perform the weld positioning method according to any one of claims 1 to 11, the device comprises: A control module, used to control the image acquisition device to scan in a preset direction, and obtain image information of the non-exposed side of the workpiece to be welded acquired by the image acquisition device, wherein the workpiece to be welded includes a first workpiece and a second workpiece, a weld is provided between the first workpiece and the second workpiece, and a plane formed by the first workpiece, the weld and the second workpiece along a first direction is a welding surface, a light source device is arranged on one side of the welding surface to form an exposed side, and the other side of the welding surface is the non-exposed side, and the first direction refers to a direction of transition from the first workpiece to the second workpiece; the preset direction is a direction close to the weld with a preset area as a starting position, and the preset area represents an area away from the weld; An image processing module, used to determine the edge line data of the first workpiece and the edge line data of the second workpiece based on the image information, wherein the edge line data includes coordinate data representing the boundary line between the workpiece to be welded and the weld; The positioning module is used to obtain the area information of the weld according to the edge line data of the first workpiece and the edge line data of the second workpiece, wherein the area information includes the position coordinates of the area where the weld is located, and the position coordinates include the center coordinates of the weld.
13. A weld positioning system, characterized in that: The system comprises: A light source device, the light source device is used to expose a target area of a workpiece to be welded, the workpiece to be welded includes a first workpiece and a second workpiece, a weld is provided between the first workpiece and the second workpiece, a plane formed by the first workpiece, the weld and the second workpiece along a first direction is a welding surface, the first direction refers to a direction of transition from the first workpiece to the second workpiece, the light source device is arranged on one side of the welding surface to form an exposure side; wherein the target area includes an area of the target workpiece corresponding to the exposure side, and the target workpiece is one of the first workpiece and the second workpiece; An image acquisition device, the image acquisition device is arranged on the non-exposed side of the welding surface, and the image acquisition device is used to acquire image information of the non-exposed side of the workpiece to be welded; A host computer, the host computer is electrically connected to the light source device and the image acquisition device, and the host computer is used to implement the weld positioning method as described in any one of claims 1-11.
14. The weld positioning system according to claim 13, characterized in that: The light source device includes a first light source and a second light source, the first light source and the second light source are respectively arranged on both sides of the target workpiece along a second direction, the light source emission direction of the light source device is toward the target workpiece and parallel to the welding surface; wherein the second direction is a direction perpendicular to the first direction.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the weld locating method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method for automatically detecting and tracking weld seam
CN104014907A
Plane butt joint workpiece welding track locating method and system
CN114734439A