Weld seam height measurement method and apparatus, and electronic device and readable storage medium
By determining the target plane position of the weld and the pixel point distance of the weld area in the three-dimensional coordinate system, the problems of low accuracy and large error in weld height detection are solved, and high-precision weld height measurement is achieved.
Patent Information
- Application Number
- PCT/CN2024/126455
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-11
- Filing Date
- 2024-10-22
- Publication Date
- 2025-07-17
AI Technical Summary
In the prior art, there are problems of low accuracy and large errors in weld height detection, especially in the image acquisition process, the depth image error caused by camera position deviation and ambient light changes have a great impact.
By obtaining the target depth image of the weld in the battery cell, the position information of the corresponding target plane of the shell in the preset three-dimensional coordinate system is determined, and using this as the reference plane, combining the distance between each pixel point in the weld area and the target plane, the weld height is accurately determined and detection errors are reduced.
It improves the accuracy of weld height measurement, reduces detection errors, and ensures the reliability and consistency of welding quality inspection.
Smart Images

Figure CN2024126455_17072025_PF_FP_ABST
Abstract
Description
Weld height detection method, device, electronic device and readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202410044180.7, filed on January 11, 2024, entitled “Method, device, electronic device and readable storage medium for detecting weld height,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of visual inspection technology, and in particular relates to a method, device, electronic device and readable storage medium for detecting weld height. Background Art
[0004] In the process of processing battery cells, it is often necessary to weld two parts, such as welding the shell and the top cover by laser to make the shell and the top cover tightly combined. During the welding process, the top cover and the shell are not completely connected, resulting in a convex weld bead shape, forming a flange, where the flange value is the height of the convexity. After the welding process, the quality of the welding can be tested. In related technologies, image detection is often used to detect the welding quality. By collecting the image of the weld, the height of the weld in the image, that is, the flange value, is identified, and then the weld quality is judged in combination with the height information.
[0005] However, during the image acquisition process, there are often factors such as camera position offset and ambient light that can easily cause errors in the depth image. The existence of these errors will affect the accuracy of determining the weld height.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a weld height detection method, device, electronic device and readable storage medium, which can quickly and accurately determine the weld height in combination with a depth image.
[0008] In a first aspect, an embodiment of the present application provides a method for detecting weld height, comprising:
[0009] Acquire a target depth image of a weld in a battery cell, wherein the battery cell includes adjacent top cover and shell, and the weld is located between the top cover and shell;
[0010] Determine the position information of the shell corresponding to the target plane in a preset three-dimensional coordinate system according to the target depth image;
[0011] The height of the weld is determined based on the position information of each first target pixel point in the target depth image in a preset three-dimensional coordinate system and the position information of the target plane, wherein the first target pixel point is the pixel point corresponding to the weld area in the target depth image.
[0012] In an embodiment of the present application, after obtaining the target depth image of the weld in the battery cell, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined based on the target depth image. Thus, the position information of the shell in the preset three-dimensional coordinate system can be accurately determined. Next, using the target plane as the reference plane, the height of the weld is determined based on the distance from each pixel point corresponding to the weld area in the target depth image to the target plane, thereby effectively improving the accuracy of measuring the weld height and reducing detection errors.
[0013] In one possible implementation, determining position information of the shell corresponding to the target plane in a preset three-dimensional coordinate system according to the target depth image includes:
[0014] Obtaining a preset angle between the top cover and the shell, position information of the target straight line corresponding to the weld in the target depth image in a preset three-dimensional coordinate system, and position information corresponding to each pixel point in the target depth image in the preset three-dimensional coordinate system;
[0015] The position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined according to the preset angle, the position information of the target straight line and the position information corresponding to each pixel.
[0016] According to an embodiment of the present application, the corrected target plane is used as a reference plane to assist in determining the weld height, thereby facilitating improving the accuracy of determining the weld height.
[0017] In one possible implementation, determining the position information of the shell corresponding to the target plane in a preset three-dimensional coordinate system based on the preset angle, the position information of the target line, and the position information corresponding to each pixel includes:
[0018] Determine, based on the position information corresponding to each first pixel in the target depth image, the first plane corresponding to the top cover and the position information of the first plane in the preset three-dimensional coordinate system, wherein the first pixel point is the pixel point corresponding to the shell area in the target depth image;
[0019] Generate position information of the second plane according to the preset angle and the position information of the first plane, wherein the angle between the first plane and the second plane is the preset angle;
[0020] The position information of the target plane of the shell in the preset three-dimensional coordinate system is determined according to the position information corresponding to each second pixel in the target depth image and the position information of the second plane.
[0021] According to an embodiment of the present application, after determining the first plane corresponding to one of the top covers, combined with the geometric position relationship between the top cover and the shell, for example, the angle between the top cover and the shell, the target plane of the shell in the preset three-dimensional coordinate system is determined. This can effectively reduce the error between the position information of the target plane and the actual position of the shell, and provide a reliable data basis for the accurate measurement of the weld height.
[0022] In one possible implementation, determining the position information of the target plane of the shell in a preset three-dimensional coordinate system according to the position information corresponding to each second pixel in the target depth image and the position information of the second plane includes:
[0023] Moving the second plane, and determining an average distance between the second pixel points and the moved second plane, wherein the average distance is an average value of the second distances between each second pixel point and the moved plane;
[0024] The position information of the target plane is determined according to the average distance between the second pixel point and the moved second plane, wherein the target plane is the moved second plane corresponding to the minimum average distance.
[0025] According to the embodiment of the present application, by referring to the distance between the second pixel point and the second plane, the second plane is moved, which is conducive to accurately finding the target plane with the highest matching degree with the second surface.
[0026] In one possible implementation, determining the height of the weld according to position information of each first target pixel point in the target depth image in a preset three-dimensional coordinate system and position information of the target plane includes:
[0027] Determining a first distance between each first target pixel point and the target plane corresponding to the shell according to position information of each first target pixel point in a preset three-dimensional coordinate system and position information of the target plane;
[0028] A height of the weld is determined based on the plurality of first distances.
[0029] According to an embodiment of the present application, the target plane is used as the reference plane, and the first distance between each first pixel point corresponding to the weld area and the target plane is used to determine the height of the weld, thereby effectively improving the accuracy of measuring the weld height and reducing detection errors.
[0030] In one possible implementation, determining a first distance between each first target pixel and the target plane corresponding to the shell according to position information of each first target pixel in a preset three-dimensional coordinate system and position information of the target plane includes:
[0031] Obtain the position information of the weld corresponding to the target straight line in the preset three-dimensional coordinate system in the target depth image;
[0032] Determine the weld area according to the position information of the target plane and the position information of the target straight line corresponding to the weld system, wherein the weld area and the target straight line are located on the same side of the target plane;
[0033] A first distance between each first target pixel point and the target plane corresponding to the shell is determined according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane.
[0034] Based on this, the accuracy of measuring weld height can be effectively improved and detection errors can be reduced.
[0035] In a possible implementation, determining the height of the weld according to the multiple first distances includes:
[0036] A maximum value of the first distances is determined among the multiple first distances, and the maximum value of the first distances is determined as the height of the weld.
[0037] Based on this, the accuracy of determining the weld height can be effectively improved and detection errors can be reduced.
[0038] In one possible implementation, obtaining a target depth image of a weld in a battery cell includes:
[0039] Acquire a first depth image of a weld in a battery cell, wherein the first depth image includes a depth value of each initial pixel point;
[0040] Determining an initial fitting straight line of the weld in the first depth image in a preset three-dimensional coordinate system according to the depth value of each initial pixel point;
[0041] According to the positional relationship between the initial fitting straight line and the preset coordinate axes in the preset three-dimensional coordinate system, the first depth image is adjusted to the target position in the preset three-dimensional coordinate system to obtain a target depth image, wherein the target depth image includes a target straight line corresponding to the weld, and the target straight line is parallel to the preset coordinate axes.
[0042] According to an embodiment of the present application, the position of the first depth image is adjusted by combining the positional relationship between the initial fitting straight line and the coordinate axis to obtain a target depth image at the target position, so that the weld position and direction in the target depth image are standardized, providing an accurate data basis for subsequent weld height detection.
[0043] In a possible implementation, the first depth image includes a plurality of pixel rows, and an arrangement direction of the plurality of pixel rows is consistent with an extension direction of the weld;
[0044] Determining an initial fitting straight line of the weld in the first depth image in a preset three-dimensional coordinate system according to the depth value of each initial pixel point includes:
[0045] Determine a second target pixel in each pixel row according to the depth value of each initial pixel, wherein the second target pixel is the initial pixel corresponding to the maximum depth value in the pixel row;
[0046] An initial fitting straight line of the weld in the first depth image in the preset three-dimensional coordinate system is generated according to the position information of each second target pixel point in the preset three-dimensional coordinate system.
[0047] In an embodiment of the present application, the initial fitting straight line is a preliminary representation of the weld in three-dimensional space, which can conveniently indicate the approximate direction and position of the weld in the first depth image, which is beneficial to improving the adjustment accuracy in the subsequent step of adjusting the first depth image, as well as improving the accuracy of the measurement of the weld height.
[0048] In one possible implementation, obtaining a first depth image of a weld in a battery cell includes:
[0049] Acquire a second depth image of depth values of a weld in the battery cell;
[0050] The second depth image is subjected to noise reduction processing according to a preset image noise reduction algorithm to obtain a first depth image of the weld in the battery cell.
[0051] According to the embodiments of the present application, image noise can be suppressed and image smoothness can be improved.
[0052] In a second aspect, an embodiment of the present application provides a device for detecting weld height, characterized in that the device includes:
[0053] an acquisition module, configured to acquire a target depth image of a weld in a battery cell, wherein the battery cell includes adjacent top cover and shell, and the weld is located between the top cover and shell;
[0054] A processing module, configured to determine position information of the shell corresponding to the target plane in a preset three-dimensional coordinate system based on the target depth image;
[0055] The processing module is also used to determine the height of the weld based on the position information of each first target pixel point in the target depth image in a preset three-dimensional coordinate system and the position information of the target plane, wherein the first target pixel point is the pixel point corresponding to the weld area in the target depth image.
[0056] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of detecting the weld height as in the first aspect are implemented.
[0057] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of detecting the weld height as in the first aspect are implemented.
[0058] 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
[0059] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the embodiments below. The accompanying drawings are only for the purpose of illustrating the embodiments and are not to be considered as limiting the present application. In the accompanying drawings:
[0060] FIG1 is a schematic flow chart of a method for detecting weld height according to an embodiment of the present application;
[0061] FIG2 is a schematic structural diagram of a battery cell provided in some embodiments of the present application;
[0062] FIG3 is a schematic diagram of an image acquisition method provided by an embodiment of the present application;
[0063] FIG4 is a two-dimensional schematic diagram of a target depth image provided by an embodiment of the present application;
[0064] FIG5 is a three-dimensional schematic diagram of a target depth image provided by an embodiment of the present application;
[0065] FIG6 is a schematic diagram of a surface position relationship provided in an embodiment of the present application;
[0066] FIG7 is a schematic flow chart of another method for detecting weld height provided in an embodiment of the present application;
[0067] FIG8 is a schematic structural diagram of a weld height detection device provided in an embodiment of the present application;
[0068] FIG9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0069] In the accompanying drawings, the drawings are not necessarily drawn to scale. DETAILED DESCRIPTION
[0070] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0071] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0072] In the process of processing battery cells, it is often necessary to weld two parts, such as welding the shell and the top cover by laser to make the shell and the top cover tightly combined. During the welding process, the top cover and the shell are not completely connected, resulting in a convex weld bead shape, forming a flange, where the flange value is the height of the convexity. After the welding process, the quality of the welding can be tested. In related technologies, image detection is often used to detect the welding quality. By collecting the image of the weld, the height of the weld in the image, that is, the flange value, is identified, and then the weld quality is judged in combination with the height information.
[0073] During the welding process, excess metal is generated on both sides of the weld. When this excess metal exceeds the required weld width, welding quality issues arise. Flanging quality issues can lead to reduced weld strength, poor sealing, and cracks. Therefore, welding quality testing facilitates factory quality control of welded products.
[0074] Based on this, the quality of the weld can be tested after the flanging process. Image detection is often used in related technologies to detect weld quality. By capturing an image of the weld, the weld height (also known as the flanging height) is identified in the image, and the weld quality is determined based on this height information.
[0075] However, during the image acquisition process, there are often factors such as camera position offset and ambient light that can easily cause errors in the depth image. The existence of these errors will affect the accuracy of determining the weld height.
[0076] Among the technical solutions for related quality inspection, there is also the method of visually observing the shape and edges of the weld to determine whether there is a weld flanging problem. Although this detection method is simple, there are still some shortcomings in detection accuracy and consistency of detection standards. In addition, there are also the use of sensors, such as laser sensors, cameras, ultrasonic sensors, etc., to scan and detect the weld to obtain the shape, geometric characteristics and surface quality of the weld, and then determine whether there are any quality problems by detecting the weld height. However, in the solution of using sensors for detection, there are many detection devices involved and the calculation process is complicated. The detected weld height still has large errors and low accuracy.
[0077] Based on the above considerations, in order to solve the problem of low accuracy and large errors in weld height detection results, the embodiments of the present application provide a weld height detection method, device, electronic device and readable storage medium. For battery cells that require weld height detection, after obtaining a target depth image of the weld in the battery cell, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined based on the target depth image. Thus, the position information of the shell in the preset three-dimensional coordinate system can be accurately determined. Next, using the target plane as a reference plane, the height of the weld is determined based on the distance between each pixel point corresponding to the weld area in the target depth image and the target plane. This can effectively improve the accuracy of measuring the weld height and reduce detection errors.
[0078] The technical solutions described in the embodiments of this application are applicable to the detection and manufacturing of products such as batteries and vehicles that are produced based on physical manufacturing processes.
[0079] FIG1 is a flow chart of a method for detecting the height of a weld provided in an embodiment of the present application. As shown in FIG1 , the method includes steps 101 to 103 .
[0080] Step 101: Acquire a target depth image of a weld in a battery cell, wherein the battery cell includes a top cover and a shell adjacent to each other, and the weld is located between the top cover and the shell;
[0081] Step 102: determining the position information of the shell corresponding to the target plane in a preset three-dimensional coordinate system based on the target depth image;
[0082] Step 103: Determine the height of the weld based on the position information of each first target pixel point in the target depth image in a preset three-dimensional coordinate system and the position information of the target plane, wherein the first target pixel point is the pixel point corresponding to the weld area in the target depth image.
[0083] The above steps are described in detail below.
[0084] The battery referred to in the embodiments of this application refers to a single physical module comprising one or more battery cells to provide higher voltage and capacity. In some embodiments, the battery can be a battery module. When there are multiple battery cells, the multiple battery cells are arranged and fixed to form a battery module. In some embodiments, the battery can be a battery pack, which can include a housing and battery cells, with the battery cells or battery modules housed in the housing.
[0085] Specifically, with respect to the above step 101 , for one or more battery cells included in the battery, each battery cell may include a housing assembly and a cell assembly located within the housing assembly.
[0086] The housing assembly of the battery cell may include a shell and a top cover, wherein the shell and the top cover need to be welded together, and the shell may include multiple side surfaces, wherein the shell is welded to each side surface respectively.
[0087] The battery cells disclosed in the embodiments of this application can be used, but are not limited to, in electrical devices such as vehicles, ships, or aircraft. A power supply system comprising the battery cells and batteries disclosed in this application can be used to construct such electrical devices. This helps avoid safety issues caused by poor welding of the battery cell top cover and improves battery performance stability and battery life.
[0088] Figure 2 is a schematic diagram of the structure of a battery cell provided in some embodiments of the present application. As shown in Figure 2 , the housing assembly may include a welded top cover 21 and a housing 22. The housing assembly shown in Figure 2 is prismatic and may include a top surface, a bottom surface, and multiple side surfaces. The top surface is the surface on which the top cover 21 is located, and the housing 22 includes multiple side surfaces. The top surface and the multiple side surfaces each form an intersection line, and these multiple intersection lines surround the top surface.
[0089] Multiple welds are formed between the top cover 21 and the shell 22. As shown in Figure 2, taking the shell as a rectangle as an example, the top cover forms four intersection lines 201a, 201b, 201c, and 201d with the four side surfaces respectively, and four welds 202a, 202b, 202c, and 202d are formed by welding between the shell 32 and the top cover 31. Each weld is close to an intersection line of the shell component and is roughly parallel to the intersection line. For example, the intersection line 201a is close to the weld 202a and is roughly parallel to the weld 202a, the intersection line 201b is close to the weld 202b and is roughly parallel to the weld 202b, the intersection line 201c is close to the weld 202c and is roughly parallel to the weld 202c, and the intersection line 201d is close to the weld 202d and is roughly parallel to the weld 202d.
[0090] When inspecting welds on a housing assembly, a depth camera can be used to capture each weld. A target depth image can be generated based on the images captured by the depth camera. Alternatively, the depth image captured by the depth camera can be used directly as the target depth image, or noise reduction and correction processing can be performed on the depth image captured by the depth camera, and the processed depth image can be used as the target depth image.
[0091] Optionally, the depth camera can be a camera such as a CCD line scan camera that can obtain the distance between the photographed object and the camera. Figure 3 is a schematic diagram of an image acquisition provided in an embodiment of the present application, and Figure 4 is a schematic diagram of a target depth image provided in an embodiment of the present application. In conjunction with Figure 3, for example, the CCD line scan camera 31 can scan along an intersection line 301 of the housing component 30 to obtain a target depth image. The target depth image of the housing component 30 obtained after scanning includes the intersection line 301 and two surfaces adjacent to the intersection line 301, such as the top surface and a side surface shown in Figure 2. The target depth image including the weld can be shown in Figure 4(b).
[0092] After obtaining the target depth image, the following steps involve the above steps 102 and 103. According to the target depth image, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined.
[0093] Specifically, the depth value of each pixel in the target depth image is determined based on the distance between each point in the captured object and the depth camera. That is, the image information of the target depth image includes the depth value of each pixel in the target depth image. Therefore, in the target depth image, the spatial position relationship between each pixel can be known, and the position information corresponding to each pixel in the preset three-dimensional coordinate system can be determined in the preset three-dimensional coordinate system, where the position information corresponding to each pixel can specifically be the coordinates of the pixel.
[0094] For example, and in conjunction with Figure 4, the depth camera scans along the extension direction of the weld to obtain a depth image. Optionally, during the scanning process, the weld is parallel to the scanning direction, the weld is perpendicular to the row direction of the pixels, and each pixel row of the target depth image is parallel to the X-axis.
[0095] In the target depth image, the pixel points corresponding to the shell are located on one side of the weld area, and the pixel points corresponding to the top cover are located on the other side of the weld area. Therefore, based on the positional relationship between the depth camera and the weld, the image area corresponding to the shell and the image area corresponding to the top cover in the target depth image can be determined. Therefore, based on the coordinates of each pixel point included in the shell area, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system can be determined.
[0096] In the embodiment of the present application, the pixel corresponding to the weld area in the target depth image is the first target pixel. Next, the weld height can be determined based on the position information of each first target pixel in a preset three-dimensional coordinate system and the position information of the target plane. Specifically, for example, the distance between each first pixel and the target plane is obtained, and then a statistical calculation is performed based on multiple distances to obtain the weld height. Optionally, the statistical calculation may include finding the maximum value, mean value, etc.
[0097] In an embodiment of the present application, after obtaining the target depth image of the weld in the battery cell, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined based on the target depth image. Thus, the position information of the shell in the preset three-dimensional coordinate system can be accurately determined. Next, using the target plane as the reference plane, the height of the weld is determined based on the distance from each pixel point corresponding to the weld area in the target depth image to the target plane, thereby effectively improving the accuracy of measuring the weld height and reducing detection errors.
[0098] In some embodiments of the present application, in order to improve the accuracy of determining the target plane, the above steps involve determining the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system based on the target depth image. For details, please refer to the following steps 201 and 202.
[0099] Step 201: Obtain a preset angle between the top cover and the shell, position information of the target straight line corresponding to the weld in the target depth image in a preset three-dimensional coordinate system, and position information corresponding to each pixel point in the target depth image in the preset three-dimensional coordinate system;
[0100] Step 202 : Determine the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line, and the position information corresponding to each pixel point.
[0101] Specifically, the preset angle between the top cover and the shell can be determined based on the design information of the battery cell. Optionally, the angle between the top cover and the shell can be designed to be 90 degrees. Based on this, when welding the top cover and the shell, the welding process will refer to this angle to ensure that the angle between the top cover and the shell is 90 degrees. It should be understood that the above specific values are only for facilitating the understanding of the technical solution of this application and do not specifically limit the implementation methods of this application.
[0102] The target straight line is the straight line corresponding to the weld in the preset three-dimensional coordinate system in the target depth image. Combining the two-dimensional depth image shown in Figure 4 and the three-dimensional depth image shown in Figure 5, it can be seen that the pixel points corresponding to the top cover and the pixel points corresponding to the shell can be easily found.
[0103] Based on the positional information of the corresponding pixels of the top cover, a plane of the top cover in a preset three-dimensional coordinate system can be fitted. Based on the positional information of the corresponding pixels of the shell, a plane of the shell in a preset three-dimensional coordinate system can be fitted. Since the preset angle between the top cover and the shell is known, after obtaining the plane corresponding to the top cover, the preset angle can be combined to determine the plane of the shell in the preset three-dimensional coordinate system, i.e., the target plane.
[0104] According to an embodiment of the present application, the corrected target plane is used as a reference plane to assist in determining the weld height, thereby facilitating improving the accuracy of determining the weld height.
[0105] In some embodiments, determining the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line and the position information corresponding to each pixel may include the following steps 301 to 303.
[0106] Step 301, determining the first plane corresponding to the top cover and the position information of the first plane in a preset three-dimensional coordinate system according to the position information corresponding to each first pixel point in the target depth image, wherein the first pixel point is the pixel point corresponding to the top cover area in the target depth image;
[0107] Step 302: Generate position information of a second plane based on a preset angle and position information of the first plane, wherein the angle between the first plane and the second plane is the preset angle, and the target straight line is located in the second plane;
[0108] Step 303 : Determine the position information of the target plane of the shell in the preset three-dimensional coordinate system according to the position information corresponding to each second pixel in the target depth image and the position information of the second plane.
[0109] Specifically, the first pixel point is a pixel point corresponding to the top cover area in the target depth image, and the second pixel point is a pixel point corresponding to the shell area in the target depth image.
[0110] In some embodiments, a plane corresponding to the top cover in a preset three-dimensional coordinate system, i.e., a first plane, can be generated based on the position information of the pixel points corresponding to the top cover, thereby obtaining the first plane and the position information of the first plane. The position information of the first plane can be expressed by a plane equation.
[0111] After obtaining the position information of the first plane, the position information of the second plane can be determined by combining the preset angle, the position of the target line and the plane equation of the first plane, wherein the position information of the second plane can be expressed using the plane equation.
[0112] Exemplarily, taking the angle between the top cover and the shell as 90 degrees, after determining the first plane, the normal vector of the first plane can be obtained, and the first plane can be rotated 90 degrees around the target line to obtain the second plane. At this time, the angle between the second plane and the first plane is a preset angle, and the target line is located in the second plane. Specifically, Figure 6 is a schematic diagram of a surface position relationship provided by an embodiment of the present application. As shown in Figure 6, the first plane 601, the second plane 602, and the angle a between the first plane 601 and the second plane 602 are preset angles. The target line is located in the second plane 602, wherein the target line coincides with the second plane 602 at point 604. Among them, the height of the weld can be represented by the distance 605.
[0113] Next, the position of the second plane is adjusted based on the position information of each second pixel point, thereby determining the target plane.
[0114] According to an embodiment of the present application, after determining the first plane corresponding to one of the top covers, combined with the geometric position relationship between the top cover and the shell, for example, the angle between the top cover and the shell, the target plane of the shell in the preset three-dimensional coordinate system is determined. This can effectively reduce the error between the position information of the target plane and the actual position of the shell, and provide a reliable data basis for the accurate measurement of the weld height.
[0115] In some optional embodiments, the position information of the target plane of the shell in the preset three-dimensional coordinate system is determined based on the position information corresponding to each second pixel in the target depth image and the position information of the second plane. Specifically, please refer to the following steps: move the second plane and determine the average distance between the second pixel point and the moved second plane, wherein the average distance is the average value of the second distance between each second pixel point and the moved plane; determine the position information of the target plane based on the average distance between the second pixel point and the moved second plane, wherein the target plane is the moved second plane corresponding to the smallest average distance.
[0116] Specifically, the second distance is the distance between each second pixel point and the moved second plane.
[0117] The second plane is moved once, and the distance between each second pixel and the moved second plane is calculated, i.e., the second distance. Thus, multiple second distances can be obtained for each movement, and the average second distance can be calculated to obtain the average distance between the second pixel and the moved second plane.
[0118] Based on this, in the process of moving the second plane, the minimum average distance is found and the moved second plane corresponding to the minimum average distance is determined as the target plane.
[0119] According to the embodiment of the present application, by referring to the distance between the second pixel point and the second plane, the second plane is moved, which is conducive to accurately finding the target plane with the highest matching degree with the second surface.
[0120] In some embodiments of the present application, after determining the target plane, the height of the weld can be determined based on the position information of each first target pixel in the target depth image in a preset three-dimensional coordinate system and the position information of the target plane. Specifically, the following steps can be referred to: based on the position information of each first target pixel in the preset three-dimensional coordinate system and the position information of the target plane, determine a first distance between each first target pixel and the target plane corresponding to the shell; and determine the height of the weld based on the multiple first distances.
[0121] Specifically, the first target pixel is the pixel corresponding to the weld area in the target depth image. Since the weld protrudes from the welding surface during the flange welding process, the target line is not located in the target plane in the preset three-dimensional coordinate system, but is located on one side of the target plane.
[0122] In some optional embodiments, the first distance between each first target pixel point and the target plane corresponding to the shell is determined based on the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane. For details, please refer to the following steps 401 to 403.
[0123] Step 401, obtaining position information of a weld corresponding to a target straight line in a preset three-dimensional coordinate system in a target depth image;
[0124] Step 402, determining a weld region based on the position information of the target plane and the position information of the target line corresponding to the weld, wherein the weld region and the target line are located on the same side of the target plane;
[0125] Step 403 : determining a first distance between each first target pixel point and the target plane corresponding to the shell according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane.
[0126] Specifically, the position information of the weld corresponding to the target straight line in the preset three-dimensional coordinate system can be expressed by a straight line equation.
[0127] For example, the weld area may be determined as an image area in the target depth image that is located on the same side of the target plane as the target straight line, and the pixel point in the weld area is the first target pixel point.
[0128] Next, a first distance from each first target pixel point to the target plane equation can be determined based on the position information of each first target pixel point. Thereafter, a height of the weld can be determined based on the multiple first distances.
[0129] According to an embodiment of the present application, the target plane is used as the reference plane, and the first distance between each first pixel point corresponding to the weld area and the target plane is used to determine the height of the weld, thereby effectively improving the accuracy of measuring the weld height and reducing detection errors.
[0130] In some optional embodiments, the weld height is determined based on multiple first distances. Specifically, the maximum value of the first distances among the multiple first distances may be determined, and the maximum value of the first distances is determined as the weld height. This can effectively improve the accuracy of determining the weld height and reduce detection errors.
[0131] In some embodiments of the present application, in order to further improve the accuracy of the weld height and reduce the error of the detection result based on the actual weld height, in the process of obtaining the target depth image of the weld in the battery cell, specific reference may be made to steps 501 to 503.
[0132] Step 501: Acquire a first depth image of a weld in a battery cell, wherein the first depth image includes initial pixels and a depth value of each initial pixel;
[0133] Step 502: determining an initial fitting straight line of the weld in the first depth image in a preset three-dimensional coordinate system according to the depth value of each initial pixel point;
[0134] In step 503, based on the positional relationship between the initial fitting straight line and the preset coordinate axes in the preset three-dimensional coordinate system, the first depth image is adjusted to the target position in the preset three-dimensional coordinate system to obtain a target depth image. The target depth image includes a target straight line corresponding to the weld, and the target straight line is parallel to the preset coordinate axes.
[0135] Specifically, the weld can be scanned using a depth camera, thereby obtaining a scanned image of the weld. Alternatively, the scanned image output by the depth camera can be directly obtained and used as the first depth image of the weld.
[0136] In some optional embodiments, the first depth image can be obtained by referring to the following steps: obtaining a second depth image of the depth value of the weld in the battery cell; and performing noise reduction processing on the second depth image according to a preset image noise reduction algorithm to obtain a first depth image of the weld in the battery cell.
[0137] Optionally, the preset image noise reduction algorithm can be, for example, a filtering algorithm such as a Gaussian filtering algorithm. During the execution of the preset image noise reduction algorithm, convolution calculation is performed to suppress image noise and improve image smoothness. In the embodiment of the present application, the specific preset noise reduction algorithm can be selected based on the image noise reduction requirements.
[0138] The first depth image includes initial pixels and a depth value of each initial pixel. By combining the depth value of each initial pixel, an initial fitting line of the weld in the first depth image in a preset three-dimensional coordinate system can be determined.
[0139] Among them, the initial fitting straight line is a preliminary representation of the weld in three-dimensional space, which can conveniently indicate the approximate direction and position of the weld in the first depth image, and can facilitate improving the adjustment accuracy in the subsequent step of adjusting the first depth image, as well as improving the accuracy of the measurement of the weld height.
[0140] Next, the first depth image may be adjusted to a target position in the preset three-dimensional coordinate system according to a positional relationship between the initial fitting straight line and the preset coordinate axes in the preset three-dimensional coordinate system.
[0141] For example, the positional relationship may be an angular relationship between an initial fitting line and a preset coordinate axis. When the first depth image is adjusted to the target position, the line corresponding to the weld in the adjusted first depth image is parallel to the preset coordinate axis. In this case, the angular relationship between the initial fitting line and the preset coordinate axis is 0 degrees.
[0142] Adjust the first depth image to a target position in the preset three-dimensional coordinate system. Optionally, the adjustment method includes but is not limited to rotation, translation, and the like. The target position refers to the position where the straight line corresponding to the weld in the adjusted first depth image is parallel to the preset coordinate axis. For example, the first depth image may be shown in FIG4(a), and the adjusted first depth image, i.e., the target depth image, may be shown in FIG4(b).
[0143] As a specific example, Figure 5 is a three-dimensional schematic diagram of a target depth image provided in an embodiment of the present application. As shown in Figure 5, a preset three-dimensional coordinate system includes mutually perpendicular X-axis, Y-axis, and Z-axis. The preset coordinate axis can be any axis in the three-dimensional coordinate system. The positional relationship between first plane 501, second plane 502, and weld 503 in the target depth image can be shown in Figure 5.
[0144] For example, taking the preset coordinate axis as the Y-axis, the position of the first depth image is adjusted according to the angle between the initial fitting straight line and the Y-axis. After the adjustment, the angle between the second straight line equation and the Y-axis is 0, that is, the straight line corresponding to the weld in the adjusted first depth image is parallel to the Y-axis. At this time, the straight line corresponding to the weld is the target straight line.
[0145] According to an embodiment of the present application, the position of the first depth image is adjusted by combining the positional relationship between the initial fitting straight line and the coordinate axis to obtain a target depth image at the target position, so that the weld position and direction in the target depth image are standardized, providing an accurate data basis for subsequent weld height detection.
[0146] In some embodiments, the first depth image includes a plurality of pixel rows arranged in a direction consistent with the extension direction of the weld. Based on the depth value of each initial pixel, an initial fitting line for the weld in the first depth image in a preset three-dimensional coordinate system is determined. For details, see steps 601 and 602 below.
[0147] Step 601: determining a second target pixel in each pixel row according to the depth value of each initial pixel, wherein the second target pixel is the initial pixel corresponding to the maximum depth value in the pixel row;
[0148] Step 602 : generating an initial fitting straight line of the weld in the first depth image in the preset three-dimensional coordinate system according to the position information of each second target pixel point in the preset three-dimensional coordinate system.
[0149] Specifically, by obtaining the depth value of each initial pixel point, the initial pixel point corresponding to the maximum depth value in each pixel row can be determined. Next, the initial pixel point corresponding to the maximum depth value in each pixel row can be determined as the second target pixel point.
[0150] The first depth image includes multiple pixel rows, and the arrangement direction of the multiple pixel rows is consistent with the extension direction of the weld. The pixels included in each pixel row include pixels corresponding to the weld, and the depth value of the pixel corresponding to the weld is generally greater than the depth values of other points in the pixel row. Optionally, for the first depth image, the coordinates of the pixel corresponding to the maximum depth value in the row can be found, where the initial pixel corresponding to the maximum depth value is the second target pixel.
[0151] Next, fitting can be performed based on the coordinates of each second target pixel point to obtain an initial fitting line, wherein the initial fitting line is the line corresponding to the weld in the preset three-dimensional coordinate system.
[0152] In an embodiment of the present application, the initial fitting straight line is a preliminary representation of the weld in three-dimensional space, which can conveniently indicate the approximate direction and position of the weld in the first depth image, which is beneficial to improving the adjustment accuracy in the subsequent step of adjusting the first depth image, as well as improving the accuracy of the measurement of the weld height.
[0153] In order to more clearly introduce the technical solution of the present application, Figure 7 is a flow chart of another weld height detection method provided in an embodiment of the present application. As shown in Figure 7, the weld height detection method may include steps 701 to 711.
[0154] Step 701: Acquire a first depth image of a weld in a battery cell.
[0155] The first depth image includes the depth value of each initial pixel.
[0156] Step 702 : Determine a second target pixel in each pixel row according to the depth value of each initial pixel in the first depth image.
[0157] The second target pixel is the initial pixel corresponding to the maximum depth value in the pixel row. The first depth image includes a plurality of pixel rows, and the arrangement direction of the plurality of pixel rows is consistent with the extension direction of the weld.
[0158] Step 703 : generating an initial fitting straight line of the weld in the first depth image in the preset three-dimensional coordinate system according to the position information of each second target pixel point in the first depth image in the preset three-dimensional coordinate system.
[0159] Step 704 : According to the positional relationship between the initial fitting line and the preset coordinate axes in the preset three-dimensional coordinate system, the first depth image is adjusted to a target position in the preset three-dimensional coordinate system to obtain a target depth image.
[0160] The target depth image includes a target straight line corresponding to the weld, and the target straight line is parallel to a preset coordinate axis.
[0161] Step 705 , obtaining the preset angle between the top cover and the shell, the position information of the target straight line corresponding to the weld in the target depth image in the preset three-dimensional coordinate system, and the position information of each pixel point in the target depth image in the preset three-dimensional coordinate system.
[0162] Step 706 : Determine the first plane corresponding to the top cover in the preset three-dimensional coordinate system and the position information of the first plane according to the position information corresponding to each first pixel point in the target depth image.
[0163] The first pixel point is a pixel point corresponding to the shell area in the target depth image.
[0164] Step 707: Generate position information of the second plane according to the preset angle and the position information of the first plane.
[0165] The included angle between the first plane and the second plane is a preset angle.
[0166] Step 708: Move the second plane and determine the average distance between the second pixel and the moved second plane.
[0167] The average distance is the average value of the second distances between each second pixel point and the moved plane.
[0168] Step 709 : Determine the position information of the target plane according to the average distance between the second pixel point and the moved second plane.
[0169] The target plane is the second plane after movement corresponding to the minimum average distance.
[0170] Step 710: Obtain position information of the weld corresponding to the target straight line in the preset three-dimensional coordinate system in the target depth image.
[0171] Step 711 , determining the weld area according to the position information of the target plane and the position information of the target straight line corresponding to the weld system.
[0172] The weld area and the target straight line are located on the same side of the target plane, and the first target pixel point is a pixel point corresponding to the weld area in the target depth image.
[0173] Step 712 : Determine a first distance between each first target pixel point and the target plane corresponding to the shell according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane.
[0174] Step 713: Determine the maximum value of the first distance among the multiple first distances, and determine the maximum value of the first distance as the height of the weld.
[0175] In an embodiment of the present application, after obtaining a target depth image of the weld in the battery cell, the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system is determined based on the target depth image. Thus, the position information of the shell in the preset three-dimensional coordinate system can be accurately determined. Next, using the target plane as the reference plane, the height of the weld is determined based on the distance between each pixel point corresponding to the weld area in the target depth image and the target plane. This can effectively improve the accuracy of measuring the weld height and reduce detection errors.
[0176] Based on the same inventive concept, the present application also provides a weld height detection device corresponding to the above-mentioned weld height detection method. This is described in detail with reference to FIG8 . FIG8 is a schematic structural diagram of a weld height detection device provided in an embodiment of the present application. As shown in FIG8 , the weld height detection device 800 may include: an acquisition module 801 and a processing module 802.
[0177] An acquisition module 801 is configured to acquire a target depth image of a weld in a battery cell, wherein the battery cell includes an adjacent top cover and a shell, and the weld is located between the top cover and the shell;
[0178] The processing module 802 is further configured to determine position information of the shell corresponding to a target plane in a preset three-dimensional coordinate system based on the target depth image;
[0179] The processing module 802 is also used to determine the height of the weld based on the position information of each first target pixel point in the target depth image in the preset three-dimensional coordinate system and the position information of the target plane, wherein the first target pixel point is the pixel point corresponding to the weld area in the target depth image.
[0180] In some embodiments, the acquisition module 801 is further configured to acquire a preset angle between the top cover and the shell, position information of the weld in the target depth image corresponding to a target straight line in the preset three-dimensional coordinate system, and position information corresponding to each pixel point in the target depth image in the preset three-dimensional coordinate system;
[0181] The processing module 802 is further configured to determine the position information of the shell corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line and the position information corresponding to each pixel.
[0182] In some embodiments, the processing module 802 is further configured to determine, based on position information corresponding to each first pixel in the target depth image, a first plane corresponding to the top cover in the preset three-dimensional coordinate system and position information of the first plane, wherein the first pixel point is a pixel point corresponding to the shell area in the target depth image;
[0183] The processing module 802 is further configured to generate position information of a second plane according to the preset angle and the position information of the first plane, wherein the angle between the first plane and the second plane is the preset angle;
[0184] The processing module 802 is further configured to determine the position information of the target plane of the shell in the preset three-dimensional coordinate system according to the position information corresponding to each second pixel in the target depth image and the position information of the second plane.
[0185] In some embodiments, the processing module 802 is further configured to move the second plane and determine an average distance between the second pixel point and the moved second plane, wherein the average distance is an average value of the second distances between each second pixel point and the moved plane;
[0186] The processing module 802 is further configured to determine position information of a target plane according to an average distance between the second pixel point and the moved second plane, wherein the target plane is the moved second plane corresponding to the minimum average distance.
[0187] In some embodiments, the processing module 802 is further configured to determine a first distance between each first target pixel and the target plane corresponding to the shell based on the position information of each first target pixel in the preset three-dimensional coordinate system and the position information of the target plane;
[0188] The processing module 802 is further configured to determine the height of the weld according to the plurality of first distances.
[0189] In some embodiments, the acquisition module 801 is further configured to acquire position information of the weld in the target depth image corresponding to the target straight line in the preset three-dimensional coordinate system;
[0190] The processing module 802 is further configured to determine the weld region based on the position information of the target plane and the position information of the target line corresponding to the weld, wherein the weld region and the target line are located on the same side of the target plane;
[0191] The processing module 802 is further configured to determine a first distance between each first target pixel point and the target plane corresponding to the shell according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane.
[0192] In some embodiments, the processing module 802 is further configured to determine a maximum value of the first distances among the multiple first distances, and determine the maximum value of the first distances as the height of the weld.
[0193] In some embodiments, the acquisition module 801 is further configured to acquire a first depth image of the weld in the battery cell, wherein the first depth image includes a depth value of each initial pixel point;
[0194] The processing module 802 is further configured to determine an initial fitting straight line of the weld in the first depth image in the preset three-dimensional coordinate system according to the depth value of each initial pixel point;
[0195] The processing module 802 is also used to adjust the first depth image to the target position in the preset three-dimensional coordinate system according to the positional relationship between the initial fitting straight line and the preset coordinate axis in the preset three-dimensional coordinate system, so as to obtain the target depth image, wherein the target depth image includes the target straight line corresponding to the weld, and the target straight line is parallel to the preset coordinate axis.
[0196] In some embodiments, the first depth image includes a plurality of pixel rows, and an arrangement direction of the plurality of pixel rows is consistent with an extension direction of the weld;
[0197] The processing module 802 is further configured to determine a second target pixel in each pixel row according to the depth value of each initial pixel, wherein the second target pixel is the initial pixel corresponding to the maximum depth value in the pixel row;
[0198] The processing module 802 is further configured to generate an initial fitting straight line of the weld in the first depth image in the preset three-dimensional coordinate system according to the position information of each second target pixel point in the preset three-dimensional coordinate system.
[0199] In some embodiments, the acquisition module 801 is further configured to acquire a second depth image of a depth value of a weld in the battery cell;
[0200] The processing module 802 is further configured to perform noise reduction processing on the second depth image according to a preset image noise reduction algorithm to obtain a first depth image of the weld in the battery cell.
[0201] It can be understood that the weld height detection device of the embodiment of the present application can correspond to the execution entity of the weld height detection method provided in the embodiment of the present application. The specific details of the operation and / or function of each module / unit of the weld height detection device can be found in the description of the corresponding parts of the weld height detection method in the above-mentioned embodiment of the present application. For the sake of brevity, they will not be repeated here.
[0202] Figure 9 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As shown in Figure 9, the device may include a processor 901 and a memory 902 storing computer program instructions.
[0203] Specifically, the processor 901 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0204] The memory 902 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In one example, the memory 902 may include removable or non-removable (or fixed) media, or the memory 902 may be a non-volatile solid-state memory. The memory 902 may be internal or external to the electronic device.
[0205] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0206] The processor 901 implements the method described in the embodiment of the present application by reading and executing the computer program instructions stored in the memory 902, and achieves the corresponding technical effect achieved by executing the method in the embodiment of the present application. For the sake of brevity, it will not be repeated here.
[0207] In one example, the electronic device may further include a communication interface 903 and a bus 904. As shown in FIG9, the processor 901, the memory 902, and the communication interface 903 are connected via the bus 904 and communicate with each other.
[0208] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0209] The bus 904 includes hardware, software, or both, coupling the components of the online information flow metering device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 904 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0210] The electronic device can execute the weld height detection method in the embodiment of the present application, thereby achieving the corresponding technical effects of the weld height detection method described in the embodiment of the present application.
[0211] In addition, in combination with the weld height detection method in the above embodiment, the embodiment of the present application may provide a readable storage medium for implementation. The readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the weld height detection methods in the above embodiment is implemented. Examples of readable storage media may be non-transitory machine-readable media, such as electronic circuits, semiconductor memory devices, read-only memories (ROMs), floppy disks, compact disc read-only memories (CD-ROMs), optical discs, hard disks, etc.
[0212] It should be understood that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of simplicity, a detailed description of the known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the embodiments of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0213] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memories (ROMs), flash memories, erasable read-only memories (EROMs), floppy disks, compact disc read-only memories (CD-ROMs), optical discs, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0214] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0215] An embodiment of the present application also provides a computer-readable storage medium having computer program instructions stored thereon; when the computer program instructions are executed by a processor, the weld height detection method provided in an embodiment of the present application is implemented.
[0216] In addition, in conjunction with the weld height detection method, apparatus, and readable storage medium of the above embodiments, embodiments of the present application may provide a computer program product for implementation. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device performs any of the weld height detection methods of the above embodiments.
[0217] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0218] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for detecting the height of a weld seam, the method comprising: Obtaining a target depth image of the weld seam in a battery cell, wherein the battery cell includes an adjacent top cover and a housing, and the weld seam is located between the top cover and the housing; Determining position information of the housing corresponding to a target plane in a preset three-dimensional coordinate system according to the target depth image; Determining the height of the weld seam according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane in the target depth image, wherein the first target pixel point is a pixel point corresponding to the weld seam area in the target depth image.
2. The method according to claim 1, wherein The determining the position information of the housing corresponding to the target plane in the preset three-dimensional coordinate system according to the target depth image includes: Obtaining a preset angle between the top cover and the housing, position information of a target line corresponding to the weld seam in the preset three-dimensional coordinate system in the target depth image, and position information of each pixel point in the target depth image corresponding to the preset three-dimensional coordinate system; Determining the position information of the housing corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line, and the position information of each pixel point.
3. The method according to claim 2, wherein The determining the position information of the housing corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line, and the position information of each pixel point includes: Determining a first plane corresponding to the top cover in the preset three-dimensional coordinate system and position information of the first plane according to the position information of each first pixel point in the target depth image, wherein the first pixel point is a pixel point corresponding to the top cover area in the target depth image; Generating position information of a second plane according to the preset angle and the position information of the first plane, an included angle between the first plane and the second plane being the preset angle, and the target line being located in the second plane; Determining the position information of the target plane of the housing in the preset three-dimensional coordinate system according to the position information of each second pixel point in the target depth image and the position information of the second plane.
4. The method according to claim 3, wherein The determining the position information of the target plane of the housing in the preset three-dimensional coordinate system according to the position information of each second pixel point in the target depth image and the position information of the second plane includes: Moving the second plane and determining an average distance between the second pixel point and the moved second plane, the average distance being an average value of second distances between each second pixel point and the moved plane; Determining the position information of the target plane according to the average distance between the second pixel point and the moved second plane, the target plane being the moved second plane corresponding to the minimum average distance.
5. The method according to claim 1, wherein The determining the height of the weld seam according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane includes: Determine the first distance between each of the first target pixel points and the target plane corresponding to the housing according to the position information of each of the first target pixel points in the preset three-dimensional coordinate system and the position information of the target plane; Determine the height of the weld seam according to the plurality of first distances.
6. The method according to claim 5, wherein The step of determining the first distance between each of the first target pixel points and the target plane corresponding to the housing according to the position information of each of the first target pixel points in the preset three-dimensional coordinate system and the position information of the target plane includes: Obtain the position information of the target straight line corresponding to the weld seam in the preset three-dimensional coordinate system in the target depth image; Determine the weld seam region according to the position information of the target plane and the position information of the target straight line corresponding to the weld seam system, and the weld seam region and the target straight line are on the same side of the target plane; Determine the first distance between each of the first target pixel points and the target plane corresponding to the housing according to the position information of each of the first target pixel points in the preset three-dimensional coordinate system and the position information of the target plane.
7. The method according to claim 6, wherein, The step of determining the height of the weld seam according to the plurality of first distances includes: Determine the maximum value of the first distances among the plurality of first distances, and determine the maximum value of the first distances as the height of the weld seam.
8. The method according to claim 1, wherein The step of obtaining the target depth image of the weld seam in the battery cell includes: Obtain the first depth image of the weld seam in the battery cell, where the first depth image includes initial pixel points and the depth value of each initial pixel point; Determine the initial fitting straight line of the weld seam in the preset three-dimensional coordinate system in the first depth image according to the depth value of each initial pixel point; According to the positional relationship between the initial fitting straight line and the preset coordinate axes in the preset three-dimensional coordinate system, adjust the first depth image to a target position in the preset three-dimensional coordinate system to obtain the target depth image, and the target depth image includes the target straight line corresponding to the weld seam, and the target straight line is parallel to the preset coordinate axes.
9. The method according to claim 8, wherein The first depth image includes a plurality of pixel rows, and the arrangement direction of the plurality of pixel rows is consistent with the extending direction of the weld seam; The step of determining the initial fitting straight line of the weld seam in the preset three-dimensional coordinate system in the first depth image according to the depth value of each initial pixel point includes: Determine the second target pixel points in each of the pixel rows according to the depth value of each initial pixel point, and the second target pixel points are the initial pixel points corresponding to the maximum depth value in the pixel rows; Generate the initial fitting straight line of the weld seam in the preset three-dimensional coordinate system in the first depth image according to the position information of each of the second target pixel points in the preset three-dimensional coordinate system.
10. The method according to claim 8, wherein, The step of obtaining the first depth image of the weld seam in the battery cell includes: Obtain the second depth image of the weld seam in the battery cell, and the second depth image is obtained by scanning the depth value of the weld seam; Perform noise reduction processing on the second depth image according to a preset image noise reduction algorithm to obtain the first depth image of the weld seam in the battery cell.
11. A detection device for the height of a weld seam, the device comprising: An acquisition module, configured to acquire a target depth image of a weld seam in a battery cell, wherein the battery cell includes an adjacent top cover and a housing, and the weld seam is located between the top cover and the housing; A processing module, configured to determine position information of the housing corresponding to a target plane in a preset three-dimensional coordinate system according to the target depth image; The processing module is further configured to determine the height of the weld seam according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane in the target depth image, wherein the first target pixel point is a pixel point corresponding to the weld seam area in the target depth image.
12. The apparatus according to claim 11, wherein, The acquisition module is further configured to: Acquire a preset angle between the top cover and the housing, position information of a target line corresponding to the weld seam in the preset three-dimensional coordinate system in the target depth image, and position information of each pixel point in the target depth image corresponding to the preset three-dimensional coordinate system; The processing module is further configured to: Determine the position information of the housing corresponding to the target plane in the preset three-dimensional coordinate system according to the preset angle, the position information of the target line, and the position information corresponding to each pixel point.
13. The apparatus according to claim 12, wherein, The processing module is further configured to: Determine the position information of a first plane corresponding to the top cover in the preset three-dimensional coordinate system and the position information of the first plane according to the position information corresponding to each first pixel point in the target depth image, wherein the first pixel point is a pixel point corresponding to the top cover area in the target depth image; Generate position information of a second plane according to the preset angle and the position information of the first plane, an included angle between the first plane and the second plane is the preset angle, and the target line is located in the second plane; Determine the position information of the target plane of the housing in the preset three-dimensional coordinate system according to the position information corresponding to each second pixel point in the target depth image and the position information of the second plane.
14. The apparatus according to claim 13, wherein, The processing module is further configured to: Move the second plane and determine an average distance between the second pixel point and the moved second plane, where the average distance is an average value of second distances between each second pixel point and the moved plane; Determine the position information of the target plane according to the average distance between the second pixel point and the moved second plane, where the target plane is the moved second plane corresponding to the minimum average distance.
15. The device according to claim 11, wherein, The processing module is further configured to: Determine a first distance between each first target pixel point and the target plane corresponding to the housing according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane; Determine the height of the weld seam according to the plurality of first distances.
16. The device according to claim 15, wherein The processing module is further configured to: Acquire the position information of the target line corresponding to the weld seam in the preset three-dimensional coordinate system in the target depth image; Determine the weld region according to the position information of the target plane and the position information of the target line corresponding to the weld system, and the weld region and the target line are on the same side of the target plane; Determine the first distance between each first target pixel point and the target plane corresponding to the housing according to the position information of each first target pixel point in the preset three-dimensional coordinate system and the position information of the target plane.
17. The apparatus according to claim 16, wherein, The processing module is further configured to: Determine the maximum value of the first distances among the multiple first distances, and determine the maximum value of the first distances as the height of the weld.
18. The device according to claim 11, wherein The acquisition module is further configured to: Acquire a first depth image of the weld in the battery cell, where the first depth image includes initial pixel points and depth values of each initial pixel point; The processing module is further configured to: Determine an initial fitting line of the weld in the first depth image in the preset three-dimensional coordinate system according to the depth value of each initial pixel point; Adjust the first depth image to a target position in the preset three-dimensional coordinate system according to the positional relationship between the initial fitting line and a preset coordinate axis in the preset three-dimensional coordinate system to obtain the target depth image, and the target depth image includes a target line corresponding to the weld, The target line is parallel to the preset coordinate axis.
19. The device according to claim 18, wherein The first depth image includes a plurality of pixel rows, and the arrangement direction of the plurality of pixel rows is consistent with the extension direction of the weld; The processing module is further configured to: Determine a second target pixel point in each pixel row according to the depth value of each initial pixel point, and the second target pixel point is the initial pixel point corresponding to the maximum depth value in the pixel row; Generate an initial fitting line of the weld in the first depth image in the preset three-dimensional coordinate system according to the position information of each second target pixel point in the preset three-dimensional coordinate system.
20. The apparatus according to claim 18, wherein, The acquisition module is further configured to: Acquire a second depth image of the weld in the battery cell, and the second depth image is obtained by scanning the depth value of the weld; The processing module is further configured to: Perform noise reduction processing on the second depth image according to a preset image noise reduction algorithm to obtain the first depth image of the weld in the battery cell.
21. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the method for detecting the height of a weld according to any one of claims 1-10.
22. A readable storage medium, characterized in that, Computer program instructions are stored on the readable storage medium, and when the computer program instructions are executed by the processor, the method for detecting the height of a weld according to any one of claims 1-10 is implemented.
Citation Information
Patent Citations
Weld joint detection method and device
CN114354618A
Labeling positioning method based on YOLO target detection and multi-view sampling
CN115690391A
Determination method and device for lag distance and double-face double-arc welding control method
CN116140752A
Welding defect detection method and device and storage medium
CN117252883A
Information processing apparatus, information processing method, and non-transitory computer readable medium
US20230260159A1
Cited By
Welding seam process combination method and device, electronic equipment and storage medium
CN120885868A
Battery cell welding control method and welding system
CN121733118A