CN-122023423-A - Machine vision-based real-time detection method and system for surface flaws of aluminum-plastic composite film
Abstract
The invention discloses a real-time detection method and a real-time detection system for surface flaws of an aluminum-plastic composite film based on machine vision, particularly relates to the technical field of machine vision and image analysis, and aims to solve the problem that when an existing method based on single-frame image analysis is used for detecting micro flaws, high detection rate and low false alarm rate cannot be achieved due to weak target signals and aliasing with noise, the method comprises the steps of obtaining a continuous multi-frame surface image forming sequence, calculating statistics of each pixel position in a time dimension, analyzing a cooperative change mode of pixel points and a spatial neighborhood of the pixel points based on the statistics to screen candidate points, carrying out region growth on the candidate points to form a connected abnormal region and extracting region characteristic quantity of the candidate points, and finally evaluating and marking the comprehensive time statistics and the spatial region characteristic quantity, so that the micro flaws on the surface of the aluminum-plastic composite film can be reliably identified and positioned from a noise background.
Inventors
- CAI SHENGYUN
- CHEN YONGHUA
- YU TAO
Assignees
- 杭州鸿成科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260414
Claims (10)
- 1. The machine vision-based real-time detection method for the surface flaws of the aluminum-plastic composite film is characterized by comprising the following steps of: S1, acquiring multi-frame surface images acquired by the surface of an aluminum-plastic composite film in a continuous motion process, and forming a surface image sequence; s2, calculating statistics of pixel values of a pixel point set in a time dimension, wherein the pixel point set corresponds to the same physical position in the surface image sequence; s3, for pixel points in a current frame image of the surface image sequence, analyzing pixel value change correlation between the pixel points represented by statistics and other pixel points in a spatial neighborhood of the pixel points, and identifying a candidate pixel point set with a spatial cooperative change mode; s4, for each candidate pixel point in the candidate pixel point set, determining a connected abnormal region containing the candidate pixel point according to the spatial continuity of pixel values around the candidate pixel point, and calculating the region characteristic quantity of the connected abnormal region; S5, comprehensively evaluating the candidate pixel point set according to the statistic and the area characteristic quantity to distinguish whether the candidate pixel point set is caused by surface flaws or random noise, and marking the pixel points judged to be caused by the surface flaws in the current frame image.
- 2. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 1, wherein the steps of obtaining a plurality of frames of surface images collected by the surface of the aluminum-plastic composite film in a continuous motion process to form a surface image sequence include: Determining the continuous movement speed of the aluminum-plastic composite film; calculating the acquisition time interval between two adjacent frames of surface images according to the continuous motion speed and the preset image space resolution; continuously acquiring multi-frame surface images of the surface of the aluminum-plastic composite film through an industrial camera according to the acquisition time interval; and arranging the continuously acquired multi-frame surface images according to the acquisition time sequence to form a surface image sequence.
- 3. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 1, wherein the calculating of statistics of pixel values of a set of pixel points in a time dimension of the set of pixel points corresponding to the same physical position in a sequence of surface images comprises: extracting a time sequence value corresponding to each pixel point position from the surface image sequence; Calculating a first index representing time sequence stability of the time sequence value of each pixel point position; Calculating a second index representing time sequence fluctuation of the time sequence value of each pixel point position; and combining the first index and the second index of each pixel position to form statistics of the pixel position.
- 4. The machine vision-based real-time detection method for surface flaws of aluminum-plastic composite films according to claim 3, wherein the first index is an arithmetic mean value of time series values and the second index is a standard deviation of the time series values.
- 5. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 1, wherein for pixel points in a current frame image of a surface image sequence, analyzing pixel value change correlation between a pixel point characterized by statistics and other pixel points in a spatial neighborhood thereof, identifying a candidate pixel point set with a spatial cooperative change pattern comprises: generating a pixel point preliminary abnormal mapping of the current frame image according to the statistic of each pixel point position in the current frame image; For each mapping point in the preliminary abnormal mapping of the pixel points, analyzing the consistency of statistic variation of all pixel point positions in the spatial neighborhood of the mapping point; And identifying and collecting mapping points, in which the consistency of statistic changes in the spatial neighborhood meets a preset cooperative condition, as a candidate pixel point set.
- 6. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 5, wherein the preset cooperative condition is that the statistic change directions of more than half pixel positions in the spatial neighborhood are the same.
- 7. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 1, wherein for each candidate pixel point in the candidate pixel point set, determining a connected abnormal region including the candidate pixel point according to spatial continuity of pixel values around the candidate pixel point, and calculating a region feature quantity of the connected abnormal region, comprises: each candidate pixel point in the candidate pixel point set is taken as a starting point, region growth is carried out in the current frame image based on a preset pixel value continuity criterion, and connected pixel points meeting the continuity criterion are combined to form a connected abnormal region; Calculating pixel value distribution characteristics of all pixel points in the connected abnormal region as a first region characteristic component; calculating the boundary geometric shape characteristic of the connected abnormal region as a second region characteristic component; The first region feature component and the second region feature component are combined to constitute a region feature quantity connecting the abnormal region.
- 8. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 7, wherein the preset pixel value continuity criterion is that the absolute difference of pixel values between adjacent pixel points is smaller than or equal to a fixed gray-scale tolerance value.
- 9. The machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film according to claim 1, wherein comprehensively evaluating the candidate pixel point set according to statistics and region feature amounts to distinguish whether the candidate pixel point set is caused by surface flaws or random noise, and marking the pixel points determined to be caused by surface flaws in the current frame image comprises: Constructing a comprehensive discrimination feature vector according to the statistics corresponding to each candidate pixel point and the regional feature quantity of the connected abnormal region; Comparing the comprehensive discrimination feature vector corresponding to each candidate pixel point with a preset classification decision condition; and judging the candidate pixel points meeting the classification decision condition as being caused by the surface flaw, and carrying out position marking on the pixel points in the current frame image.
- 10. The machine vision-based real-time detection system for surface flaws of an aluminum-plastic composite film is used for realizing the machine vision-based real-time detection method for surface flaws of an aluminum-plastic composite film, and is characterized by comprising the following modules: The image acquisition module is used for acquiring multi-frame surface images acquired by the surface of the aluminum-plastic composite film in the continuous motion process to form a surface image sequence; The statistic calculation module is used for calculating the statistic of the pixel value of the pixel point set on the time dimension for the pixel point set corresponding to the same physical position in the surface image sequence; The collaborative recognition module is used for analyzing the pixel value change relevance between the pixel points represented by the statistic and other pixel points in the spatial neighborhood of the pixel points for the pixel points in the current frame image of the surface image sequence, and recognizing a candidate pixel point set with a spatial collaborative change mode; The region analysis module is used for determining a connected abnormal region containing the candidate pixel points according to the spatial continuity of the pixel values around the candidate pixel points for each candidate pixel point in the candidate pixel point set, and calculating the region characteristic quantity of the connected abnormal region; And the evaluation marking module is used for comprehensively evaluating the candidate pixel point set according to the statistic and the regional characteristic quantity to distinguish whether the candidate pixel point set is caused by the surface flaw or the random noise, and marking the pixel points judged to be caused by the surface flaw in the current frame image.
Description
Machine vision-based real-time detection method and system for surface flaws of aluminum-plastic composite film Technical Field The invention relates to the technical field of machine vision and image analysis, in particular to a real-time detection method and system for surface flaws of an aluminum-plastic composite film based on machine vision. Background The aluminum-plastic composite film is used as a key packaging material, and the surface quality of the aluminum-plastic composite film directly influences the safety and reliability of a product. Therefore, integrating an online real-time detection system based on machine vision on a high-speed production line thereof has become an industry standard practice. The prior art generally employs a high resolution industrial camera to capture images of the film surface and utilizes image analysis algorithms such as thresholding, texture contrast or feature matching to identify scratches, stains, foreign objects, etc. The technical path aims at replacing the traditional manual visual inspection so as to meet the high requirements on production efficiency and detection consistency. However, with the continuous increase in product quality requirements, the size of defects that need to be reliably detected is increasingly small, so that the pixels in the image that characterize the target feature are very few and the signal intensity is weak. Meanwhile, sensor noise, illumination fluctuation and background texture formed by the microstructure of the material are introduced in the image acquisition and transmission process, so that a complex system noise background is formed. Under the condition, the weak target signal and random noise fluctuation are highly aliased on the statistical characteristics, so that the existing method based on single-frame image analysis faces the fundamental limitation that false alarm cannot be effectively restrained while the high detection rate is maintained. Specifically, when the judgment threshold is lowered to capture weaker flaw signals, the probability of misjudging the noise as flaws is increased sharply, and when the threshold is raised to control the false alarm rate, the true micro flaws are easy to be missed. The contradiction leads the confidence and stability of the detection result to be obviously reduced when the existing machine vision detection method is used for coping with the micro-flaws at the sub-pixel level or near noise level, and the severe requirement on zero defect management in high-end manufacturing cannot be met. Disclosure of Invention In order to overcome the defects in the prior art, the invention provides a machine vision-based real-time detection method and system for surface flaws of an aluminum-plastic composite film, which are used for solving the problems in the background art. In order to achieve the above purpose, the present invention provides the following technical solutions: The real-time detection method for the surface flaws of the aluminum-plastic composite film based on machine vision comprises the following steps: S1, acquiring multi-frame surface images acquired by the surface of an aluminum-plastic composite film in a continuous motion process, and forming a surface image sequence; s2, calculating statistics of pixel values of a pixel point set in a time dimension, wherein the pixel point set corresponds to the same physical position in the surface image sequence; s3, for pixel points in a current frame image of the surface image sequence, analyzing pixel value change correlation between the pixel points represented by statistics and other pixel points in a spatial neighborhood of the pixel points, and identifying a candidate pixel point set with a spatial cooperative change mode; s4, for each candidate pixel point in the candidate pixel point set, determining a connected abnormal region containing the candidate pixel point according to the spatial continuity of pixel values around the candidate pixel point, and calculating the region characteristic quantity of the connected abnormal region; S5, comprehensively evaluating the candidate pixel point set according to the statistic and the area characteristic quantity to distinguish whether the candidate pixel point set is caused by surface flaws or random noise, and marking the pixel points judged to be caused by the surface flaws in the current frame image. Further, acquiring a plurality of frames of surface images acquired by the surface of the aluminum-plastic composite film in the continuous motion process to form a surface image sequence, wherein the method comprises the following steps of: Determining the continuous movement speed of the aluminum-plastic composite film; calculating the acquisition time interval between two adjacent frames of surface images according to the continuous motion speed and the preset image space resolution; continuously acquiring multi-frame surface images of the surface of the aluminum-plastic compos