Multi-jig high-precision defect area mapping method

By adopting alternating modules and digital image processing technology in the appearance inspection of lithium battery blue film, the problem of unstable defect area mapping under the multi-camera structure is solved, high-precision and automated defect area transfer and mapping is achieved, and the debugging difficulty is simplified.

CN120634981APending Publication Date: 2025-09-12BEIJING FOCUSIGHT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510699702.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the appearance inspection of lithium battery blue film, the mapping accuracy of defective areas under the multi-camera structure is unstable, relying on the consistency of the mechanical structure and unable to compensate for mapping deviations in real time, resulting in insufficient accuracy of cross-camera inspection.

Method used

A multi-camera and multi-fixture visual inspection system is built using an alternating module approach. Offline calibration is performed using a nine-point calibration block, and compensation values ​​are calculated in real time to adjust the mapping matrix. Digital image processing technology is used to capture product edges and automatically calibrate the mapping matrix.

Benefits of technology

The accuracy and stability of defect area mapping are improved, the dependence on mechanical structure consistency is reduced, high-precision mapping of 0.1mm is achieved, the debugging process is simplified and the degree of automation of the detection system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634981A_ABST
    Figure CN120634981A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-jig high-precision defect area mapping method, which comprises the following steps of: 1, constructing a hardware structure, namely constructing a visual detection system which is formed by matching a plurality of camera stations with a plurality of carriers, and adopting an alternate module mode under the plurality of camera stations; step 2, mapping matrix calibration: using a nine-point calibration block with a circular hole to respectively perform image acquisition in a plurality of cameras and a plurality of modules, and performing offline calibration after obtaining an image of the calibration block; and step 3, in the operation process of the equipment, grabbing the product edge according to the positioned area, calculating a compensation value in real time, and adjusting the mapping matrix to achieve an accurate mapping effect. The method does not depend on mechanism consistency, pixel coordinates of product feature points can be automatically grabbed, deviation values can be automatically calculated and compensated to the mapping matrix, and the effect of automatically adjusting the mapping matrix in real time is achieved; the mapping precision is improved, and the method has the advantages of being simple in debugging process, convenient to operate, low in debugging difficulty and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image vision detection technology, and in particular to a high-precision defect area mapping method for multiple fixtures. Background Art

[0002] Currently in the lithium battery blue film appearance inspection industry, if a multi-camera structure is involved, most rely on the electromechanical parts to ensure structural consistency so that the product is located in a relatively fixed position in the camera imaging. Therefore, a mechanism similar to an alternating module is basically not used in a multi-camera scenario.

[0003] Therefore, the existing technology suffers from unstable mapping accuracy, relying solely on mechanical structure consistency and camera trigger accuracy, and failing to compensate for mapping deviations in real time. This is due to the unique characteristics of line scan cameras: the trigger source cannot accurately maintain the product's relative position in the image when scanning it. Furthermore, the mechanical structure can degrade in consistency over time, leading to slight variations in the product's position relative to the image. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a high-precision defect area mapping method for multiple fixtures, so as to solve the problem that in automated AOI inspection equipment, when product inspection requires multiple fixtures and multiple camera stations, the high-precision cross-camera mapping and transmission accuracy of the defect area of ​​the product surface inspection is not high, and one-to-many precise transmission cannot be performed.

[0005] The technical solution adopted by the present invention to solve the technical problem is: a high-precision defect area mapping method for multiple fixtures, comprising the following steps:

[0006] Step 1: Build the hardware structure and construct a visual inspection system with multiple camera stations and multiple carriers. Under multiple camera stations, use an alternating module approach.

[0007] Step 2: Mapping matrix calibration: Use a nine-point calibration block with circular holes to collect images from multiple cameras and multiple modules, and then perform offline calibration after obtaining the images of the calibration block.

[0008] Step 3: During the operation of the equipment, according to the located area, the product edge is captured, the compensation value is calculated in real time, and the mapping matrix is ​​adjusted to achieve the effect of accurate mapping.

[0009] Furthermore, in step 2 of the present invention, the offline calibration process is the process of calculating the mapping matrix.

[0010] Furthermore, the calculation process of the mapping matrix described in the present invention is as follows: find the edges of different circular holes in the calibration block, capture the edge contours with a measuring caliper, fit them into a circle, and obtain the coordinates of the center of the circle; repeat this operation under different cameras to obtain the physical coordinate system relationship under different cameras; then perform secondary transformation matrix fitting to obtain a set of original two-dimensional affine transformation matrices.

