Large-breadth cross-scale adhesive film defect detection method and device

Through the large-format cross-scale adhesive film defect detection method, combined with image difference method, anchor frame algorithm and local feature matching network, high accuracy and high efficiency of adhesive film defect detection are achieved, and the problem of insufficient splicing accuracy and processing efficiency in the existing technology is solved.

CN119991644AActive Publication Date: 2025-05-13GUANGDONG UNIV OF TECH

Patent Information

Application Number
CN202510160183.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-13
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

The prior art has shortcomings in splicing accuracy, processing efficiency and detail retention in the detection of adhesive film engraving defects, especially when facing complex patterns and small defects, it is difficult to achieve accurate detection and positioning.

Method used

The large-format cross-scale film defect detection method is adopted, and the camera's rough focus and fine focus are combined with image differential method, anchor frame algorithm, genetic algorithm and dual-axis linkage control, and the motion platform is driven to carry out fine scanning path planning and execution. Image stitching and fusion are performed using the local feature matching network-based local feature matching network to perform image stitching and fusion, and the complete film image is output for defect detection.

Benefits of technology

It significantly improves the splicing accuracy and processing efficiency of film defect detection, can accurately detect small defects in complex patterns, reduces computing time, and avoids common "ghosts" and misalignment phenomena in image fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991644A_ABST
    Figure CN119991644A_ABST
Patent Text Reader

Abstract

The invention discloses a large-breadth cross-scale adhesive film defect detection method and a large-breadth cross-scale adhesive film defect detection device. The method comprises the following steps: carrying out coarse focusing on a camera and capturing a glue film image, carrying out coarse scanning on the glue film image and extracting information of a printed image-text in the glue film image by using an image difference method, inputting an output difference image into an anchor frame algorithm, inputting an output fine scanning target area coordinate into a genetic algorithm, and carrying out fine scanning on the glue film image. Outputting an optimized fine scanning path in combination with S curve planning characteristics of the motor; the motion platform is driven to complete path execution by combining double-axis linkage control with the fine scanning path, camera focusing is completed in the path execution process, and a high-resolution image of a defect area is collected and registered; and carrying out image splicing and fusion on the registered images by combining an optimal suture line algorithm with an improved Laplacian pyramid fusion method, and carrying out defect detection on the fused complete adhesive film image. The method has the advantages of high splicing precision and fast processing efficiency, and can effectively retain more detail information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of industrial automation detection, and more specifically, relates to a large-format cross-scale adhesive film defect detection method and device. Background Art

[0002] With the development of industrial automation, adhesive films are increasingly used in the fields of electronic manufacturing, photovoltaic industry and printing. The quality of adhesive films directly affects the reliability and appearance of products, and adhesive film engravings are prone to defects such as bubbles, scratches, residues and uneven pattern printing during the production process. These defects not only affect the subsequent processing process, but may also cause the finished product to be scrapped and increase production costs. Therefore, accurate detection and positioning of adhesive film engraving defects has become a key link in ensuring production quality. At present, traditional methods for detecting defects in adhesive film engravings mainly rely on manual visual inspection or simple machine vision algorithms. However, manual inspection is inefficient and easily affected by subjective factors, especially when faced with a large number of adhesive film engravings, the probability of missed detection or false detection is significantly increased. Although the detection method based on traditional machine vision can partially replace manual labor, it often relies on fixed rules (such as grayscale differences or texture features) and is prone to failure when the lighting conditions change or the background is complex. In addition, the complex patterns in the adhesive film engravings increase the difficulty of defect detection, especially for small defects in printed fine patterns, which are difficult to accurately locate by traditional methods. On the other hand, traditional detection systems have shortcomings in processing efficiency and splicing accuracy. During the image stitching process, defective areas often cannot be accurately detected due to uneven boundary transitions or loss of details.

[0003] The invention patent with the prior art publication number CN116167993A proposes a pipeline quality inspection method and a pipeline quality inspection device based on panoramic vision, which first obtains multiple groups of local images of the target pipeline wall, then splices all the local images in each group to obtain multiple local panoramas, and then splices multiple local panoramas to obtain a pipeline panorama. Finally, according to the pipeline panorama, the pipeline panorama is detected based on a preset target detection model to identify and locate target defects. This method uses a Laplace pyramid algorithm based on masks and optimal stitching lines to achieve smooth transition at the image fusion point, and has shortcomings in splicing accuracy and processing efficiency. Summary of the invention

[0004] In order to overcome the deficiencies in the prior art in terms of splicing accuracy, processing efficiency and detail retention, the present invention provides a large-format cross-scale adhesive film defect detection method and device.

[0005] The primary purpose of the present invention is to solve the above technical problems. The technical solution of the present invention is as follows:

[0006] The first aspect of the present invention provides a large-format cross-scale film defect detection method, comprising the following steps:

[0007] The camera is roughly focused and the film image is captured, the film image is roughly scanned and the information of the printed image and text in the film image is extracted by using the image difference method, and a differential image containing the target image and text information is output;

[0008] Inputting the differential image into an anchor frame algorithm, obtaining the coordinates of the fine scanning target area from the coarse scanning coordinates;

[0009] The coordinates of the target area of ​​the fine scanning are input into a genetic algorithm, and an optimized fine scanning path is output in combination with the S-curve planning characteristics of the motor;

[0010] The path execution is completed by utilizing the dual-axis linkage control in combination with the precise scanning path to drive the motion platform. During the path execution, the camera is focused by utilizing the precise focus search strategy to acquire a high-resolution image of the defect area.

[0011] Performing image registration on the high-resolution image using an image registration algorithm improved by a local feature matching network based on a converter, performing image stitching and fusion on the registered image using an optimal seam line algorithm combined with an improved Laplace pyramid fusion method, and outputting a complete film image;

[0012] Perform defect detection on the complete film image and output the detection results.

[0013] Furthermore, the film image is roughly scanned and the information of the printed image and text in the film image is extracted by using an image difference method, including the following steps:

[0014] Using a camera to acquire a film image, obtaining an original input image;

[0015] De-noise the original input image and output the denoised processed image;

[0016] Using historical frames or pre-collected background images as a comparison benchmark, a background image is obtained;

[0017] Perform a difference operation between the background image and the denoised processed image to obtain the difference map D(x,y), which is expressed as follows:

[0018] D(x,y)=255-|T(x,y)-S(x,y)|

[0019] Where (x, y) is the coordinate of the image pixel, T(x, y) is the pixel grayscale of the background image, and S(x, y) is the pixel grayscale of the film defect area in the current frame.

[0020] Furthermore, the differential image is input into the anchor frame algorithm to output the coordinates of the precise scan target area, including the following steps:

[0021] Perform multi-geometric feature filtering on the extracted differential image to remove pseudo-spots and noise interference, and obtain an optimized foreground contour map;

