Method for visual on-line detection of surface defects of a web for printing apparatuses

CN122636621BActive Publication Date: 2026-10-13WEINAN QINYA PRINTING & PACKAGING MASCH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611124942.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-13
Estimated Expiration
2046-07-28

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供了一种用于印刷设备的卷材表面缺陷视觉在线检测方法,以解决现有基于差分法进行缺陷检测的方法,始终面临“紧密跟随纹理”与“有效平滑缺陷”之间的根本矛盾,无法对不同纹理区域自适应调节背景估计强度,导致误检与漏检难以同时控制的问题

Benefits of technology

本发明中,通过提取每个像素点的局部方形邻域内沿多个扫描方向的一维灰度剖面序列,计算各方向上的灰度起伏特征(方向灰度起伏剧烈程度与方向纹理周期性指标)的变异系数,以量化每个像素点处的纹理空间结构的自洽程度,进而利用每个像素点的纹理自洽度系数自适应匹配高斯滤波尺度,在纹理均匀区域采用大尺度平滑充分消除缺陷信号,在纹理复杂区域采用小尺度平滑贴合纹理起伏,从根源上解决了“纹理跟随”与“缺陷平滑”的矛盾,大幅降低了误检与漏检率;同时,通过每个像素点的纹理自洽度系数对差分图像进行局部特征增强,针对性放大低自洽度区域的缺陷信号,同时抑制高自洽度区域的纹理残留,显著提升了缺陷与背景的对比度,在保证检测精度的同时运算效率高,可适配卷材高速运行的在线检测场景,满足印刷工业实时质量控制的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122636621B_ABST
    Figure CN122636621B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a kind of surface defect visual online detection method for printing equipment, the method obtains the surface gray image of the coil to be detected;By extracting the one-dimensional gray profile sequence in the local square neighborhood of each pixel point in surface gray image along multiple scanning directions, the direction gray fluctuation intensity and the direction texture periodicity index in each direction are calculated, the texture self-consistent degree coefficient corresponding to the pixel point is obtained, to match the adaptive Gaussian kernel scale of pixel point, the surface gray image is carried out Gaussian filtering, and background estimation image is obtained;Using the texture self-consistent degree coefficient of each pixel point, the difference image between surface gray image and background estimation image is carried out local feature enhancement processing, and defect highlighting image is obtained, and surface defect region is determined in defect highlighting image, the method adapts the online detection scene of high-speed running of coil, and meets the demand of real-time quality control of printing industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more particularly to an online visual detection method for surface defects on rolls used in printing equipment. Background Technology

[0002] In printing equipment, roll materials (such as films, paper, and metal foil) move at high speeds in a continuous winding manner during production, and their surface quality directly determines the quality of the final printed product. However, due to factors such as impurities in raw materials, equipment wear, electrostatic adsorption, and fluctuations in process parameters, various defects inevitably occur on the surface of the roll materials during production. Typical defects include scratches, dirt spots, creases, holes, bubbles, oil stains, and roller marks. If these defects are not detected and marked in time, they will lead to large-scale waste in subsequent printing processes, resulting in serious waste of raw materials and production capacity. Therefore, integrating online visual inspection functions for the surface of roll materials into printing equipment to achieve real-time and accurate defect identification has become an urgent need for quality control in the modern printing industry.

[0003] Existing methods for defect detection on rolled materials often employ the differential method. This method typically uses a fixed-size mean filter or Gaussian filter to obtain a reference background, assuming the defect is a "small" local anomaly while the background is a "large-area" smooth variation. Large-size filtering would smooth out the defect. However, on rolled materials, different types of textures vary significantly—matte films have random granular textures, metal foils have directional calendering patterns, and specialty papers have interwoven fiber textures. Large-size filtering in rough textured areas can produce significant background estimation bias because it cannot closely follow the texture undulations. This bias itself leaves a strong residue in the differential image and is misjudged as a defect. If the filter size is reduced, the actual defect cannot be sufficiently smoothed and remains in the background, resulting in a severe weakening or even disappearance of the defect signal after differential analysis, leading to missed detections. Therefore, existing methods for defect detection based on the differential method always face the fundamental contradiction between "closely following the texture" and "effectively smoothing the defect," failing to adaptively adjust the background estimation intensity for different texture regions, making it difficult to simultaneously control false positives and false negatives. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a visual online detection method for surface defects of roll materials for printing equipment, in order to solve the problem that existing defect detection methods based on the differential method always face the fundamental contradiction between "closely following the texture" and "effectively smoothing the defect", and cannot adaptively adjust the background estimation intensity for different texture regions, resulting in the difficulty of simultaneously controlling false detection and false negative detection.

