A method and system for real-time wire diameter detection of multi-metal solder strips

By combining a backlight source and a linear CCD image sensor with a subpixel edge extraction algorithm, the problems of low efficiency and poor accuracy in multi-metal solder strip detection are solved, achieving high-precision wire diameter detection at high speeds and improving detection efficiency and stability.

CN121329975BActive Publication Date: 2026-03-10SUZHOU TONYSHARE ELECTRONICS MATERIALS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies for multi-metal weld strip inspection suffer from low efficiency, large measurement errors, and poor stability, especially in high-speed motion conditions where high-precision wire diameter detection is difficult to achieve.

Method used

A constant backlight source and a linear CCD image sensor are used in conjunction with a subpixel edge extraction algorithm. By generating a high-contrast contour boundary solder strip projection, continuous line scanning and edge point extraction based on grayscale gradient are performed. The edge coordinates with subpixel accuracy are calculated by combining a cubic spline interpolation algorithm, and finally the wire diameter measurement value is calculated.

Benefits of technology

It enables high-precision wire diameter detection of multi-metal weld strips under high-speed motion, improving detection efficiency and stability, reducing noise interference, and ensuring the reliability and accuracy of measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121329975B_ABST
    Figure CN121329975B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for real-time wire diameter detection of multi-metal solder strips, relating to the field of photoelectric measurement technology. The method includes: generating a high-contrast projection by having a linearly moving multi-metal solder strip pass through a constant backlight illumination area; controlling a linear CCD to perform continuous line scanning in a vertical motion direction to acquire image frames; determining the left and right edge coordinates with sub-pixel accuracy based on a grayscale gradient edge extraction algorithm; and calculating the wire diameter measurement value based on the edge coordinate difference and calibration coefficient, followed by real-time filtering. The system correspondingly includes a backlight illumination module, an image acquisition module, an edge processing module, and a wire diameter calculation module. This invention eliminates reflective interference through backlight illumination, utilizes high-speed scanning of a linear CCD to adapt to motion states, and combines a sub-pixel algorithm to improve accuracy, effectively solving the problem of high-precision real-time detection of metal solder strip wire diameter under high-speed conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of photoelectric measurement technology, and in particular to a method and system for real-time wire diameter detection of multi-metal solder strips. Background Technology

[0002] In the field of photovoltaic module and electronic component manufacturing, multi-metal solder ribbons are key interconnect materials, and their wire diameter uniformity directly affects the conductivity and welding reliability of the product. Traditional inspection methods face significant technical bottlenecks: contact measurement (such as micrometers) suffers from low efficiency and is prone to material deformation, failing to meet the full inspection requirements of high-speed production lines; laser scanning methods require extremely high installation alignment accuracy, and the strong reflective properties of metal surfaces easily interfere with the measurement signal, resulting in insufficient stability; visual measurement methods based on area CCD arrays are limited by exposure time and image processing volume, making it difficult to balance image clarity and sampling frequency in high-speed scenarios, easily causing motion blur and poor real-time performance.

[0003] Furthermore, factors such as solder strip vibration caused by high-speed movement, surface oil contamination, and lighting fluctuations further exacerbate measurement errors. Therefore, there is an urgent need for a real-time wire diameter detection method for multi-metal solder strips that can adapt to high-speed movement conditions. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, the embodiments of this application provide a method for real-time wire diameter detection of multi-metal solder strips to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this application provides a method for real-time wire diameter detection of multi-metal solder strips, comprising:

[0006] The multi-metal solder ribbon, moving in a straight line, passes through the illumination area generated by a constant backlight source, generating a solder ribbon projection with a high-contrast contour boundary.

[0007] Controlling a linear CCD image sensor to continuously scan the projection of the multi-metal solder ribbon with its scanning direction perpendicular to the movement direction of the ribbon, and acquiring a linear image frame composed of a series of single-column pixels, includes: calculating the minimum line scanning frequency required by the linear CCD image sensor based on the movement speed of the multi-metal solder ribbon and the target space sampling accuracy; setting the actual line scanning frequency of the linear CCD image sensor to a value not less than the minimum line scanning frequency; and controlling the linear CCD image sensor to perform continuous line scanning with the set line scanning frequency to obtain the linear image frame composed of a series of single-column pixels.

[0008] For each frame of the linear array image, edge point extraction based on grayscale gradient is performed to determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame. This includes: performing first-order differential processing on the pixel grayscale value sequence of the linear array image frame to obtain a grayscale gradient sequence. The first-order differential processing adopts the central difference method, and its calculation formula is as follows: ,in, Indicates the first grayscale value of each pixel. Indicates the first grayscale gradient value at each pixel Indicates the first grayscale value of each pixel. Indicates the first The grayscale values ​​of each pixel are calculated; in the grayscale gradient sequence, the maximum positive value and its corresponding pixel position are found as the initial coordinates of the right edge, and the minimum negative value and its corresponding pixel position are found as the initial coordinates of the left edge; based on the initial coordinates of the left edge and the initial coordinates of the right edge, and combined with the cubic spline interpolation algorithm, the sub-pixel precision left edge coordinates and right edge coordinates are calculated.

[0009] The wire diameter of the multi-metal solder strip is calculated based on the difference in pixel coordinates on the left and right sides, combined with the calibration coefficients of the physical size of the pixels and the optical magnification in the linear CCD image sensor.

[0010] To address the aforementioned problems, this application also provides a real-time wire diameter detection system for multi-metal solder strips, the system comprising:

[0011] The projection generation module is used to make the multi-metal solder ribbon moving in a straight line pass through the illumination area generated by a constant backlight source to generate a solder ribbon projection with a high-contrast contour boundary.

[0012] The scanning and acquisition module controls a linear CCD image sensor to perform continuous line scanning on the projection of the multi-metal solder ribbon with its scanning direction perpendicular to the movement direction of the ribbon, thereby acquiring a linear image frame composed of a series of single-column pixels. The module includes: calculating the minimum line scanning frequency required by the linear CCD image sensor based on the movement speed of the multi-metal solder ribbon and the target space sampling accuracy; setting the actual line scanning frequency of the linear CCD image sensor to a value not less than the minimum line scanning frequency; and controlling the linear CCD image sensor to perform continuous line scanning at the set line scanning frequency to obtain the linear image frame composed of a series of single-column pixels.