[0022] The optimized foreground contour map is converted into coordinates through the anchor frame algorithm, the film foreground contour within the camera field of view is calculated, converted into the pixel coordinate system coordinates under the fine scanning field of view, and the coordinates of the fine scanning target area are output.

[0023] Furthermore, the coordinates of the target area for fine scanning are input into the genetic algorithm, and the optimized fine scanning path is output in combination with the S-curve motion planning characteristics of the motor, including the following steps:

[0024] Read the center coordinate data of the precision scanning target area, set the population size and maximum evolutionary generations, and randomly generate the initial population. Each individual in the population represents a precision scanning path arrangement.

[0025] Calculate the fitness value of each individual in the population. The fitness function expression is as follows:

[0026]

[0027] Where n is the precise scanning coordinate set Q n The number of scanned coordinates, C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) represents the time from the i-th target to the i+1-th target. According to the third-order S-curve motion planning, T(C i ,C j ) expression is as follows:

[0028] T(C i ,C j )=T a +T v +T d

[0029] Among them, T a For the acceleration period, the expression is as follows:

[0030]

[0031] T v is the uniform speed period, the expression is as follows:

[0032]

[0033] T d For the deceleration period, the expression is as follows:

[0034]

[0035] Among them, a a is the maximum acceleration in the acceleration stage, V v is the maximum speed in the uniform speed section, a d is the deceleration in the deceleration stage, T v is the uniform speed period, a d is the deceleration in the deceleration stage, which is obtained from the S-curve motion planning. i ,C j ) is to convert the Euclidean distance of the target area of ​​the precision scan into the longest projection length in the X and Y directions. The expression is as follows:

[0036] d(C i ,C j )=max(|X i -X j |,|Y i -Y j |)

[0037] Among them, (X i ,Y i ) is point C i The coordinates of (X j ,Y j ) is point C j The coordinates of;

[0038] Sort the fitness values ​​by size and assign selection probabilities according to the fitness values. The expression for selection probability is as follows:

[0039]

[0040] Among them, x represents the individual, FIT(x) represents the fitness of the individual, F j Represents the sum of all individual fitness values ​​in the population;

[0041] The roulette algorithm is used to select individuals from the next generation population in combination with the selection probability, and a partial matching crossover operation is performed on the selected population to generate new individuals to maintain the rationality of the path structure; the path sequence of the individuals is randomly mutated and adjusted with a preset probability to avoid falling into the local optimum;

[0042] Construct a target optimization function to minimize the total time consumption. The target function expression is as follows:

[0043]

[0044] Where n is the precise scanning coordinate set Q n The number of scanned coordinates, the coordinate number range is [1, n], C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) is from scanning point C i To scanning point C i+1 Movement time, T(C n , C1) is from the last scan point C n Movement time to return to the first scanning point C1;

[0045] Accumulate the current evolutionary generations and determine whether the maximum generation or fitness value convergence condition is reached. If the condition is not met, return to the fitness calculation step and continue iterative optimization; if the termination condition is reached, output the optimal path individual in the current population as the refined scanning path output.

[0046] Further, the camera focusing is completed using a fine focus search strategy, including the following steps:

[0047] Set the search step of the camera focus module, and select a reasonable search step in combination with geometric error compensation and coarse focus;

[0048] Calculate the definition evaluation value F1 of the image at the current shooting position, set the initial search step length L, drive the camera motor to move a unit step length in a certain direction, calculate the image definition evaluation value F2 of the position after the movement, if F2>F1, continue to move in the current direction; otherwise, adjust the moving direction to the opposite direction, and drive the camera motor to move twice the step length in the opposite direction;

[0049] Get the image after moving in the opposite direction, and calculate its clarity evaluation value F3. If F3>F2, it means that the opposite direction is more conducive to improving clarity, and continue to move in this direction; otherwise, adjust the moving direction to the opposite direction again, and reduce the current step length L to 0.618 times of the original step length;

[0050] Determine whether the current step length is less than the preset minimum step length d. If the step length is less than d, stop searching and the process ends; otherwise, return to continue iterating the above operations until the termination condition is met and the camera fine focusing is completed.

[0051] Further, the high-resolution image is registered using an image registration algorithm improved by a local feature matching network based on a converter, comprising the following steps:

[0052] The high-resolution image is calculated using the first preset method for the average value of the gradient amplitude of the image. If the average value of the gradient amplitude is less than the preset threshold, it is judged as sparse features; if the average value of the gradient amplitude is greater than the preset threshold, it is judged as dense features; for the image to be registered with dense features, the second preset method is used to extract feature points; for the image to be registered with sparse features, the third preset method is used to extract local feature points to obtain a high-quality feature point set;

[0053] Matching the feature point set using a feature matching algorithm to generate a matching point pair list;

[0054] Randomly select n pairs of points from the matching point pairs, calculate the transformation matrix based on the selected point pairs and evaluate whether the transformation model is an approximate standard translation transformation model. If it does not meet the approximate standard translation transformation conditions, reselect n pairs of points; if it meets the approximate standard translation transformation conditions, calculate the average distance error l between all matching points and the transformation model based on the translation transformation model. The expression is as follows:

[0055]

[0056] Among them, P i is the matching point, M is the point corresponding to the transformation model, and n is the number of selected matching points; the average distance error l is used as the error threshold t to divide the internal points and external points. Points less than the threshold t are internal points, and points greater than the threshold t are external points. The number of internal points is counted;

[0057] Repeat the above steps until the preset number of iterations is reached, and output the translation transformation model containing the largest number of inliers;

[0058] The output transformation model is applied to the image to be registered, and the image is geometrically transformed in combination with the model parameters to complete the image registration and output the registered image.

[0059] Furthermore, the first preset method is a Sobel operator fast calculation method, the second preset method is a SURF algorithm that adds color information, and the third preset method is a LoFTR algorithm.

[0060] Furthermore, the best seam line algorithm is combined with the improved Laplace pyramid fusion method to perform image stitching and fusion, and output a complete film image, including the following steps:

[0061] Extract the overlapping areas of the high-resolution images after image registration;

[0062] Calculate the energy function value of each pixel in the overlapping area to obtain the energy matrix of the area, where the expression of the energy function is as follows:

[0063]

[0064] Among them, E(x,y) represents the energy value of the point (x,y) itself, E c It represents the difference in pixel color intensity, that is, the sum of the grayscale differences of the three channels at the corresponding points in the overlapping area. g Indicates the intensity of image structure difference;

[0065] The optimal stitching line algorithm is used to find the optimal stitching line trajectory in the overlapping area according to the energy minimization principle;

[0066] Convert the pixel color space of the overlapping area from the RGB space to the HSL space, where H represents hue, S represents saturation, and L represents brightness;

