Aluminum foil quality defect detection method based on image processing
By using a multi-camera station and image processing algorithms, combined with edge slope calculation methods, the problem of identifying micron-level defects in aluminum foil is solved through refined cutting and classification. This achieves efficient and accurate defect detection, reducing production costs and false detection rates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHUOYUSHUO (JIANGSU) INTELLIGENT TECH CO LTD
- Filing Date
- 2025-06-23
- Publication Date
- 2026-06-19
Smart Images

Figure CN120689331B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for detecting quality defects in aluminum foil. Background Technology
[0002] Low-voltage forming foil is a core material for electronic components such as aluminum electrolytic capacitors, and its surface quality directly affects the capacitor's voltage withstand capability, capacitance stability, and lifespan. With the rapid development of new energy, consumer electronics, and 5G communications, the market demand for high-performance forming foil has surged, and quality requirements are becoming increasingly stringent. High-end capacitors have "zero tolerance" for defects; for example, if high-voltage capacitors used in new energy vehicles fail due to foil defects, it could pose a safety hazard. Defects in low-voltage forming foil include pinholes, scratches, uneven oxidation, black lines, and bright spots, which are difficult to accurately identify using traditional equipment. Existing manual visual inspection is inefficient: relying on human eyes or simple optical instruments, it is susceptible to fatigue and subjective judgment, resulting in high rates of missed and false detections. The vision solution uses a high-resolution line scan camera and a high-speed image processing chip, solving the hardware bottleneck of high-speed imaging and real-time analysis. Current machine vision solutions rely on the mature application of traditional algorithms combined with deep learning algorithms in the field of defect detection, providing a technical foundation for various minute defects in complex backgrounds. They enable real-time detection and marking of aluminum foil defects, and synchronize the detected defects to relevant web pages to realize an online real-time feedback system. Furthermore, they statistically analyze defect distribution data to guide process optimization and form a closed-loop quality control.
[0003] Micrometer-scale defects (such as pinholes and microcracks) are easily missed due to the limited resolution of traditional optical systems. Highly reflective surfaces (such as the anodized layer of aluminum foil) result in low imaging contrast and blurred defect edges, leading to the misidentification of reflective noise as defects. Defect morphologies are diverse; uneven oxidation manifests as color differences, scratches appear as lines, and black spots are foreign matter attachments. Relying solely on traditional algorithms and manually setting thresholds makes it difficult to dynamically adapt to different defect characteristics. This results in low detection efficiency, difficulty in accurately identifying defects, and high labor costs. Summary of the Invention
[0004] The purpose of this invention is to provide an image processing-based method for detecting aluminum foil quality defects, which involves real-time inspection and alarm monitoring of the aluminum foil production line via multiple camera stations and uploading statistical defects to help manufacturers optimize the aluminum foil production process.
[0005] The technical solution of this invention is:
[0006] A method for detecting quality defects in aluminum foil based on image processing, characterized by comprising the following steps:
[0007] Step 1: First, use an algorithm to obtain the region with the largest outline in the acquired standard image of aluminum foil to determine the location of the aluminum foil;
[0008] Step 2: Calculate the maximum bounding rectangle of the obtained maximum contour, segment the image within this rectangle, and to prevent defect features from being segmented into different images, each segmentation in the same direction needs to be performed forward or upward to ensure that there is some overlapping area; then these segmented images are fed into the model; the model returns the predicted classification and score for these segmented images.
[0009] Step 3: The entire image is fed into the model, and the model returns the predicted classification and score for the entire image;
[0010] Step 4: The edges of the object being detected need to be cut to obtain four points in the quadrilateral contour. Then, the slope of the quadrilateral is calculated, and the image is cut sequentially according to the slope. These edge images are then fed into the model, which returns the predicted classification and score for these edge images. Based on the classification and score in the configuration file, the images are initially filtered to determine which images have defects. Then, based on the defect type, different Halcon image processing algorithms are used to calculate the corresponding defect area or length. Finally, a second filtering based on defect area or length is used to finely control whether defects are detected.
[0011] In the second step, the image within the rectangle is divided into 5 segments along the X-axis and 8 segments along the Y-axis to ensure that the aspect ratios of the final segmented images are similar.
[0012] In the fourth step, the cropping size of the edge image is set to 200*200.
[0013] Method for acquiring standard images of aluminum foil: The width of the aluminum foil is 500mm. Because double-sided inspection is required, the inspection agency uses a camera to acquire standardized images of both sides of the aluminum foil. The image acquisition device uses an 8K line scan camera, and the triggering method adopts a frame trigger plus line signal method for fixed-length image acquisition. The frame signal is triggered by a sensor, and the line signal is continuously output by an encoder to acquire the standard image.
[0014] Background interference exists during edge defect identification. After acquiring the vertices of the aluminum foil quadrilateral, the slope value of each side is calculated. The edge image is then further refined according to the slope to reduce background interference, thereby improving the defect detection rate and reducing the false alarm rate.
[0015] Defects are often scattered across different images during image segmentation, leading to dispersed defect features and missed detections. Overlapping image segmentation consolidates defect features into a single image, improving the defect detection rate.
[0016] This invention can effectively improve the speed and accuracy of aluminum foil defect identification, reduce the missed detection rate and production cost of manual inspection, meet the requirements of the manufacturing industry to develop towards intelligence and automation, and will bring good economic and social benefits. Attached Figure Description
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] Figure 1 This is a flowchart of one embodiment of the present invention. Detailed Implementation
[0019] A method for detecting quality defects in aluminum foil based on image processing, characterized by comprising the following steps:
[0020] Step 1: First, use traditional algorithms to obtain the region with the largest outline in the acquired standard image of aluminum foil to determine the location of the aluminum foil;
[0021] Method for acquiring standard images of aluminum foil: The width of the aluminum foil is 500mm. Because double-sided inspection is required, the inspection agency uses a camera to acquire standardized images of both sides of the aluminum foil. The image acquisition device uses an 8K line scan camera, and the triggering method adopts a frame trigger plus line signal method for fixed-length image acquisition. The frame signal is triggered by a sensor, and the line signal is continuously output by an encoder to acquire the standard image.
[0022] Step 2: Calculate the largest bounding rectangle of the obtained maximum contour, and segment the image within this rectangle. To prevent defects from being segmented into different images, each segmentation in the same direction needs to be performed forward or upward to ensure some overlapping areas. Then, these segmented images are fed into the model (the model is a set of mathematical functions and parameters formed by training and statistics on image data, which can map input data to output prediction results). The model returns the predicted classification and score for these segmented images.
[0023] Step 3: The entire image is fed into the model, and the model returns the predicted classification and score for the entire image;
[0024] Step 4: The edges of the detected object need to be cut. Because the object is tilted, directly cutting the edges using the bounding rectangle of the largest contour would result in a large amount of background being cut into the image. Therefore, four points of the quadrilateral contour are obtained, and the slope of the quadrilateral is calculated. The image is then cut sequentially according to the slope. These edge images are fed into the model, which returns the predicted classification and score for these edge images. The classification and score in the configuration file are used to determine which images are defective in the first screening. For example, when the threshold is set to 0.5, images with a value greater than 0.5 are considered reliable in the classification. If the classification is a defect, it is considered a defect; otherwise, it is not a defect. Then, different Halcon image processing algorithms are used to calculate the corresponding defect area or length according to the defect type. Finally, a second screening based on defect area or length is used to finely control whether defects are detected.
[0025] In the second step, the image within the rectangle is divided into 5 segments along the X-axis and 8 segments along the Y-axis to ensure that the aspect ratios of the final segmented images are similar.
[0026] In the fourth step, the cropping size of the edge image is set to 200*200.
Claims
1. An image processing based method for detecting quality defects in aluminum foil, characterized in that: Includes the following steps: Step 1: First, use an algorithm to obtain the region with the largest outline in the acquired standard image of aluminum foil to determine the location of the aluminum foil; Step 2: Calculate the maximum bounding rectangle of the obtained maximum contour, segment the image within this rectangle, and to prevent defect features from being segmented into different images, each segmentation in the same direction needs to be performed forward or upward to ensure that there is some overlapping area; then these segmented images are fed into the model; the model returns the predicted classification and score for these segmented images. Step 3: The entire image is fed into the model, and the model returns the predicted classification and score for the entire image; Step 4: The edges of the object being detected need to be cut to obtain four points in the quadrilateral contour. Then, the slope of the quadrilateral is calculated, and the image is cut sequentially according to the slope. These edge images are then fed into the model, which returns the predicted classification and score for these edge images. Based on the classification and score in the configuration file, the images are initially filtered to determine which images have defects. Then, based on the defect type, different Halcon image processing algorithms are used to calculate the corresponding defect area or length. Finally, a second filtering based on defect area or length is used to finely control whether defects are detected.
2. The aluminum foil quality defect detection method based on image processing according to claim 1 is characterized in that: in the second step, the image within the rectangle is divided into 5 segments in the X-axis direction and 8 segments in the Y-axis direction to ensure that the aspect ratio of the final segmented image is similar.
3. The image processing based aluminum foil quality defect detection method according to claim 1 or 2, characterized in that: In the fourth step, the cropping size of the edge image is set to 200*200.
4. The image processing based aluminum foil quality defect detection method according to claim 1 or 2, characterized in that: Method for acquiring standard images of aluminum foil: The width of the aluminum foil is 500mm. Because double-sided inspection is required, the inspection agency uses a camera to acquire standardized images of both sides of the aluminum foil. The image acquisition device uses an 8K line scan camera, and the triggering method adopts a frame trigger plus line signal method for fixed-length image acquisition. The frame signal is triggered by a sensor, and the line signal is continuously output by an encoder to acquire the standard image.