Copper strip surface defect detection method, device and equipment

Through image fusion and deep learning models under multiple angles and different light conditions, the surface defects of copper tape are detected, which solves the problems of strong professionalism and environmental impact in the existing technology, improves detection accuracy and efficiency, and reduces costs.

CN118275449BActive Publication Date: 2024-11-19RUIAN WUXING COPPER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410526602.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-11-19
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

The existing copper tape surface defect detection technology is highly professional, susceptible to environmental influences, and has low detection accuracy and efficiency.

Method used

By acquiring copper strip surface images at multiple angles and different light conditions, performing image fusion and preprocessing, detecting defect locations, sampling and identifying defect types, and using deep learning models to improve detection accuracy and automation levels.

Benefits of technology

It improves the accuracy and efficiency of surface defect detection of copper belts, reduces labor demand, reduces production costs, improves automation level, and reduces misjudgments caused by light and viewing angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118275449B_ABST
    Figure CN118275449B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of copper strip technology, and in particular to a method, device and equipment for detecting surface defects of copper strips, the method comprising: obtaining a surface image of the copper strip; detecting the defect position in the surface image of the copper strip to obtain defect position information; sampling the defect area in the surface image of the copper strip according to the defect position information to obtain a sampled image; identifying the sampled image to obtain a recognition result; wherein the recognition result is used to reflect the type of surface defects of the copper strip. The surface defect detection method of the copper strip provided by the present application improves the accuracy and efficiency of surface defect detection of the copper strip and improves the level of automation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of copper strip technology, and in particular relates to a method, device and equipment for detecting surface defects of copper strips. Background Art

[0002] Copper tape generally refers to a strip of copper material, which is usually used in electrical engineering as a conductive and grounding material, as well as various other industrial applications. The characteristics of copper tape include good electrical conductivity, thermal conductivity and plasticity, and it is used in many occasions such as construction, electrical connection, decoration and art.

[0003] In the existing technology, copper strip surface defect detection operations usually require professional skills and experience, and the skill level and experience differences of operators may affect the accuracy of the detection results. Some detection technologies, such as ultrasonic and eddy current detection, may be affected by ambient noise, temperature and electromagnetic interference.

[0004] In summary, the existing technology for detecting copper strip surface defects has the problems of high technical expertise and susceptibility to environmental influences. Summary of the invention

[0005] The embodiments of the present application provide a method, device and equipment for detecting surface defects of copper strips, which can solve the problem that the technology for detecting surface defects of copper strips in the prior art is highly professional and easily affected by the environment.

[0006] In a first aspect, an embodiment of the present application provides a method for detecting surface defects of a copper strip, comprising:

[0007] Acquire the copper strip surface image;

[0008] Detecting defect positions in the copper strip surface image to obtain defect position information;

[0009] Sampling the defective area in the copper strip surface image according to the defect position information to obtain a sampled image;

[0010] The sampled image is identified to obtain an identification result; wherein the identification result is used to reflect the type of surface defects of the copper strip.

[0011] The above technical solutions in the embodiments of the present application have at least the following technical effects:

[0012] The copper strip surface defect detection method provided by the present application first obtains the copper strip surface image, which is conducive to obtaining the most comprehensive copper strip surface view, then detects the defect position in the copper strip surface image, obtains the defect position information, and then samples the defect area in the copper strip surface image according to the defect position information to obtain the sampled image, which is conducive to obtaining a clear and high-quality defect image, providing a basis for subsequent identification of defect types, and finally identifies the sampled image to obtain the identification result, and the type of copper strip surface defect can be known. The method helps reduce the misjudgment caused by light and viewing angle through multi-angle images, and improves the accuracy and efficiency of defect detection. Detecting copper strip surface defects by this method reduces manpower requirements, speeds up detection, reduces production costs, and improves the level of automation.

[0013] In a possible implementation manner of the first aspect, acquiring the copper strip surface image includes:

[0014] Acquire at least two groups of first images; wherein the at least two groups of first images include first images taken at at least two angles of the copper strip surface, and each group of first images includes multiple images taken at the same angle and under different lighting conditions of the copper strip surface;

[0015] Performing image preprocessing on the at least two groups of first images to obtain at least two groups of second images;

[0016] Performing image fusion on each group of the second images to obtain a third image; wherein the third image includes light fusion images at at least two angles;

[0017] The third image is processed to obtain the copper strip surface image.

[0018] In a possible implementation manner of the first aspect, performing image fusion on each group of the second images to obtain a third image includes:

[0019] When the brightness range of the second image is greater than a brightness threshold, performing image fusion on the second image using HDR fusion to obtain a third image;

[0020] When the brightness range of the second image is less than or equal to the brightness threshold, the second image is fused using average or weighted average fusion to obtain a third image.

[0021] In a possible implementation manner of the first aspect, performing image processing on the third image to obtain the copper strip surface image includes:

[0022] Extracting and matching feature points of the third image;

[0023] Calculating a geometric transformation according to the matched feature points, and registering the third image based on the geometric transformation to obtain a fourth image;

[0024] The fourth image is fused using an image fusion model based on deep learning to obtain a fifth image; wherein the image fusion model based on deep learning is pre-trained using fused copper strip surface images at different angles under different light conditions;

[0025] The fifth image is post-processed and optimized to obtain the copper strip surface image.

[0026] In a possible implementation manner of the first aspect, detecting the defect position in the surface image of the copper strip to obtain defect position information includes:

[0027] Binarizing the copper strip surface image to obtain a sixth image;

[0028] performing edge detection on the sixth image, and extracting a defect contour from the sixth image;

[0029] The defect contour is analyzed to determine the position and size of the defect contour, and the defect position is marked in the copper strip surface image to obtain the defect position information.

[0030] In a possible implementation manner of the first aspect, sampling the defect area in the copper strip surface image according to the defect position information to obtain the sampled image includes:

[0031] Determining the area type of the defect to be identified in the copper strip surface image according to the defect position information;

[0032] Performing an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified;

[0033] The defect area corresponding to the defect to be identified is sampled to obtain the sampled image.

[0034] In a possible implementation manner of the first aspect, determining the area type of the defect to be identified in the copper strip surface image according to the defect position information includes:

[0035] According to the defect position information, the number of pixels corresponding to the defect to be identified is obtained;

[0036] When the number of pixels is greater than a preset number, it is determined that the area type of the defect to be identified is a large area type; wherein the large area type means that the area occupied by the defect to be identified in the copper strip surface image is greater than a preset value;

[0037] When the number of pixels is less than or equal to the preset number, it is determined that the area type of the defect to be identified is a small area type; wherein the small area type means that the area occupied by the defect to be identified in the copper strip surface image is less than or equal to the preset value.

[0038] In a possible implementation manner of the first aspect, performing an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified includes:

[0039] When the area type of the defect to be identified is the large area type, the copper strip surface image is segmented into a plurality of small blocks by using superpixel segmentation;

[0040] Extracting features of the plurality of small blocks and comparing them with features of defect-free areas to obtain feature analysis results;