[0067] Calculate the difference between the hue, saturation and brightness of the stitched images, and calculate the comprehensive similarity based on adjustable preset weights:

[0068] According to the optimal seam line trajectory, the Gaussian-Laplacian pyramid method is used to decompose the image at multiple scales, and a weight matrix pyramid is constructed. The number of decomposition layers of the Laplacian pyramid is adjusted according to the comprehensive similarity. If the similarity is high, the number of decomposition layers is reduced; if the similarity is low, the number of decomposition layers is increased.

[0069] The multi-scale decomposed images are reconstructed layer by layer to generate a seamless and complete film image.

[0070] The second aspect of the present invention provides a large-format cross-scale adhesive film defect detection device, which is used to implement the steps of a large-format cross-scale adhesive film defect detection method, and the device includes: a rack module, an imaging module, a lighting module, and a motion platform module; wherein the rack module includes a plurality of guide rails; the imaging module includes a Z-axis motion mechanism and an imaging camera, which are located at the top of the rack module and are slidably connected to the guide rails at the top of the rack module; the lighting module is located below the imaging module, part of which is slidably connected to the guide rails in the rack module, and part of which moves synchronously with the motion platform module; the motion platform module includes a motion platform, an X-axis motion mechanism and a Y-axis motion mechanism, which are arranged inside the rack module and below the lighting module and the imaging module.

[0071] Furthermore, the X-axis motion mechanism includes a linear motor and a first guide rail, which are arranged at the bottom of the motion platform module; the Y-axis motion mechanism includes a linear motor, which is arranged on the X-axis motion mechanism, and the X-axis motion mechanism and the Y-axis motion mechanism are both parallel to the plane where the lighting module is located.

[0072] Furthermore, the Z-axis motion mechanism includes a motor and a lead screw.

[0073] Furthermore, the imaging module includes an area array camera module and a global camera module, the area array camera module includes a Z-axis motion mechanism and an area array camera, which are slidably connected to the second guide rail; the global camera module includes a Z-axis motion mechanism and a global camera, which are slidably connected to the fifth guide rail; the height of the global camera module from the ground is greater than the height of the area array camera module from the ground.

[0074] Furthermore, the lighting module includes a coaxial light source, a white strip light source, and a surface light source; the coaxial light source is slidably connected to the third guide rail; the white strip light source is slidably connected to the fourth guide rail; the coaxial light source and the white strip light source are located on the same side as the area array camera module; the surface light source moves synchronously with the motion platform module; the height of the coaxial light source from the ground is greater than the height of the white strip light source from the ground, and the height of the white strip light source from the ground is greater than the height of the surface light source from the ground.

[0075] Furthermore, the coaxial light source is a visual blue coaxial light source, the white strip light source is a machine vision linear scanning light source, and the surface light source is a square direct machine vision light source for an industrial camera.

[0076] Furthermore, the white strip light source is slidably connected to the guide rail via a linear light source mounting seat, and the linear light source mounting seat is provided with an arc groove for adjusting the irradiation angle and range of the light source.

[0077] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0078] This paper proposes an image registration algorithm based on a local feature matching network improved by a converter. For images with dense features, the SURF algorithm with added color information is used for feature extraction to ensure fast calculation; for images with sparse features, the LoFTR algorithm is used to maintain high sensitivity to subtle features. After the matching points are extracted, the improved RANSAC algorithm is used to solve the image transformation relationship, which significantly improves the utilization rate of the matching points, making the computational efficiency and matching accuracy better than the existing methods.

[0079] In addition, the present invention introduces the best seam algorithm, which aims to find the optimal image stitching trajectory. The core evaluation criteria are to minimize color and geometric differences to achieve more accurate image alignment. The Laplace pyramid fusion algorithm is further improved, and the decomposition layer adaptive method is added: the decomposition layer is increased in the seam area with large visual differences to improve the fusion quality, and the layer is reduced in the area with small visual differences, so as to maintain the image fusion effect while improving the operation efficiency. Through the adaptive layer strategy and the method of constructing the image pyramid only for the overlapping area, the amount of calculation is effectively reduced, and the overall time consumption is reduced by 58.7% compared with the traditional image pyramid fusion algorithm. In the subjective evaluation, the algorithm shows stable structural retention and good seam color transition, effectively avoiding the common "ghosting" and dislocation phenomena in image fusion, and achieving the control of the calculation time within a reasonable range while improving the fusion quality. The overall improved algorithm can handle the film defect recognition of more than 20,000 spliced ​​images. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to make the purpose and technical solution of the present invention clearer, the present invention provides the following drawings and descriptions:

[0081] Figure 1 A flow chart of a method provided by an embodiment of the present invention;

[0082] Figure 2 A difference effect diagram between the current frame image of the film and the original background image provided by the embodiment of the present invention;

[0083] Figure 3 A schematic diagram of the optimal seam line algorithm search process provided by an embodiment of the present invention;

[0084] Figure 4 A schematic diagram of an anchor frame algorithm provided by an embodiment of the present invention;

[0085] Figure 5 A schematic diagram of the effect of the path planning algorithm provided by an embodiment of the present invention;

[0086] Figure 6 A Laplace pyramid flow chart provided for an embodiment of the present invention;

[0087] Figure 7 It is a schematic diagram of the detection state of a film defect detection device;

[0088] Figure 8 It is a schematic diagram of a film defect detection device in a state to be detected;

[0089] Fig. 9 This is a front view of a film defect detection device;

[0090] Fig.10 A top view of a film defect detection device;

[0091] Fig.11 This is a right view of a film defect detection device. DETAILED DESCRIPTION

[0092] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0093] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0094] Embodiment 1:

[0095] The present invention provides a large-scale cross-scale film defect detection method, such as Figure 1 The figure shows a flow chart of a large-format cross-scale film defect detection method, and the specific steps are as follows:

[0096] S1: roughly focusing the global camera and capturing the film image, roughly scanning the film image and extracting the information of the printed image and text in the film image by using the image difference method, and outputting a differential image containing the target image and text information.

[0097] The specific process is:

[0098] Using a global camera to acquire a film image, obtaining an original input image;

[0099] De-noise the original input image and output the denoised processed image;

[0100] Using historical frames or pre-collected background images as a comparison benchmark, a background image is obtained;

[0101] Perform a difference operation between the background image and the denoised processed image to obtain the difference map D(x,y), which is expressed as follows:

[0102] D(x,y)=255-|T(x,y)-S(x,y)|

[0103] Among them, (x, y) is the coordinate of the image pixel, T(x, y) is the pixel grayscale of the background image, S(x, y) is the pixel grayscale of the defective area of ​​the film in the current frame, and the difference effect diagram between the current frame image of the film and the original background image is as follows: Figure 2 shown.

[0104] S2: Input the differential image into the anchor frame algorithm to obtain the fine scanning target area coordinates from the coarse scanning coordinates.

