Resistance spot welding process data extraction method and device, computer equipment and medium
By using computer vision technology to extract the real coordinates of current and resistance curves from resistance spot welding data images, the problem of inefficient acquisition of welding process numerical data in existing technologies has been solved. This enables standardized data output and autonomous monitoring, reduces costs, and improves data availability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies cannot efficiently and automatically extract numerical data from the image-based welding process data of resistance spot welding equipment, which limits the autonomous monitoring and data governance of the welding process. In particular, when using imported or closed control system equipment, the cost of obtaining complete time-series process data is high.
Using computer vision technology, including methods such as border cropping, color analysis, coordinate axis recognition, frequency statistics, and contour detection, pixel sets of current curves and resistance curves are extracted from resistance spot welding data images. These are then converted into real coordinates through color recognition and text recognition, achieving standardized data output.
The system accurately reproduces numerical data of the welding process without accessing the original equipment database, reducing data acquisition costs, improving the availability and flexibility of production data, and meeting the needs of large-scale, high-efficiency data processing in industrial settings.
Smart Images

Figure CN121999239A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of resistance spot welding process data extraction technology, and in particular to a method, apparatus, computer equipment and medium for resistance spot welding process data extraction. Background Technology
[0002] Resistance spot welding, a widely used metal joining process, plays a crucial role in the automotive manufacturing industry. Its welding quality directly impacts the strength, sealing, and safety of structural components. To achieve quality monitoring and traceability of the welding process, obtaining accurate welding process data (such as welding current and dynamic resistance) is essential. This data is typically collected and recorded by the monitoring system built into the spot welding equipment for subsequent quality analysis, process optimization, and fault diagnosis. However, in actual production environments, especially when using imported or closed-system control equipment, raw process data is often encrypted or access restricted by the equipment manufacturer. Users who need complete time-series process data usually have to pay high additional licensing fees or rely on proprietary software provided by the manufacturer to export limited information, severely limiting companies' ability to independently monitor the welding process and their data governance capabilities.
[0003] Although digitized process data cannot be directly obtained, most spot welding equipment supports local storage of process curves as images. These images contain rich timing information, such as current-time curves and resistance-time curves, and have high readability and information density. If the original numerical data can be automatically and accurately reconstructed from such images, it will greatly reduce data acquisition costs and improve the availability and flexibility of production data.
[0004] Currently, although there are general chart digitization tools, such as WebPlotDigitizer, which can manually or semi-automatically extract curves from images, they are cumbersome to operate and have a low degree of automation, and cannot meet the needs of large-scale, high-efficiency data processing in industrial settings. Summary of the Invention
[0005] This application addresses the aforementioned shortcomings or drawbacks by providing a method, apparatus, computer equipment, and medium for extracting resistance spot welding process data. This method enables standardized output and subsequent analysis of numerical data from exported raw resistance spot welding data images using computer vision technology, without requiring access to the original equipment database.
[0006] This application provides a method for extracting resistance spot welding process data according to a first aspect. The method includes: cropping the border of the original resistance spot welding data image to obtain a borderless image; performing color analysis on the borderless image to obtain image color information; performing coordinate axis recognition on the borderless image to determine the origin coordinates of the coordinate axes; extracting pixel sets of current curves and resistance curves from the borderless image based on the image color information; extracting pixel sets of current reference lines and resistance reference lines from the borderless image through color recognition, frequency statistics, and contour detection; determining the pixel coordinates of current intersection points and resistance intersection points based on the pixel sets of current reference lines and resistance reference lines; extracting the true coordinates of current intersection points and resistance intersection points from the borderless image based on image color information and text recognition; converting the pixel coordinates of each pixel in the pixel sets of current curves and resistance curves into true coordinates based on the origin coordinates, the pixel coordinates of current intersection points and resistance intersection points, and the true coordinates of current intersection points and resistance intersection points to obtain a true coordinate set of resistance curves and current curves; and performing missing value filling operation when the lengths of the true coordinate sets of resistance curves and current curves are inconsistent to obtain a standard coordinate set of current curves and resistance curves.
[0007] In a further technical solution, coordinate axis recognition is performed on the borderless image to determine the origin coordinates of the coordinate axes, including: performing grayscale processing, reverse binarization processing and morphological closing operation on the borderless image in sequence to obtain a thick line coordinate axis outline; performing skeletonization processing on the thick line coordinate axis outline to obtain a single pixel coordinate axis skeleton; and extracting the pixel coordinates of the origin of the coordinate axes from the single pixel coordinate axis skeleton.
[0008] In a further technical solution, the pixel coordinates of the origin of the coordinate axis are extracted from the single-pixel coordinate axis skeleton, including: extracting the pixel coordinates of the four vertices of the coordinate axis from the single-pixel coordinate axis skeleton by polygon approximation; and determining the pixel coordinates of the origin of the coordinate axis based on the pixel coordinates of the four vertices.
[0009] In a further technical solution, pixel sets of current curves and resistance curves are extracted from the borderless image based on image color information, including: extracting initial pixel sets of current curves and resistance curves from the borderless image based on image color information; performing noise filtering on the initial pixel sets of current curves and resistance curves through statistical analysis; and performing preheating valley detection and data filling on the initial pixel sets of current curves and resistance curves after noise filtering to obtain pixel sets of current curves and resistance curves.
[0010] In a further technical solution, preheating valley detection and data filling are performed on the initial pixel sets of the noise-filtered current curve and resistance curve, respectively. This includes: taking the initial pixel sets of the noise-filtered current curve and resistance curve as target pixel sets, and performing the following processing: selecting pixels whose horizontal coordinates are within a preset range from the target pixel set, arranging the selected pixels in ascending order of their horizontal coordinates to obtain a first pixel subset; calculating the horizontal coordinate interval of each pair of adjacent pixels in the first pixel subset; when the horizontal coordinate interval of any pair of adjacent pixels is greater than a preset interval threshold, taking the horizontal coordinate interval corresponding to the horizontal coordinate interval as a preheating valley interval; filling pixels in the preheating valley interval with the vertical coordinate of the origin as the filling value to obtain a second pixel subset; and merging the first pixel subset and the second pixel subset.
[0011] In a further technical solution, based on the origin coordinates, the pixel coordinates of the current intersection point and the resistance intersection point, and the true coordinates of the current intersection point and the resistance intersection point, the pixel coordinates of each pixel in the pixel set of the current curve and the resistance curve are converted into true coordinates. This includes: for each pixel in the pixel set of the current curve and the resistance curve, the pixel abscissa is converted into the true abscissa, and the pixel ordinate is converted into the true ordinate using the following formulas: ; in, and These represent the x-coordinate and y-coordinate of a pixel, respectively. and These represent the pixel's x-coordinate and y-coordinate, respectively, representing the origin coordinates; when the pixel is taken from the pixel set of the current curve, and These represent the pixel x-coordinate and pixel y-coordinate of the current intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the current intersection point, respectively; when the pixel is taken from the pixel set of the resistance curve, and These represent the pixel x-coordinate and pixel y-coordinate of the resistor intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the resistance intersection point, respectively.
[0012] In a further technical solution, the true coordinates of the current intersection and the resistance intersection are extracted from the borderless image based on image color information and text recognition. This includes: locating the coordinate display boxes of the current intersection and the resistance intersection from the borderless image based on image color information; and performing text recognition on the coordinate display boxes of the current intersection and the resistance intersection to obtain the true coordinates of the current intersection and the resistance intersection.
[0013] According to a second aspect, this application provides a resistance spot welding process data extraction device, the device comprising: The preprocessing module is used to crop the borders of the original resistance spot welding data image to obtain a borderless image, and to perform color analysis on the borderless image to obtain the image color information. The coordinate axis recognition module is used to recognize the coordinate axes of borderless images in order to determine the origin coordinates of the coordinate axes; The spot welding process data extraction module is used to extract the pixel sets of current curves and resistance curves from borderless images based on image color information. The coordinate transformation module is used to extract the pixel sets of current reference lines and resistance reference lines from the borderless image through color recognition, frequency statistics, and contour detection. Based on the pixel sets of the current and resistance reference lines, it determines the pixel coordinates of the current intersection and resistance intersection. Based on the image color information, it locates the coordinate display boxes of the current and resistance intersections in the borderless image, performs text recognition on the coordinate display boxes, and obtains the true coordinates of the current and resistance intersections. Based on the origin coordinates, the pixel coordinates of the current and resistance intersections, and the true coordinates of the current and resistance intersections, it converts the pixel coordinates of each pixel in the pixel sets of the current curve and resistance curve into true coordinates, thus obtaining the true coordinate sets of the resistance curve and current curve. The data verification module is used to perform missing value filling operations when the lengths of the true coordinate sets of the resistance curve and the current curve are inconsistent, so as to obtain the standard coordinate sets of the current curve and the resistance curve.
[0014] According to a third aspect, this application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of any of the resistance spot welding process data extraction methods described above.
[0015] According to a fourth aspect, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the resistance spot welding process data extraction methods described above.
[0016] The above-mentioned technical solution of this application can accurately reconstruct the numerical data of the welding process from the exported original resistance spot welding data image through computer vision technology without accessing the original equipment database, thereby achieving standardized data output and subsequent analysis and utilization. This application preprocesses the original resistance spot welding data image through border cropping and color analysis to obtain a borderless image and image color information. Next, the origin coordinates are accurately located using coordinate axis recognition. Based on the image color information, pixel sets of the current curve and resistance curve are extracted from the borderless image. Pixel sets of the current reference line and resistance reference line are extracted from the borderless image through color recognition, frequency statistics, and contour detection. Based on the pixel sets of the current reference line and resistance reference line, the pixel coordinates of the current intersection point and resistance intersection point are determined. Based on the image color information and text recognition, the true coordinates of the current intersection point and resistance intersection point are extracted from the borderless image. Then, based on the origin coordinates, the pixel coordinates of the current intersection point and resistance intersection point, and the true coordinates of the current intersection point and resistance intersection point, the pixel coordinates of each pixel in the pixel sets of the current curve and resistance curve are converted into true coordinates, resulting in the true coordinate sets of the resistance curve and current curve. This achieves accurate restoration of the spot welding process data from image to numerical value. Finally, when the lengths of the current curve data and resistance curve data are inconsistent, a missing value filling operation is performed to ensure data integrity and standardized output. Attached Figure Description
[0017] Figure 1 This is a flowchart of a data extraction method for resistance spot welding process according to this application; Figure 2 This is an example image of the original resistance spot welding data in this application. The horizontal axis in the image represents time in milliseconds (ms), the left vertical axis represents current in kiloamperes (ka), and the right vertical axis represents resistance in milliohms (mΩ). Figure 3 This is an example diagram of the single-pixel coordinate axis skeleton in this application; Figure 4-a This is an example diagram showing the data point distribution of the current curve for a non-preheated solder joint without a preheating stage in this application. Figure 4-b This is an example diagram showing the data point distribution of the resistance curve of a non-preheated solder joint without a preheating stage in this application. Figure 5-a This is an example diagram showing the data point distribution of the current curve for a preheated solder joint with a preheating stage in this application; Figure 5-b This is an example diagram showing the data point distribution of the resistance curve of a preheated solder joint with a preheating stage in this application; Figure 6-a This is an example diagram showing the true distribution of the current curves obtained after interpolation in this application. Figure 6-b This is an example diagram showing the true distribution of the resistance curves obtained after interpolation in this application. Figure 7 This is a schematic diagram of the resistance spot welding process data extraction device in this application. Figure 8 This is a schematic diagram of the internal structure of a computer device according to this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0020] In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0021] To address the shortcomings and defects of related technologies, this application provides a method for extracting resistance spot welding process data. This method can achieve standardized output and subsequent analysis and utilization of numerical data of the welding process from the exported original resistance spot welding data images without accessing the original equipment database, through computer vision technology.
[0022] Example 1 like Figure 1 As shown, the resistance spot welding process data extraction method provided in this embodiment includes steps S110 to S150, and each step is described in detail below.
[0023] S110: The original resistance spot welding data image is cropped to obtain a borderless image. Color analysis is performed on the borderless image to obtain the image color information.
[0024] The raw resistance spot welding data image (referred to as the raw image) refers to the process curve image exported from the resistance spot welding equipment. Its contents can be found in [reference needed]. Figure 2 As shown (the original image does not include "①", "②", "③", "④", "⑤", and "⑥", these markings were added for ease of explanation below), it includes at least a current curve (representing a current-time curve, which reflects the change of welding current during the welding process, such as...). Figure 2 The curve marked with "①" in the middle), the resistance curve (representing the resistance-time curve, which can reflect the change of welding resistance during the welding process, such as...) Figure 2 The curve marked with "②" in the middle), current reference lines (including current curve reference lines and current vertical reference lines, such as...) Figure 2 The curve marked by "③" and the vertical line marked by "⑤", and the resistance reference lines (including the resistance curve reference line and the resistance vertical reference line, such as...) Figure 2 The curve marked by “④” and the vertical line marked by “⑥”, as well as the display boxes that show the actual coordinates of the current intersection point (the intersection of the current curve reference line and the current vertical reference line) and the resistance intersection point (the intersection of the resistance curve reference line and the resistance vertical reference line).
[0025] The current curve and the resistance curve have different color characteristics; the current curve is usually red, and the resistance curve is usually green.
[0026] The original image also contains borders and distracting elements (such as labels and dashed grid lines). Therefore, the original image can be cropped first to remove the borders, retaining only the core chart area. The size of the border to be cropped should be determined based on the specific characteristics of the original image; for example, cropping 8 pixels top and bottom and 20 pixels left and right.
[0027] A borderless image is an image obtained by cropping the original image with borders. Color analysis refers to performing color statistics on a borderless image to determine all the colors in the image. Image color information is the result of color analysis, which is an RGB value matrix, represented as Color=[N,3], where N is the number of color types, used to identify current curves (such as red) and resistance curves (such as green).
[0028] S120: Perform coordinate axis recognition on the borderless image to determine the origin coordinates of the coordinate axes.
[0029] This step uses computer vision algorithms to identify the coordinate axes in the borderless image and locate the origin coordinates. The origin coordinates refer to the pixel coordinates of the origin pixel obtained through coordinate axis identification, which can be represented as (origin_x, origin_y). The origin coordinates can be used as the reference point for converting pixel coordinates to real coordinates in subsequent steps.
[0030] The operation of coordinate axis recognition for borderless images includes: performing grayscale processing, inverse binarization processing, and morphological closing operation on the borderless image in sequence to obtain a thick line coordinate axis outline; performing skeletonization processing on the thick line coordinate axis outline to obtain a single pixel coordinate axis skeleton; and extracting the pixel coordinates of the coordinate axis origin from the single pixel coordinate axis skeleton.
[0031] First, the borderless image is converted to grayscale using the following formula: gray(x,y)=0.299⋅R(x,y)+0.587⋅G(x,y)+0.114⋅B(x,y); Where R(x,y), G(x,y), and B(x,y) represent the pixel values of the red, green, and blue channels, respectively.
[0032] Next, the grayscale borderless image is reverse-binarized using the following formula to highlight the coordinate axis bar features: ; Morphological closing operations are performed on the image after inverse binarization to fill any gaps in the coordinate axes. Finally, the outermost contour is extracted from the image to serve as the coarse coordinate axis contour.
[0033] Next, the thick coordinate axis contour is skeletonized. This skeletonization process involves multiple iterations. In each iteration, erosion, dilation, and subtraction operations are performed sequentially on the thick coordinate axis contour. After multiple iterations, the contour boundary can be accurately extracted, refining the thick line into a single-pixel-width skeleton line (i.e., a single-pixel coordinate axis skeleton). Furthermore, if the skeleton line breaks during the skeletonization process, morphological closing operations can be used to connect the broken parts. The single-pixel coordinate axis skeleton obtained after skeletonization can be found in [reference needed]. Figure 3 As shown in the figure, the white area with the largest area is the outline of the coordinate values.
[0034] Finally, the pixel coordinates of the origin of the coordinate axes are extracted from the single-pixel coordinate axis skeleton using polygon approximation techniques. First, the pixel coordinates of the four vertices of the coordinate axes can be extracted from the single-pixel coordinate axis skeleton using polygon approximation (such as the Douglas-Peucker algorithm). Then, the pixel coordinates of the origin of the coordinate axes are determined based on the pixel coordinates of the four vertices. Specifically, the beginning and end points of the entire contour of the single-pixel coordinate axis skeleton can be used as endpoints. , For any point on the contour Calculate its distance to the line vertical distance Take the maximum distance ,like Then the entire sub-chain is represented by a single line segment. Replace, otherwise keep the farthest point and recursively process, where This refers to the perimeter of the closed contour; finally, the pixel coordinates of the origin of the coordinate axis in the entire image are output, denoted as (origin_x, origin_y).
[0035] S130: Extract the pixel sets of current curves and resistance curves from the borderless image based on image color information.
[0036] In some technical solutions, the pixel sets of current and resistance curves are extracted from a borderless image by color matching based on image color information. Color matching is the process of extracting the target color curve based on image color information and through tolerance comparison.
[0037] Specifically, different parameter curves typically have different color characteristics; current curves are represented by red, and resistance curves by green. Color matching can be performed using the following formula to extract the target curve (current curve or resistance curve): ; in, This indicates the position in a borderless image. The color value of the pixel; TargetColor represents the RGB value of the target color, and the specific value can be determined based on the image color information Color. For example, when extracting the red current curve, the color with the largest red channel value and the smallest green and blue channel values can be selected from the image color information as TargetColor. When extracting the green resistance curve, the color with the largest green channel value and the smallest red and blue channel values can be selected from the image color information as TargetColor. This is a tolerance value that can be set according to the color matching precision. For example, when precise color matching is required, it can be set to 0. For the mask image at position The color value of the pixel at that location.
[0038] Specifically, based on the above formula, each pixel in the borderless image can be... The difference between the pixel value and the target color's RGB value (TargetColor) is calculated. If the difference is less than or equal to the tolerance value (Tolerance), the pixel is considered to belong to the target curve (when extracting the pixel set of the current curve, the target curve refers to the current curve; when extracting the pixel set of the resistance curve, the target curve refers to the resistance curve), and the mask value is set to 255 (representing white). If the difference is greater than the tolerance value (Tolerance), the mask value is set to 0 (representing black). After processing each pixel in the borderless image using the above formula, a binary mask image is obtained. The white areas in the mask image are the curve pixels to be extracted, and the black areas are the background or other information. Subsequently, only the coordinates of the white pixels need to be extracted from this mask image to complete the extraction of the pixel set of the target curve.
[0039] In a further technical solution, after extracting the pixel sets of the current curve and the resistance curve from the borderless image through color matching, the pixel sets of the current curve and the resistance curve can be statistically analyzed using the following formulas to identify and filter out abnormally dense pixels, remove image noise interference, and use the filtered pixel sets as the pixel sets of the current curve and resistance curve for subsequent steps: ; in, This is the filtered set of pixels; This indicates the number of pixels with the same x-coordinate in the target set (which can be a set of pixels from a current curve extracted by color matching or a set of pixels from a resistance curve). It is the noise threshold.
[0040] In a further technical solution, the operation of extracting the pixel sets of the current curve and the resistance curve from the borderless image based on image color information includes: extracting the initial pixel sets of the current curve and the resistance curve from the borderless image based on image color information; performing noise filtering on the initial pixel sets of the current curve and the resistance curve through statistical analysis; and performing preheating valley detection and data filling on the noise-filtered initial pixel sets of the current curve and the resistance curve to obtain the pixel sets of the current curve and the resistance curve.
[0041] Considering that some weld joints in resistance spot welding have a preheating stage and the data is relatively sparse, we first perform color matching on the borderless image based on the image color information to extract the pixel set of the current curve and resistance curve from the borderless image (to facilitate the distinction of subsequent pixel sets, the pixel set extracted based on the color matching operation will be referred to as the initial pixel set below). Then, through statistical analysis, abnormally dense pixels in the initial pixel set of the current curve and resistance curve are identified and filtered out. Then, preheating valley detection and data filling are performed on the initial pixel set of the current curve and resistance curve after noise filtering, so as to obtain the pixel set of the current curve and resistance curve that will be used in subsequent steps.
[0042] The preheating trough detection and filling function addresses the data sparsity issue caused by the preheating stage in some resistance spot welding joints. Preheating trough detection locates the preheating troughs, and then data is filled into the trough regions to ensure data continuity. If no preheating trough is detected, data filling is unnecessary. The data point distribution of current and resistance curves for non-preheated weld joints can be found in [reference needed]. Figure 4-a and Figure 4-b ; Figure 4-a and Figure 4-b Both the horizontal and vertical axes in the graph represent pixel values.
[0043] The above technical solution involves performing preheating trough detection and data filling operations on the initial pixel sets of the noise-filtered current and resistance curves, respectively, including: The initial pixel sets of the noise-filtered current curve and the initial pixel sets of the resistance curve are respectively used as target pixel sets, and the following processing is performed: Pixels whose horizontal coordinates are within a preset range are selected from the target pixel sets, and the selected pixels are arranged in ascending order of their horizontal coordinates to obtain the first pixel subset; the horizontal coordinate interval of each pair of adjacent pixels in the first pixel subset is calculated; when the horizontal coordinate interval of any pair of adjacent pixels is greater than a preset interval threshold, the horizontal coordinate interval corresponding to the horizontal coordinate interval is taken as the preheating valley interval; pixels are filled in the preheating valley interval with the vertical coordinate of the origin as the filling value to obtain the second pixel subset; the first pixel subset and the second pixel subset are merged.
[0044] The preset range can be set based on the characteristics of the resistance spot welding process and the statistical results of historical resistance spot welding data images. For example, the preheating stage of resistance spot welding usually occurs at the beginning of the welding process, corresponding to the early area of the horizontal axis (time axis) of the image. By analyzing a large number of resistance spot welding data images generated by spot welding equipment, it can be found that the data sparsity (i.e., the valley phenomenon) in the preheating stage is most significant in the range of 50 to 200 pixels on the horizontal axis. This range covers the critical transition period from the start-up to the stabilization of the current or resistance in the preheating stage, which can ensure that the preheating valley detection can accurately capture the abnormal intervals in the preheating stage. Therefore, the preset range can be set to [50, 200].
[0045] When calculating the horizontal coordinate interval of each pair of adjacent pixels in the first pixel subset, the horizontal coordinate interval can be calculated using the following formula: ; Where m represents the number of pixels selected, that is, the number of pixels in the first pixel subset; This represents the x-coordinate of the k-th pixel in the first pixel subset. This represents the x-coordinate of the (k+1)th pixel in the first pixel subset.
[0046] If it exists (The T value can be set based on experience, such as 5), then a judgment is made. The corresponding interval is the preheating trough, and the output trough interval. .
[0047] The values of the preheating troughs can be filled using the ordinate value of the origin of the coordinate axis, as shown in the following formula: ; in, This represents the fill pixel, and its x-coordinate. The value is taken from the trough interval. ,like or Its pixel ordinate is fixed as the pixel ordinate of the origin coordinate. .
[0048] The data point distribution of the current and resistance curves for the preheated solder joints can be found in [reference needed]. Figure 5-a and Figure 5-b ; Figure 5-a and Figure 5-b Both the horizontal and vertical axes in the graph represent pixel values.
[0049] S140: Extract pixel sets of current reference lines and resistance reference lines from the borderless image through color recognition, frequency statistics, and contour detection. Determine the pixel coordinates of the current intersection and resistance intersection based on the pixel sets of the current reference lines and resistance reference lines. Extract the true coordinates of the current intersection and resistance intersection from the borderless image based on image color information and text recognition. Based on the origin coordinates, the pixel coordinates of the current intersection and resistance intersection, and the true coordinates of the current intersection and resistance intersection, convert the pixel coordinates of each pixel in the pixel sets of the current curve and resistance curve into true coordinates to obtain the true coordinate sets of the resistance curve and the current curve.
[0050] The borderless image also includes current reference lines and resistance reference lines. The pixel set of the current reference lines and the pixel set of the resistance reference lines can be extracted from the borderless image through color recognition, frequency statistics and contour detection.
[0051] Current reference lines include current curve reference lines and vertical current reference lines; resistance reference lines include resistance curve reference lines and vertical resistance reference lines. The vertical current reference lines and vertical resistance reference lines are usually different colors, such as... Figure 2 As shown, the vertical reference line for current is shown in blue, and the vertical reference line for resistance is shown in red. The reference lines for current and resistance curves are usually the same color, such as... Figure 2 As shown, both curve reference lines are black.
[0052] Regarding the extraction of the vertical reference lines for current and resistance, the X-axis coordinates of these two vertical reference lines can be determined first through frequency statistics. Since the vertical reference line is a continuous vertical line, the pixel density at its X-axis position will be much higher than that of curves or other scattered elements, thus forming a significant peak. Therefore, a vertical pixel scan can be performed on the borderless image, and the pixel density at each X-axis coordinate can be statistically analyzed to find this peak, thereby determining the precise X-axis coordinates of the vertical reference line in the borderless image.
[0053] Frequency statistics can locate the positions of two vertical reference lines. Typically, the current vertical reference line and the resistance vertical reference line are different colors. Therefore, image color information can be used to match and filter pixel areas of specific colors, thereby determining whether each vertical reference line is a current vertical reference line or a resistance vertical reference line.
[0054] Regarding the extraction of current curve reference lines and resistance curve reference lines, two black curve reference lines can be extracted from the borderless image using color recognition. Considering that the grid lines and the two curve reference lines have the same color (e.g., both are black), when processing the borderless image using color recognition, in addition to extracting the two curve reference lines, the grid lines (e.g., the grid lines) will also be extracted. Figure 2(The black dashed line in the image) Therefore, contour detection is still required, and the longest first M segments of the contour are retained (e.g., 10 segments; the number of segments retained can be set based on experience). There may still be a small number of grid lines in the retained contours. The shape and geometric differences between the grid lines and the curve reference lines (e.g., the curve reference lines are continuous long curves while the grid lines are shorter) can be used to filter out two curve reference lines.
[0055] A current intersection point refers to the pixel where the current curve reference line and the perpendicular current reference line intersect. The pixel coordinates of this point can be denoted as (current_x, current_y). A resistance intersection point refers to the pixel where the resistance curve reference line and the perpendicular resistance reference line intersect. The coordinates of this point can be denoted as (resistance_x, resistance_y). Pixel coordinates refer to the position of a pixel in a borderless image, and can be represented as (x, y). The pixel coordinates of each pixel include the horizontal coordinate (e.g., x) and the vertical coordinate (e.g., y).
[0056] After determining the pixel sets of the current curve reference line, the resistance curve reference line, the current vertical reference line, and the resistance vertical reference line, the intersection point (i.e., the current intersection point) can be calculated based on the pixel sets of the current curve reference line and the current vertical reference line, and the intersection point (i.e., the resistance intersection point) can be calculated based on the pixel sets of the resistance curve reference line and the resistance vertical reference line.
[0057] Both the current vertical reference line and the resistance vertical reference line are vertical reference lines, and their horizontal coordinates are fixed, which can be denoted as current_x and resistance_x, respectively.
[0058] When calculating the current intersection point, a direct matching process can be performed first. This involves searching the pixel set of the current curve reference line for all pixels with an x-coordinate equal to `current_x`. If found, the average of the y-coordinates of all pixels with an x-coordinate equal to `current_x` is calculated and used as the y-coordinate of the current intersection point, denoted as `current_y`. If not found, interpolation is used to determine the y-coordinate of the current intersection point. For example, the two adjacent pixels with x-coordinates closest to `current_x` can be found in the pixel set of the current curve reference line, denoted as (x...). a ,y a ) and (x b ,y b (where x) a <current_x<x b The pixel ordinate current_y of the current intersection point is calculated based on the following formula: ; The calculation process for the resistance intersection is the same as that for the current intersection. First, a direct matching is performed. All pixels in the pixel set of the resistance curve reference line with an x-coordinate equal to resistance_x are searched. If found, the average of the y-coordinates of all pixels with an x-coordinate equal to resistance_x is calculated and used as the y-coordinate of the resistance intersection, denoted as resistance_y. If not found, interpolation is used to determine the y-coordinate of the resistance intersection. For example, the two adjacent pixels with x-coordinates closest to resistance_x are first found in the pixel set of the resistance curve reference line, which can be denoted as (x...). c ,y c ) and (x d ,y d (where x) c <resistance_y<x d The pixel ordinate resistance_y of the current intersection point is calculated based on the following formula: .
[0059] The borderless image includes a display box to show the actual coordinates of the current intersection and the resistance intersection, such as... Figure 2 The yellow display box shown.
[0060] In some technical solutions, the true coordinates of current intersections and resistance intersections are extracted from borderless images based on image color information and text recognition. This includes: locating coordinate display boxes of current intersections and resistance intersections from the borderless image based on image color information; and performing text recognition on the coordinate display boxes of current intersections and resistance intersections to obtain the true coordinates of current intersections and resistance intersections.
[0061] The target RGB values can be filtered from the image color information. By creating a mask and performing connected component analysis, the leftmost and rightmost display boxes can be automatically located. Then, a text recognition tool can be used to identify the text information in the display boxes, thereby obtaining the true coordinates of the current intersection and the resistance intersection. For example, the display box area can be cropped from the image and input into the open-source tool Tesseract OCR with the parameters configured as ['--psm 8 --oem 3 -c tessedit_char_whitelist=0123456789. ']. This tool can then be used to identify the true coordinates of the two intersections. The current intersection can be denoted as (current_x_true, current_y_true), and the resistance intersection can be denoted as (resistance_x_true, resistance_y_true). Here, the true coordinates refer to the physical quantity value corresponding to the pixel (such as the unit of current, ampere, and the unit of resistance, ohm). The true coordinates of each pixel include the true x-coordinate and the true y-coordinate.
[0062] Coordinate transformation is the process of converting the pixel coordinates of each pixel in the pixel set of the current curve and the pixel set of the resistance curve into true coordinates, ultimately obtaining the true coordinate sets of the current curve and the resistance curve. The true coordinate set of the current curve is the current timing data set obtained after coordinate transformation, representing the actual current value during the welding process. The true coordinate set of the resistance curve is the resistance timing data set obtained after coordinate transformation, representing the actual resistance value during the welding process.
[0063] In some technical solutions, the pixel coordinates of each pixel in the pixel set of the current curve and resistance curve are converted into real coordinates based on the origin coordinates, the pixel coordinates of the current intersection point and the resistance intersection point, and the real coordinates of the current intersection point and the resistance intersection point. This includes: For each pixel in the pixel set of the current curve and resistance curve, the pixel x-coordinate is converted to the true x-coordinate, and the pixel y-coordinate is converted to the true y-coordinate using the following formulas: ; in, and These represent the x-coordinate and y-coordinate of a pixel, respectively. and These represent the pixel x-coordinate and pixel y-coordinate of the origin, respectively; When the pixels are taken from the pixel set of the current curve, and These represent the pixel x-coordinate and pixel y-coordinate of the current intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the current intersection point, respectively; When the pixels are taken from the pixel set of the resistance curve and These represent the pixel x-coordinate and pixel y-coordinate of the resistor intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the resistance intersection point, respectively.
[0064] In a further technical solution, after completing the coordinate transformation operation described above, a linear interpolation algorithm can be used to smooth the true coordinate sets of the current and resistance curves obtained from the coordinate transformation, generating a continuous numerical sequence to ensure the continuity and smoothness of the output data. The linear interpolation formula is as follows: ; in, and For two adjacent pixels, Indicates that it is located at and Any real x-coordinate between (which can be called the time to be interpolated). Indicates the time to be interpolated The corresponding actual vertical axis (which can be the current value or the resistance value).
[0065] The true distribution of the current and resistance curves obtained after interpolation can be found in [reference]. Figure 6-a and Figure 6-b As shown; Figure 6-a and Figure 6-b The horizontal axis in the graph represents time. Figure 6-a The vertical axis represents electric current, and the unit is kiloampere (ka). Figure 6-b The vertical axis in the figure represents resistance, and the unit is milliohm (mΩ).
[0066] S150: When the lengths of the actual coordinate sets of the resistance curve and the current curve are inconsistent, perform a missing value filling operation to obtain the standard coordinate sets of the current curve and the resistance curve.
[0067] To meet engineering application requirements, the completeness and accuracy of the output welding data must be ensured. After obtaining the true coordinate sets of the current curve and the resistance curve, check whether the lengths of these two sets are consistent. If the data lengths are inconsistent, for the shorter set, missing values can be filled by linear extrapolation to ensure data integrity.
[0068] The final standard coordinate set of the current curve and the standard coordinate set of the resistance curve are the standardized data sets output after length consistency verification and padding. At this time, the lengths of the current curve data (i.e., the standard coordinate set of the current curve) and the resistance curve data (i.e., the standard coordinate set of the resistance curve) are consistent, and they can be directly used for welding quality analysis.
[0069] This embodiment preprocesses the original resistance spot welding data image through border cropping and color analysis to obtain a borderless image and image color information. Next, the origin coordinates are accurately located using coordinate axis recognition. Based on the image color information, pixel sets of the current curve and resistance curve are extracted from the borderless image. Pixel sets of the current reference line and resistance reference line are extracted from the borderless image through color recognition and frequency statistics. Based on the pixel sets of the current and resistance reference lines, the pixel coordinates of the current and resistance intersections are determined. Based on image color information and text recognition, the true coordinates of the current and resistance intersections are extracted from the borderless image. Then, based on the origin coordinates, the pixel coordinates of the current and resistance intersections, and the true coordinates of the current and resistance intersections, the pixel coordinates of each pixel in the pixel sets of the current and resistance curves are converted to true coordinates, resulting in the true coordinate sets of the resistance and current curves. This achieves accurate restoration of the spot welding process data from image to numerical value. Finally, when the lengths of the current curve data and resistance curve data are inconsistent, a missing value filling operation is performed to ensure data integrity and standardized output. This embodiment can accurately reconstruct the numerical data of the welding process from the exported original resistance spot welding data images using computer vision technology without accessing the original equipment database, thereby achieving standardized data output and subsequent analysis and utilization.
[0070] Example 2 This embodiment provides an alternative solution for coordinate axis identification.
[0071] In Example 1, coordinate axis recognition is achieved through skeletonization and polygon approximation, while in this example, coordinate axis recognition is achieved based on Hough line detection and scale template matching.
[0072] After obtaining the borderless image through step S110, the borderless image is first converted to grayscale to obtain a grayscale image. Then, Canny edge detection is used to extract lines from the grayscale image, and Hough line detection is used to identify horizontal and vertical line segments in the grayscale image. The four sides that constitute the coordinate axis are then selected from the selected horizontal and vertical line segments. Finally, tick template matching is performed, that is, tick lines or numbers near the origin of the coordinate axis are used as templates (such as the 0 tick mark) to match the position of the origin of the coordinate axis within the detected coordinate axis area.
[0073] Example 3 This embodiment provides an alternative solution for vertical reference line identification.
[0074] In Example 1, vertical reference lines in a borderless image are identified by color recognition and frequency statistics. In this example, the geometric detection capability of Hough line detection is used to identify two vertical reference lines in a borderless image, namely the current reference line and the resistance reference line.
[0075] For example, the borderless image is first converted to grayscale to obtain a grayscale image. Then, edge detection algorithms such as Canny are used to process the grayscale image to enhance line features, generating a binarized image that retains only significant edges, preparing for line detection. Next, a Hough transform is performed on the binarized image, and by setting angle constraints (e.g., θ≈90°±5°), all candidate lines that are close to the vertical direction are specifically selected. Finally, color matching is performed on the detected vertical lines based on image color information (the color matching process can be found in Example 1), thereby accurately identifying the target reference line and eliminating duplicate or interfering lines.
[0076] It should be noted that, unless otherwise explicitly stated herein, the execution order of the various steps included in the resistance spot welding process data extraction method provided in any of the above embodiments is not strictly limited, and these steps can be executed in other orders. Moreover, at least some of these steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0077] Based on the same inventive concept, this application also provides a data extraction device for resistance spot welding process. In some embodiments, such as Figure 7 As shown, the resistance spot welding process data extraction device includes the following modules: The preprocessing module 110 is used to crop the border of the original resistance spot welding data image to obtain a borderless image, and to perform color analysis on the borderless image to obtain image color information. The coordinate axis recognition module 120 is used to perform coordinate axis recognition on borderless images in order to determine the origin coordinates of the coordinate axes; The spot welding process data extraction module 130 is used to extract the pixel sets of the current curve and the resistance curve from the borderless image based on the image color information. The coordinate transformation module 140 is used to extract the pixel sets of the current reference line and the resistance reference line from the borderless image through color recognition, frequency statistics, and contour detection, respectively; determine the pixel coordinates of the current intersection point and the resistance intersection point based on the pixel sets of the current reference line and the resistance reference line; locate the coordinate display box of the current intersection point and the resistance intersection point in the borderless image based on the image color information; perform text recognition on the coordinate display box to obtain the true coordinates of the current intersection point and the resistance intersection point; and convert the pixel coordinates of each pixel in the pixel set of the current curve and the resistance curve into true coordinates based on the origin coordinates, the pixel coordinates of the current intersection point and the resistance intersection point, and the true coordinates of the current intersection point and the resistance intersection point to obtain the true coordinate set of the resistance curve and the current curve. The data verification module 150 is used to perform a missing value filling operation when the lengths of the true coordinate sets of the resistance curve and the current curve are inconsistent, so as to obtain the standard coordinate set of the current curve and the resistance curve.
[0078] In some embodiments, the coordinate axis recognition module 120 is used to sequentially perform grayscale processing, reverse binarization processing, and morphological closing operation on the borderless image to obtain a thick-line coordinate axis outline; perform skeletonization processing on the thick-line coordinate axis outline to obtain a single-pixel coordinate axis skeleton; and extract the pixel coordinates of the origin of the coordinate axis from the single-pixel coordinate axis skeleton.
[0079] In some embodiments, the coordinate axis recognition module 120 is further configured to extract the pixel coordinates of the four vertices of the coordinate axis from the single-pixel coordinate axis skeleton by polygon approximation; and determine the pixel coordinates of the origin of the coordinate axis based on the pixel coordinates of the four vertices.
[0080] In some embodiments, the spot welding process data extraction module 130 is used to extract the initial pixel sets of the current curve and the resistance curve from the borderless image based on image color information; to perform noise filtering on the initial pixel sets of the current curve and the resistance curve through statistical analysis; and to perform preheating valley detection and data filling on the initial pixel sets of the noise-filtered current curve and the resistance curve to obtain the pixel sets of the current curve and the resistance curve.
[0081] In some embodiments, the spot welding process data extraction module 130 is further configured to take the initial pixel set of the noise-filtered current curve and the initial pixel set of the resistance curve as target pixel sets, and perform the following processing: filter pixels whose pixel horizontal coordinates are in a preset range from the target pixel set, arrange the filtered pixels in ascending order of pixel horizontal coordinates to obtain a first pixel subset; calculate the pixel horizontal coordinate interval of each pair of adjacent pixels in the first pixel subset; when the pixel horizontal coordinate interval of any pair of adjacent pixels is greater than a preset interval threshold, take the horizontal coordinate interval corresponding to the pixel horizontal coordinate interval as a preheating valley interval; fill pixels in the preheating valley interval with the vertical coordinate of the origin as the filling value to obtain a second pixel subset; and merge the first pixel subset and the second pixel subset.
[0082] In some embodiments, the coordinate transformation module 140 is used to convert the pixel abscissa of a pixel to a true abscissa and the pixel ordinate of a pixel to a true ordinate for each pixel in the pixel set of the current curve and the resistance curve using the following formula: ; in, and These represent the x-coordinate and y-coordinate of a pixel, respectively. and These represent the pixel x-coordinate and pixel y-coordinate of the origin, respectively; When the pixels are taken from the pixel set of the current curve, and These represent the pixel x-coordinate and pixel y-coordinate of the current intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the current intersection point, respectively; When the pixels are taken from the pixel set of the resistance curve and These represent the pixel x-coordinate and pixel y-coordinate of the resistor intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the resistance intersection point, respectively.
[0083] In some embodiments, the coordinate transformation module 140 is further configured to locate the coordinate display boxes of the current intersection point and the resistance intersection point from the borderless image based on the image color information; and to perform text recognition on the coordinate display boxes of the current intersection point and the resistance intersection point to obtain the true coordinates of the current intersection point and the resistance intersection point.
[0084] Specific limitations regarding the resistance spot welding process data extraction device can be found in the limitations of the resistance spot welding process data extraction method described above, and will not be repeated here. Each module in the aforementioned resistance spot welding process data extraction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0085] This application also provides a computer device. In some embodiments, the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement the steps of the resistance spot welding process data extraction method provided in any of the above embodiments.
[0086] In some embodiments, the internal structure diagram of a computer device may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores raw resistance spot welding data images and other data; the specific data stored can be further specified in the above method embodiments. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for extracting resistance spot welding process data.
[0087] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0088] This application also provides a computer-readable storage medium, in some embodiments of which a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the resistance spot welding process data extraction method provided in any of the above embodiments.
[0089] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0090] Those skilled in the art will understand that implementing all or part of the processes in the above method embodiments can be accomplished by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink, DRAM (SLDRAM), memory bus, direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0091] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0092] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for extracting data from a resistance spot welding process, characterized in that, The method includes: The original resistance spot welding data image is cropped to obtain a borderless image. Color analysis is then performed on the borderless image to obtain image color information. The borderless image is subjected to coordinate axis recognition to determine the origin coordinates of the coordinate axes; The pixel sets of the current curve and resistance curve are extracted from the borderless image based on the image color information. Pixel sets of current reference lines and resistance reference lines are extracted from the borderless image using color recognition, frequency statistics, and contour detection. Pixel coordinates of the current intersection point and resistance intersection point are determined based on these pixel sets. The true coordinates of the current intersection point and resistance intersection point are extracted from the borderless image based on image color information and text recognition. Based on the origin coordinates, the pixel coordinates of the current intersection point and resistance intersection point, and the true coordinates of the current intersection point and resistance intersection point, the pixel coordinates of each pixel in the pixel sets of the current curve and the resistance curve are converted to true coordinates, resulting in the true coordinate sets of the resistance curve and the current curve. When the lengths of the actual coordinate sets of the resistance curve and the current curve are inconsistent, a missing value filling operation is performed to obtain the standard coordinate sets of the current curve and the resistance curve.
2. The method according to claim 1, characterized in that, The step of performing coordinate axis recognition on the borderless image to determine the origin coordinates of the coordinate axes includes: The borderless image is sequentially subjected to grayscale conversion, inverse binarization, and morphological closing operation to obtain a thick line coordinate axis outline; The thick line coordinate axis outline is skeletonized to obtain a single pixel coordinate axis skeleton; Extract the pixel coordinates of the origin of the coordinate axis from the single-pixel coordinate axis skeleton.
3. The method according to claim 2, characterized in that, Extracting the pixel coordinates of the origin of the coordinate axis from the single-pixel coordinate axis skeleton includes: The pixel coordinates of the four vertices of the coordinate axis are extracted from the single-pixel coordinate axis skeleton by polygon approximation; The pixel coordinates of the origin of the coordinate axis are determined based on the pixel coordinates of the four vertices.
4. The method according to claim 1, characterized in that, The step of extracting the pixel sets of the current curve and resistance curve from the borderless image based on the image color information includes: Based on the image color information, the initial pixel sets of the current curve and the resistance curve are extracted from the borderless image respectively; Noise filtering is performed on the initial pixel sets of the current curve and the resistance curve respectively through statistical analysis; Preheating trough detection and data filling are performed on the initial pixel sets of the current curve and the resistance curve after noise filtering, respectively, to obtain the pixel sets of the current curve and the resistance curve.
5. The method according to claim 4, characterized in that, The step of performing preheating trough detection and data filling on the initial pixel sets of the noise-filtered current curve and resistance curve includes: The initial pixel set of the current curve and the initial pixel set of the resistance curve after noise filtering are respectively used as the target pixel set, and the following processing is performed: Pixels whose horizontal coordinates fall within a preset range are selected from the target pixel set, and the selected pixels are arranged in ascending order of their horizontal coordinates to obtain the first pixel subset. Calculate the pixel x-coordinate interval of each pair of adjacent pixels in the first pixel subset; When the pixel horizontal coordinate interval of any pair of adjacent pixels is greater than a preset interval threshold, the horizontal coordinate interval corresponding to the pixel horizontal coordinate interval is taken as the preheating valley interval. Using the ordinate of the origin coordinates as the fill value, pixels are filled in the preheating valley interval to obtain the second pixel subset; The first pixel subset and the second pixel subset are merged.
6. The method according to claim 1, characterized in that, The process of converting the pixel coordinates of each pixel in the pixel set of the current curve and the resistance curve into real coordinates based on the origin coordinates, the pixel coordinates of the current intersection point and the resistance intersection point, and the real coordinates of the current intersection point and the resistance intersection point includes: For each pixel in the pixel set of the current curve and the resistance curve, the pixel's x-coordinate is converted to a true x-coordinate, and the pixel's y-coordinate is converted to a true y-coordinate using the following formulas: ; in, and These represent the x-coordinate and y-coordinate of the pixel, respectively. and These represent the pixel x-coordinate and pixel y-coordinate of the origin coordinates, respectively. When the pixel is taken from the pixel set of the current curve, and These represent the pixel x-coordinate and pixel y-coordinate of the current intersection point, respectively. and These represent the true x-coordinate and true y-coordinate of the current intersection point, respectively. When the pixel is taken from the pixel set of the resistance curve, and These represent the pixel x-coordinate and pixel y-coordinate of the intersection of the resistors, respectively. and These represent the true x-coordinate and true y-coordinate of the intersection of the resistors, respectively.
7. The method according to claim 1, characterized in that, The step of extracting the true coordinates of the current intersection point and the resistance intersection point from the borderless image based on the image color information and text recognition includes: Based on the image color information, coordinate display boxes are located from the borderless image to respectively locate the current intersection point and the resistance intersection point; Text recognition is performed on the coordinate display boxes of the current intersection point and the resistance intersection point respectively to obtain the actual coordinates of the current intersection point and the resistance intersection point.
8. A data extraction device for resistance spot welding process, characterized in that, The device includes: The preprocessing module is used to crop the border of the original resistance spot welding data image to obtain a borderless image, and to perform color analysis on the borderless image to obtain image color information. A coordinate axis recognition module is used to perform coordinate axis recognition on the borderless image to determine the origin coordinates of the coordinate axes; The spot welding process data extraction module is used to extract the pixel sets of the current curve and the resistance curve from the borderless image based on the image color information. The coordinate transformation module is used to extract pixel sets of current reference lines and resistance reference lines from the borderless image through color recognition, frequency statistics, and contour detection; determine the pixel coordinates of the current intersection point and the resistance intersection point based on the pixel sets of the current reference lines and the resistance reference lines; locate the coordinate display boxes of the current intersection point and the resistance intersection point in the borderless image based on the image color information; perform text recognition on the coordinate display boxes to obtain the true coordinates of the current intersection point and the resistance intersection point; and convert the pixel coordinates of each pixel in the pixel sets of the current curve and the resistance curve into true coordinates based on the origin coordinates, the pixel coordinates of the current intersection point and the resistance intersection point, and the true coordinates of the current intersection point and the resistance intersection point to the true coordinate sets of the resistance curve and the current curve. The data verification module is used to perform a missing value filling operation when the lengths of the true coordinate sets of the resistance curve and the current curve are inconsistent, so as to obtain the standard coordinate sets of the current curve and the resistance curve.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.