[0041] According to the feature analysis result, identifying the small block having features significantly different from the defect-free area, and obtaining the defect area corresponding to the defect to be identified;

[0042] When the area type of the defect to be identified is the small area type, contour detection is performed on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified.

[0043] In a possible implementation manner of the first aspect, sampling the defect area corresponding to the defect to be identified to obtain the sampled image includes:

[0044] When the resolution of the defect area is greater than a preset threshold, sampling the defect area to obtain the sampled image;

[0045] When the resolution of the defective area is less than or equal to the preset threshold, the defective area is upsampled to obtain the sampled image.

[0046] In a possible implementation manner of the first aspect, the identifying the sampled image to obtain a recognition result includes:

[0047] Extracting key features of the sampled image;

[0048] The key features are analyzed using a defect recognition model to identify and classify the defect types in the sampled image to obtain a recognition result; wherein the defect recognition model is pre-trained using a plurality of copper strip surface images with labeled copper strip surface defect types.

[0049] In a second aspect, an embodiment of the present application provides a copper strip surface defect detection device, comprising:

[0050] An acquisition unit, used for acquiring an image of the surface of the copper strip;

[0051] A detection unit, used to detect the defect position in the copper strip surface image and obtain defect position information;

[0052] A sampling unit, used for sampling the defect area in the copper strip surface image according to the defect position information to obtain a sampling image;

[0053] The recognition unit is used to recognize the sampled image and obtain a recognition result; wherein the recognition result is used to reflect the type of surface defects of the copper strip.

[0054] In a third aspect, an embodiment of the present application provides a copper strip surface defect detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the embodiments of the first aspect when executing the computer program.

[0055] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 1 It is a schematic flow chart of a copper strip surface defect detection method provided in one embodiment of the present application;

[0058] Figure 2 It is a schematic diagram of the implementation process of step S100 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0059] Figure 3 It is a schematic diagram of the implementation process of step S130 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0060] Figure 4 It is a schematic diagram of the implementation process of step S140 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0061] Figure 5 It is a schematic diagram of the implementation process of step S200 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0062] Figure 6It is a schematic diagram of the implementation process of step S300 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0063] Figure 7 It is a schematic diagram of the implementation process of step S310 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0064] Figure 8 It is a schematic diagram of the implementation process of step S320 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0065] Fig. 9 It is a schematic diagram of the implementation process of step S330 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0066] Fig.10 It is a schematic diagram of the implementation process of step S400 in the copper strip surface defect detection method provided in one embodiment of the present application;

[0067] Fig.11 It is a schematic diagram of the structure of a copper strip surface defect detection device provided in an embodiment of the present application;

[0068] Fig.12 It is a schematic diagram of the structure of the copper strip surface defect detection equipment provided in the embodiment of the present application. DETAILED DESCRIPTION

[0069] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0070] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0071] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0072] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0073] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0074] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0075] In the related technology, the copper strip surface defect detection operation usually requires professional skills and experience, and the skill level and experience differences of the operators may affect the accuracy of the detection results. Some detection technologies, such as ultrasonic and eddy current detection, may be affected by the surrounding environmental noise, temperature and electromagnetic interference.

[0076] To solve the above problems, the embodiments of the present application provide a method, device and equipment for detecting surface defects of copper strips.

[0077] In this method, the surface image of the copper strip is first obtained to facilitate obtaining the most comprehensive view of the copper strip surface, and then the defect position in the copper strip surface image is detected to obtain the defect position information, and then the defect area in the copper strip surface image is sampled according to the defect position information to obtain a sampled image, which is conducive to obtaining a clear and high-quality defect image, providing a basis for subsequent identification of defect types, and finally the sampled image is identified to obtain an identification result, and the type of copper strip surface defect can be known. This method helps reduce misjudgment caused by light and viewing angle through multi-angle images, and improves the accuracy and efficiency of defect detection. Detecting copper strip surface defects through this method reduces manpower requirements, speeds up detection, reduces production costs, and improves work efficiency.

[0078] The copper strip surface defect detection method provided in the embodiment of the present application can be applied to a terminal device. In this case, the terminal device is the executor of the copper strip surface defect detection method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0079] For example, the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a desktop computer, a smart screen, a smart TV, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premises equipment (customer premises equipment) equipment, CPE) and / or other equipment for communicating on wireless systems and next-generation communication systems, for example, mobile terminals in 5G networks or mobile terminals in future evolved public land mobile networks (Public Land Mobile Network, PLMN) networks, etc.

[0080] In order to better understand the copper strip surface defect detection method provided in the embodiment of the present application, the specific implementation process of the copper strip surface defect detection method provided in the embodiment of the present application is exemplarily introduced below.

[0081] Figure 1 A schematic flow chart of a copper strip surface defect detection method provided in an embodiment of the present application is shown, and the copper strip surface defect detection method includes:

[0082] S100, acquiring a surface image of the copper strip.

[0083] Exemplarily, a high-resolution camera or other imaging device can be used to change the light conditions at the same angle to shoot multiple images of the copper strip surface, and the multiple copper strip surface images under different light conditions at the same angle are fused to form an image at the angle. According to this method, images are shot at different angles on the copper strip surface to obtain image groups under different light conditions at each angle, and each group of images is fused to obtain a light fusion image corresponding to each angle. Multiple light fusion images corresponding to each angle are fused to obtain a copper strip surface image. For example, the angles of the front and side surfaces of the copper strip surface are selected, and multiple images are shot at the front surface of the copper strip surface under the light conditions are changed, and these images are fused to obtain a copper strip surface front image; multiple images are shot at the side surface of the copper strip surface under the light conditions are changed, and these images are fused to obtain a copper strip surface side image; the copper strip surface front image and the copper strip surface side image are fused again to finally obtain a copper strip surface image.

[0084] In one possible implementation, see Figure 2 , S100, obtain the copper strip surface image, including:

[0085] S110, acquiring at least two groups of first images, wherein the at least two groups of first images include first images taken at at least two angles of the copper strip surface, and each group of first images includes multiple images taken at the same angle and under different light conditions of the copper strip surface.

[0086] Exemplarily, at least two different angles can be selected to capture the copper strip surface, and these angles should be able to cover the key features and possible defect areas of the copper strip. For example, an angle parallel to the copper strip surface and an oblique angle can be selected to observe possible edge defects from the side. For each selected angle, multiple images are collected, and each image uses different lighting conditions, which may include different light source intensities, light source directions, or different types of lighting (such as ring lights, LEDs, or natural light). The position of the light source can be systematically changed, such as moving the light source from directly above to the side, or changing the intensity of the light, so that the reaction of the copper strip surface under different lighting can be captured at each angle. A high-resolution camera can be used for shooting to ensure that the image quality is high enough to capture subtle surface features and defects. At each angle and each lighting condition, multiple images are taken to increase the richness of the data, which helps to more effectively remove noise and enhance details in the subsequent image preprocessing stage. Each image can also be marked in detail to record the specific angle and lighting conditions of the shooting, which will help the subsequent image fusion and analysis stages to understand the shooting environment of each image.