[0105] The specific process is:

[0106] Perform multi-geometric feature filtering on the extracted differential image to remove pseudo-spots and noise interference, and obtain an optimized foreground contour map;

[0107] The optimized foreground contour map is converted into coordinates through the anchor frame algorithm, and the film foreground contour within the global camera field of view is calculated and converted into the pixel coordinate system coordinates under the fine scanning field of view, and the coordinates of the fine scanning target area are output, such as Figure 4 As shown, the red zigzag line is the foreground contour of the film defect P i The maximum external rectangular frame is represented by the blue dotted frame in the figure, where the number of windows to be scanned is O i The expression is as follows:

[0108]

[0109] Among them, W i is the width of the rectangular frame in pixel coordinate system, H i is the length of the rectangular frame in the pixel coordinate system, C W is the horizontal resolution of the camera, which is 3072 in this embodiment, C H is the vertical resolution of the camera, which is 2048 in this embodiment, q is the ratio of the field of view of fine scanning to that of coarse scanning, P i The pixel coordinates O in the image coordinate system of the jth fine scan i_j The expression is as follows:

[0110]

[0111] Where c is the anchor frame algorithm correction coefficient, n is the n acquisition windows obtained by the anchor frame algorithm, represents the starting scan correction value of the lower left corner under fine scanning, and (x, y) is the coordinate O i_j The coordinates of (x i ,y i ) are the center coordinates of the maximum circumscribed rectangular box.

[0112] S3: Input the coordinates of the target area of ​​the fine scanning into the genetic algorithm, and output the optimized fine scanning path in combination with the motor S-curve planning characteristics.

[0113] The specific process is:

[0114] Read the center coordinate data of the precision scanning target area, set the population size and maximum evolutionary generations, and randomly generate the initial population. Each individual in the population represents a precision scanning path arrangement.

[0115] Calculate the fitness value of each individual in the population. The fitness function expression is as follows:

[0116]

[0117] Among them, x represents the individual, n is the precise scanning coordinate set Q n The number of scanned coordinates, C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) represents the time from the i-th target to the i+1-th target. According to the third-order S-curve motion planning, T(C i ,C j ) expression is as follows:

[0118] T(C i ,C j )=T a +T v +T d

[0119] Among them, T a For the acceleration period, the expression is as follows:

[0120]

[0121] T v is the uniform speed period, the expression is as follows:

[0122]

[0123] T d For the deceleration period, the expression is as follows:

[0124]

[0125] Among them, a a is the maximum acceleration in the acceleration stage, V v is the maximum speed in the uniform speed section, a d is the deceleration in the deceleration stage, T v is the uniform speed period, a d is the deceleration in the deceleration stage, which is obtained from the S-curve motion planning. i ,C j ) is to convert the Euclidean distance of the target area of ​​the precision scan into the longest projection length in the X and Y directions. The expression is as follows:

[0126] d(C i ,Cj )=max(|X i -X j |,|Y i -Y j |)

[0127] Among them, (X i ,Y i ) is point C i The coordinates of (X j ,Y j ) is point C j The coordinates of

[0128] Sort the fitness values ​​by size and assign selection probabilities according to the fitness values. The expression for selection probability is as follows:

[0129]

[0130] Among them, x represents the individual, FIT(x) represents the fitness of the individual, F j Represents the sum of all individual fitness values ​​in the population;

[0131] The roulette algorithm is used to select individuals in the next generation population in combination with the selection probability, and the partial matching crossover (PMX) operation is performed on the selected population to generate new individuals to maintain the rationality of the path structure; the path order of the individuals is randomly mutated and adjusted with a preset probability to avoid falling into the local optimum;

[0132] Construct a target optimization function to minimize the total time consumption. The target function expression is as follows:

[0133]

[0134] Where n is the precise scanning coordinate set Q n The number of scanned coordinates, the coordinate number range is [1, n], C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) is from scanning point C i To scanning point C i+1 Movement time, T(C n , C1) is from the last scan point C n The movement time back to the first scanning point C1 forms a closed loop;

[0135] The current evolutionary generation is accumulated. In this embodiment, the maximum number of iterations is set to 700. It is determined whether the maximum generation or fitness value convergence condition is reached. If the condition is not met, the fitness calculation step is returned to continue iterative optimization. If the termination condition is reached, the optimal path individual in the current population is output as the refined scanning path output. The effect is as follows: Figure 5 shown.

[0136] S4: using dual-axis linkage control in combination with the precise scanning path to drive the motion platform to complete path execution, using a precise focus search strategy during path execution to complete the focus of the area array camera and collect a high-resolution image of the defect area.

[0137] The precise focus search strategy is used to complete the focusing of the area array camera. The specific process is as follows:

[0138] Set the search step of the camera focus module, and select a reasonable search step in combination with geometric error compensation and coarse focus;

[0139] Calculate the clarity evaluation value F1 of the image at the current shooting position, set the initial search step length L, drive the camera motor to move a unit step in a certain direction, and calculate the image clarity evaluation value F2 after the move. If F2>F1, it means that the clarity is improved and continue to move in the current direction; otherwise, adjust the moving direction to the opposite direction and drive the camera motor to move twice the step length in the opposite direction.

[0140] Get the image after moving in the opposite direction and calculate its clarity evaluation value F3. If F3>F2, it means that the opposite direction is more conducive to improving clarity, and continue moving in this direction; otherwise, adjust the moving direction to the opposite direction again, and reduce the current step length L to 0.618 times the original step length.

[0141] Then determine whether the current step length L is less than the preset minimum step length d. If the step length is less than d, stop searching and the process ends; otherwise, return to continue iterating the above operations until the termination condition is met. The entire process completes the camera's precise focus by adjusting and comparing the clarity evaluation values ​​multiple times.

[0142] S5: Perform image registration on the high-resolution image using an image registration algorithm improved by a local feature matching network based on a converter, perform image stitching and fusion on the registered images using an optimal seam line algorithm combined with an improved Laplace pyramid fusion method, and output a complete film image.

[0143] The high-resolution image is registered using an improved image registration algorithm based on a local feature matching network of a converter. The specific process is as follows:

[0144] The Sobel operator is used to quickly calculate the average gradient amplitude of the high-resolution image. Let the image be I(x,y), where x and y represent the horizontal and vertical coordinates of the image, S x (x,y),S y (x, y) represents the Sobel gradient in the horizontal and vertical directions respectively, M and N represent the width and height of the image respectively. The gradient magnitude G(x, y) is calculated for each pixel using the following formula:

[0145]

[0146] Then use the following formula to calculate the average gradient amplitude

[0147]