[0013] The edge extraction module is used to extract edge points based on grayscale gradients for each frame of the linear array image, and to determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame. This includes: performing first-order differential processing on the pixel grayscale value sequence of the linear array image frame to obtain a grayscale gradient sequence. The first-order differential processing uses the central difference method, and its calculation formula is as follows: ,in, Indicates the first grayscale value of each pixel. Indicates the first grayscale gradient value at each pixel Indicates the first grayscale value of each pixel. Indicates the first The grayscale values ​​of each pixel are calculated; in the grayscale gradient sequence, the maximum positive value and its corresponding pixel position are found as the initial coordinates of the right edge, and the minimum negative value and its corresponding pixel position are found as the initial coordinates of the left edge; based on the initial coordinates of the left edge and the initial coordinates of the right edge, and combined with the cubic spline interpolation algorithm, the sub-pixel precision left edge coordinates and right edge coordinates are calculated.

[0014] The wire diameter calculation module is used to calculate the wire diameter measurement value of the multi-metal solder strip based on the difference between the pixel coordinates of the left and right edge sides, and in combination with the calibration coefficient of the physical size of the pixel and the optical magnification of the linear CCD image sensor.

[0015] This invention effectively solves several technical challenges in high-speed metal ribbon diameter detection by organically integrating a constant backlight illumination system, a high-speed linear CCD scanning strategy, and a sub-pixel edge extraction algorithm. First, the backlight illumination combined with optical homogenizing elements completely eliminates the interference of ribbon surface reflections on imaging, generating a high-contrast projection with a steep grayscale gradient, providing a reliable image foundation for accurate edge positioning. The linear CCD scanning method perpendicular to the direction of motion and its speed-adaptive line frequency ensure unambiguous acquisition of each frame at high speeds, achieving coordinated optimization of temporal and spatial resolution. The sub-pixel processing algorithm, combining the center difference method and cubic spline interpolation, significantly improves edge positioning accuracy, overcomes coordinate fluctuations caused by noise and jitter, and enables single-measurement accuracy to break through the physical limitations of pixels.

[0016] Secondly, a precise mapping relationship between image pixels and actual physical dimensions was established through calibration coefficients. Combined with a real-time filtering mechanism, measurement fluctuations were effectively suppressed, resulting in stable and reliable line diameter data. This invention deeply integrates optical design, image acquisition, and processing algorithms, forming a dedicated detection system for high-speed, high-reflectivity scenarios. This not only significantly improves detection efficiency and accuracy but also enhances the system's anti-interference capability and robustness in complex industrial environments. Attached Figure Description

[0017] Figure 1 A schematic flowchart of a real-time wire diameter detection method for multi-metal solder strips provided in an embodiment of this application;

[0018] Figure 2 This is a functional block diagram of a real-time wire diameter detection system for multi-metal welding strips provided in an embodiment of this application;

[0019] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0021] This application provides a method for real-time wire diameter detection of multi-metal solder ribbon. The execution subject of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method for real-time wire diameter detection of multi-metal solder ribbon can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.

[0022] Reference Figure 1 The diagram shown is a flowchart illustrating a real-time wire diameter detection method for multi-metal solder strips according to an embodiment of this application. In this embodiment, the real-time wire diameter detection method for multi-metal solder strips includes:

[0023] S1. The multi-metal solder ribbon, which is moving in a straight line, passes through the illumination area generated by a constant backlight source to generate a solder ribbon projection with a high-contrast contour boundary.

[0024] In this embodiment, the multi-metal welding strip in linear motion refers to the state in which the multi-metal welding strip moves along a preset linear trajectory at a constant speed under the drive of the production conveyor device. This state ensures that the position of the welding strip is stable during the inspection process and avoids inspection errors caused by deviation in the direction of movement. The constant backlight source refers to an illumination device that can continuously output stable light intensity and uniform light distribution. Its function is to provide a stable light environment for the projection of the welding strip and avoid the impact of light intensity fluctuations on the clarity of the welding strip outline boundary. The illumination area refers to the specific spatial range covered by the constant backlight source for illuminating the multi-metal welding strip. The size of this range must ensure that the welding strip is completely within it to ensure that the entire welding strip can form a complete projection.

[0025] In this embodiment, the high-contrast contour boundary projection of the solder strip refers to the image projection of the solder strip under backlight illumination, where the grayscale difference between its contour and the background is significant. This projection can clearly show the edge shape of the solder strip, laying the foundation for subsequent extraction of edge pixel coordinates.

[0026] In some embodiments, the process of passing a multi-metallic solder ribbon in a linear motion through an illumination area generated by a constant backlight source to generate a solder ribbon projection with a high-contrast contour boundary includes:

[0027] An LED linear light source with a light-emitting surface length greater than the width of the multi-metal solder strip is used as the constant backlight source;

[0028] An optical homogenizing element is provided in the light output path of the LED linear light source to generate a uniformly distributed illumination area;

[0029] The multi-metal solder ribbon is controlled to pass through the illumination area. Based on the light-blocking effect of the solder ribbon, a projection of the solder ribbon is formed on the photosensitive surface of the linear CCD image sensor. The central area is a low gray value region and the two sides are high gray value regions. A steep gray value gradient change is formed between the low gray value region and the high gray value region.

[0030] First, start the production conveyor device for the multi-metal welding ribbon and adjust the ribbon's movement speed to a preset constant value. This speed is typically set according to production requirements; for example, in photovoltaic welding ribbon production, the common speed range is 8-15 m / s. In this embodiment, it is set to 10 m / s to ensure the welding ribbon passes through the detection area in a straight line. Second, select a suitable constant backlight source. In this embodiment, an LED linear light source with a luminous surface length greater than the width of the multi-metal welding ribbon is used. Assuming the welding ribbon width is 1.5 mm, the luminous surface length of the LED linear light source is set to 5 mm to ensure the welding ribbon is completely within the illumination range. Next, install an optical homogenizing element on the light path of the LED linear light source. This element can be frosted glass or a microlens array; in this embodiment, a microlens array is used. Its function is to homogenize the light emitted by the LED linear light source. The light emitted by the light source is homogenized to achieve a light intensity distribution uniformity of over 90% within the illuminated area, preventing blurring of localized solder ribbon projections due to uneven light intensity. Finally, the multi-metal solder ribbon, moving in a straight line, is controlled to precisely pass through the homogenized illuminated area along a preset trajectory. Due to the opacity of the solder ribbon, it blocks the light emitted by the backlight source, forming a solder ribbon projection on the photosensitive surface of the subsequent linear CCD image sensor. This projection consists of a low grayscale region in the center and high grayscale regions on both sides. The low grayscale region corresponds to the solder ribbon itself, while the high grayscale regions correspond to the unblocked background light. The grayscale difference between the low and high grayscale regions is greater than 80 (grayscale range 0-255), creating a steep grayscale gradient change, thus generating a solder ribbon projection with a high-contrast contour boundary.