[0005] This invention provides a method for online visual inspection of surface defects in roll materials for printing equipment, the method comprising the following steps: Acquire a surface image of the roll material to be inspected, and perform filtering and grayscale normalization on the surface image to obtain a surface grayscale image; For any pixel in the surface grayscale image, a local square neighborhood is constructed with the pixel as the center. A preset number of scanning directions are constructed in the local square neighborhood at equal angular intervals. Starting from the pixel, the grayscale value of each pixel is extracted sequentially in each scanning direction to form a one-dimensional grayscale profile sequence. Grayscale fluctuation analysis and texture periodicity analysis are performed on each one-dimensional grayscale profile sequence to obtain the texture self-consistency coefficient of the pixel. The adaptive Gaussian kernel scale of any pixel is obtained based on the texture self-consistency coefficient of any pixel. The adaptive Gaussian kernel scale of each pixel in the surface grayscale image is obtained. The surface grayscale image is then subjected to adaptive Gaussian filtering to obtain the background estimation image. A difference image is obtained between the surface grayscale image and the background estimation image. The texture self-consistency coefficient of each pixel in the surface grayscale image is used to perform local feature enhancement processing on the difference image to obtain a defect highlighting image. Adaptive threshold segmentation and multi-feature joint screening are performed on the defect highlighting image to determine the surface defect area of ​​the roll material to be detected.

[0006] Preferably, the step of performing grayscale fluctuation analysis and texture periodicity analysis on each of the one-dimensional grayscale profile sequences to obtain the texture self-consistency coefficient of any pixel includes: For any one-dimensional grayscale profile sequence, perform first-order difference processing on the one-dimensional grayscale profile sequence to obtain the corresponding difference sequence, calculate the root mean square of the difference sequence, and obtain the degree of drastic grayscale fluctuation in the direction of the one-dimensional grayscale profile sequence. Obtain the local maximum position in any one-dimensional grayscale profile sequence, calculate the positional interval between adjacent local maximum positions, calculate the mean of all positional intervals, and obtain the directional texture periodicity index of any one-dimensional grayscale profile sequence. Based on the intensity of directional grayscale fluctuations and directional texture periodicity indices of each of the one-dimensional grayscale profile sequences, the texture self-consistency coefficient of any pixel is obtained.

[0007] Preferably, obtaining the texture self-consistency coefficient of any pixel based on the directional gray-level fluctuation intensity and directional texture periodicity index of each of the one-dimensional gray-level profile sequences includes: Based on the degree of intensity of directional gray-level fluctuations in each of the one-dimensional gray-level profile sequences, the coefficient of variation of the degree of intensity of directional gray-level fluctuations is calculated as the degree of dispersion of gray-level fluctuations in each direction for any pixel; based on the directional texture periodicity index of each of the one-dimensional gray-level profile sequences, the coefficient of variation of the directional texture periodicity index is calculated as the degree of disorder of texture periodicity in each direction for any pixel. The local gray-level abrupt change degree of any pixel is obtained by weighted summing of the gray-level fluctuation dispersion degree and the texture periodic disorder degree of each direction. The local gray-level abrupt change degree of any pixel is then normalized inversely using an exponential function with the natural constant as the base, to obtain the texture self-consistency coefficient of any pixel.

[0008] Preferably, obtaining the adaptive Gaussian kernel scale of any pixel based on the texture self-consistency coefficient of any pixel includes: ; ; in, Indicates the position as Adaptive Gaussian kernel scale for pixels, Denotes the smallest Gaussian kernel size. Indicates the maximum Gaussian kernel size. Indicates the position as The texture self-consistency coefficient of the pixel. This represents the connection function used to monotonically map the texture self-consistency coefficients to an interval. Inside, 1 represents a constant. This represents an exponential function with the natural constant as its base. Indicates the steepness parameter. This indicates the median value during the transition period.

[0009] Preferably, the step of using the texture self-consistency coefficient of each pixel in the surface grayscale image to perform local feature enhancement processing on the difference image to obtain a defect highlighting image includes: For any pixel in the difference image, the enhancement gain factor of the pixel is obtained by using the texture self-consistency coefficient of the pixel in the surface grayscale image that is at the same position as the pixel. The product of the difference value of the pixel and the enhancement gain factor is taken as the enhancement difference value of the pixel. The enhanced difference value of each pixel in the difference image is obtained to obtain a defect-highlighting image after local feature enhancement processing of the difference image.

[0010] Preferably, obtaining the enhancement gain factor of any pixel using the texture self-consistency coefficient of the pixel in the surface grayscale image that is at the same position as any pixel includes: ; in, Indicates the position as The enhancement gain factor for each pixel, where 1 represents a constant. Indicates the gain modulation amplitude. Indicates the position as The texture self-consistency coefficient of the pixel. This is the gain nonlinearity index.

[0011] Preferably, the step of performing adaptive threshold segmentation and multi-feature joint screening on the defect highlighting image to determine the surface defect region of the roll material to be detected includes: Adaptive threshold segmentation is performed on the defect-highlighting image to obtain at least one defect candidate region composed of defect candidate pixels in the defect-highlighting image; multi-feature joint screening is performed on each defect candidate region to determine the surface defect region among all defect candidate regions.