[0148] When the feature content in the image gradually decreases, its gradient average value also decreases, so a threshold t can be set, which is set to 9 in the embodiment. If the gradient amplitude average value is less than the preset threshold, it is judged as sparse features, and if the gradient amplitude average value is greater than the preset threshold, it is judged as dense features. For images to be registered with dense features, the SURF algorithm with color information added is used to extract feature points; for images to be registered with sparse features, the LoFTR algorithm is used to extract local feature points to obtain a high-quality feature point set.

[0149] Matching the feature point set using a feature matching algorithm to generate a list of matching point pairs for subsequent estimation of a transformation model;

[0150] Randomly select n pairs of points from the matching point pairs, and calculate the transformation matrix based on the selected point pairs. The standard translation transformation model formula is as follows:

[0151]

[0152] Among them, (x, y, 1) represents the homogeneous coordinates of a pixel before translation, (x', y', 1) represents the homogeneous coordinates of the pixel after translation, and Δx and Δy are the translation amounts;

[0153] Evaluate whether the transformation model is an approximate translation transformation model, that is, whether the seven values ​​in the same position of the comparison matrix, except for Δx and Δy, are similar to those of the standard translation transformation model. Due to a certain calculation error, this embodiment sets the numerical deviation to be no more than 2% to be considered as an approximate translation transformation, where the numerical deviation calculation expression is as follows:

[0154]

[0155] Among them, δ i represents the numerical deviation of the i-th element, T est,irepresents the i-th element in the estimated transformation matrix, T ref,i Represents the corresponding i-th element in the standard translation transformation model matrix.

[0156] If the approximate translation transformation condition is not met, n pairs of points are reselected; if the approximate translation transformation condition is met, the average distance error l between all matching points and the transformation model is calculated according to the translation transformation model. The expression is as follows:

[0157]

[0158] Among them, P i is the matching point, M is the point corresponding to the transformation model, and n is the number of selected matching points; the average distance error l is used as the error threshold t to divide the internal points and external points. Points less than the threshold t are internal points, and points greater than the threshold t are external points. The number of internal points is counted;

[0159] Repeat the above steps until a preset number of iterations is reached. In this embodiment, the number of iterations is 50, and the translation transformation model containing the largest number of inliers is output;

[0160] The output transformation model is applied to the image to be registered, and the image is geometrically transformed in combination with the model parameters to complete the image registration, and the registered image is output as the input of the subsequent stitching and fusion stage. The present invention proposes an image registration algorithm improved by a local feature matching network based on a converter. For images with dense features, the SURF algorithm with added color information is used for feature extraction to ensure fast calculation; for images with sparse features, the LoFTR algorithm is used to maintain a high sensitivity to subtle features. After the matching points are extracted, the improved RANSAC algorithm is used to solve the image transformation relationship, which significantly improves the utilization rate of the matching points, making the computational efficiency and matching accuracy better than the existing methods.

[0161] The best seam line algorithm combined with the improved Laplace pyramid fusion method is used to stitch and fuse the images and output a complete film image. The specific process is as follows:

[0162] Extract the overlapping areas of the high-resolution images after image registration;

[0163] Calculate the energy function value of each pixel in the overlapping area to obtain the energy matrix of the area, where the expression of the energy function is as follows:

[0164]

[0165] Among them, E(x,y) represents the energy value of the point (x,y) itself, E c It represents the difference in pixel color intensity, that is, the sum of the grayscale differences of the three channels at the corresponding points in the overlapping area. gRepresents the intensity of image structure difference; traverse and calculate each pixel in the overlapping area to obtain the energy matrix of the area, and search for the best seam line on this basis. First, set all the points in the first row of the energy matrix as the starting point of a seam line, that is, the initial number of seams is equal to the number of columns in the energy matrix. Then calculate the energy value of the next row. Suppose the current point is (x, y), then find the energy value E of the three points (x-1, y+1), (x, y+1), and (x+1, y+1) closest to (x, y) in the next row. The point with the smallest E value is used as the extension point of the current seam line, and gradually move downward until it touches the bottom. The current seam line search is completed. Repeat the above steps to find all seams, and sum the energy values ​​of all positions along each line path. The one with the smallest total energy value is used as the best seam line in the area. The search process is as follows: Figure 3 shown.

[0166] Using the best stitching algorithm, the best stitching trajectory is found in the overlapping area according to the energy minimization principle, and the pixels on both sides of the trajectory from different images are divided into fusion areas and non-fusion areas to ensure smooth transition after stitching;

[0167] The pixel color space of the overlapping area is converted from the RGB space to the HSL space, where H represents hue, and the color expression is closer to the intuitive feeling of the human eye; S represents saturation, which is a label for the vividness of the color; L represents brightness, which is a label for the brightness of the color, reflecting the intensity of the light source and the reflection coefficient; assuming that the components of the pixel in the RGB space are (r, g, b), the maximum value and the minimum value are represented by max and min, and the following formula is used to convert them into the (h, s, l) components of HSL:

[0168]

[0169] The pixel points of the converted image A are represented as B is represented by N is the number of pixels. The normalized cumulative average difference of each channel is calculated using the following formula.

[0170]

[0171] Next, the similarity y of the stitching line pixels of the two images to be stitched is calculated using the following formula:

[0172]

[0173] Among them, w H 、w S 、w L is the weight of each component, usually w H +w S +w L=1, adjust the decomposition level of the Laplacian pyramid based on the similarity y. The closer y is to 1, the more similar the seam area is visually. The number of decomposition levels can be reduced to improve computational efficiency and reduce memory consumption. Conversely, the closer y is to 0, the number of decomposition levels should be increased to improve fusion quality. H 、w S 、w L The value of follows the following rules:

[0174] Regarding the value of hue H, if the defect has a characteristic that is obviously different from the normal area in terms of color hue, such as stains of a certain color or heterochromatic defects, then the weight of hue (H) may be more important for detection, w H For example, when detecting different-colored ink dots on printed matter, the hue difference is the key feature. H Possible values ​​are between 0.4 and 0.6.

[0175] Regarding the value of saturation S, when the color vividness of the defective area is significantly different from that of the normal area, the weight of saturation (S) w S For example, some surface coating defects may cause significant changes in local color saturation. If this change is the main manifestation of the defect, w S The value can be 0.3-0.5. However, if the defect does not change significantly in saturation, w S It can be relatively small, such as 0.1-0.3.

[0176] Regarding the value of brightness L, brightness (L) may be an important basis for judging some defects caused by light, wear and tear, etc. For example, scratches on the metal surface may cause local brightness changes. L The value of can be larger, such as 0.3-0.5.

[0177] Since this defect detection requires high accuracy, it is necessary to comprehensively consider the three components of HSL, w H 、w S 、w L The value should be relatively balanced. In the embodiment, the value w H =0.35, w S =0.3, w L =0.35 to ensure that all aspects of the features are fully considered and avoid missing important defect information due to too low a weight for a certain component.