[0031] In this embodiment, step S1 solves the problem of blurred projected contours caused by unstable lighting or solder strip reflections in existing detection methods. By combining a constant backlight source with an optical homogenizing element, the interference of light fluctuations and solder strip metal surface reflections on imaging is effectively eliminated, ensuring clear solder strip projected contour boundaries.

[0032] S2. Control the linear CCD image sensor to perform continuous line scanning on the projection of the solder strip with its scanning direction perpendicular to the movement direction of the multi-metal solder strip, and acquire a linear image frame composed of a series of single-column pixels.

[0033] In this embodiment, the linear CCD image sensor is an optical sensor composed of multiple photosensitive pixels arranged in a straight line. It can convert the received light signal into an electrical signal, thereby generating a series of grayscale data of pixels, which is suitable for continuous imaging of high-speed moving objects. The scanning direction is the direction in which the linear CCD image sensor collects pixel data. In this embodiment, this direction forms a 90-degree angle with the movement direction of the multi-metal solder ribbon to ensure that each scan can cover the entire width range of the solder ribbon. The movement direction of the multi-metal solder ribbon refers to the direction in which the solder ribbon is transported on the production line. In the photovoltaic solder ribbon production scenario, this direction is usually horizontal, and the solder ribbon moves along this direction at a constant speed.

[0034] In this embodiment, the solder ribbon projection is a shadow image formed on the photosensitive surface of the linear CCD image sensor under constant backlight illumination as described in step S1. The projection has a high-contrast contour boundary, a low grayscale value area in the middle, and high grayscale value areas on both sides. Continuous line scanning is the process by which the linear CCD image sensor continuously acquires image data along the scanning direction at preset time intervals. In this way, continuous image data reflecting the state of the solder ribbon at different times during its movement can be obtained. A linear image frame composed of a single column of pixels is an image data unit output by the linear CCD image sensor after each line scan. Each frame contains only the grayscale value information of one column of pixels. Multiple consecutive frames are arranged in chronological order, which can reflect the morphological changes of the solder ribbon in the direction of movement.

[0035] In some embodiments, the control linear CCD image sensor performs continuous linear scanning of the solder strip projection with its scanning direction perpendicular to the movement direction of the multi-metal solder strip, acquiring a linear image frame composed of a series of single-column pixels, including:

[0036] Based on the movement speed of the multi-metal welding strip and the target space sampling accuracy, calculate the minimum scanning frequency required by the linear CCD image sensor;

[0037] The actual line scanning frequency of the linear CCD image sensor is set to a value that is not less than the minimum line scanning frequency;

[0038] The linear CCD image sensor is controlled to perform continuous line scanning at a set line scanning frequency to obtain the linear image frame composed of a series of single-column pixels.

[0039] In this embodiment, the minimum scanning frequency is the lowest scanning frequency required to ensure accurate capture of changes in the solder ribbon diameter. It is determined by the movement speed of the solder ribbon and the sampling accuracy of the target space. It is a key parameter to avoid distortion in the ribbon diameter measurement due to excessive scanning interval. The actual line scanning frequency is the scanning frequency of the linear CCD image sensor during actual operation. This frequency needs to be set to a value not less than the minimum scanning frequency to ensure sufficient sampling density to reflect the true ribbon diameter.

[0040] In this embodiment, the scanning direction of the linear CCD image sensor needs to be determined first. The scanning direction is adjusted to be perpendicular to the movement direction of the multi-metal solder ribbon. For example, when the solder ribbon moves horizontally at a speed of 10 m / s, the scanning direction of the linear CCD is set to the vertical direction to ensure that each scan covers the entire width of the solder ribbon, providing complete image data for accurate wire diameter measurement. Next, the minimum scanning frequency required by the linear CCD image sensor needs to be calculated. The calculation of the minimum scanning frequency requires consideration of the movement speed of the multi-metal solder ribbon and the target space sampling accuracy. The target space sampling accuracy refers to the actual distance between two adjacent scans in the direction of solder ribbon movement; this accuracy determines the resolution of the wire diameter measurement. Assuming that the target space sampling accuracy is set to 0.01 mm (i.e., 1 × 10⁻⁻⁶) in this embodiment... 5 The welding strip's movement speed is 10 m / s. According to the formula "Minimum scanning frequency = Welding strip movement speed ÷ Target space sampling accuracy", the minimum scanning frequency can be calculated as 10 m / s ÷ 1 × 10⁻⁻⁴. 5 m = 1 × 10 6 Hz (i.e. 1MHz) is calculated to ensure that at least one scan is completed within a distance of 0.01mm of solder ribbon movement, thus enabling the capture of minute changes in wire diameter.

[0041] In this embodiment, after calculating the minimum scanning frequency, the actual line scanning frequency of the linear CCD image sensor needs to be set to a value not less than this minimum scanning frequency. This is because in practical applications, there may be fluctuations in the solder ribbon speed or other interference factors, and reserving a certain frequency redundancy can ensure the reliability of sampling. In this embodiment, an actual line scanning frequency of 1.2MHz is selected, which is greater than the calculated minimum scanning frequency of 1MHz, thus meeting the sampling density requirements.

[0042] In this embodiment, after setting the line scanning frequency, the linear CCD image sensor is controlled to continuously scan the solder ribbon projection using the set frequency. The linear CCD image sensor converts the received light signal into an electrical signal through photosensitive pixels, and outputs grayscale data of a single column of pixels after analog-to-digital conversion. Each column of data constitutes a frame of linear image. For example, a scanning frequency of 1.2 MHz can generate 1.2 × 10⁻⁶ pixels per second. 6Linear image frames are arranged in chronological order to form a continuous data stream.

[0043] In this embodiment, step S2 addresses the problem that existing visual measurement methods based on linear CCD arrays struggle to balance measurement speed and image clarity on high-speed production lines. By rationally setting the scanning direction and frequency of the linear CCD array, it ensures complete capture of the solder ribbon width information while achieving high-frequency sampling, meeting the real-time detection requirements of high-speed moving solder ribbons. Simultaneously, the image frame data volume per column of pixels is small, reducing the pressure on subsequent data processing.

[0044] S3. Extract edge points based on grayscale gradient for each linear array image frame to determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame.