[0012] Preferably, the step of performing multi-feature joint screening on each defect candidate region to determine the surface defect region among all defect candidate regions includes: For any candidate defect region, calculate the area of ​​the candidate defect region and calculate the average absolute deviation of the enhancement difference values ​​of all pixels in the candidate defect region as the differential response level; if both the area and the differential response level of the candidate defect region meet the requirements, then the candidate defect region is determined to be a surface defect region.

[0013] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: In this invention, a one-dimensional grayscale profile sequence along multiple scanning directions is extracted from the local square neighborhood of each pixel. The variation coefficients of grayscale fluctuation features (the intensity of directional grayscale fluctuations and the directional texture periodicity index) in each direction are calculated to quantify the self-consistency of the texture space structure at each pixel. Then, the texture self-consistency coefficient of each pixel is used to adaptively match the Gaussian filter scale. Large-scale smoothing is used in areas with uniform texture to fully eliminate defect signals, while small-scale smoothing is used in areas with complex texture to fit the texture fluctuations. This fundamentally solves the contradiction between "texture following" and "defect smoothing," significantly reducing the false detection and false negative rates. At the same time, the texture self-consistency coefficient of each pixel is used to perform local feature enhancement on the differential image, specifically amplifying defect signals in low self-consistency areas while suppressing texture residue in high self-consistency areas. This significantly improves the contrast between defects and the background. While ensuring detection accuracy, the computational efficiency is high, making it suitable for online detection scenarios with high-speed roll material operation and meeting the real-time quality control needs of the printing industry. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart of a method for online visual inspection of surface defects of roll materials for printing equipment, provided in Embodiment 1 of the present invention. Detailed Implementation

[0016] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0017] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0018] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0019] See Figure 1 This is a flowchart of a method for online visual inspection of surface defects in roll materials for printing equipment, provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include: Step S101: Obtain the surface image of the roll material to be inspected, perform filtering and grayscale normalization on the surface image to obtain a surface grayscale image.

[0020] A high-resolution linear CCD camera, combined with a high-brightness LED linear light source, is used to scan and acquire images of the surface of the roll material being inspected line by line during operation. It should be noted that the linear camera offers advantages such as fast imaging speed, high resolution, and no motion blur, making it suitable for online inspection in scenarios involving high-speed, continuous roll material operation. The light source employs bright-field front illumination, with the illumination angle controlled within 10° to 15° of the camera's optical axis to fully illuminate the roll material surface while avoiding localized overexposure caused by specular reflection. Acquisition parameter settings: Based on the Nyquist sampling theorem and actual inspection accuracy requirements, the camera's lateral resolution is set to be no less than 4096 pixels, and the line scanning frequency is synchronized with the roll material's running speed to ensure that the spatial resolution of the acquired images in both the horizontal and vertical directions is no less than 0.1 mm / pixel, meeting the detection requirements for millimeter-level and sub-millimeter-level defects.

[0021] The surface image of the roll material to be inspected is inevitably affected by sensor thermal noise, quantization noise and other interferences during the acquisition and transmission process. These random noises will reduce the signal-to-noise ratio of the statistical relationship between neighboring pixels in subsequent calculations and affect the accuracy of texture self-consistency assessment. Therefore, guided filtering is used to denoise the surface image of the roll material to be inspected to obtain a denoised surface image. The guided filtering uses the original image itself as the guide image, which can effectively smooth noise in flat areas while maintaining the edge structure of the image well. This is a prior art technology.

[0022] Furthermore, to eliminate the impact of differences in overall grayscale level and contrast between different roll material batches on subsequent data calculations, grayscale normalization processing is performed on the denoised surface image to obtain the corresponding surface grayscale image. The denoised surface image is converted to grayscale to obtain a grayscale image, with the position in the grayscale image as... Using the pixel as the center point, based on the grayscale value of each pixel in the grayscale image, in the local neighborhood of the center point... (Refer to the longest side of the image) Calculate the local grayscale mean within ) and local grayscale standard deviation Used for positions where Normalize the grayscale values ​​of the pixels:

[0023] in, Indicates the position as The gray value of a pixel in a surface grayscale image, that is, the grayscale value after grayscale normalization. Indicates the position as The gray value of a pixel in a grayscale image, that is, the value before grayscale normalization. Indicates the position as The local grayscale mean value within the local neighborhood of a pixel. Indicates the position as The local grayscale standard deviation within the local neighborhood of a pixel. To avoid dividing by zero for small constants.

[0024] It should be noted that after grayscale normalization, By eliminating local brightness and contrast differences, the grayscale fluctuation characteristics of different texture regions are unified to the same scale for comparison, providing a comparable basis for subsequent cross-regional unified calculation of texture self-consistency.

[0025] Thus, through filtering and grayscale normalization, a high-quality, uniform grayscale image of the surface of the roll material under inspection was obtained. This eliminates uneven lighting and noise interference introduced during the acquisition process, providing a reliable image basis for texture self-consistency calculation and background estimation in subsequent steps.