[0178] Calculate the difference between the hue, saturation and brightness of the stitched images, and calculate the comprehensive similarity based on adjustable preset weights:

[0179] According to the optimal seam line trajectory, the Gaussian-Laplacian pyramid method is used to decompose the image at multiple scales, and a weight matrix pyramid is constructed. The number of layers of the Laplacian pyramid decomposition is adjusted according to the comprehensive similarity. If the similarity is high, the number of decomposition layers is reduced to improve efficiency and reduce storage requirements; if the similarity is low, the number of decomposition layers is increased to retain more details. The mapping function expression of the number of layers n and the comprehensive similarity is as follows:

[0180] n=n min +(n max -n min )·(1-y)

[0181] Among them, n min and n max Represents the minimum and maximum number of possible decomposition levels. In this embodiment, n is set min For 3 layers, n max It has 7 floors.

[0182] The multi-scale decomposed images are reconstructed layer by layer to generate a seamless and complete film image. The present invention introduces the optimal seam line algorithm to find the optimal image stitching trajectory. The core evaluation criteria is to minimize the color and geometric differences to achieve more accurate image alignment. The Laplace pyramid fusion algorithm is further improved by adding an adaptive decomposition layer method: the number of decomposition layers is increased in the seam area with large visual differences to improve the fusion quality, and the number of layers is reduced in the area with small visual differences, thereby improving the operating efficiency while maintaining the image fusion effect. The algorithm flow is as follows: Figure 6 As shown in the figure, images A and B are decomposed by Gaussian-Laplace respectively, and then the images are fused by weight pyramid. The adaptive layer strategy and the method of constructing image weight pyramid only for overlapping areas effectively reduce the amount of calculation, and the overall time consumption is reduced by 58.7% compared with the traditional image pyramid fusion algorithm. In the subjective evaluation, the algorithm shows stable structural retention and good seam color transition, effectively avoiding the common "ghosting" and dislocation phenomena in image fusion, and achieving the control of calculation time within a reasonable range while improving the fusion quality. The overall improved algorithm can handle the film defect recognition of more than 20,000 spliced ​​images.

[0183] S6: Perform defect detection on the complete film image and output the detection result.

[0184] This solution proposes an advanced EVA film inspection system, which has significant advantages in detection capabilities. It can not only identify common defects caused by poor material quality, such as material blocks, crystal points, holes, and defects caused by foreign objects such as mosquitoes, dirt, and oil, but also expand the detection range and can accurately detect subtle defects in the film engraved printing images, including silk threads, bubbles, drop points, scratches, liquid marks, dents, meat points and bumps. This comprehensive detection capability makes this solution more reliable in ensuring the quality of film products. Through a highly automated and precise detection process, it not only improves detection efficiency and reduces labor costs, but also helps reduce the generation of defective products in the production process, thereby enhancing the market competitiveness of the product.

[0185] Embodiment 2:

[0186] This embodiment provides a large-format cross-scale adhesive film defect detection method and device, and the device is used to implement the steps of a large-format cross-scale adhesive film defect detection method as described in Example 1. Figure 7 The figure shows a schematic diagram of the detection state of a film defect detection device. Figure 8 The figure shows a schematic diagram of a film defect detection device in a state to be detected, and the front view, top view and right view of the film defect detection device are respectively shown as follows Fig. 9 , Fig.10 , Fig.11 shown.

[0187] A film defect detection device includes: a frame module 21, an imaging module 22, a lighting module 23, and a motion platform module 24.

[0188] The rack module 21 is responsible for supporting the mechanical skeleton of the entire system, ensuring that the guide rails, imaging module 22, lighting module 23 and motion platform module 24 are positioned in a stable, precision-controlled space. The rack module 21 includes several guide rails, which are made of aluminum alloy to meet the requirements of long-term stable operation and high-precision detection. In addition, the rack module 21 is also provided with several feet and anti-skid pads to improve the stability of the whole machine and reduce vibration, ensuring the accuracy of the position of the imaging module 22 and the lighting module 23 during the detection process.

[0189] The imaging module 22 includes an array camera module 8 and a global camera module 12. The array camera module 8 includes a Z-axis motion mechanism and an array camera, which is slidably connected to the second guide rail 13; the global camera module 12 includes a Z-axis motion mechanism and a global camera, which is slidably connected to the fifth guide rail 16; the height of the global camera module 12 from the ground is greater than the height of the array camera module 8 from the ground. The array camera and the global camera can move or fine-tune in a specific direction along their respective guide rails to meet different detection requirements. The Z-axis motion mechanism includes a motor and a screw rod, which serves as an auxiliary focusing mechanism to adjust the distance between the camera and the film to be tested, ensuring that a clear, high-resolution image is obtained and can effectively increase the camera scale span and shorten the focusing time. In this embodiment, the global camera module 12 adopts a single global camera configuration; the array camera module 8 adopts a multi-array camera configuration, with three array cameras, which are evenly spaced on the track, to achieve multi-viewing angle and multi-resolution detection.

[0190] The lighting module 23 includes a coaxial light source 7, a white strip light source 6, and a surface light source 5; in the present embodiment, the coaxial light source 7 is a visual blue coaxial light source, which is slidably connected to the third guide rail 14; the white strip light source 6 is a machine vision linear scanning light source, which is slidably connected to the fourth guide rail 15; the coaxial light source 7 and the white strip light source 6 are located on the same side as the area array camera module 8; the surface light source 5 is a square direct machine vision light source for an industrial camera, which moves synchronously with the motion platform module 24; the height of the coaxial light source 7 from the ground is greater than the height of the white strip light source 6 from the ground, and the height of the white strip light source 6 from the ground is greater than the height of the surface light source 5 from the ground. There are three coaxial light sources 7, which are evenly spaced on the track and are arranged directly below the area array camera module 8. There are six white strip light sources 6, which are arranged below the coaxial light source 7. A white strip light source 6 is arranged on the left and right sides below each coaxial light source 7. The white strip light source 6 is slidably connected to the guide rail through a linear light source mounting seat. The linear light source mounting seat is provided with an arc groove 25 for adjusting the irradiation angle and range of the light source to meet the optical requirements of different film defect detection, such as Fig. 9 shown.

[0191] The motion platform module 24 includes a motion platform 4, an X-axis motion mechanism and a Y-axis motion mechanism. The motion platform module 24 is arranged inside the frame module 21 and below the lighting module 23 and the imaging module 22. The X-axis motion mechanism includes a linear motor 1 and a first guide rail 2, which are arranged at the bottom of the motion platform module 24. The linear motor 1 and the first guide rail 2 are used to realize the movement of the motion platform module 24 along the X-axis direction; the Y-axis motion mechanism is arranged on the X-axis motion mechanism, and includes a linear motor 3. The linear motor 3 is used to realize the movement of the motion platform 4 along the Y-axis direction. The X-axis motion mechanism and the Y-axis motion mechanism are parallel to the plane where the lighting module 23 is located. The motion platform moves along the guide rails in the XY-axis direction, which can effectively expand the sliding range of the motion platform. The motion platform 4 is also provided with a clamping and fixing device 11 for positioning the film. When the film is placed on the motion platform 4, the clamping and fixing device 11 can abut and position the side wall of the film, so as to realize the rapid alignment of the film on the motion platform 4 and improve the detection efficiency. Figure 8 shown.

