A 3D vision-based line measurement method
Through the etching measurement method based on 3D vision, the accuracy and efficiency of etching line measurement in the lithium battery pole plate laser etching equipment is solved, and efficient and accurate detection of etching lines is achieved.
Patent Information
- Application Number
- CN202510805440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-17
AI Technical Summary
In lithium battery pole laser liner equipment, how to accurately and efficiently measure the line width and line depth of the etching line to meet the real-time requirements of industrial scenarios.
Using a 3D vision-based trunking measurement method, data is collected and outliers are filled with outliers, line width compensation angle and measurement area rectangle inclination are calculated, rectangles are drawn to locate edge points, combined into fine positioning edge points, 3D profile of trunking is obtained, and the depth and width of trunking are calculated.
It realizes efficient and accurate detection of the line width and line depth of the etching line in industrial testing scenarios, meeting the requirements of real-time and accuracy.
Smart Images

Figure CN120339367B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data processing, and in particular relates to a 3D vision-based line measurement method. Background Art
[0002] Lithium-ion battery electrode laser scribing equipment requires etching the coating on the cell electrode area. Based on the cell process requirements, the equipment continuously unwinds and rewinds the electrode. After correction and positioning, it rapidly burns, vaporizes, expands, and peels off designated areas of active material on both sides of the designated coating area, removing the coating within the specified range and depth, while ensuring that the etching quality and cell performance requirements are met.
[0003] The width and depth of the etched grooves directly affect the product yield, necessitating measurement of both line width and depth. Since both the width and depth of the etched lines are at the micron level, accurate and efficient measurement to meet the real-time requirements of industrial scenarios presents a significant challenge. The 3D vision-based line measurement method provided by this invention effectively addresses this challenge. Summary of the Invention
[0004] The problem to be solved by the present invention is to provide a method for accurately and efficiently measuring the line width and line depth of an etched line.
[0005] The present invention discloses a 3D vision-based line measurement method, and its specific technical solution is as follows: A 3D vision-based line measurement method comprises the following steps:
[0006] Step S1: The 3D camera collects data and refills the abnormal values in the output depth map with normal values;
[0007] Step S2: Draw a straight line along the scribed line direction on the depth map, and calculate the line width compensation angle and the rectangular inclination angle of the measurement area;
[0008] Step S3: Draw a flat rectangle on the depth map to roughly locate the edge points of the scribed line. At least two roughly located edge points should be detected on each scribed line for subsequent fine edge point location.
[0009] Step S4: merging multiple coarse positioning edge points on the same scribed line into one fine positioning edge point according to the set maximum point spacing;
[0010] Step S5: setting a rectangular measurement area according to the position of the precisely located edge point, and obtaining the 3D cross-sectional profile of the scribed line within the rectangular measurement area;
[0011] Step S6: Calculate the depth and width of the scribed line groove according to each 3D cross-sectional profile of the scribed line groove.
[0012] Furthermore, the step S1 specifically includes:
[0013] Step S1.1: The 3D camera collects data and obtains a depth map;
[0014] Step S1.2: Refill the outliers in the depth map with normal values for more user-friendly visualization;
[0015] When filling abnormal values, the automatic filling mode or manual filling mode is used. When automatic filling is used, the average depth value of the valid value area in the depth map is first calculated. , and fill the average value into all outlier areas. The average value is calculated as follows:
[0016] ;
[0017] Where R is the image area where the average value needs to be calculated, F is the pixel area of area R, and p is the pixel point on area R. is the grayscale value of point p.
[0018] Furthermore, the step S2 specifically includes:
[0019] After drawing a straight line on the depth map, you can get two points on the line. These two points can be used to calculate the line width compensation angle and the inclination angle of the measurement area rectangle. The calculation method is as follows:
[0020] ;
[0021] ;
[0022] in is the line width compensation angle, is the rectangular inclination of the measurement area, and Respectively represent the pixel accuracy of the image in the horizontal and vertical directions, 、 They represent the pixel coordinates of the starting point and ending point when drawing a straight line.
[0023] Furthermore, the step S3 specifically includes:
[0024] Step S3.1: Draw a rectangular ROI on the depth map to find the rough positioning edge points, which is used to determine the measurement area;
[0025] Step S3.2: Set an appropriate smoothing coefficient and minimum edge threshold to roughly locate at least two edge points on each scribed line, namely the transition from light to dark and from dark to light, for subsequent fine positioning of edge points.
[0026] Furthermore, the step S5 specifically includes:
[0027] Step S5.1: Set the half-width and half-height of the rectangular measurement area, the height of the small measurement rectangle on each scribed line, the number of sections to be measured on each scribed line, and the Gaussian smoothing coefficient of the 3D profile;
[0028] Step S5.2: Determine the area where the 3D profile is to be acquired based on the calculated precise positioning edge points and the rectangular inclination parameters of the measurement area. Use the corresponding interpolation method on the depth map to obtain the 3D profile of the scribed line. The acquired one-dimensional 3D profile needs to be pre-processed by Gaussian smoothing. The calculation method is as follows:
[0029] ;
[0030] in is the Gaussian smoothing coefficient, is the horizontal axis, is the Gaussian filter kernel coefficient.
[0031] Furthermore, the step S6 specifically includes:
[0032] Step S6.1: setting a suitable offset and minimum search range for the wire slot;
[0033] Step S6.2: Measuring the 3D cross-sectional profile of each scribed line according to the calculated line width compensation angle to obtain the line width and line depth of each 3D cross-sectional profile;
[0034] Among them, when calculating the line depth, it is necessary to obtain the lowest point of the profile and calculate the first-order derivative of the smoothed 3D profile. For discrete one-dimensional profile points, the calculation method is as follows:
[0035] ;
[0036] in 、 Represents the position The pixel values of the next and previous pixels, Represent the current position, the next position, and the previous position respectively.
[0037] The present invention collects data through a 3D camera and refills abnormal values in the depth map output by the 3D camera with normal values; draws a straight line along the direction of the scribed line on the filled depth map, calculates the line width compensation angle and the rectangular inclination of the measurement area; then draws a flat regular rectangle for coarsely locating the edge points of the scribed line, and at least two edge points should be detected on each scribed line for subsequent fine positioning of edge points; based on the set maximum point spacing, multiple coarse positioning edge points on the same scribed line are merged into one fine positioning edge point; based on the position of the fine positioning edge point and the set rectangular measurement area, the 3D cross-sectional profile of the scribed line is obtained; based on each 3D cross-sectional profile of the scribed line groove, the depth and width of the scribed line are calculated. Through the above steps, the present invention can efficiently and accurately detect the line width and line depth of the etched line, and has practical application value in industrial detection scenarios that require real-time performance and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Schematic diagram of the process of the present invention;
[0039] Figure 2 Schematic diagram of a depth map captured by a 3D camera and a redrawn depth map in an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of a straight line drawn when using an angle calculation tool in an embodiment of the present invention;
[0041] Figure 4 Schematic diagram of a rectangular ROI drawn when roughly locating edge points in an embodiment of the present invention;
[0042] Figure 5 for Figure 4 Enlarged schematic diagram at point C in the middle;
[0043] Figure 6 Schematic diagram of edge point positions calculated for precise edge point positioning according to an embodiment of the present invention;
[0044] Figure 7 Schematic diagram of a rectangular measurement area centered on a precisely positioned edge point in an embodiment of the present invention;
[0045] Figure 8 3D cross-sectional profile schematic diagram obtained in an embodiment of the present invention;
[0046] Figure 9 Schematic diagram of points and straight lines used to calculate line width and line depth in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0048] Figure 1The process diagram of the method of the present invention comprises the following steps:
[0049] Step S1: The 3D camera collects data and refills the abnormal values in the output depth map with normal values;
[0050] Step S1.1: The 3D camera collects data and obtains a depth map;
[0051] Step S1.2: Refill the outliers in the depth map with normal values for more user-friendly visualization.
[0052] There are two modes for filling abnormal values: automatic filling or manual filling. When automatic filling is used, the average depth value of the valid value area in the depth map is calculated first. , and fill the average value into all outlier areas. The average value is calculated as follows:
[0053] ;
[0054] Where R is the image area where the average value needs to be calculated, F is the pixel area of area R, and p is the pixel point on area R. is the grayscale value of point p.
[0055] Step S2: Draw a straight line along the scribed line direction on the depth map, and calculate the line width compensation angle and the rectangular inclination angle of the measurement area;
[0056] After drawing a straight line on the depth map, you can get two points on the line. These two points can be used to calculate the line width compensation angle and the inclination angle of the measurement area rectangle. The calculation method is as follows:
[0057] ;
[0058] ;
[0059] in is the line width compensation angle, is the rectangular inclination of the measurement area, and Respectively represent the pixel accuracy of the image in the horizontal and vertical directions, 、 They represent the pixel coordinates of the starting point and ending point when drawing a straight line.
[0060] Step S3: Draw a flat rectangle on the depth map to roughly locate the edge points of the scribed line. At least two roughly located edge points should be detected on each scribed line for subsequent fine edge point location.
[0061] Step S3.1: Draw a rectangular ROI on the depth map to find the rough positioning edge points, which is used to determine the measurement area;
[0062] Step S3.2: Set an appropriate smoothing coefficient and minimum edge threshold to roughly locate at least two edge points on each scribed line, namely the transition from light to dark and from dark to light, for subsequent fine positioning of edge points.
[0063] Step S4: Based on the set maximum point spacing, multiple coarse positioning edge points on the same scribed line are merged into one fine positioning edge point.
[0064] Step S5: setting a rectangular measurement area according to the position of the precisely located edge point, and obtaining the 3D cross-sectional profile of the scribed line within the rectangular measurement area;
[0065] Step S5.1: Set the half-width and half-height of the rectangular measurement area, the height of the small measurement rectangle on each scribed line, the number of sections to be measured on each scribed line, and the Gaussian smoothing coefficient of the 3D profile;
[0066] Step S5.2: Determine the area where the 3D profile needs to be acquired based on the calculated precise positioning edge points and the rectangular inclination parameters of the measurement area, and use the corresponding interpolation method on the depth map to obtain the 3D profile of the scribed line. The acquired one-dimensional 3D profile needs to be pre-processed by Gaussian smoothing, and the calculation method is as follows:
[0067] ;
[0068] in is the Gaussian smoothing coefficient, is the horizontal axis, is the Gaussian filter kernel coefficient.
[0069] Step S6: Calculating the depth and width of the scribed line groove according to each 3D cross-sectional profile of the scribed line groove;
[0070] Step S6.1: setting a suitable offset and minimum search range for the wire slot;
[0071] Step S6.2: Based on the calculated line width compensation angle, the 3D cross-sectional profile of each scribed line is measured to obtain the line width and line depth of each 3D cross-sectional profile.
[0072] Among them, when calculating the line depth, it is necessary to obtain the lowest point of the profile and calculate the first-order derivative of the smoothed 3D profile. For discrete one-dimensional profile points, the calculation method is as follows:
[0073] ;
[0074] in 、 Represents the position The pixel values of the next and previous pixels, Represent the current position, the next position, and the previous position respectively.
[0075] The following uses an embodiment as an example to describe the specific calculation process of the above 6 steps in detail:
[0076] The industrial camera is controlled by software to collect depth maps. Since the depth and width of the measured cable trough are small, the industrial 3D camera used in this embodiment is LMI's 3D intelligent line confocal sensor, model Gocator 5504. The camera has a repeatability accuracy of 0.05μm in the Z direction, which can meet the high-precision measurement requirements of the cable trough.
[0077] Since the pixel values of invalid points in the depth map often deviate greatly from the average depth value of the valid area of the image, the line grooves captured in the image appear unclear, or even the entire image appears to have the same grayscale value, making the line grooves invisible. Figure 2 As shown in (a), the depth value of a small number of invalid points in the depth map is 0, which is much lower than the average depth value of other valid areas. In order to facilitate reasonable display and debugging, the abnormal values in the depth map can be filled with normal values. The effect after filling is as follows Figure 2 As shown in (b), it can be seen that the wire groove in the depth map can be seen more clearly at this time.
[0078] When filling invalid points, you can use automatic filling or manual filling. When automatic filling is used, the average depth value of the valid value area in the depth map will be calculated first. , and fill the average value into all outlier areas. The average value is calculated as follows:
[0079] ;
[0080] Where R is the image area where the average value needs to be calculated, F is the pixel area of area R, and p is the pixel point on area R. is the grayscale value of point p.
[0081] When manual filling is used, the outlier area will be filled with the manually set value.
[0082] After the depth map is filled, the subsequent calculations are based on the filled depth map, such as Figure 2 As shown in (b).
[0083] Draw a straight line roughly parallel to the direction of the engraving on the filled depth map, such as Figure 3 As shown, after drawing a straight line, you can get the starting point A and the end point B on the straight line. The coordinates of point A are 、Point B coordinates , the line width compensation angle can be calculated using points A and B and the rectangular inclination of the measurement area , calculated as follows:
[0084] ;
[0085] ;
[0086] in Indicates the line width compensation angle, Indicates the rectangular inclination of the measurement area. In the image, it is the angle between the drawn straight line and the horizontal direction. and Respectively represent the pixel accuracy of the image in the horizontal and vertical directions, 、 They represent the pixel coordinates of the starting point and ending point when drawing a straight line.
[0087] After completing the calculation of the line width compensation angle and the rectangular inclination of the measurement area, draw a rectangular ROI on the depth map to find the edge point to determine the measurement area, such as Figure 4 As shown in . The rectangular ROI has the characteristics of small height and large width. By performing one-dimensional measurement in the measurement area determined by it, a set of one-dimensional edge points can be obtained. These points are the rough positioning edge points of the scribed line, which are used to roughly determine the position of the scribed line.
[0088] When performing one-dimensional measurement of coarse edge points, the following two parameters need to be set:
[0089] Smoothing coefficient: Gaussian smoothing coefficient Sigma when determining rough edge points in one-dimensional measurement.
[0090] Minimum edge threshold: used to filter edge points. Points above this threshold will be selected as coarse positioning edge points.
[0091] By setting appropriate smoothing coefficients and minimum edge thresholds, each line can be roughly located to at least one pair of edge points, which are transitions from light to dark and from dark to light, respectively. Figure 4 As shown in , three edge points are measured for each of the two scribed lines. Figure 5 for Figure 4 The enlarged image of point C in the middle, Figure 5 The three rough positioning edge points measured on the right side of the two lines are shown in the figure. 、 and Zoomed in details.
[0092] After obtaining the coarsely positioned edge points, these points need to be provided to the subsequent fine positioning tool in order to obtain fine positioning edge points. In the fine positioning tool, it is necessary to set an appropriate maximum point spacing. This parameter is the distance threshold for judging whether different edge points belong to the same engraved line. It is used to merge multiple coarsely positioned edge points on the same engraved line into one fine positioning edge point. If the distance between adjacent coarse positioning edge points is greater than the set maximum point spacing, they are regarded as edge points on different engraved lines, otherwise they are regarded as edge points on the same engraved line. Figure 6 As shown in the figure, there are two fine positioning edge points on two scribed lines. It can be seen from the figure that the three rough positioning edge points extracted on each scribed line have been merged into one. For each scribed line, the N edge point coordinates obtained by rough extraction are , , …, , the following calculation method is used to merge into one precise positioning edge point :
[0093] ;
[0094] ;
[0095] in Represents the precise positioning edge points The row and column coordinates of 、 Respectively represent the row and column coordinates of the i-th coarse positioning edge point.
[0096] After completing the above calculations, enter the Get Profile tool, which requires setting the following parameters:
[0097] Detection area half width: half width of the rectangular measurement area.
[0098] Detection area half height: half height of the rectangular measurement area.
[0099] Measuring rectangle height: The height of the small measuring rectangle on each scale line.
[0100] Smoothing coefficient: Gaussian smoothing coefficient of 3D profile.
[0101] Number of single-line profiles: Enter the number of profiles to be measured on each line.
[0102] After completing these 5 parameter settings, the edge points are precisely positioned according to the calculated , rectangular inclination of measurement area , the corresponding interpolation method can be used on the depth map to obtain the 3D profile of the engraved line. Figure 7 As shown in the figure, the two large rectangles are the rectangular measurement areas for obtaining the profile, and the center point of the rectangle is the precise positioning edge point obtained in the previous step. The inclination angle of the rectangle is the inclination angle of the measurement area rectangle calculated in the previous step. , 10 section lines are calculated in each rectangular area in the figure. Figure 8 As shown in , this is a 3D cross-sectional profile. The obtained one-dimensional 3D cross-sectional profile needs to be pre-processed by Gaussian smoothing. The calculation method is as follows:
[0103] ;
[0104] in is the Gaussian smoothing coefficient, is the horizontal axis, and its value range is Decide, is the Gaussian filter kernel coefficient.
[0105] After obtaining the smoothed 3D profile of the scribed line, the final line width and line depth measurement can be performed. The parameters that need to be set are as follows:
[0106] Offset: After the 3D profile is fitted into a straight line, the offset of the straight line is translated in the y direction. The two intersection points of the translated straight line and the profile of the profile are 、 The distance between the straight line before translation and the lowest point in the groove is the line width. The y-direction distance is the line depth, such as Figure 9 As shown, the left and right intersection points of the translation line at the edge of the wire duct and the 3D cross-section profile 、 The spacing is the line width, the lowest point The y-direction distance to the straight line before translation is the line depth, which is the measurement in the image. and The y-distance between points. Using the offset line to calculate line width can effectively improve the stability of line width calculation.
[0107] Wire trough minimum value search range: used to expand the search range of the minimum value point in the wire trough. Usually, this parameter can be set to 5%.
[0108] After setting the above two parameters, the compensation angle is calculated based on the calculated line width. The 3D profile of each scribed line can be measured to obtain the line width and line depth of each 3D profile, thus completing the width and depth calculation of the scribed line. Among them, when calculating the line depth, it is necessary to obtain the lowest point of the profile and calculate the first-order derivative of the smoothed 3D profile. For discrete one-dimensional profile points, the calculation method is as follows:
[0109] ;
[0110] in 、 Represents the position The pixel values of the next and previous pixels, Represent the current position, the next position, and the previous position respectively.
[0111] The description of the above embodiment only represents one implementation means of the present technology, and implementation means derived from or used in combination with the present technology method are still within the scope of protection of the present invention.
Claims
1. A 3D vision-based line measurement method, characterized in that: The following steps are involved: Step S1: The 3D camera collects data and refills the abnormal values in the output depth map with normal values; Step S2: Draw a straight line along the scribed line direction on the depth map, and calculate the line width compensation angle and the rectangular inclination angle of the measurement area; The step S2 specifically includes: After drawing a straight line on the depth map, you can get two points on the line. These two points can be used to calculate the line width compensation angle and the inclination angle of the measurement area rectangle. The calculation method is as follows: ; ; in is the line width compensation angle, is the rectangular inclination of the measurement area, and Respectively represent the pixel accuracy of the image in the horizontal and vertical directions, 、 Respectively represent the pixel coordinates of the starting point and the ending point when drawing a straight line; Step S3: Draw a flat rectangle on the depth map to roughly locate the edge points of the scribed line. At least two roughly located edge points should be detected on each scribed line for subsequent fine edge point location. Step S4: merging multiple coarse positioning edge points on the same scribed line into one fine positioning edge point according to the set maximum point spacing; Step S5: setting a rectangular measurement area according to the position of the precisely located edge point, and obtaining the 3D cross-sectional profile of the scribed line within the rectangular measurement area; The step S5 specifically includes: Step S5.1: Set the half-width and half-height of the rectangular measurement area, the height of the small measurement rectangle on each scribed line, the number of sections to be measured on each scribed line, and the Gaussian smoothing coefficient of the 3D profile; Step S5.2: Determine the area where the 3D profile is to be acquired based on the calculated precise positioning edge points and the rectangular inclination parameters of the measurement area. Use the corresponding interpolation method on the depth map to obtain the 3D profile of the scribed line. The acquired one-dimensional 3D profile needs to be pre-processed by Gaussian smoothing. The calculation method is as follows: ; in is the Gaussian smoothing coefficient, is the horizontal axis, is the Gaussian filter kernel coefficient; Step S6: Calculate the depth and width of the scribed line groove according to each 3D cross-sectional profile of the scribed line groove.
2. The 3D vision-based line measurement method according to claim 1, characterized in that: The step S1 specifically includes: Step S1.1: The 3D camera collects data and obtains a depth map; Step S1.2: Refill the outliers in the depth map with normal values for more user-friendly visualization; When filling abnormal values, the automatic filling mode or manual filling mode is used. When automatic filling is used, the average depth value of the valid value area in the depth map is first calculated. , and fill the average value into all outlier areas. The average value is calculated as follows: ; Where R is the image area where the average value needs to be calculated, F is the pixel area of area R, and p is the pixel point on area R. is the grayscale value of point p.
3. The 3D vision-based line measurement method according to claim 1, wherein: The step S3 specifically includes: Step S3.1: Draw a rectangular ROI on the depth map to find the rough positioning edge points, which is used to determine the measurement area; Step S3.2: Set an appropriate smoothing coefficient and minimum edge threshold to roughly locate at least two edge points on each scribed line, namely the transition from light to dark and from dark to light, for subsequent fine positioning of edge points.
4. The 3D vision-based line measurement method according to claim 1, characterized in that: The step S6 specifically includes: Step S6.1: setting a suitable offset and minimum search range for the wire slot; Step S6.2: Measuring the 3D cross-sectional profile of each scribed line according to the calculated line width compensation angle to obtain the line width and line depth of each 3D cross-sectional profile; Among them, when calculating the line depth, it is necessary to obtain the lowest point of the profile and calculate the first-order derivative of the smoothed 3D profile. For discrete one-dimensional profile points, the calculation method is as follows: ; in 、 Represents the position The pixel values of the next and previous pixels, Represent the current position, the next position, and the previous position respectively.
Citation Information
Patent Citations
Precision hole part geometrical characteristic detection method and system based on machine vision
CN111862037A
Pixel equivalent measuring method based on mobile terminal pupil distance intelligent measurement
CN119214588A