[0087] S120: performing image preprocessing on at least two groups of first images to obtain at least two groups of second images.

[0088] For example, noise may be introduced during the image capture process, especially in low light conditions or when using high ISO settings. De-noising algorithms (such as Gaussian blur, median filtering, or more advanced digital denoising techniques) can be used to remove these unnecessary noises. According to the exposure of the original image, adjust the brightness and contrast to ensure that the key details of the image are more clearly visible. This can be achieved through histogram equalization, logarithmic transformation, or linear stretching. Perform color correction on the image to ensure that the color representation of the copper strip is as close to the actual situation as possible. It is very important for identifying certain specific types of surface defects. Color correction can be performed using white balance adjustment or color correction filters. Apply a sharpening filter to enhance image details and make edges clearer, which is helpful for subsequent defect detection and feature extraction. Commonly used sharpening techniques include Unsharp Mask (USM) and high-pass filtering. If the image is geometrically distorted due to shooting angle or lens distortion, geometric correction is required, including correcting perspective distortion, rotation correction, and cropping irregular edges to ensure that the straight lines and edges of the image accurately represent the true form of the object. For consistency in subsequent processing, resizing all images to a uniform resolution and size helps simplify the image processing pipeline in subsequent steps and ensures consistency in feature extraction.

[0089] Through these preprocessing, the first image group will be converted into a second image group that is more suitable for further processing. The preprocessed images will have better image quality and be more suitable for deep analysis and defect detection. This not only improves the usability of the images, but also provides important guarantees for ensuring the efficiency and accuracy of subsequent processing steps (such as image fusion and feature analysis).

[0090] S130, performing image fusion on each group of second images to obtain a third image, wherein the third image includes light fusion images at least at two angles.

[0091] Exemplarily, a suitable fusion technology can be selected according to the characteristics and needs of the image. If the exposure difference between the images is large, the high dynamic range (HDR) fusion technology can be used; if the exposure is relatively consistent, the average fusion or weighted average fusion method can be selected. For copper strip surface images, HDR fusion is particularly useful because it can capture the most details from images with different exposures. Before fusion, ensure that all input images have been preprocessed as necessary, such as correcting geometric distortion, adjusting the size and aligning the images, to ensure the consistency and accurate alignment of image information during the fusion process. The second image group under different lighting conditions at each angle is merged using the selected fusion technology, which involves pixel-level information merging, in which the algorithm evaluates the information contribution of each pixel point to select the most representative data to construct the final image. The fused image may require further optimization processing, such as adjusting color, enhancing contrast and detail sharpening to improve image quality. These steps help ensure that the fused image is visually clear and rich in details. After obtaining the preliminary fusion results, evaluate the quality of the image, especially to see whether the key defective areas are clearly visible. You can also go back to the fusion process to adjust parameters or reselect the fusion method to achieve the best visual effect. Once the third image reaches the expected quality standard, confirm that the image fusion step is completed. The third image contains all key information obtained from at least two angles and multiple lighting conditions for each angle.

[0092] Optionally, see Figure 3 , S130, performing image fusion on each group of second images to obtain a third image, including:

[0093] S131: When the brightness range of the second image is greater than the brightness threshold, HDR fusion is used to perform image fusion on the second image to obtain a third image.

[0094] It can be understood that when processing images with different exposure levels, HDR (High Dynamic Range) fusion and average fusion are commonly used image fusion techniques. HDR fusion is suitable for images with large exposure differences, while average or weighted average fusion is suitable for images with relatively consistent exposure.

[0095] For example, a brightness threshold may be set to distinguish between images with large exposure differences and images with relatively consistent exposures, and the brightness threshold may be set according to a brightness range or a histogram width or a brightness standard deviation.

[0096] The brightness range between the brightest and darkest pixels in the image can be calculated. This brightness range can be used to measure the exposure difference of the image. If the brightness range exceeds the brightness threshold, it indicates that the exposure difference is large; if it is less than the brightness threshold, it indicates that the exposure is relatively consistent. For example, if the brightness threshold is set to 100, a brightness range in the image exceeding 100 indicates a large exposure difference, and a brightness range less than or equal to 100 indicates a relatively consistent exposure.

[0097] The histogram of an image reflects the number of pixels for each brightness value. The width of the histogram can be used as an indicator to measure exposure differences. By analyzing the width of the histogram distribution, a brightness threshold is set. If the width of the histogram exceeds the brightness threshold, it indicates that the exposure difference is large; if the width is less than the brightness threshold, it indicates that the exposure is relatively consistent. For example, the brightness threshold is set to 50 brightness values ​​based on the width of the histogram. A width of more than 50 brightness values ​​indicates a large exposure difference, and a width of less than or equal to 50 indicates a relatively consistent exposure.

[0098] The brightness standard deviation reflects the dispersion of the image brightness. A high standard deviation means a large brightness dispersion, and a low standard deviation means concentrated brightness. Set a brightness threshold to distinguish between images with large exposure differences and images with relatively consistent exposure. For example, set the brightness threshold of the brightness standard deviation to 15. A standard deviation greater than 15 indicates a large exposure difference, and less than or equal to 15 indicates relatively consistent exposure.

[0099] It can be understood that high dynamic range (HDR) fusion can integrate images with different exposure levels to produce an image that is more balanced in brightness and details. Commonly used HDR fusion software includes Adobe Photoshop, PhotomatixPro, or the open source OpenCV library, which can usually process multiple images with different exposure levels and merge them into one.

[0100] For example, before performing HDR fusion, ensure that all images are accurately aligned. Even a slight movement may affect the fusion effect. Image alignment algorithms such as feature matching and perspective transformation can be used to adjust image alignment.

[0101] The preprocessed, aligned images are input into the HDR fusion program, which analyzes the details of each image in different brightness areas and combines this information to create an image with a wider dynamic range. During the HDR fusion process, the algorithm usually involves calculating local or global tone mapping to optimize the overall contrast and detail performance of the output image. The fused HDR image may need to be tone mapped in order to be displayed correctly on a standard display device. Tone mapping aims to preserve important visual details while avoiding excessive or insufficient color and luminance. Image enhancement, such as sharpening and contrast adjustment, can be performed to further improve image quality.

[0102] After completing the HDR fusion, evaluate the quality of the image, paying special attention to the details that may have been lost before the exposure difference. You can also go back to the fusion and tone mapping steps to adjust the parameters to achieve the best visual effect. After confirming that the fusion result meets the quality standards, the final HDR image is the third image.

[0103] S132: When the brightness range of the second image is less than or equal to the brightness threshold, use average or weighted average fusion to perform image fusion on the second image to obtain a third image.

[0104] It can be understood that average fusion is the simplest fusion method, which directly calculates the arithmetic average of all image pixel values. This method is very effective when the exposure is very consistent, and can significantly reduce image noise and smooth details.