[0045] In this embodiment, each image frame in the linear array image frame contains a column of grayscale value data for pixels. The number of pixels is consistent with the resolution of the linear CCD (4096 pixels in this embodiment), serving as the basic image data for subsequent edge point extraction. The grayscale gradient is the rate of change of grayscale values ​​between adjacent pixels in the linear array image frame. It quantifies the degree of change in pixel grayscale values; the larger the grayscale gradient value, the more significant the grayscale change at that location. It typically corresponds to the edge position of the solder ribbon projection and is a core feature parameter for edge identification. Edge point extraction is the process of identifying and determining the pixel points corresponding to the contour edges of the solder ribbon projection from the linear array image frame. Through this process, the edge position information on the left and right sides of the solder ribbon projection can be obtained, providing crucial coordinate data for subsequent wire diameter calculation.

[0046] In this embodiment, the pixel coordinates of the left and right edges of the multi-metal ribbon projection are the position values ​​of the pixels corresponding to the left and right contours of the ribbon projection in the image coordinate system within the linear array image frame. These coordinates are in pixels, with the left edge coordinate value being smaller than the right edge coordinate value; the difference between the two reflects the image width of the ribbon projection.

[0047] In some embodiments, the step of extracting edge points based on grayscale gradients for each linear array image frame and determining the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame includes:

[0048] The pixel grayscale value sequence of the linear array image frame is subjected to first-order differential processing to obtain a grayscale gradient sequence. The first-order differential processing adopts the central difference method, and its calculation formula is as follows:

[0049]

[0050] in, Indicates the first grayscale value of each pixel. Indicates the first grayscale gradient value at each pixel Indicates the first grayscale value of each pixel. Indicates the first grayscale value of each pixel;

[0051] In the grayscale gradient sequence, the maximum positive value and its corresponding pixel position are found as the initial coordinates of the right edge, and the minimum negative value and its corresponding pixel position are found as the initial coordinates of the left edge.

[0052] Based on the initial coordinates of the left edge and the initial coordinates of the right edge, and combined with the cubic spline interpolation algorithm, the left edge coordinates and right edge coordinates with sub-pixel precision are calculated.

[0053] In this embodiment, the pixel grayscale value sequence is a data sequence formed by arranging the grayscale values ​​of a column of pixels in a linear array image frame according to their pixel positions. For example, the pixel grayscale value sequence of a certain image frame is [250,252,248,...,30,28,32,...,251,249], where the lower grayscale values ​​in the middle (such as 30, 28) correspond to the solder ribbon projection area, and the higher grayscale values ​​on both sides (such as 250, 252) correspond to the background area.

[0054] In this embodiment, first-order differential processing is a method of performing mathematical operations on the pixel grayscale value sequence to obtain the grayscale gradient sequence. It quantifies the trend of grayscale value change by calculating the change in grayscale values ​​between adjacent pixels. In this embodiment, the central difference method is used to implement this processing.

[0055] In this embodiment, the center difference method is a specific algorithm for first-order differential processing. It calculates the difference in grayscale values ​​between adjacent pixels and divides it by 2 to obtain the grayscale gradient value at that pixel. This algorithm has high calculation accuracy and can effectively preserve detailed information about grayscale changes, making it suitable for fine-grained identification of solder strip edges.

[0056] In this embodiment, the grayscale gradient sequence is a data sequence obtained by performing first-order differentiation on the pixel grayscale value sequence. Each value in this sequence corresponds to the grayscale gradient value of the corresponding pixel in the original pixel grayscale value sequence, and serves as a direct basis for finding the initial coordinates of the edge.

[0057] In some embodiments, calculating the sub-pixel precision left and right edge coordinates based on the initial coordinates of the left and right edges, combined with a cubic spline interpolation algorithm, includes:

[0058] Using the initial coordinates of the left edge and the initial coordinates of the right edge as centers, extract multiple adjacent gradient values ​​from the gray-level gradient sequence as interpolation nodes.

[0059] Using the index value of the interpolation node as the independent variable and the corresponding gradient value as the dependent variable, a cubic spline interpolation function passing through all the interpolation nodes is constructed.

[0060] By solving for the zero-crossing point of the first derivative of the cubic spline interpolation function, the left and right edge coordinates with sub-pixel precision are calculated.

[0061] In this embodiment, the initial coordinates of the left edge are the pixel position value corresponding to the smallest negative value in the grayscale gradient sequence. This is the preliminary positioning result of the left edge of the solder strip projection, providing an initial reference for subsequent calculation of sub-pixel precision coordinates.

[0062] In this embodiment, the initial coordinates of the right edge are the pixel position value corresponding to the maximum positive value in the grayscale gradient sequence. This is the preliminary positioning result of the right edge of the solder ribbon projection, and together with the initial coordinates of the left edge, it forms the basis for fine edge positioning.

[0063] In this embodiment, the cubic spline interpolation algorithm is a mathematical algorithm that constructs a smooth, continuous function using known interpolation nodes. This algorithm can construct a continuous function that conforms to the grayscale gradient change trend based on a finite number of gradient value nodes, thereby achieving sub-pixel level edge coordinate calculation and improving edge positioning accuracy.

[0064] In some embodiments, when finding the maximum positive value and its corresponding pixel position as the initial coordinates of the right edge and the minimum negative value and its corresponding pixel position as the initial coordinates of the left edge in the gray-level gradient sequence, the method further includes:

[0065] When searching for extreme points in the gray-level gradient sequence, only extreme points whose absolute gradient value is greater than a preset gradient threshold are listed as candidate objects. The preset gradient threshold is determined according to the background noise level of the linear array image frame.

[0066] When multiple candidate extreme points that meet the conditions are detected in a single-sided edge region, the candidate point with the largest absolute gradient value is selected as the final valid initial edge point.

[0067] In this embodiment, the sub-pixel precision left and right edge coordinates are obtained by optimizing the initial edge coordinates using a cubic spline interpolation algorithm, resulting in edge position values ​​with higher precision than a single pixel.

[0068] In this embodiment, an extreme point is a point in the grayscale gradient sequence where the value reaches a local maximum or minimum. The local maximum corresponds to a possible left edge position, and the local minimum corresponds to a possible right edge position, but these must be filtered using a preset gradient threshold to eliminate noise interference.

[0069] In this embodiment, the preset gradient threshold is a value used to filter valid extreme points. This value is determined based on the background noise level of the linear array image frame. In this embodiment, by acquiring a background image without solder strips, the standard deviation of its grayscale value is calculated to be 5, and the preset gradient threshold is set to 10 (i.e., twice the standard deviation). Only extreme points with an absolute gradient value greater than this threshold are retained as edge candidate points.