[0011] Furthermore, in step 3 of the present invention, the method for obtaining the product edge includes the following steps:

[0012] A. Define the measurement area in the image and set it perpendicular to the target line;

[0013] B. Calculate the gradient intensity of the target area image and find the points where the grayscale value changes significantly;

[0014] C. According to the set threshold, the edge points that meet the conditions are selected as candidate points for fitting the straight line;

[0015] D. Fit the candidate points into a straight line using the least squares method so that the sum of the squares of the vertical distances from all candidate points to the target line is minimized.

[0016] Furthermore, in step 3 of the present invention, the coordinates of the straight line obtained by fitting the edge of the product in the image are calculated, and the relative position of the product in the image is monitored in real time, and the position is recorded in the real-time cache.

[0017] Furthermore, the alternating modules of the present invention are written into the cache as many times as there are groups.

[0018] Furthermore, in step 3 described in the present invention, after the alternating modules circulate to grab and discharge materials, the product IDs will be accumulated in sequence, and the module number corresponding to the product ID can be obtained by calculation; when the corresponding module number is reset, the corresponding position in the cache is called out, and compared with the newly calculated position to calculate the difference; if the difference exceeds the tolerance range, the difference is compensated to the matrix operation point array through difference compensation, and the new mapping matrix is ​​recalculated and replaced with the original matrix.

[0019] The beneficial effect of the present invention is to solve the defects existing in the background technology.

[0020] 1. Improve the accuracy of traditional defect mapping: Compared with traditional defect mapping, which has higher requirements for electrical and mechanical debugging of multiple fixtures, the present invention has relatively simple requirements for mechanism design and debugging when the inspection system needs to use multiple groups of cameras to jointly inspect the same area of ​​the product, and the difficulty is transferred to the level of visual algorithm development; the mapping accuracy of the present invention can reach 0.1mm.

[0021] 2. Fast debugging: The present invention has the characteristics of simple debugging process, easy operation, and low debugging difficulty. It does not rely on the consistency of the mechanism. During the defect area mapping process, the accuracy and stability of the area mapping between multiple fixtures can be adjusted in real time through external parameters. Therefore, in the application scenario of multiple cameras, the requirements for the consistency of the mechanism and triggering are reduced, and the difficulty is transferred to the image processing algorithm for solution.

[0022] 3. Automatic calculation of offset value: Since the trigger position of the line scan camera is controlled by an external signal, the trigger position of each product is not exactly the same, and the pixel coordinates of the product in the image are not completely relatively fixed. The present invention can automatically capture the pixel coordinates of the product feature points, automatically calculate the offset value, and compensate it to the mapping matrix, thereby achieving the effect of automatic real-time adjustment of the mapping matrix. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a schematic diagram of a multi-camera and multi-jig workstation according to the present invention;

[0024] Figure 2 It is a schematic flow chart of the method of the present invention;

[0025] Figure 3 This is a flow chart of the automatic difference compensation of the present invention. DETAILED DESCRIPTION

[0026] The present invention will now be described in further detail with reference to the accompanying drawings and preferred embodiments. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0027] like Figure 1-Figure 3 The method is used for visual appearance inspection of automated equipment with multiple camera stations and multiple fixtures operating alternately, as well as for comprehensive image judgment of product surface defects under multiple camera stations. The camera coordinate systems of different cameras are calibrated using a special calibration block to obtain the coordinate system matrix under the corresponding camera. The two-dimensional affine transformation technology in digital image processing is then used to assist in cyclically binding independent compensation values ​​under different fixtures to achieve real-time compensation for different mapping matrices of multiple fixtures.

[0028] The specific steps include:

[0029] Step 1: Hardware structure construction

[0030] like Figure 1As shown, the present invention is mainly used in scenarios where certain defects are characterized differently under different cameras. For example, when inspecting the appearance of a blue-film battery, the detection of foreign matter in the film can clearly distinguish between convex and concave defects under a black and white camera, but cannot distinguish between foreign matter in the film and envelope bubbles; however, under a color / infrared camera, foreign matter in the film and envelope bubbles can be distinguished, but convex and concave defects cannot be distinguished. In this case, it is necessary to build a visual system that can detect with multiple cameras at the same time.

[0031] In order to improve inspection efficiency and enable the machine to continuously perform grabbing / releasing actions under multiple camera stations, an alternating module solution is usually adopted. In this case, a visual inspection system consisting of multiple camera stations and multiple carriers will be formed.