[0105] In the weighted average fusion method, different weights can be given to each image according to its quality. For example, the clarity of the image or the importance of a specific area can be used to determine the weight. The weighted average fusion method is more flexible and is suitable for situations where some images are more important or reliable than others.

[0106] For example, you can ensure that all images used for fusion have been standardized in exposure and color, and that the images are accurately aligned to avoid any offset or distortion that affects the final result. You can use image processing software or custom scripts, such as OpenCV or PIL libraries in Python, to implement average or weighted average fusion. For average fusion, simply average the corresponding values ​​of each pixel; for weighted average fusion, the value of each pixel needs to be multiplied by its corresponding weight, and then the weighted pixel values ​​are summed and normalized based on the sum of all weights. The fused image may require further adjustments, such as color correction, contrast enhancement, or sharpening, to optimize the visual effect. Carefully examine the fused image, especially paying attention to those areas that may not be well represented in the single images, and ensure that the fused image is better than any single source image in terms of detail and color representation. Once the fused image meets the quality standards, confirm it as the final third image.

[0107] S140, performing image processing on the third image to obtain a surface image of the copper strip.

[0108] Exemplarily, after preprocessing the third image, the light fusion images of at least two angles in the third image are fused to obtain the copper strip surface image. Multi-angle image fusion methods include focus stacking technology, multi-view fusion technology, and image fusion methods based on deep learning. If images at different angles have different focus depths, focus stacking technology can be used to synthesize all the clearest parts to obtain the best focus depth in one image; multi-view fusion technology includes traditional stereo vision methods and more modern three-dimensional reconstruction technologies, such as deep learning-based methods, which can be used to synthesize a detailed three-dimensional view or a high-detail two-dimensional image; deep learning-based image fusion methods can be used, which can automatically optimize fusion parameters and processes by learning a large amount of data, providing a more natural fusion effect, especially when dealing with complex scenes and lighting conditions.

[0109] Optionally, see Figure 4 , S140, performing image processing on the third image to obtain a copper strip surface image, including:

[0110] S141, extracting and matching feature points of the third image.

[0111] For example, suitable feature point detection algorithms can be used, such as SIFT (Scale Invariant Feature Transform), SURF (Speeded Robust Features), ORB (Oriented FAST and Rotated BRIEF), etc. These algorithms can detect corners, edges and other significant features in the image, and have a certain robustness to changes in light and perspective. The selected detection algorithm is run on the third image to extract significant feature points, and the positions and descriptors of these feature points will be used for subsequent feature matching.

[0112] Matching algorithms between feature descriptors (such as FLANN matcher, Brute-Force matcher) can be used to find corresponding feature points in different images. During the matching process, certain distance metrics (such as Euclidean distance) can be used to ensure the accuracy of the matching. Applying ratio tests and consistency checks (such as RANSAC) to remove false matches and retain reliable matching pairs can help improve the matching quality, especially in images with complex backgrounds and different lighting conditions.

[0113] S142, calculating a geometric transformation according to the matched feature points, and registering the third image based on the geometric transformation to obtain a fourth image.

[0114] Exemplarily, the matched feature points can be used to estimate the geometric transformation between images, which involves calculating an affine transformation or a more complex homography (perspective) transformation. The homography transformation involves the use of at least four pairs of matching points and is able to handle rotation, scaling, translation, and perspective deformation between images, which is particularly important for images taken from different angles. An algorithm such as RANSAC (Random Sample Consensus) can be used to robustly estimate the transformation matrix, which can effectively eliminate erroneous matching points and improve the accuracy of the transformation. According to the calculated transformation matrix, all images in the third image are registered, including applying an affine or homography transformation to adjust all images to the same coordinate system. Through the transformation, it is ensured that the same features in the image are aligned in space, so that the same areas from different images overlap in the final synthesized image to obtain a fourth image.

[0115] S143, using a deep learning-based image fusion model to fuse the fourth image to obtain a fifth image. The deep learning-based image fusion model is pre-trained using fused copper strip surface images at different angles under different light conditions.

[0116] For example, you can choose a deep learning model suitable for image fusion, such as a convolutional neural network (CNN) or a generative adversarial network (GAN), which can automatically find the best way to fuse different image features by learning complex patterns in large amounts of data. Configure model parameters, such as network architecture, learning rate, and optimizer, to ensure that the model can effectively process specific image data.

[0117] Images of the copper strip surface at different angles and in different lighting conditions that have been fused can be used as training data. These data include a wide range of scenarios and conditions to ensure that the model can generalize to new, unseen images. Model training usually requires a lot of computing resources and time. During the training process, the model will learn how to identify and fuse image features from different sources. The fourth image is input into the trained deep learning model, and the model will automatically process the image and apply the feature fusion technology it has learned to generate a higher quality fused image. The image output by the model is the fifth image, which will show the best visual information accumulated from all previous processing steps.

[0118] S144, post-processing and optimizing the fifth image to obtain a copper strip surface image.

[0119] For example, the fifth image may be subjected to detail optimization (sharpening) to enhance the details of the image, especially the boundary of the defect and the subtle texture of the surface, which helps to more clearly identify and analyze the defect. Unsharp Mask or high-pass filter may be applied using image processing software or libraries (such as Adobe Photoshop, GIMP, or OpenCV), which can improve edge contrast and make the details more prominent. Adjust the sharpening intensity and threshold to avoid excessive processing resulting in increased noise or distortion.

[0120] The contrast and brightness of the fifth image can be adjusted to improve the overall visual effect and enhance the visibility of defects, making image analysis more effective. Histogram equalization can be used to automatically adjust the brightness distribution of the image, or the slider can be manually adjusted to improve the brightness and contrast of specific areas. During the adjustment process, ensure that the adjustment is uniform to avoid partial overexposure or darkening, which affects the identification and classification of defects.

[0121] The fifth image can be color corrected to ensure the naturalness and accuracy of the image color and reflect the real material properties. Adjust the color temperature and color balance to correct the color cast caused by lighting conditions or camera settings. You can use the color correction tool to make white balance adjustments, or manually adjust the color slider in the image editing software to ensure the natural presentation of color and match the actual material color.

[0122] The above steps greatly improve the quality and usability of the final copper strip surface image by utilizing image information from multiple angles and multiple lights. This method not only improves the accuracy of detection, but also helps reduce false judgments caused by image quality problems.

[0123] S200, detecting the defect position in the copper strip surface image to obtain defect position information.

[0124] Exemplarily, predefined or automatically extracted defect templates can be used for search and matching in the copper strip surface image, the template can be moved throughout the image using a sliding window technique, and the similarity between the template and the current window can be calculated. This method is suitable for defect detection with relatively consistent shapes and sizes.

[0125] Edge detection algorithms (such as the Canny edge detector) can be used to extract edges in the image, which helps to identify physical defects such as cracks and scratches on the copper strip surface; contour detection algorithms (such as the findContours method in OpenCV) are applied to determine the contours of defects in the binary image, which can extract the shape and size information of the defects; the detected defect contours are further analyzed to determine the exact location and size of each defect, and the bounding box (minimum rectangular area) of the defect is calculated, which helps to mark the specific location of the defect in the copper strip surface image.