[0070] In this embodiment, the background noise level is the random fluctuation amplitude of grayscale values ​​in a linear array image frame, excluding solder ribbon projection, caused by factors such as light source fluctuations and sensor noise. This level can be quantified by calculating the standard deviation of the grayscale values ​​of the background image, which is the core basis for setting the preset gradient threshold. In this embodiment, the standard deviation corresponding to this level is 5.

[0071] In this embodiment, a single-sided edge region refers to a region formed by extending a certain number of pixels to the left and right sides from the initial coordinates of the edge. In this embodiment, this range is set to 5 pixels to limit the search range for extreme points and avoid misjudging noise points far from the edge as edge points.

[0072] In this embodiment, the effective initial edge point is the extreme point that best represents the true edge position, selected from candidate extreme points within a single edge region. The selection criterion is the maximum absolute gradient value, ensuring that the point accurately reflects the grayscale change characteristics of the weld strip projection edge.

[0073] In this embodiment, the linear array image frame output in step S2 needs to be acquired first. The linear array CCD image sensor continuously outputs linear array image frames at a line scanning frequency of 1.2MHz. The image acquisition module in the industrial control computer receives these image frames in real time and arranges the single-column pixel grayscale values ​​of each image frame into a pixel grayscale value sequence according to their position. For example, the pixel grayscale value sequence of a certain image frame is I[0]=250,I[1]=252,I[2]=248,...,I

[1000] =32,I

[1001] =30,I

[1002] =28,...,I

[1684] =31,I

[1685] =33,...,I

[4095] =249, where I[i] represents the grayscale value of the i-th pixel.

[0074] In this embodiment, the pixel grayscale value sequence is then subjected to first-order differential processing to obtain a grayscale gradient sequence. The processing adopts the central difference method, and its calculation formula is "grayscale gradient value g[i] at the i-th pixel = (grayscale value I[i+1] of the (i+1)-grayscale value I[i-1] of the (i-1)-th pixel) / 2". The parameter values ​​of this formula are based on the pixel grayscale value sequence of the linear array image frame, where the value of i ranges from 1 to 4094 (the first and last pixels of the sequence are excluded because the pixel grayscale values ​​of i-1 and i+1 need to be obtained). Taking the 1001st pixel in the sequence (I

[1001] =30) as an example, its previous pixel I

[1000] =32 and its next pixel I

[1002] =28. Substituting into the formula, we can get g

[1001] =(28-32) / 2=-2. By performing this calculation on each pixel in the sequence that meets the conditions, a grayscale gradient sequence can be obtained, for example, g

[999] =(30-248) / 2=-109, g

[1000] =(28-32) / 2=-2, g

[1001] =(31-32) / 2=-0.5, g

[1683] =(33-31) / 2=1, g

[1684] =(251-31) / 2=110, etc. This calculation process is executed in real time by the data processing module in the industrial control computer. The grayscale gradient sequence is calculated immediately after each image frame is received, ensuring the real-time performance of the detection.

[0075] In this embodiment, after obtaining the grayscale gradient sequence, it is necessary to find the initial coordinates of the left edge and the initial coordinates of the right edge in the sequence, and at the same time, a preset gradient threshold filtering mechanism is introduced to eliminate noise interference. First, the grayscale gradient sequence is traversed to search for all extreme points where the absolute value of the gradient is greater than the preset gradient threshold (10 in this embodiment): in the left region of the ribbon projection (near pixel position 1000), the gradient value g

[999] =-109 (absolute value 109>10) is found to be a local maximum value (the adjacent gradient values ​​in the left region are all less than this value), and it is listed as a candidate point for the left edge; in the right region of the ribbon projection (near pixel position 1684), the gradient value g

[1684] =110 (absolute value 110>10) is found to be a local minimum value (the adjacent gradient values ​​in the right region are all greater than this value), and it is listed as a candidate point for the right edge. If there are multiple candidate extreme points in the single-sided edge region (such as two candidate points g

[998] =-95 and g

[999] =-109 in the left edge region at the same time), then the point with the largest absolute gradient value (the pixel position 999 corresponding to g

[999] =-109) is selected as the initial coordinate of the left edge, and similarly, the pixel position 1684 corresponding to g

[1684] =110 is selected as the initial coordinate of the right edge.

[0076] In this embodiment, the sub-pixel precision edge coordinates are calculated based on the initial coordinates of the left edge (999 pixels) and the initial coordinates of the right edge (1684 pixels), using a cubic spline interpolation algorithm. The specific steps are as follows:

[0077] The first step is to extract the five adjacent gradient values ​​from the gray-level gradient sequence, centered on the initial edge coordinates, as interpolation nodes. For example, the interpolation nodes corresponding to the initial coordinates of the left edge 999 are pixel positions 997 (g

[997] =-80), 998 (g

[998] =-95), 999 (g

[999] =-109), 1000 (g

[1000] =-2), and 1001 (g

[1001] =-0.5). The interpolation nodes corresponding to the initial coordinates of the right edge 1684 are pixel positions 1682 (g

[1682] =0.8), 1683 (g

[1683] =1), 1684 (g

[1684] =110), 1685 (g

[1685] =98), and 1686 (g

[1686] =85).

[0078] The second step involves constructing a cubic spline interpolation function y=S(x) that passes through all interpolation nodes, using the index value (pixel position, such as 997, 998) of the interpolation node as the independent variable x and the corresponding gradient value (such as -80, -95) as the dependent variable y. This function is obtained by satisfying the interpolation condition (the function value at each node is equal to the gradient value) and the smoothness condition (the first and second derivatives at the nodes are continuous), and can accurately fit the changing trend of the gray-level gradient.

[0079] The third step is to find the zero-crossing point of the first derivative of the cubic spline interpolation function S'(x) = 0. The x value corresponding to this zero-crossing point is the sub-pixel precision edge coordinate. For example, the zero-crossing point of the first derivative of the left edge interpolation function S(x) is x = 1000.85, which means the sub-pixel precision left edge coordinate is 1000.85 pixels; the zero-crossing point of the first derivative of the right edge interpolation function S(x) is x = 1684.20, which means the sub-pixel precision right edge coordinate is 1684.20 pixels.