[0026] Step S102: For any pixel in the surface grayscale image, a local square neighborhood is constructed with the pixel as the center. A preset number of scanning directions are constructed in the local square neighborhood at equal angular intervals. Starting from the pixel, the grayscale value of each pixel is extracted sequentially in each scanning direction to form a one-dimensional grayscale profile sequence. Grayscale fluctuation analysis and texture periodicity analysis are performed on each one-dimensional grayscale profile sequence to obtain the texture self-consistency coefficient of any pixel.

[0027] A healthy rolled material textured surface should exhibit statistical self-consistency in its local grayscale fluctuation patterns across all directions: the variation patterns of pixel grayscale within a neighborhood should have inherent consistency across different directions. This self-consistency is disrupted when defects (such as scratches or dirt) occur: scratches produce abrupt grayscale breaks perpendicular to their direction, and dirt exhibits abrupt grayscale changes in all directions that clash with the surrounding texture. To quantify this self-consistency, the local multidirectional texture density is analyzed, centered on each pixel in the surface grayscale image, and the texture self-consistency coefficient for each pixel is calculated to describe the degree of consistency in the texture spatial structure within each pixel's local neighborhood.

[0028] The position in the surface grayscale image is Taking a pixel as an example, a local square neighborhood is constructed with that pixel as the center (the reference side length of the local square neighborhood). (15 pixels), extracting one-dimensional grayscale profiles along multiple preset directions, statistically analyzing the grayscale fluctuation features of each profile, and comparing the differences between profile features in different directions: the smaller the difference, the more consistent the texture; the larger the difference, the potential for defects that disrupt texture consistency. Therefore, a local square neighborhood is defined... Scanning directions at equal angular intervals ( In this embodiment of the invention, the following are taken: ,Right now It is worth noting that along a certain scanning direction... and in its opposite direction The extracted one-dimensional grayscale profile essentially carries grayscale distribution information along the same straight line, only the sampling traversal order is reversed. Furthermore, the two subsequently calculated profile features (directional grayscale fluctuation intensity and directional texture periodicity index) are completely unrelated to the traversal direction (forward or reverse) along the straight line. Therefore, in this embodiment of the invention, only... By uniformly setting eight scanning directions within a half-plane, it is sufficient to completely capture the texture information of straight lines in each direction within a local square neighborhood. In the entire plane, it will increase the reverse scanning direction and will not provide additional information for texture self-consistency discrimination, but will instead increase the computational load.

[0029] For the k-th scanning direction Based on location Starting from the pixel, in the k-th scanning direction The grayscale values ​​of each pixel are extracted sequentially with a step size of 1 pixel to form the k-th scanning direction. One-dimensional grayscale profile sequence Furthermore, for one-dimensional grayscale profile sequences The gray-level variation characteristics are characterized by two complementary dimensions: dimension one, gray-level fluctuation analysis, and dimension two, texture periodicity analysis. Therefore, for dimension one, the root mean square difference between adjacent profiles can reflect the intensity of gray-level fluctuations in the profile. Thus, for a one-dimensional gray-level profile sequence... Perform first-order difference processing to obtain the corresponding difference sequence, and calculate the root mean square of the difference sequence as a one-dimensional gray-level profile sequence. directional grayscale fluctuation intensity The degree of drastic fluctuation in grayscale in direction The larger the value, the more likely it is to be the k-th scanning direction. The more dramatic the grayscale fluctuations, the better.

[0030] For dimension two: the average spacing between grayscale peaks in the profile can reflect the spatial periodicity or quasi-periodicity of grayscale fluctuations, thus obtaining a one-dimensional grayscale profile sequence. The local maxima locations, i.e., the pixel positions corresponding to local maxima, are determined by calculating the positional intervals between adjacent local maxima locations and then averaging all these intervals to form a one-dimensional grayscale profile sequence. Directional texture periodicity index , Quantization along the k-th scan direction The repeating spacing of texture primitives, for directional periodic textures, is [specified in the main direction of the texture]. It exhibits stable eigenvalues. It should be noted that when the number of local maxima is less than 2, it indicates that the k-th scan direction... The grayscale profile lacks a clear oscillation structure and a discernible complete oscillation period, thus directly defining... This indicates that the texture repetition scale has exceeded the observation range, semantically representing "non-periodicity", which can guarantee the numerical stability of subsequent coefficient of variation calculations.

[0031] Similarly, the intensity of directional gray-level fluctuations and the periodicity index of directional texture are obtained for the one-dimensional gray-level profile sequence in each scanning direction. Then, based on the profile features of each scanning direction, an aggregation calculation of inter-directional differences is performed: according to the intensity of directional gray-level fluctuations in each of the one-dimensional gray-level profile sequences, the coefficient of variation of the intensity of directional gray-level fluctuations is calculated as the position... The degree of dispersion of grayscale fluctuations in each direction of the pixel The coefficient of variation is used to reflect the consistency of the intensity of grayscale fluctuations in each scanning direction. The smaller the coefficient of variation, the closer the grayscale fluctuations in each direction are, and the more self-consistent the texture space structure is. Conversely, the larger the coefficient of variation, the more significantly the fluctuations in a certain direction differ from those in other directions, and the texture self-consistency is destroyed. Similarly, based on the directional texture periodicity index of each of the aforementioned one-dimensional grayscale profile sequences, the coefficient of variation of the directional texture periodicity index is calculated as the position... The degree of periodic disorder of texture in each direction of the pixel This is used to reflect the directional consistency of texture periodicity in each scanning direction.

[0032] It should be noted that the coefficients of variation for the degree of directional grayscale fluctuation and the coefficients of variation for the directional texture periodicity index are calculated using the following formulas:

[0033] in, Represents the coefficient of variation. Indicates standard deviation, This represents the mean. To represent a very small constant, and to prevent the denominator from being zero, which would render the formula meaningless, this setting is preferred. .

[0034] Finally, for the position is The weighted sum of the gray-level fluctuation dispersion and the periodic disorder of the texture in each direction of the pixel is used to obtain the position as The degree of local grayscale abrupt change of the pixel; using an exponential function with the natural constant as the base, for the position... The degree of local grayscale abrupt change in the pixel is inversely normalized to obtain the position as Texture consistency coefficient of pixels:

[0035] in, Indicates the position as The texture self-consistency coefficient of a pixel, representing the pixel's texture self-consistency coefficient. The degree of consistency between the grayscale fluctuations and periodicity of the texture in all directions. This represents an exponential function with the natural constant as its base. Indicates the position as The degree of periodic disorder of texture in each direction of the pixel. Indicates the position as The degree of dispersion of grayscale fluctuations in each direction of a pixel. Indicates the first scaling weight. This indicates the second scaling weight.

[0036] It should be noted that, The value range of is (0, 1]. The closer it is to 1, the more consistent the texture undulation characteristics are in each scanning direction, that is, the texture space structure is highly self-consistent, and the corresponding texture structure is more stable and without anomalies; the closer it is to 0, the greater the difference is in each scanning direction, that is, the texture structure is destroyed, the self-consistency is poor, there are directional abrupt changes or periodic disorders, which may correspond to defects. An exponential function is used. The purpose of inverse proportional normalization is to achieve an inverse proportional relationship where the larger the coefficient of variation is, the smaller the texture self-consistency coefficient is, ensuring that the output is smooth and continuous without abrupt changes, and compressing the output to the (0, 1] interval. and These are all scaling weights, used to control the sensitivity of each dimension's influence on texture consistency. The reference value is... , Among them, for Setting a high scaling weight is because the anisotropic consistency of the degree of grayscale fluctuation is the most direct signal for identifying the presence of defects. Defect-induced grayscale abrupt changes... The middle part is the most sensitive to the reaction.

[0037] Based on the above location The method for obtaining the texture self-consistency coefficient of each pixel is to obtain the texture self-consistency coefficient of each pixel in the surface grayscale image.

[0038] Step S103: Obtain the adaptive Gaussian kernel scale of any pixel based on the texture self-consistency coefficient of any pixel, obtain the adaptive Gaussian kernel scale of each pixel in the surface grayscale image, perform adaptive Gaussian filtering on the surface grayscale image, and obtain the background estimation image.

[0039] Based on the texture self-consistency coefficient of each pixel in the surface grayscale image, the most suitable background estimation smoothing scale is adaptively selected for each pixel in the surface grayscale image. This allows the background estimation image to use large-scale smoothing in areas with high texture self-consistency to effectively smooth defects and obtain a clean background, while using small-scale smoothing in areas with low texture self-consistency to closely follow the changes in the texture itself and avoid the residue after the texture undulations are canceled out as false defects.

[0040] Standard deviation of Gaussian kernel Controlling the smoothing scale — The larger the size, the wider the smoothing range, and the easier it is to smooth out small defects, but the worse the ability to closely follow the texture. The smaller the value, the better the texture details are preserved, but the less smooth the defects are. In the embodiments of this invention, Designed for A monotonically increasing function is used to achieve adaptive adjustment. The position in the surface grayscale image is still taken as... Taking a pixel as an example, the adaptive Gaussian kernel scale of the pixel is obtained based on the texture self-consistency coefficient of that pixel:

[0041] in, Indicates the position as Adaptive Gaussian kernel scale for pixels, This represents the smallest Gaussian kernel size, with a value of 1.5 pixels, used for tight texture following in areas with extremely low texture self-consistency. This indicates that the maximum Gaussian kernel size reference value is 8.0 pixels, which is used to fully smooth defects in areas with extremely high texture self-consistency. Indicates the position as The texture self-consistency coefficient of the pixel. This represents the connection function used to monotonically map the texture self-consistency coefficients to an interval. Within this range, an S-shaped function is then chosen to achieve a smooth transition in the intermediate self-consistency range:

[0042] Where 1 represents a constant, This represents an exponential function with the natural constant as its base. This represents the steepness parameter; a reference value of 10.0 is used. This represents the transition median value, with a reference value of 0.5.

[0043] It should be noted that when Much larger hour, , Background estimation employs large-scale smoothing; when much smaller hour, , Background estimation employs small-scale smoothing; when Approximately equal to hour, By using an intermediate value, a smooth and gradual transition of scale is achieved, avoiding artificial edge artifacts caused by abrupt scale changes in subsequent difference images.

[0044] Similarly, by obtaining the adaptive Gaussian kernel scale for each pixel in the surface grayscale image, and then performing pixel-by-pixel adaptive Gaussian filtering on the surface grayscale image, a background estimation image is obtained. That is, an ideal texture reference image without defects:

[0045] in, This indicates the location in the background estimation image as The pixel value of the pixel. , representing the filter window radius, covering a range of 3 times the maximum standard deviation to ensure sufficient coverage by the Gaussian kernel, corresponding to the ability to obtain a filter window with location as the filter window radius. A filter window is constructed centered on the pixels; This indicates the location in the surface grayscale image. The grayscale value of the pixel. Indicates the position as The Gaussian kernel of the pixels, For the standard two-dimensional Gaussian kernel function, the position is... By substituting the adaptive Gaussian kernel scale of each pixel into the standard two-dimensional Gaussian kernel function, the corresponding Gaussian kernel can be obtained. .

[0046] It should be noted that the adaptive Gaussian filtering operation described above uses the adaptive Gaussian kernel scale corresponding to all pixels in the neighborhood of each pixel location for weighting, rather than only using the adaptive Gaussian kernel scale of the center pixel. This makes the filtering process smoother and avoids filtering discontinuities caused by abrupt scale changes. Furthermore, all operations in this adaptive Gaussian filtering are performed in the spatial domain, and each calculation step can be visually verified on the original image (surface grayscale image): any local area can be cropped for observation. Whether the value change matches the texture structure change can be compared to see if the difference between the original image and the estimated background image closely follows the texture area and is smoothed over a large area in the defect area.

[0047] Step S104: Obtain the difference image between the surface grayscale image and the background estimation image. Use the texture self-consistency coefficient of each pixel in the surface grayscale image to perform local feature enhancement processing on the difference image to obtain the defect highlighting image. Perform adaptive threshold segmentation and multi-feature joint screening on the defect highlighting image to determine the surface defect area of ​​the roll material to be detected.

[0048] The background estimation image is obtained based on the above adaptive Gaussian filtering. Then, pixel-by-pixel differencing can be performed between the surface grayscale image and the estimated background image to obtain the difference image between the surface grayscale image and the estimated background image:

[0049] in, Indicates the position in the difference image as The difference value of the pixels, This indicates the location in the surface grayscale image. The grayscale value of the pixel. This indicates the location in the background estimation image as The pixel value of the pixel.

[0050] Ideally, texture-healthy areas Approaching 0 (background estimation closely follows texture, texture is canceled out after differencing), defect areas There is a significant deviation (large-scale smoothing equalizes the grayscale deviation of the defect, and the defect signal is preserved after differencing). However, due to... The selection of texture primitives is limited by the size of the texture primitives. The background estimation of the defect area may still retain a certain degree of influence from the grayscale of the defect, resulting in... The defect signal intensity is low, resulting in insufficient differentiation from residual texture signals. Furthermore, in transition regions with moderate to low texture self-consistency, There may be subtle texture residual undulations. To address this issue, local enhancement weights are constructed using the texture self-consistency coefficient of each pixel in the surface grayscale image, targeting areas with a high probability of defects. Low) imparts a strong gain, which is beneficial to healthy texture areas ( (High) A weak gain is applied or maintained to further widen the gap between the defect and the background residue. Then, for any pixel in the difference image, the enhancement gain factor of that pixel is obtained by using the texture self-consistency coefficient of the pixel in the surface grayscale image that is at the same position as that pixel.

[0051] in, Indicates the position as The pixel enhancement gain factor satisfies 1 represents a constant. This indicates the gain modulation amplitude, with a reference value of 3.0. Indicates the position as The texture self-consistency coefficient of the pixel. The gain nonlinearity exponent is taken as the reference value. , Make the gain in Accelerates rise from lower levels, Keep it flat when it's high. This ensures that the gain increases as the self-consistency decreases; the lower the self-consistency, the greater the possibility of defects, and the higher the gain.

[0052] The enhancement gain factor of each pixel in the difference image is obtained and used to perform local feature enhancement processing on the difference image to obtain a defect highlighting image: for a pixel in the difference image at position... The pixel at position is The product of the pixel difference and the enhancement gain factor is used as the position. Pixel enhancement difference Similarly, the enhanced difference value of each pixel in the difference image is obtained to obtain a defect highlighting image after local feature enhancement processing of the difference image. .

[0053] It should be noted that this local feature enhancement process uses the texture self-consistency coefficient as a gain guide, achieving selective enhancement of "defect area amplification and texture area preservation", which effectively improves the contrast between defects and background residue.

[0054] Furthermore, since the adaptive background estimation driven by the texture consistency coefficient has effectively offset texture fluctuations, and the enhancement processing improves the defect signal intensity, Defective regions typically exhibit significant positive or negative deviations: if darker than the background, the defect grayscale shows a negative deviation; if brighter than the background, the defect grayscale shows a positive deviation. Healthy texture regions, however, show near-zero grayscale deviation. Therefore, in obtaining a defect-highlighting image... Then, adaptive threshold segmentation and multi-feature joint screening can be performed on the defect highlighting image to determine the surface defect area of ​​the roll material to be detected.

[0055] First, adaptive threshold segmentation is performed on the defect highlighting image to obtain at least one defect candidate region composed of defect candidate pixels in the defect highlighting image: because the defect highlighting image The background pixel values ​​are concentrated near zero, exhibiting a symmetrical unimodal distribution (approximately Gaussian distribution), while the defect pixel values ​​are distributed at the tails on both sides, forming a "heavy-tailed" feature. Based on this, adaptive thresholding based on absolute deviation is employed: the overall statistics of the defect-highlighting image are calculated, and the background pixel values ​​are centered at zero. The mean and standard deviation of the absolute deviation are used to characterize the background distribution.

[0056]

[0057] In the formula, The total number of pixels in the image to highlight defects. This represents the mean of the absolute deviations of the enhancement difference values ​​for all pixels in the image that highlight the defect. The standard deviation of the absolute bias of the enhancement difference values ​​for all pixels in the image highlighting defects is represented by ||, where || indicates the sign of the absolute value. Set the segmentation threshold:

[0058] In the formula, Indicates the segmentation threshold. This is the threshold sensitivity coefficient; a reference value range is provided. The absolute deviation values ​​of the background region are concentrated in... The following are the defective areas due to The significant deviation, whose absolute deviation is much greater than .pass Value adjustment can control detection sensitivity. Smaller values ​​(such as 2.5) result in more sensitive detection but may introduce a small amount of false alarms due to texture residue. Larger values ​​(e.g., 5.0) result in more conservative detection, effectively suppressing false alarms but potentially missing subtle defects with extremely low contrast. In practical applications, it is recommended... As the initial default value, it can be fine-tuned according to the on-site debugging of each type of roll material.

[0059] Will satisfy The pixels are marked as defect candidate pixels, and the initial defect candidate region is obtained by binarization. || represents the absolute value symbol. Morphological post-processing is performed on each initial defect candidate region: first, an opening operation (erosion followed by dilation) is performed using a circular structuring element with a radius of 2 pixels to remove isolated small noise points with an area smaller than the structuring element; then, a closing operation (dilation followed by erosion) is performed using the same structuring element to connect the weak breaks caused by threshold segmentation, and a complete binary defect map, which is the defect candidate region.

[0060] Then, connected component analysis is performed on each defect candidate region to obtain the location coordinates and area of ​​each defect candidate region. (Number of pixels), Perimeter Length of the smallest circumscribed rectangle and width Geometric properties, etc. To ultimately eliminate the small number of texture residual pseudo-responses that may still pass through, a multi-feature joint screening is performed on each defect candidate region from two dimensions: geometric features and differential magnitude. For any defect candidate region, the area of ​​that region is calculated. The mean absolute deviation of the enhancement difference values ​​of all pixels within any defect candidate region is calculated as the degree of differential response. If the area and differential response level of any candidate defect region meet the requirements, then the candidate defect region is determined to be a surface defect region. It should be noted that the requirements for both area and differential response level to meet the requirements are as follows: and ,in, This represents the set minimum area threshold. Pixels, noise residue due to insufficient filtering area. This indicates the set minimum differential amplitude threshold. In other words, the mean absolute deviation within the defect candidate region must be at least 1.5 times the segmentation threshold to ensure that the differential response of the defect candidate region is sufficiently significant and to filter out the fuzzy response at the boundary. Finally, the defect type of each surface defect region is determined: the aspect ratio of each surface defect region is calculated. Because scratch-type defects have a large aspect ratio ( The aspect ratio of oil stains and dirt spots is relatively small (far greater than 1). (close to 1), therefore, if pixels and Then the corresponding surface defect area is classified as a planar defect (dirt spots, oil stains, roller marks, etc.); if pixels and If so, the corresponding surface defect area will be classified as a linear defect (scratches, creases, etc.); if Pixels, on the other hand, classify the corresponding surface defect areas as point defects (small dirt spots, pinholes, etc.).

[0061] This outputs statistical information such as the number of defects, the location coordinates of each defect, the area of ​​the region, the aspect ratio of the region, and the defect type in the surface image of each roll of material to be inspected, and drives the marking device to mark the defect location online or trigger an alarm signal.

[0062] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for online visual inspection of surface defects in roll materials used in printing equipment, characterized in that, The method includes: Acquire a surface image of the roll material to be inspected, and perform filtering and grayscale normalization on the surface image to obtain a surface grayscale image; For any pixel in the surface grayscale image, a local square neighborhood is constructed centered on the pixel. Within this local square neighborhood, a predetermined number of scanning directions are constructed at equal angular intervals. Starting from the pixel, the grayscale values ​​of each pixel are sequentially extracted along each scanning direction to form a one-dimensional grayscale profile sequence. Grayscale fluctuation analysis and texture periodicity analysis are performed on each one-dimensional grayscale profile sequence to obtain the texture self-consistency coefficient of the pixel, including: For any one-dimensional grayscale profile sequence, perform first-order difference processing on the one-dimensional grayscale profile sequence to obtain the corresponding difference sequence, calculate the root mean square of the difference sequence to obtain the intensity of directional grayscale fluctuation of the one-dimensional grayscale profile sequence; obtain the local maximum position in the one-dimensional grayscale profile sequence, calculate the position interval between adjacent local maximum positions, calculate the mean of all position intervals, and obtain the directional texture periodicity index of the one-dimensional grayscale profile sequence. Based on the degree of intensity of directional gray-level fluctuations in each of the one-dimensional gray-level profile sequences, the coefficient of variation of the degree of intensity of directional gray-level fluctuations is calculated as the degree of dispersion of gray-level fluctuations in each direction for any pixel; based on the directional texture periodicity index of each of the one-dimensional gray-level profile sequences, the coefficient of variation of the directional texture periodicity index is calculated as the degree of disorder of texture periodicity in each direction for any pixel. The local gray-level abrupt change degree of any pixel is obtained by weighted summing of the gray-level fluctuation dispersion degree and the texture periodic disorder degree of each direction of any pixel; the local gray-level abrupt change degree of any pixel is then normalized inversely using an exponential function with the natural constant as the base, to obtain the texture self-consistency coefficient of any pixel. Obtaining the adaptive Gaussian kernel scale of any pixel based on the texture self-consistency coefficient of any pixel includes: ; ; in, Indicates the position as Adaptive Gaussian kernel scale for pixels, Denotes the smallest Gaussian kernel size. Indicates the maximum Gaussian kernel size. Indicates the position as The texture self-consistency coefficient of the pixel. This represents the connection function used to monotonically map the texture self-consistency coefficients to an interval. Inside, 1 represents a constant. This represents an exponential function with the natural constant as its base. Indicates the steepness parameter. Indicates the median value during the transition period; The adaptive Gaussian kernel scale of each pixel in the surface grayscale image is obtained, and the surface grayscale image is subjected to adaptive Gaussian filtering to obtain the background estimation image; Obtain the difference image between the surface grayscale image and the background estimation image. Using the texture self-consistency coefficient of each pixel in the surface grayscale image, perform local feature enhancement processing on the difference image to obtain a defect highlighting image, including: For any pixel in the difference image, the enhancement gain factor of that pixel is obtained using the texture self-consistency coefficient of the pixel in the surface grayscale image that is at the same position as that pixel. ; in, Indicates the position as The enhancement gain factor for each pixel, where 1 represents a constant. Indicates the gain modulation amplitude. Indicates the position as The texture self-consistency coefficient of the pixel. The gain is a nonlinear exponent; The product of the difference value of any pixel and the enhancement gain factor is taken as the enhancement difference value of any pixel; the enhancement difference value of each pixel in the difference image is obtained to obtain the defect highlighting image after local feature enhancement processing of the difference image; Adaptive threshold segmentation and multi-feature joint screening are performed on the defect highlighting image to determine the surface defect area of ​​the roll material to be detected.

2. The online visual inspection method for surface defects of roll materials used in printing equipment according to claim 1, characterized in that, The step of performing adaptive threshold segmentation and multi-feature joint screening on the defect highlighting image to determine the surface defect region of the roll material to be detected includes: Adaptive threshold segmentation is performed on the defect-highlighting image to obtain at least one defect candidate region composed of defect candidate pixels in the defect-highlighting image; multi-feature joint screening is performed on each defect candidate region to determine the surface defect region among all defect candidate regions.

3. The online visual inspection method for surface defects of roll materials used in printing equipment according to claim 2, characterized in that, The step of performing multi-feature joint screening on each defect candidate region to determine the surface defect region from all defect candidate regions includes: For any candidate defect region, calculate the area of ​​the candidate defect region and calculate the average absolute deviation of the enhancement difference values ​​of all pixels in the candidate defect region as the differential response level; if both the area and the differential response level of the candidate defect region meet the requirements, then the candidate defect region is determined to be a surface defect region.

Citation Information

Patent Citations

  • Dotted line pressing and cutting rewinding machine

    CN116767614A

  • Industrial Metrology of Workpiece Surface based on Depth Map

    US20220319027A1