[0192] In this embodiment, the X-axis moving range of the defect detection platform is 0-1000mm, the Y-axis moving range is 0-550mm, and the Z-axis moving range is 0-80mm, which can realize film defect detection from 10 microns to meters. The working process is as follows:

[0193] Before testing, if Figure 8 As shown, the motion platform module 24 moves to the initialization position, that is, the position below the global camera module 12, and the film is installed on the surface light source 5 in the motion platform 4 and fixed by the clamping fixture 11. The global camera module 12 is used to perform a global scan of the film as a whole to determine the overall size and shape of the film, as well as the specific area that needs to be inspected. After the global scan, the surface light source 5 below the film illuminates the film, and impurities such as impurities such as bubbles in the film will appear on the film due to different light transmittances. During the movement, as Figure 7 As shown, the platform drives the surface light source and the film to move together, the array camera 8, the white strip light source 6, and the coaxial light source 7 are all fixed, and the detection platform 4 is driven by the linear motor to control the XY axis movement. The path planning algorithm is used to analyze the data obtained from the global scan, and a shortest path covering all the areas that need to be detected is planned to ensure the accuracy and efficiency of the detection. In addition, since the bubbles or impurities inside the film will not produce obvious multi-directional scattering reflection under light, the defects on the surface of the film will reflect the light in multiple directions. Therefore, when the white strip light source 6 and the coaxial light source 7 irradiate the film, the array camera 8 can effectively identify and judge the existence of defects based on these multi-directional scattering reflection characteristics.

[0194] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A large-scale cross-scale film defect detection method, characterized in that: The steps include: The camera is roughly focused and the film image is captured, the film image is roughly scanned and the information of the printed image and text in the film image is extracted by using the image difference method, and a differential image containing the target image and text information is output; Inputting the differential image into an anchor frame algorithm, obtaining the coordinates of the fine scanning target area from the coarse scanning coordinates; The coordinates of the target area of ​​the fine scanning are input into a genetic algorithm, and an optimized fine scanning path is output in combination with the S-curve planning characteristics of the motor; The path execution is completed by utilizing the dual-axis linkage control in combination with the precise scanning path to drive the motion platform, and during the path execution, the camera is focused by utilizing the precise focus search strategy to collect high-resolution images of the defective area; Performing image registration on the high-resolution image using an image registration algorithm improved by a local feature matching network based on a converter, performing image stitching and fusion on the registered image using an optimal seam line algorithm combined with an improved Laplace pyramid fusion method, and outputting a complete film image; Perform defect detection on the complete film image and output the detection results.

2. The large-format cross-scale film defect detection method according to claim 1, characterized in that: The film image is roughly scanned and the information of the printed image and text in the film image is extracted by using an image difference method, including the following steps: Using a camera to acquire a film image, obtaining an original input image; De-noise the original input image and output the denoised processed image; Using historical frames or pre-collected background images as a comparison benchmark, a background image is obtained; Perform a difference operation between the background image and the denoised processed image to obtain the difference map D(x,y), which is expressed as follows: D(x,y)=255-|T(x,y)-S(x,y)| Where (x, y) is the coordinate of the image pixel, T(x, y) is the pixel grayscale of the background image, and S(x, y) is the pixel grayscale of the film defect area in the current frame.

3. The large-format cross-scale film defect detection method according to claim 1, characterized in that: The differential image is input into the anchor frame algorithm, and the coordinates of the precise scan target area are output, including the following steps: Perform multi-geometric feature filtering on the extracted differential image to remove pseudo-spots and noise interference, and obtain an optimized foreground contour map; The optimized foreground contour map is converted into coordinates through the anchor frame algorithm, the film foreground contour within the camera field of view is calculated, converted into the pixel coordinate system coordinates under the fine scanning field of view, and the coordinates of the fine scanning target area are output.

4. The large-format cross-scale film defect detection method according to claim 1, characterized in that: The coordinates of the target area for fine scanning are input into the genetic algorithm, and the optimized fine scanning path is output in combination with the S-curve motion planning characteristics of the motor, including the following steps: Read the center coordinate data of the precision scanning target area, set the population size and maximum evolutionary generations, and randomly generate the initial population. Each individual in the population represents a precision scanning path arrangement. Calculate the fitness value of each individual in the population. The fitness function expression is as follows: Where n is the precise scanning coordinate set Q n The number of scanned coordinates, C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) represents the time from the i-th target to the i+1-th target. According to the third-order S-curve motion planning, T(C i ,C j ) expression is as follows: T(C i ,C j )=T a +T v +T d Among them, T a For the acceleration period, the expression is as follows: T v is the uniform speed period, the expression is as follows: T d For the deceleration period, the expression is as follows: Among them, a a is the maximum acceleration in the acceleration stage, V v is the maximum speed in the uniform speed section, a d is the deceleration in the deceleration stage, T v is the uniform speed period, a d is the deceleration in the deceleration stage, which is obtained from the S-curve motion planning. i ,C j ) is to convert the Euclidean distance of the target area of ​​the precision scan into the longest projection length in the X and Y directions. The expression is as follows: d(C i ,C j )=max(|X i -X j |,|Y i -Y j |) Among them, (X i ,Y i ) is point C i The coordinates of (X j ,Y j ) is point C j The coordinates of Sort the fitness values ​​by size and assign selection probabilities according to the fitness values. The expression for selection probability is as follows: Among them, x represents the individual, FIT(x) represents the fitness of the individual, Represents the sum of all individual fitness values ​​in the population; The roulette algorithm is used to select individuals from the next generation population in combination with the selection probability, and a partial matching crossover operation is performed on the selected population to generate new individuals to maintain the rationality of the path structure; the path sequence of the individuals is randomly mutated and adjusted with a preset probability to avoid falling into the local optimum; Construct a target optimization function to minimize the total time consumption. The target function expression is as follows: Where n is the precise scanning coordinate set Q n The number of scanned coordinates, the coordinate number range is [1, n], C i is the current scanning coordinate, C i+1 is the next scan coordinate, C i ∈Q n , C i+1 ∈Q n , T(C i ,C i+1 ) is from scanning point C i To scanning point C i+1 Movement time, T(C n , C1) is from the last scan point C n Movement time to return to the first scanning point C1; Accumulate the current evolutionary generations and determine whether the maximum generation or fitness value convergence condition is reached. If the condition is not met, return to the fitness calculation step and continue iterative optimization; if the termination condition is reached, output the optimal path individual in the current population as the refined scanning path output.