[0126] In one possible implementation, see Figure 5 , S200, detecting the defect position in the copper strip surface image, and obtaining defect position information, including:

[0127] S210, performing binarization processing on the copper strip surface image to obtain a sixth image.

[0128] It can be understood that the purpose of binarization of the copper strip surface image is to simplify the image data, convert the color image into an image containing only grayscale information, reduce the amount of processed data and facilitate subsequent binarization processing.

[0129] For example, image processing software can be used to convert an RGB color image into a grayscale image by removing color information and retaining only brightness information. A suitable binarization method can be selected. For example, if the overall brightness of the image is relatively uniform, a fixed threshold can be selected to convert the image into black and white. The global threshold method is simple and fast, but may not be suitable for images with complex lighting conditions. If the image brightness is unevenly distributed, the adaptive threshold method will dynamically adjust the threshold according to the lighting conditions of different areas of the image. This method is more suitable for processing practical application scenarios with complex lighting changes.

[0130] Each pixel in the grayscale image is converted to black or white by setting or calculating a threshold. Specifically, pixel values ​​above the threshold are converted to white, and those below the threshold are converted to black, thus generating a new binary image. The binarization process may introduce noise into the image, and morphological operations such as opening or closing can be used to remove small noise points or fill small holes. The edges of the binarized image are smoothed to reduce jagged or broken edges and make the outline of defects clearer. Check the binarized image to confirm whether key features such as defects on the surface of the copper strip are clearly highlighted. Based on the results of the preliminary evaluation, it may be necessary to return to the binarization parameter settings for adjustments, such as modifying the threshold settings or improving the noise removal strategy, to obtain better image quality and analysis results.

[0131] Through this step, the sixth image obtained will provide clear and easy-to-parse visual information for further copper strip defect detection and analysis. Binarization is an effective preprocessing method and provides a strong foundation for the automated detection system.

[0132] S220, performing edge detection on the sixth image, and extracting a defect contour from the sixth image.

[0133] Exemplarily, clear edges are identified from the binary image (sixth image), which represent the outline of the object, especially any potential defect areas. Common edge detection algorithms such as the Canny edge detector can be used. The Canny algorithm is particularly suitable for such tasks because it can provide good noise suppression and edge detection accuracy. The Canny algorithm detects edges by first smoothing the image using a Gaussian filter and then calculating the gradient strength and direction of each pixel in the image.

[0134] The specific shape and location of the defect can be identified and extracted through edge detection results. You can use contour detection methods such as findContours (implemented in many image processing libraries), which can extract contour information from binary images. The detected edges are used as input, and the findContours method outputs a list of contours. Each contour consists of a series of points that are connected together to describe the shape of the edge.

[0135] S230, analyzing the defect contour, determining the position and size of the defect contour, and marking the defect position in the copper strip surface image to obtain defect position information.

[0136] For example, image processing tools (such as OpenCV) can be used to analyze the properties of each contour, including calculating the area and perimeter of the contour, which helps to determine the severity of the defect. Determining the bounding box (minimum enclosing rectangle) of each contour provides the location and maximum size of the defect. The bounding box can be automatically calculated by the image processing library.

[0137] Defect location information includes defect location and defect contour information. Each identified defect location can be clearly marked on the copper strip surface image. Different color lines can be used to distinguish different types of defects. Marking related contour information is very important for subsequent reporting and analysis.

[0138] Through the above steps, it can be ensured that every defect in the copper strip surface image is accurately identified and marked. Effectively detecting and recording defects on the copper strip surface is crucial to ensuring product quality and optimizing production processes.

[0139] S300, sampling the defective area in the copper strip surface image according to the defect position information to obtain a sampled image.

[0140] For example, the defect location information obtained in the previous step can be used to determine the specific defect area on the copper strip surface image, which usually includes the boundary box coordinates or contour data of the defect. According to the area type of the defect, the defect area to be further analyzed is selected, and large and significant defects may be selected first for detailed sampling.

[0141] Extracting the defect area from the complete copper strip surface image usually involves image cropping technology, which is based on the bounding box coordinates of the defect for precise cropping. It may be necessary to adjust the size of the cropped defect image according to the analysis requirements. For example, in order to maintain consistency in analysis, all sampled images can be adjusted to a uniform size. In order to better analyze the defects, further image enhancement processing may be required on the sampled images, such as contrast enhancement, sharpening, etc. If there is noise in the sampled image, a noise removal algorithm is applied to clearly display the defect features.

[0142] Save the sampled images in an appropriate format and directory for subsequent analysis and comparison. Add necessary tag information to each sampled image, such as defect area type, location, sampling time, etc. This information is very useful for building a defect database and performing statistical analysis. Integrate all sampled images into a dataset to prepare for in-depth analysis using machine learning models.

[0143] In one possible implementation, see Figure 6 S300, sampling the defective area in the copper strip surface image according to the defect position information to obtain a sampled image, including:

[0144] S310, determining the area type of the defect to be identified in the copper strip surface image according to the defect location information.

[0145] Exemplarily, the area of ​​each defect is calculated based on the defect contour information in the defect position information, and can be calculated directly from the number of pixels of the defect by image processing software or programming methods. According to the copper strip production standards and quality control requirements, an area threshold is pre-set to distinguish different defect area types. For example, a threshold can be set to distinguish between small area defects and large area defects.

[0146] Optionally, see Figure 7 , S310, determining the area type of the defect to be identified in the copper strip surface image according to the defect position information, including:

[0147] S311, obtaining the number of pixels corresponding to the defect to be identified according to the defect position information.

[0148] For example, the total number of pixels contained in each identified defective area can be calculated based on the defect location information, which can be done by analyzing the pixels in each defective area. Usually, in a binary image, the defective area is marked with a specific color (such as white), while the non-defective area is marked with another color (such as black). Based on product quality standards and historical data, a pixel number threshold is set to distinguish different defect area types.

[0149] S312: When the number of pixels is greater than a preset number, it is determined that the area type of the defect to be identified is a large area type, wherein the large area type means that the area occupied by the defect to be identified in the copper strip surface image is greater than a preset value.

[0150] Exemplarily, the preset value can be set as a certain proportion of the entire image area, such as 1%, and the number of pixels of the preset value is calculated based on the total number of pixels in the image, and the number of pixels is the preset number of pixels (i.e., the preset number). If the number of pixels of a defect is greater than the preset number, it indicates that the defect is of a large area type.

[0151] S313: When the number of pixels is less than or equal to a preset number, it is determined that the area type of the defect to be identified is a small area type, wherein the small area type means that the area occupied by the defect to be identified in the copper strip surface image is less than or equal to a preset value.

[0152] Exemplarily, if the number of pixels of the defect is less than or equal to the preset number of pixels, it indicates that the defect is of a small area type.

[0153] S320, performing an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified.