[0080] In this embodiment, step S3 addresses the problems of low positioning accuracy and susceptibility to noise interference in existing edge detection algorithms during high-speed solder strip detection. By accurately calculating the grayscale gradient using the central difference method, filtering out noise using a preset gradient threshold, and then employing a cubic spline interpolation algorithm, the edge positioning accuracy is improved to the sub-pixel level. This effectively avoids edge misjudgment caused by solder strip surface reflection and light source fluctuations, ensuring the accuracy of edge coordinates.

[0081] S4. Based on the difference in pixel coordinates on the left and right sides, and combined with the calibration coefficients of the physical size of the pixels and the optical magnification in the linear CCD image sensor, calculate the wire diameter measurement value of the multi-metal solder strip.

[0082] In some embodiments, calculating the wire diameter measurement of the multi-metal solder strip based on the difference in pixel coordinates of the left and right edges, combined with the calibration coefficients of the physical size and optical magnification of the pixels in the linear CCD image sensor, includes:

[0083] The difference between the left and right edge pixel coordinates is multiplied by a pre-calibrated calibration coefficient to obtain the line diameter measurement value of the current frame, wherein the calibration coefficient is the ratio of the physical size of the pixel to the magnification of the optical system.

[0084] In this embodiment, the physical size of a pixel is the actual physical length of a single photosensitive unit of the linear CCD image sensor. The linear CCD image sensor used in this embodiment has a pixel physical size of 7 μm. This parameter is an inherent property of the sensor and determines the basic accuracy of the conversion between image data and actual physical size.

[0085] In this embodiment, optical magnification is the magnification ratio by which the optical lens in the detection system images the actual object onto the photosensitive surface of the image sensor. In this embodiment, the telecentric lens has an optical magnification set to 5, meaning that the image size of the actual object on the photosensitive surface after being imaged by the lens is 5 times the actual size of the object.

[0086] In some embodiments, the calibration coefficients are obtained through the following calibration steps:

[0087] The standard gauge block is fixedly placed within the lighting area;

[0088] The linear CCD image sensor is controlled to perform a line scan on the projection of the stationary standard gauge block to acquire a linear image frame of the standard gauge block.

[0089] Edge point extraction based on grayscale gradient is performed on the linear array image frame to obtain the edge pixel coordinate difference of the standard block projection;

[0090] According to the formula The calibration coefficients were calculated. ,in, This refers to the actual size of the standard gauge block. It is the difference in edge pixel coordinates.

[0091] In this embodiment, the calibration coefficient is a conversion coefficient used to convert the pixel coordinate difference in an image into the actual size of the object. Its value is equal to the ratio of the physical size of the pixel to the optical magnification (since the optical magnification is the ratio of the image size to the object size, the actual size calculation requires dividing the pixel physical size by the magnification, i.e., calibration coefficient = pixel physical size / optical magnification). In this embodiment, it is determined through pre-calibration and is a key parameter connecting image data and physical size.

[0092] In this embodiment, the wire diameter measurement value is the actual width or diameter of the multi-metal solder strip calculated from image data. This value is expressed in length units (such as μm, mm) and is the core inspection result for determining whether the solder strip meets production size standards.

[0093] In this embodiment, the standard gauge block is a standard measuring instrument with known precise dimensions. In this embodiment, a first-order standard gauge block with a diameter of 1.000 mm (i.e., 1000 μm) is selected, whose dimensional accuracy conforms to national metrological standards, and is used to calibrate the detection system to obtain accurate calibration coefficients. In some embodiments, after calculating the wire diameter measurement value of the multi-metal weld strip, the method further includes:

[0094] Real-time filtering is performed on multiple consecutive wire diameter measurements to suppress fluctuations in measurements caused by multi-metal solder strip jitter or noise.

[0095] In this embodiment, real-time filtering is an algorithmic process that smooths multiple continuously acquired wire diameter measurements. This process can suppress fluctuations in measurement values ​​caused by interference factors such as solder ribbon jitter and image noise, and output more stable detection results.

[0096] In this embodiment, the preset gradient threshold is a threshold used to filter valid gradient values ​​during edge point extraction. This threshold is determined based on the background noise level of the linear array image frame, and only extreme points with absolute gradient values ​​greater than the threshold are retained as edge candidate points to exclude noise interference.

[0097] In this embodiment, the background noise level is the random grayscale fluctuation amplitude in a linear array image frame, excluding solder ribbon projection, caused by factors such as light source fluctuation and sensor noise. In this embodiment, the background noise level is determined by acquiring a background image without solder ribbon and calculating its grayscale value standard deviation, providing a basis for setting a preset gradient threshold.

[0098] In this embodiment, the difference between the left and right edge pixel coordinates output in step S3 needs to be obtained first. Assuming the left edge sub-pixel coordinate determined in step S3 is 1000.85 pixels and the right edge sub-pixel coordinate is 1684.20 pixels, then the difference between the left and right edge pixel coordinates Δx = 1684.20 - 1000.85 = 683.35 pixels.

[0099] In this embodiment, the next step is to obtain the pre-calibrated calibration coefficients. The calibration coefficients are obtained through calibration using standard gauge blocks, and the specific steps are as follows:

[0100] First, fix the 1.000mm standard gauge block in the illumination area of ​​step S1, and ensure that the position of the gauge block is consistent with the position of the subsequent solder strip inspection to avoid calibration error due to position deviation;

[0101] The second step is to control the linear CCD image sensor to perform line scanning on the static standard block projection at the 1.2MHz line scanning frequency set in step S2, and acquire the linear array image frame of the standard block. This process is completely consistent with the image acquisition parameters of the solder strip detection, ensuring the uniformity of the calibration environment and the detection environment.

[0102] The third step is to perform the same edge point extraction algorithm based on grayscale gradient as in step S3 on the linear array image frame of the standard block to obtain the edge pixel coordinate difference Δx_calibrate of the standard block projection. In this embodiment, Δx_calibrate = 683.50 pixels is calculated.

[0103] The fourth step involves calculating the calibration coefficient using the formula "calibration coefficient = actual size of the standard gauge block / edge pixel coordinate difference". Substituting the actual size of the standard gauge block (1000μm) and the edge pixel coordinate difference (683.50 pixels) into the formula, we obtain a calibration coefficient of 1000μm / 683.50 pixels ≈ 1.463μm / pixel. This calibration process must be performed once before each start-up of the detection system to ensure that errors caused by changes in ambient temperature and lens position are corrected, thus guaranteeing the accuracy of the calibration coefficient.