5. The large-format cross-scale film defect detection method according to claim 1, characterized in that: The method of using the fine focus search strategy to complete camera focusing includes the following steps: Set the search step of the camera focus module, and select a reasonable search step in combination with geometric error compensation and coarse focus; Calculate the definition evaluation value F1 of the image at the current shooting position, set the initial search step length L, drive the camera motor to move a unit step length in a certain direction, calculate the image definition evaluation value F2 of the position after the movement, if F2>F1, continue to move in the current direction; otherwise, adjust the moving direction to the opposite direction, and drive the camera motor to move twice the step length in the opposite direction; Get the image after moving in the opposite direction, and calculate its clarity evaluation value F3. If F3>F2, it means that the opposite direction is more conducive to improving clarity, and continue to move in this direction; otherwise, adjust the moving direction to the opposite direction again, and reduce the current step length L to 0.618 times of the original step length; Determine whether the current step length is less than the preset minimum step length d. If the step length is less than d, stop searching and the process ends; otherwise, return to continue iterating the above operations until the termination condition is met and the camera fine focusing is completed.

6. The large-format cross-scale film defect detection method according to claim 1, characterized in that: Performing image registration on the high-resolution image using an image registration algorithm improved by a local feature matching network based on a converter comprises the following steps: The high-resolution image is calculated using the first preset method for the average value of the gradient amplitude of the image. If the average value of the gradient amplitude is less than the preset threshold, it is judged as sparse features; if the average value of the gradient amplitude is greater than the preset threshold, it is judged as dense features; for the image to be registered with dense features, the second preset method is used to extract feature points; for the image to be registered with sparse features, the third preset method is used to extract local feature points to obtain a high-quality feature point set; Matching the feature point set using a feature matching algorithm to generate a matching point pair list; Randomly select n pairs of points from the matching point pairs, calculate the transformation matrix based on the selected point pairs and evaluate whether the transformation model is an approximate standard translation transformation model. If it does not meet the approximate standard translation transformation conditions, reselect n pairs of points; if it meets the approximate standard translation transformation conditions, calculate the average distance error l between all matching points and the transformation model based on the translation transformation model. The expression is as follows: Among them, P i is the matching point, M is the point corresponding to the transformation model, and n is the number of selected matching points; the average distance error l is used as the error threshold t to divide the internal points and external points. Points less than the threshold t are internal points, and points greater than the threshold t are external points. The number of internal points is counted; Repeat the above steps until the preset number of iterations is reached, and output the translation transformation model containing the largest number of inliers; The output transformation model is applied to the image to be registered, and the image is geometrically transformed in combination with the model parameters to complete the image registration and output the registered image.

7. The large-format cross-scale film defect detection method according to claim 6, characterized in that: The first preset method is the Sobel operator fast calculation method, the second preset method is the SURF algorithm that adds color information, and the third preset method is the LoFTR algorithm.

8. The large-format cross-scale film defect detection method according to claim 1, characterized in that: The best seam line algorithm combined with the improved Laplace pyramid fusion method is used to stitch and fuse the images and output a complete film image, including the following steps: Extract the overlapping areas of the high-resolution images after image registration; Calculate the energy function value of each pixel in the overlapping area to obtain the energy matrix of the area, where the expression of the energy function is as follows: Among them, E(x,y) represents the energy value of the point (x,y) itself, E c It represents the difference in pixel color intensity, that is, the sum of the grayscale differences of the three channels at the corresponding points in the overlapping area. g Indicates the intensity of image structure difference; The optimal stitching line algorithm is used to find the optimal stitching line trajectory in the overlapping area according to the energy minimization principle; Convert the pixel color space of the overlapping area from the RGB space to the HSL space, where H represents hue, S represents saturation, and L represents brightness; Calculate the difference between the hue, saturation and brightness of the stitched images, and calculate the comprehensive similarity based on adjustable preset weights: According to the optimal seam line trajectory, the Gaussian-Laplacian pyramid method is used to decompose the image at multiple scales, and a weight matrix pyramid is constructed. The number of decomposition layers of the Laplacian pyramid is adjusted according to the comprehensive similarity. If the similarity is high, the number of decomposition layers is reduced; if the similarity is low, the number of decomposition layers is increased. The multi-scale decomposed images are reconstructed layer by layer to generate a seamless and complete film image.

9. A large-format cross-scale film defect detection device, characterized in that: The device is used to implement the steps of a large-format cross-scale film defect detection method as described in any one of claims 1 to 8, and the device comprises: a frame module (21), an imaging module (22), an illumination module (23), and a motion platform module (24); wherein the frame module (21) comprises a plurality of guide rails; the imaging module (22) comprises a Z-axis motion mechanism and an imaging camera, which are located at the top of the frame module (21) and are slidably connected to the guide rail at the top of the frame module (21); the illumination module (23) is located below the imaging module (22), and comprises a first illumination module and a second illumination module, the first illumination module is slidably connected to the guide rail in the frame module (21), and the second illumination module moves synchronously with the motion platform module (24); the motion platform module (24) comprises a motion platform (4), an X-axis motion mechanism, and a Y-axis motion mechanism, which are arranged inside the frame module (21) and below the illumination module (23) and the imaging module (22).

10. The large-format cross-scale film defect detection device according to claim 9, characterized in that: The X-axis motion mechanism comprises a linear motor (1) and a first guide rail (2), which are arranged at the bottom of a motion platform module (24); the Y-axis motion mechanism comprises a linear motor (3), which is arranged on the X-axis motion mechanism, and the X-axis motion mechanism and the Y-axis motion mechanism are both parallel to the plane where the lighting module (23) is located.

Citation Information

Patent Citations

  • Panoramic vision-based pipeline quality inspection method and pipeline quality inspection device

    CN116167993A

  • Image splicing method for large-diameter optical crystal surface micro-defect detection

    CN108760766A

  • Carbon fiber precursor defect detection method based on machine vision

    CN115205281A

  • Underwater large-view-field image splicing method

    CN116205792A

  • Spinning cake defect detection method based on improved LoFTR algorithm

    CN116993709A

Cited By

  • Defect detection method for thermosetting resin adhesive

    CN121190440A

  • Method, device and equipment for determining critical load of thin film and storage medium

    CN121595364A

  • Wall-climbing robot wall disease intelligent evaluation method and system based on multi-sensor information fusion

    CN121810803A

  • A wall-climbing robot wall disease intelligent evaluation method and system based on multi-sensor information fusion

    CN121810803B

  • Method for detecting compressive strength of building concrete member based on multi-technology fusion

    CN121935544A