[0154] Exemplarily, for large-area defect types, superpixel segmentation technology can be used to segment the image into smaller, uniform blocks, which helps to analyze and identify the characteristics of large-area defects in more detail. Analyze the characteristics of each superpixel block, such as color, texture, and shape, and compare it with the surrounding area to identify those blocks that are significantly different as defect areas. For small-area defect types, edge or contour detection technology can be used to accurately identify the boundaries of the defects, which can be directly applied to the binarized image to accurately outline the defect area. Through morphological operations such as dilation and erosion, adjust and optimize the contour lines to ensure that the boundaries of the defect area are clear and complete. Clearly marking each identified defect area in the image, using different colors or labels to distinguish between large and small defects, and recording the specific location, size, and other relevant information of each defect are essential for subsequent analysis and report production. The accuracy and effectiveness of regional detection operations can also be regularly evaluated to ensure that all important defects are accurately identified and marked.

[0155] Optionally, see Figure 8 , S320, performing an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified, including:

[0156] S321, when the area type of the defect to be identified is a large area type, the copper strip surface image is segmented into multiple small blocks using superpixel segmentation.

[0157] For example, superpixel segmentation algorithms such as SLIC (Simple Linear Iterative Clustering) and SEEDS (Superpixels Extracted via Energy-Driven Sampling) can be used to segment images. A suitable algorithm can be selected based on the characteristics of the image and specific application requirements. For example, the SLIC algorithm is widely used in various image processing tasks due to its efficiency and ease of implementation.

[0158] Setting the number of superpixels is a key decision that directly affects the granularity of the segmentation. For large area defects, choosing an appropriate number of superpixels can help better cover the entire defect area while maintaining sufficient details. It may be necessary to determine the optimal number of superpixels through experiments to ensure that it is neither too fragmented nor loses important defect information. The copper strip surface image can be segmented using the selected algorithm, and each superpixel will represent a block in the image with relatively consistent color and texture. Adjust the algorithm parameters, such as the number of iterations, compactness factor, etc., to optimize the segmentation results.

[0159] S322, extract the features of multiple small blocks and compare them with the features of the defect-free area to obtain feature analysis results.

[0160] Exemplarily, determine which features to extract from each superpixel block. Common features include color histograms, texture features (such as gray level co-occurrence matrix, local binary pattern), edge features, etc. Apply a feature extraction algorithm to each superpixel block. For example, a color histogram can be used to capture the color distribution of the block, or a texture analysis method can be used to evaluate the consistency and variability of the surface pattern. Known defect-free areas are selected from the image as references. These areas should be representative and can accurately reflect the characteristics of the copper strip surface in a defect-free state. Extract the same type of features from these defect-free areas and establish a baseline feature set for subsequent comparative analysis. Comparing the features of each superpixel block with the baseline feature set can be achieved by calculating the distance between the features (such as Euclidean distance, cosine similarity). Analyze the differences between the features to determine which superpixel blocks have features that deviate significantly from the features of the defect-free areas. These deviations may indicate the presence of defects.

[0161] S323, based on the feature analysis results, identify small blocks with features significantly different from those of the defect-free area, and obtain defect areas corresponding to the defects to be identified.

[0162] Exemplarily, one or more difference metrics (e.g., Euclidean distance, Mahalanobis distance, or cosine similarity between feature vectors) can be defined to quantify the difference between superpixel blocks and defect-free baseline features. A threshold is set to determine what level of feature difference can be identified as a defect, and the threshold setting can be based on experience, historical data analysis, or a pre-set quality standard. For each superpixel block, the difference between its features and the features of the defect-free area is calculated, and those superpixel blocks whose difference values ​​exceed the preset threshold are identified. These blocks are considered to be potential defect areas. These identified significant difference blocks are marked on the image for further inspection and analysis, and these marked blocks are contextually verified, considering factors such as their position, shape, and relative size on the surface of the copper strip to ensure that the defect attributes of these marked blocks are consistent with the actual production defects. Detailed information of each identified defective area is recorded, including its position, size, shape, and difference metric value. Based on the identified defective areas, a mask is created for subsequent operations to ensure that the mask accurately covers all detected defective areas.

[0163] S324, when the area type of the defect to be identified is a small area type, contour detection is performed on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified.

[0164] Exemplarily, the surface image of the copper strip can be preprocessed to enhance the contour features, which may include image graying, blurring, histogram equalization, etc. To ensure clear edges, high-pass filtering or other edge enhancement operations can be performed. Use image processing algorithms, such as Canny edge detection, to extract edges and contours in the image. The algorithm identifies significant edges by gradient changes. Determine the sensitivity of the detection based on a preset threshold, and filter out insignificant edges and noise. Through the contour detection results, identify and mark all independent contour areas. It may be necessary to screen areas related to copper strip defects based on area, shape or edge features, remove areas less than a certain threshold, avoid misjudgment or noise, and select contour areas that may represent defects. These areas are usually irregular in shape or significantly different from non-defective areas. Use the identified contour area to generate a mask for extracting the corresponding image area. The mask can be used as the basis for subsequent processing and analysis to ensure focus on the detected defective area.

[0165] The above two defect area detection methods can select the most appropriate operation method according to the size and nature of the defects to ensure the accuracy and effectiveness of the detection.

[0166] S330, sampling the defect area corresponding to the defect to be identified to obtain a sampled image.

[0167] Exemplarily, the size, resolution and scale of the sampled image can be determined based on the defective area identified above to meet the needs of subsequent analysis. Using the mask generated above, the defective area is extracted from the copper strip surface image. Rectangular cropping or other cropping methods can be used to ensure that the sampled image is complete. If the defective area is large, multiple sampled images may need to be extracted to cover the entire area. The sampled image is processed to ensure that it is clear and accurate. Noise removal, sharpening or other enhancement operations may be required to maintain the color and details of the copper strip surface image to avoid distortion introduced during the sampling process. If the sampling area is close to the edge of the image, ensure that the boundary is complete. Filling or expansion may be required to prevent information loss. Check the integrity of the sampled image to ensure that all important defect features are included. The final sampled image should have sufficient quality and resolution for subsequent identification and analysis. The sampled image can also be stored or exported for further processing and testing.

[0168] Through this step, the sampled image can accurately reflect the defect area to be identified and provide reliable data for subsequent analysis.

[0169] Optionally, see Fig. 9 S330, sampling the defect area corresponding to the defect to be identified to obtain a sampled image, including:

[0170] S331, when the resolution of the defective area is greater than a preset threshold, the defective area is sampled to obtain a sampled image.