[0104] In this embodiment, after obtaining the edge pixel coordinate difference and calibration coefficient, the line diameter measurement value of the current frame is calculated. According to the formula "Line diameter measurement value D = Difference between left and right edge pixel coordinates Δx × Calibration coefficient K", substituting Δx = 683.35 pixels and K = 1.463 μm / pixel, we get D = 683.35 pixels × 1.463 μm / pixel ≈ 999.7 μm, approximately equal to 1.000 mm. This calculation process completes the line diameter calculation immediately after acquiring the edge coordinate data of each frame of the linear array image, ensuring real-time detection.

[0105] In this embodiment, to suppress measurement fluctuations caused by multi-metal solder ribbon jitter or noise, real-time filtering of multiple consecutive wire diameter measurements is required. This embodiment employs a recursive average filtering algorithm, setting the filtering window size to 100. This means that the arithmetic average of 100 consecutive frames of wire diameter measurements is calculated, and the average value is used as the final output wire diameter measurement. For example, if the wire diameter measurements fluctuate between 998.5 μm and 1001.2 μm over 100 frames, after filtering, the average output value stabilizes at approximately 999.8 μm. The filtering algorithm is implemented through a software module in the industrial control computer. Each newly acquired wire diameter measurement value is added to the filtering window, while the oldest measurement value in the window is removed. The average value is then recalculated and output, ensuring that the filtering process does not affect the real-time performance of the detection.

[0106] In this embodiment of the application, in order to address the noise interference that may exist during the edge point extraction process, a preset gradient threshold filtering mechanism needs to be introduced when finding the initial coordinates of the edge.

[0107] First, a preset gradient threshold is determined based on the background noise level of the linear array image frame. In this embodiment, a background image without solder strips is acquired, and its grayscale value standard deviation is calculated to be 5. The preset gradient threshold is set to 10 (i.e., twice the standard deviation) to ensure that only gradient values ​​significantly higher than the noise level are retained as candidates.

[0108] Secondly, when searching for extreme points in the gray-level gradient sequence, only extreme points with an absolute gradient value greater than 10 are listed as edge candidate points to exclude false extreme points caused by noise.

[0109] Finally, when multiple candidate extrema with absolute gradient values ​​greater than 10 are detected in a single-sided edge region (such as within 5 pixels near the left edge), the candidate point with the largest absolute gradient value is selected as the final valid initial edge point. For example, if three extrema with gradient values ​​of 15, 12, and 8 are detected in the left edge region, with gradient values ​​greater than 10 for points 15 and 12, the pixel position corresponding to gradient value 15 is selected as the initial coordinate of the left edge, further improving the accuracy of edge localization and providing reliable edge coordinate data for subsequent line diameter calculation.

[0110] In this embodiment, step S4 addresses the problems of low accuracy in converting image data to actual size and large fluctuations in measured values ​​due to interference in existing detection methods. By establishing a precise correspondence between image data and physical size through calibration coefficients, calculation errors caused by differences in sensor and optical system parameters are avoided. Real-time filtering effectively suppresses ribbon jitter and noise interference, making the output wire diameter measurement more stable and meeting the dual requirements of detection accuracy and stability on high-speed production lines.

[0111] like Figure 2The diagram shown is a functional block diagram of a real-time wire diameter detection system for multi-metal welding strips provided in an embodiment of this application.

[0112] The real-time wire diameter detection system 100 for multi-metal solder strips described in this application can be installed in an electronic device. Depending on the functions implemented, the real-time wire diameter detection system 100 may include a projection generation module 101, a scanning acquisition module 102, an edge extraction module 103, and a wire diameter calculation module 104. The module described in this application can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0113] In this embodiment, the functions of each module / unit are as follows:

[0114] The projection generation module 101 is used to make the multi-metal solder ribbon moving in a straight line pass through the illumination area generated by a constant backlight source to generate a solder ribbon projection with a high-contrast contour boundary.

[0115] The scanning acquisition module 102 is used to control the linear CCD image sensor to continuously scan the projection of the solder strip with its scanning direction perpendicular to the movement direction of the multi-metal solder strip, and acquire a linear image frame composed of a series of single-column pixels.

[0116] The edge extraction module 103 is used to extract edge points based on grayscale gradient for each frame of the linear array image, and determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame.

[0117] The wire diameter calculation module 104 is used to calculate the wire diameter measurement value of the multi-metal solder strip based on the difference between the pixel coordinates of the left and right edge sides, and in combination with the calibration coefficient of the physical size of the pixel and the optical magnification of the linear CCD image sensor.

[0118] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0119] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0120] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0121] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application.

[0122] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A method for real-time diameter detection of multi-metal solder ribbon, characterized in that, The method comprises: passing the multi-metal solder strip in a linear motion state through an illumination area generated by a constant backlight illumination source to generate a solder strip projection with a high-contrast profile boundary; controlling a linear array CCD image sensor to perform continuous line scanning on the solder strip projection with its scanning direction perpendicular to the motion direction of the multi-metal solder strip, to obtain a linear array image frame composed of a series of single-column pixels, including: calculating the minimum line scanning frequency required by the linear array CCD image sensor according to the motion speed of the multi-metal solder strip and the target spatial sampling accuracy; setting the actual line scanning frequency of the linear array CCD image sensor to a value not less than the minimum line scanning frequency; controlling the linear array CCD image sensor to perform continuous line scanning at the set line scanning frequency to obtain the linear array image frame composed of a series of single-column pixels; For each frame of the linear array image, edge point extraction based on grayscale gradient is performed to determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame. This includes: performing first-order differential processing on the pixel grayscale value sequence of the linear array image frame to obtain a grayscale gradient sequence. The first-order differential processing adopts the central difference method, and its calculation formula is as follows: ,in, Indicates the first grayscale value of each pixel. Indicates the first grayscale gradient value at each pixel Indicates the first grayscale value of each pixel. Indicates the first The grayscale values ​​of each pixel are calculated; in the grayscale gradient sequence, the maximum positive value and its corresponding pixel position are found as the initial coordinates of the right edge, and the minimum negative value and its corresponding pixel position are found as the initial coordinates of the left edge; based on the initial coordinates of the left edge and the initial coordinates of the right edge, and combined with the cubic spline interpolation algorithm, the sub-pixel precision left edge coordinates and right edge coordinates are calculated. calculating the linear diameter measurement value of the multi-metal solder strip according to the difference between the left and right side edge pixel coordinates and in combination with the calibration coefficient of the physical size and optical magnification of the pixels in the linear array CCD image sensor.