[0032] Step 2: Mapping matrix calibration

[0033] Using a customized nine-point (circular hole) calibration block, images are collected from multiple cameras and multiple modules in the system, and offline calibration is performed after obtaining the images of the calibration block.

[0034] The offline calibration process is essentially the calculation of the mapping matrix. After finding the edges of different circular holes in the calibration block, the edge contours are captured using a measuring caliper and fitted into a circle to obtain the coordinates of the circle center. Repeating this operation under different cameras can obtain the physical coordinate system relationship under different cameras. At this time, the second transformation matrix fitting mentioned in 1 and 2 mentioned in the principle description can be used to obtain a set of original two-dimensional affine transformation matrices.

[0035] Step 3: During the operation of the equipment, according to the located area, the product edge is captured, the compensation value is calculated in real time, and the mapping matrix is ​​adjusted to achieve the effect of accurate mapping.

[0036] The principle is explained as follows:

[0037] 1. The core of this invention is the two-dimensional affine transformation in digital image processing, which mainly involves performing geometric transformations such as rotation, translation, scaling, and shearing on the defect area on the plane. Through affine transformation, we can change the shape and adjust the position of the defect area so that its position relative to the product is fixed under multiple camera positions.

[0038] 2. Constructing the affine transformation matrix in affine transformation is the core of the entire process. The accuracy of the matrix directly affects the accuracy of the mapping. Before constructing the matrix, it is necessary to first clarify the homogeneous coordinates and the homogeneous transformation matrix. In computer graphics and computer vision, homogeneous coordinates are an extended coordinate representation method. By adding an extra dimension (usually 1) to the ordinary coordinates, the translation operation can be implemented through matrix multiplication. For example, a point (x, y) on a two-dimensional plane is represented as (x, y, 1) in the homogeneous coordinate system. The homogeneous transformation matrix is ​​a matrix that contains transformation operations such as translation, rotation, and scaling. For two-dimensional affine transformations, the homogeneous transformation matrix is ​​usually a 3x3 matrix, which can be expressed as:

[0039] |ab tx|

[0040] |cd ty|

[0041] |0 0 1|

[0042] Among them, a, b, c, d define the rotation and scaling operations, and tx, ty define the translation operation.

[0043] The core of the affine transformation matrix is ​​to convert two sets of two-dimensional points, namely source points and target points, into a homogeneous transformation matrix. This process involves a system of linear equations to find the most suitable affine transformation matrix so that the source points can be mapped to the target points.

[0044] Assume that the source point set is {(x1,y1),(x2,y2),...,(xn,yn)} and the target point set is

[0045] {(x1',y1'),(x2',y2'),...,(xn',yn')}, where n≥3 (because affine transformation requires at least 3 sets of points to determine). The goal of the algorithm is to find an affine transformation matrix H so that for all points i, we have:

[0046] [x'i,y'i,1]=[xi,yi,1]*H

[0047] Where H is a 3×3 homogeneous transformation matrix. This system of equations can be expanded into 6 linear equations, with 2 equations for each point. These equations can then be solved using the least squares method or other optimization algorithms to find the optimal H.

[0048] 3. Due to the mechanism of the line scan camera, the position of the product in the image is not fixed when the photo is triggered, but is a random quantity. This greatly increases the difficulty of defect mapping. If the trigger accuracy cannot be guaranteed to be greater than the defect mapping accuracy, the mapping error will inevitably exceed the defect detection specification.

[0049] In the present invention, a measuring caliper is set up to capture grayscale mutation points at a fixed position in the image ± the tolerance range of lines to find the edge of the product, and the mutation points found are connected and fitted into a straight line. Specifically:

[0050] Finding product edges in an image primarily relies on edge detection in digital image processing. First, a measurement area is defined in the image, typically perpendicular to the desired target line. In this application, 20 measurement rectangles are set. The gradient intensity of the target area is calculated to identify points with significant grayscale changes. Based on set thresholds (such as edge intensity and contrast), eligible edge points are selected as candidate points for the fitted line. Finally, these candidate points are fitted to a line using the least squares method, minimizing the sum of the squared perpendicular distances from all candidate points to the target line. The equation for the fitted line is y = kx + b.

[0051] Then, by calculating the coordinates of the straight line in the image, the relative position of the product in the image is monitored in real time and recorded in the software real-time cache, specifically:

[0052] After grabbing the straight line on the left edge of the product, the coordinates of the line (X1, Y1), (X2, Y2)... (Xn, Yn) are written into the software cache (n is the total number of alternating module carriers). That is, as many groups of carriers as there are, as many groups of cache are written.