[0171] Exemplarily, the resolution of the defective area is calculated, and it can be judged according to the pixel density, image size or number of pixels per unit area to confirm whether the resolution is higher than the preset threshold to ensure that the sampled image has sufficient clarity. If the resolution of the defective area is greater than the preset threshold, the sampled image can be directly extracted from the copper strip surface image, and an appropriate sampling range can be selected according to the size and shape of the defective area. The entire defective area or a part of it can be selected to ensure that important features are included in the sampled image. Cropping or masking can be used to extract the defective area from the copper strip surface image to ensure that the sampled image is completely consistent with the defective area and retain sufficient resolution to ensure the clarity and accuracy of the sampled image. The size and proportion of the sampled image can be adjusted as needed to maintain the proportion of the copper strip surface image to avoid distortion introduced by the sampling process. Rotation, flipping or other transformations can also be performed to ensure the correct direction and positioning of the image. Check the clarity, resolution and integrity of the sampled image to ensure that no important parts are omitted or cut, and enhance the image, such as sharpening, denoising, etc., to improve the quality. Save the sampled image to a specified location to ensure that it is accessible for subsequent processing and analysis.

[0172] S332: When the resolution of the defective area is less than or equal to a preset threshold, up-sample the defective area to obtain a sampled image.

[0173] It can be understood that upsampling can be used to increase the resolution of an image, making it suitable for subsequent analysis and recognition. Upsampling methods include bilinear interpolation and image super-resolution reconstruction technology. Bilinear interpolation is suitable for simple resolution improvement, while image super-resolution reconstruction technology is more suitable for situations where higher quality and fewer artifacts are required.

[0174] For example, if bilinear interpolation is selected, determine the required magnification, and use a magnification of 2x or 4x to increase the resolution. Use the bilinear interpolation algorithm to upsample, ensure that the image is smooth and has no obvious distortion, and check the interpolated image to ensure that the edges are smooth and there is no excessive blur.

[0175] If you choose image super-resolution reconstruction technology, you can use neural networks or other machine learning-based algorithms for upsampling. Train the model to ensure that high-resolution details can be recovered from low-resolution images. Super-resolution reconstruction is performed on defective areas to ensure that details and textures are enhanced while maintaining the natural feel of the image. Inspect the super-resolution reconstructed image to ensure that there are no obvious artifacts or quality issues.

[0176] Regardless of the method used, check the upsampled sample image to ensure that its resolution meets expectations and there are no obvious quality defects. Image processing, such as sharpening or denoising, can be performed to improve the clarity of the image. Save the upsampled sample image to a specified location for subsequent analysis and recognition, and choose an appropriate file format to ensure that the image maintains quality in different environments.

[0177] The above steps can select an appropriate sampling method according to the resolution of the defect area to ensure that the final sampling image has sufficient resolution and quality to meet the needs of subsequent detection and analysis.

[0178] S400, identifying the sampled image to obtain an identification result, wherein the identification result is used to reflect the type of surface defects of the copper strip.

[0179] Exemplarily, two methods can be used to identify the sampled images. Traditional machine learning methods can be used to identify the types of surface defects of copper strips, or deep learning methods can be used to identify surface defects of copper strips. Traditional machine learning methods usually rely on manual feature extraction, and then use these features to train classification models. The texture information of the image is extracted using the gray level co-occurrence matrix (GLCM) or the local binary pattern (LBP). The shape of the defect is described by edge detection and contour extraction. Although the color of the copper strip does not change much, in some cases, corrosion or chemical changes may cause color changes, which can be used as features. Traditional machine learning methods are suitable for data with higher dimensions, have good classification effects for nonlinear problems, and can evaluate the importance of features. They are simple but the effect depends on the selection of appropriate distance metrics and K values.

[0180] Deep learning methods can automatically learn features from data and usually perform better in image recognition tasks. Use pre-trained models such as ResNet, VGG, or Inception, which have been trained on large-scale image datasets and can effectively extract image features. Fine-tune the pre-trained model on the copper strip defect image dataset and adjust the last few layers to suit the specific defect classification task. Generate more training images by rotating, scaling, cropping, etc. to improve the generalization ability of the model.

[0181] In one possible implementation, see Fig.10 , S400, identifying the sampled image to obtain a recognition result, including:

[0182] S410, extracting key features of the sampled image.

[0183] It can be understood that key features include shape features, size features, texture features, color features, etc.

[0184] Shape features include contours, edges, symmetry, etc.; size features include the area, perimeter, maximum length and width of the defect; texture features are used to describe the roughness and directionality of the internal structure of the defect; if the image is in color, the color change of the defect area can also provide important information.

[0185] For example, before extracting features, the image can be preprocessed to enhance key information and reduce the impact of noise. Use filters such as Gaussian filtering and median filtering to remove image noise, adjust the contrast of the image to make the defect and the background more distinct, and use edge detection algorithms (such as Sobel and Canny) to highlight the edges of the image.

[0186] For geometric and shape features, image processing libraries (such as OpenCV) can be used for contour detection and analysis to extract shape descriptors such as Euler number, convex hull, edge corners, etc. For texture features, texture analysis techniques such as gray-level co-occurrence matrix (GLCM) can be used to calculate statistical properties of image texture, such as contrast, uniformity, entropy, etc. If applied to color images, the color histogram of the defect area can be analyzed or color clustering techniques can be used to extract color features. Basic statistics of the defect area, such as the average gray value, standard deviation, etc., can also be calculated.

[0187] The extracted features can be appropriately encoded as numerical values ​​or vectors for input into machine learning or deep learning models for training and recognition, which may include feature standardization, normalization or other transformations to ensure that they are suitable for model training. After extracting a large number of features, feature selection algorithms (such as recursive feature elimination, model-based selection, etc.) are used to determine which features are most effective for defect identification and improve the performance of the model.

[0188] Through this step, key information reflecting the surface defects of the copper strip can be extracted from the sampling image to provide support for subsequent defect classification and analysis.

[0189] S420, using a defect recognition model to analyze key features, identify and classify defect types in the sampled image, and obtain a recognition result; wherein the defect recognition model is pre-trained using a plurality of copper strip surface images with labeled copper strip surface defect types.

[0190] For example, before training the model, a large number of defect images of the copper strip surface need to be collected and annotated. These images should cover various possible defect types, such as scratches, dents, corrosion, etc. The defect area in each image needs to be accurately annotated, including the type and location of the defect. The image may need to be size standardized, normalized, and other forms of preprocessing to meet the input requirements of the model. A suitable deep learning architecture can be selected to train the defect recognition model. Common choices include convolutional neural networks (CNNs) and their variants, such as U-Net (particularly suitable for image segmentation tasks). Use annotated datasets to train the model, including defining loss functions, selecting optimizers, and setting appropriate training cycles. Use validation datasets to test the effectiveness of the model and adjust and optimize as needed.

[0191] The trained recognition model is applied to new sampled images to identify defects. The model will identify defects in the image based on the learned features and classify them into the types defined during the training process. The output of the model identifies the defect type. Based on the recognition results, parameters or processes on the production line can be adjusted, and subsequent maintenance or repair work can be determined based on the identified defect type.

[0192] Through this step, the deep learning-based defect recognition model can efficiently identify and classify various defect types from the sampled images, providing strong technical support for copper strip production and quality control. It not only improves the accuracy of defect detection, but also significantly improves the processing speed and automation level.