2. The real-time diameter detection method of multi-metal solder strip according to claim 1, wherein, The passing of the multi-metal solder strip in a linear motion state through an illumination area generated by a constant backlight illumination source to generate a solder strip projection with a high-contrast profile boundary comprises: adopting an LED linear light source with a light-emitting surface length greater than the width of the multi-metal solder strip as the constant backlight illumination source; setting an optical homogenization element on the light-emitting light path of the LED linear light source to generate a uniformly distributed illumination area; controlling the multi-metal solder strip to pass through the illumination area, and based on the shielding effect of the solder strip on light, forming the solder strip projection with a low gray value area in the middle and high gray value areas on both sides on the light-sensitive surface of the linear array CCD image sensor, and forming an abrupt gray level gradient change between the low gray value area and the high gray value areas.

3. The method of claim 1, wherein the step of detecting the real-time diameter of the multi-metal solder ribbon is characterized by, The calculation of the left edge coordinate and the right edge coordinate with sub-pixel accuracy based on the left edge initial coordinate and the right edge initial coordinate and in combination with a cubic spline interpolation algorithm comprises: extracting a plurality of gradient values adjacent to the left and right of the left edge initial coordinate and the right edge initial coordinate as interpolation nodes from the gray level gradient sequence; constructing a cubic spline interpolation function passing through all the interpolation nodes with the index values of the interpolation nodes as independent variables and the corresponding gradient values as dependent variables; calculating the left edge coordinate and the right edge coordinate with sub-pixel accuracy by solving the zero-crossing point of the first derivative of the cubic spline interpolation function.

4. The method of claim 1, wherein the step of detecting the real-time diameter of the multi-metal solder ribbon is characterized by, When searching for the maximum positive value and its corresponding pixel position as the right edge initial coordinate and searching for the minimum negative value and its corresponding pixel position as the left edge initial coordinate in the gray level gradient sequence, it further comprises: when searching for extreme points in the gray level gradient sequence, only extreme points with a gradient absolute value greater than a preset gradient threshold value are listed as candidate objects, and the preset gradient threshold value is determined according to the background noise level of the linear array image frame; when a plurality of candidate extreme points meeting the conditions are detected in a single side edge area, the candidate point with the maximum gradient absolute value is selected as the final effective initial edge point.

5. The method of claim 1, wherein the step of detecting the real-time diameter of the multi-metal solder ribbon is characterized by, The line diameter measurement value of the multi-metallic welding strip is calculated according to the difference between the left and right side edge pixel coordinates and in combination with a calibration coefficient of a physical size of a pixel element in the linear array CCD image sensor and an optical magnification, and the line diameter measurement value of the multi-metallic welding strip is calculated according to the difference between the left and right side edge pixel coordinates and in combination with a calibration coefficient of a physical size of a pixel element in the linear array CCD image sensor and an optical magnification, and the line diameter measurement value of the multi-metallic welding strip is calculated according to the difference between the left and right side edge pixel coordinates and in combination with a calibration coefficient of a physical size of a pixel element in the linear array CCD image sensor and an optical magnification. The difference between the left and right side edge pixel coordinates is multiplied by a pre-calibrated calibration coefficient to obtain the line diameter measurement value of the current frame, wherein the calibration coefficient is a ratio of the physical size of the pixel element to the magnification of the optical system.

6. The multi-metallic solder ribbon real-time diameter detection method of claim 5, wherein, The calibration coefficient is obtained through the following calibration steps: The standard gauge block is fixedly placed in the illumination area; The linear array CCD image sensor is controlled to perform line scanning on the projection of the stationary standard gauge block to obtain a linear array image frame of the standard gauge block; Edge point extraction based on a gray gradient is performed on the linear array image frame to obtain a difference value of edge pixel coordinates of the standard gauge block projection; According to the formula The calibration coefficient is calculated wherein, is the actual size of the standard gauge block, is the edge pixel coordinate difference value.

7. The method of claim 1, wherein the step of detecting the real-time diameter of the multi-metal solder ribbon is characterized by, After the line diameter measurement value of the multi-metallic welding strip is calculated, the following steps are further included: Real-time filtering processing is performed on the continuous line diameter measurement values to suppress the measurement value fluctuations caused by the multi-metallic welding strip shaking or noise.

8. A multi-metallic solder ribbon real-time diameter detection system, characterized in that, The system includes: A projection generation module is configured to make the multi-metallic welding strip in a straight line motion state pass through an illumination area generated by a constant backlight illumination source to generate a welding strip projection with a high-contrast profile boundary; A scanning acquisition module is configured to control a linear array CCD image sensor to perform continuous line scanning on the welding strip projection in a scanning direction perpendicular to a motion direction of the multi-metallic welding strip to obtain a linear array image frame composed of a series of single column pixels, including: calculating a minimum line scanning frequency required by the linear array CCD image sensor according to a motion speed of the multi-metallic welding strip and a target spatial sampling accuracy; setting an actual line scanning frequency of the linear array CCD image sensor to a value not less than the minimum line scanning frequency; and controlling the linear array CCD image sensor to perform continuous line scanning at the set line scanning frequency to obtain the linear array image frame composed of the series of single column pixels; The edge extraction module is used to extract edge points based on grayscale gradients for each frame of the linear array image, and to determine the left and right edge pixel coordinates of the projection of the multi-metal weld strip in the linear array image frame. This includes: performing first-order differential processing on the pixel grayscale value sequence of the linear array image frame to obtain a grayscale gradient sequence. The first-order differential processing uses the central difference method, and its calculation formula is as follows: ,in, Indicates the first grayscale value of each pixel. Indicates the first grayscale gradient value at each pixel Indicates the first grayscale value of each pixel. Indicates the first The grayscale values ​​of each pixel are calculated; in the grayscale gradient sequence, the maximum positive value and its corresponding pixel position are found as the initial coordinates of the right edge, and the minimum negative value and its corresponding pixel position are found as the initial coordinates of the left edge; based on the initial coordinates of the left edge and the initial coordinates of the right edge, and combined with the cubic spline interpolation algorithm, the sub-pixel precision left edge coordinates and right edge coordinates are calculated. A line diameter calculation module is configured to calculate a line diameter measurement value of the multi-metallic welding strip according to a difference between left and right side edge pixel coordinates and in combination with a calibration coefficient of a physical size of a pixel element in the linear array CCD image sensor and an optical magnification.

Citation Information

Patent Citations

  • Method for measuring diameter size of sub-pixel edge part based on linear array CCD

    CN113436156A

  • High-precision linear distance detection algorithm

    CN117911447A