[0053] Afterwards, the product IDs are accumulated in sequence through alternating module cycles of grabbing and unloading. The module number corresponding to the product ID can be obtained through calculation. When the corresponding module number is reset, the corresponding position in the software cache is called out and compared with the newly calculated position by the algorithm to calculate the difference. If the difference exceeds the tolerance range, the difference is compensated to the matrix operation point array through difference compensation, and the new mapping matrix is ​​recalculated and replaced with the original matrix, realizing high-precision multi-fixture mapping with automatic calculation, automatic update, and automatic calibration.

[0054] The process of alternating module cycle grabbing and unloading is as follows Figure 1 As shown, for example, if there are 4 groups of carriers, then product 1, product 2, product 3, and product 4 correspond to carriers 1, 2, 3, and 4 respectively. Product 5 is captured by carrier 1. At this time, the algorithm will divide the current product ID by 4 and take the remainder to obtain the carrier number corresponding to the current product. For example, the carrier number corresponding to product 10 is 2. At this time, the algorithm will read the product edge coordinates (X2, Y2) corresponding to carrier 2 from the software cache and calculate the difference with the edge coordinates (X′, Y′) calculated by capturing product 10. If the difference is less than the tolerance value, the original mapping matrix will be used for operation. If the difference is greater than the tolerance value, the difference will be compensated to the matrix calculation point, and the matrix will be recalculated to replace the original matrix, as shown in the following example: Figure 3 shown.

[0055] The above description only describes specific embodiments of the present invention. Various examples do not limit the essential content of the present invention. After reading the description, ordinary technicians in the relevant technical field can make modifications or variations to the specific embodiments described above without departing from the essence and scope of the invention.

Claims

1. A high-precision defect area mapping method for multiple fixtures, characterized by: The following steps are included: Step 1: Build the hardware structure and construct a visual inspection system with multiple camera stations and multiple carriers. Under multiple camera stations, use an alternating module approach. Step 2: Mapping matrix calibration: Use a nine-point calibration block with circular holes to collect images from multiple cameras and multiple modules, and then perform offline calibration after obtaining the images of the calibration block. Step 3: During the operation of the equipment, according to the located area, the product edge is captured, the compensation value is calculated in real time, and the mapping matrix is ​​adjusted to achieve the effect of accurate mapping.

2. The high-precision defect area mapping method for multiple fixtures according to claim 1, characterized in that: In step 2, the offline calibration process is the process of calculating the mapping matrix.

3. The high-precision defect area mapping method for multiple fixtures according to claim 2, characterized in that: The calculation process of the mapping matrix is ​​as follows: find the edges of different circular holes in the calibration block, capture the edge contours with a measuring caliper, fit them into a circle, and obtain the coordinates of the center of the circle; repeat this operation under different cameras to obtain the physical coordinate system relationship under different cameras; then perform secondary transformation matrix fitting to obtain a set of original two-dimensional affine transformation matrices.

4. The high-precision defect area mapping method for multiple fixtures according to claim 3, characterized in that: In step 3, the method for obtaining the product edge includes the following steps: A. Define the measurement area in the image and set it perpendicular to the target line; B. Calculate the gradient intensity of the target area image and find the points where the grayscale value changes significantly; C. According to the set threshold, the edge points that meet the conditions are selected as candidate points for fitting the straight line; D. Fit the candidate points into a straight line using the least squares method so that the sum of the squares of the vertical distances from all candidate points to the target line is minimized.

5. The high-precision defect area mapping method for multiple fixtures according to claim 4, characterized in that: In step 3, the coordinates of the straight line obtained by fitting when obtaining the edge of the product in the image are calculated, and the relative position of the product in the image is monitored in real time, and the position is recorded in the real-time cache.

6. The high-precision defect area mapping method for multiple fixtures according to claim 5, characterized in that: The alternating modules are written into the cache as many times as there are groups.

7. The high-precision defect area mapping method for multiple fixtures according to claim 6, characterized in that: In step 3, after the alternating modules cycle to grab and discharge the materials, the product IDs are accumulated in sequence, and the module number corresponding to the product ID can be obtained by calculation; when the corresponding module number is reset, the corresponding position in the cache is called out and compared with the newly calculated position to calculate the difference; if the difference exceeds the tolerance range, the difference is compensated to the matrix operation point array through difference compensation, and a new mapping matrix is ​​recalculated to replace the original matrix.