[0193] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0194] Corresponding to the copper strip surface defect detection method described in the above embodiment, the embodiment of the present application also provides a copper strip surface defect detection device, and each unit of the device can implement each step of the copper strip surface defect detection method. Fig.11 A structural block diagram of a copper strip surface defect detection device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0195] Reference Fig.11 , the device comprises:

[0196] An acquisition unit, used for acquiring an image of the surface of the copper strip;

[0197] A detection unit, used to detect defect positions in the copper strip surface image and obtain defect position information;

[0198] A sampling unit, used for sampling a defective area in the copper strip surface image according to defect position information to obtain a sampling image;

[0199] The recognition unit is used to recognize the sampled image and obtain a recognition result, wherein the recognition result is used to reflect the type of surface defects of the copper strip.

[0200] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0201] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0202] The present application also provides a copper strip surface defect detection device, Fig.12 This is a schematic diagram of the structure of a copper strip surface defect detection device provided in one embodiment of the present application. Fig.12 As shown, the copper strip surface defect detection device 6 of this embodiment includes: at least one processor 60 ( Fig.12 Only one is shown), at least one memory 61 ( Fig.12 Only one is shown in the figure) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the copper strip surface defect detection device 6 implements the steps in any of the above-mentioned copper strip surface defect detection method embodiments, or the copper strip surface defect detection device 6 implements the functions of each unit in the above-mentioned device embodiments.

[0203] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the copper strip surface defect detection device 6.

[0204] The copper strip surface defect detection device 6 can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The copper strip surface defect detection device can include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand that Fig.12It is only an example of the copper strip surface defect detection device 6 and does not constitute a limitation of the copper strip surface defect detection device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, buses, etc.

[0205] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0206] In some embodiments, the memory 61 may be an internal storage unit of the copper strip surface defect detection device 6, such as a hard disk or memory of the copper strip surface defect detection device 6. In other embodiments, the memory 61 may also be an external storage device of the copper strip surface defect detection device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the copper strip surface defect detection device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the copper strip surface defect detection device 6. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0207] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0208] An embodiment of the present application provides a computer program product. When the computer program product is run on a copper strip surface defect detection device, the copper strip surface defect detection device implements the steps in any of the above-mentioned method embodiments.

[0209] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the copper strip surface defect detection device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0210] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0211] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0212] In the embodiments provided in the present application, it should be understood that the disclosed copper strip surface defect detection equipment and method can be implemented in other ways. For example, the copper strip surface defect detection equipment embodiment described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0214] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting surface defects of a copper strip, characterized in that: include: Acquire the copper strip surface image; Detecting defect positions in the copper strip surface image to obtain defect position information; Sampling the defective area in the copper strip surface image according to the defect position information to obtain a sampled image; Recognize the sampled image to obtain a recognition result; wherein the recognition result is used to reflect the type of surface defects of the copper strip; The step of obtaining the copper strip surface image comprises: Acquire at least two groups of first images; wherein the at least two groups of first images include first images taken at at least two angles of the copper strip surface, and each group of first images includes multiple images taken at the same angle and under different lighting conditions of the copper strip surface; Performing image preprocessing on the at least two groups of first images to obtain at least two groups of second images; Performing image fusion on each group of the second images to obtain a third image; wherein the third image includes light fusion images at at least two angles; Performing image processing on the third image to obtain the surface image of the copper strip; The performing image fusion on each group of the second images to obtain a third image comprises: When the brightness range of the second image is greater than a brightness threshold, performing image fusion on the second image using HDR fusion to obtain a third image; When the brightness range of the second image is less than or equal to the brightness threshold, performing image fusion on the second image by using average or weighted average fusion to obtain a third image; The performing image processing on the third image to obtain the copper strip surface image includes: Extracting and matching feature points of the third image; Calculating a geometric transformation according to the matched feature points, and registering the third image based on the geometric transformation to obtain a fourth image; The fourth image is fused using an image fusion model based on deep learning to obtain a fifth image; wherein the image fusion model based on deep learning is pre-trained using fused copper strip surface images at different angles under different light conditions; The fifth image is post-processed and optimized to obtain the copper strip surface image.

2. The copper strip surface defect detection method according to claim 1, characterized in that: The detecting the defect position in the copper strip surface image to obtain defect position information includes: Binarizing the copper strip surface image to obtain a sixth image; performing edge detection on the sixth image, and extracting a defect contour from the sixth image; The defect contour is analyzed to determine the position and size of the defect contour, and the defect position is marked in the copper strip surface image to obtain the defect position information.

3. The copper strip surface defect detection method according to claim 1, characterized in that: The step of sampling the defective area in the copper strip surface image according to the defect position information to obtain a sampled image includes: Determining the area type of the defect to be identified in the copper strip surface image according to the defect position information; Performing an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified; The defect area corresponding to the defect to be identified is sampled to obtain the sampled image.

4. The copper strip surface defect detection method according to claim 3, characterized in that: Determining the area type of the defect to be identified in the copper strip surface image according to the defect position information includes: According to the defect position information, the number of pixels corresponding to the defect to be identified is obtained; When the number of pixels is greater than a preset number, it is determined that the area type of the defect to be identified is a large area type; wherein the large area type means that the area occupied by the defect to be identified in the copper strip surface image is greater than a preset value; When the number of pixels is less than or equal to the preset number, it is determined that the area type of the defect to be identified is a small area type; wherein the small area type means that the area occupied by the defect to be identified in the copper strip surface image is less than or equal to the preset value.

5. The copper strip surface defect detection method according to claim 4, characterized in that: The performing of an area detection operation corresponding to the area type on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified includes: When the area type of the defect to be identified is the large area type, the copper strip surface image is segmented into a plurality of small blocks by using superpixel segmentation; Extracting features of the plurality of small blocks and comparing them with features of defect-free areas to obtain feature analysis results; According to the feature analysis result, identifying the small block having features significantly different from the defect-free area, and obtaining the defect area corresponding to the defect to be identified; When the area type of the defect to be identified is the small area type, contour detection is performed on the surface image of the copper strip to obtain a defect area corresponding to the defect to be identified.

6. The method for detecting surface defects of a copper strip according to claim 5, characterized in that: The step of sampling the defect area corresponding to the defect to be identified to obtain the sampled image includes: When the resolution of the defect area is greater than a preset threshold, sampling the defect area to obtain the sampled image; When the resolution of the defective area is less than or equal to the preset threshold, the defective area is upsampled to obtain the sampled image.

7. A copper strip surface defect detection device, characterized in that: Used to implement the copper strip surface defect detection method according to any one of claims 1 to 6, the copper strip surface defect detection device comprises: An acquisition unit, used for acquiring an image of the surface of the copper strip; A detection unit, used to detect the defect position in the copper strip surface image and obtain defect position information; A sampling unit, used for sampling the defect area in the copper strip surface image according to the defect position information to obtain a sampling image; The recognition unit is used to recognize the sampled image and obtain a recognition result; wherein the recognition result is used to reflect the type of surface defects of the copper strip.

8. A copper strip surface defect detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.