A visual detection method for surface flatness of special paper based on texture feature extraction

By utilizing texture feature extraction and adaptive defect response threshold technology in the image processing of special paper surfaces, the problems of false detection and missed detection caused by uneven fiber distribution on the surface of special paper are solved, and high-precision flatness detection is achieved.

CN122265201APending Publication Date: 2026-06-23JINGZHOU YUXING PAPER PROD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JINGZHOU YUXING PAPER PROD
Filing Date
2026-03-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing multi-scale texture feature extraction algorithms cannot distinguish between high-density normal recycled fibers and real flatness defects when the fiber distribution on the surface of special paper is extremely uneven, resulting in serious false detections and false negatives.

Method used

A texture feature extraction-based method is used to acquire surface images of special paper and convert them into grayscale image matrices. Fiber hybridity is calculated by peak texture intensity, average texture intensity, and local microscopic disorder. An adaptive defect response threshold is dynamically generated, and the true flatness defect is determined by combining the comprehensive confidence assessment of suspected defect clusters.

Benefits of technology

It significantly reduces the probability of missed and false alarms for flatness defects, improves the accuracy and reliability of detection, and ensures high sensitivity and high precision detection under complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265201A_ABST
    Figure CN122265201A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a kind of special paper surface flatness visual inspection method based on texture feature extraction, including obtaining special paper surface image and converting into gray image matrix, extracting the peak texture intensity, average texture intensity and local micro chaos degree of each pixel point, and calculating the corresponding fiber hybrid degree according to this;According to fiber hybrid degree, gray standard deviation feature in local area and reference threshold line of overall image matrix, dynamically generate the adaptive defect response threshold of each pixel point;Compare peak texture intensity and adaptive defect response threshold to screen abnormal candidate points, and get suspected defect cluster by clustering, and determine real defect by combining the total pixel number contained in suspected defect cluster and the abnormal degree of local feature to evaluate comprehensive confidence degree.The present application can accurately peel off complex inherent texture interference, and realize adaptive high-precision positioning of flatness defects.
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 in particular to a visual detection method for the surface flatness of special paper based on texture feature extraction. Background Technology

[0002] In the specialty paper manufacturing industry, paper raw materials contain a large number of regenerated short fibers and special coating particles, resulting in a complex physical texture on the paper surface formed by random fiber interweaving and localized pulp aggregation. Surface smoothness is a core indicator for evaluating the quality of specialty paper. Abnormal smoothness defects mainly include surface blistering caused by uneven heating of equipment and hard creases caused by abnormal tension control. Accurately identifying abnormal smoothness defects on the surface of specialty paper directly affects the product qualification rate and the efficiency of outgoing quality inspection for paper manufacturing enterprises.

[0003] Current techniques for detecting surface defects in industrial applications typically employ multi-scale texture feature extraction algorithms to calculate the texture gradient of an image, supplemented by local binary mode algorithms to obtain microscopic texture features. The extracted feature points are then input into a density-based spatial clustering algorithm with noise, and the defect region is determined based on the spatial clustering density of the feature points. This method can achieve connectivity segmentation of defect regions when detecting smooth industrial materials with a uniform background and material properties.

[0004] However, existing detection schemes combining multi-scale filtering, local binary patterns, and density clustering have significant drawbacks in the case of specialty paper. Existing clustering algorithms use globally fixed values ​​for the neighborhood radius and minimum density threshold when dividing defect-connected regions. The fiber distribution on the surface of specialty paper is extremely uneven; the interweaving of normal fibers in densely packed pulp areas generates strong texture gradient fluctuations, resulting in high-density anomalous feature points. Clustering algorithms with fixed parameters cannot distinguish between high-density distributed normal recycled fibers and genuine smoothness defects, leading to numerous false detections in practical engineering applications. If the clustering threshold is globally increased to avoid such false detections, it can result in the missed detection of minute, genuine defects in relatively smooth areas of the paper. Summary of the Invention

[0005] To address the technical problem that existing clustering detection algorithms, which use globally fixed parameters, cannot distinguish between high-density normal recycled fibers and true flatness defects in scenarios with extremely uneven fiber distribution in specialty paper, thus leading to serious false positives and false negatives, this invention provides a visual detection method for the surface flatness of specialty paper based on texture feature extraction, comprising: Acquire a surface image of the special paper in operation, and then perform smoothing filtering after converting the surface image into a grayscale image matrix; Extract the peak texture intensity, average texture intensity, and local micro-level disorder of each pixel in the grayscale image matrix; Based on the peak texture intensity, average texture intensity, and local micro-disorder of each pixel, the corresponding fiber messiness is calculated. The fiber messiness is positively correlated with the ratio of average texture intensity to peak texture intensity and with local micro-disorder. Based on the fiber mixing degree of each pixel, the gray-level standard deviation characteristics of the local area, and the baseline threshold of the overall image matrix, an adaptive defect response threshold for each pixel is dynamically generated. The peak texture intensity of each pixel is compared with the adaptive defect response threshold to screen out abnormal candidate points. The abnormal candidate points are then clustered by connectivity to obtain suspected defect clusters. The comprehensive confidence is evaluated by combining the total number of pixels contained in the suspected defect clusters with the degree of abnormality of local features to determine whether they are real smoothness defects.

[0006] This invention extracts peak texture intensity, average texture intensity, and local micro-clutter and calculates fiber mixing degree. Based on this, an adaptive defect response threshold is dynamically generated for each pixel, so that the judgment standard is automatically adjusted according to the local background clutter. It abandons the traditional global fixed parameter clustering mode, automatically increases the feature admission strictness in dense fiber areas, and automatically lowers the threshold in smooth areas to maintain sensitivity to small defects, thereby significantly reducing the probability of false negatives and false positives of flatness defects.

[0007] Preferably, the step of acquiring surface images of special paper in operation includes: configuring an industrial line scan camera and a low-angle dark field illumination source; controlling the low-angle dark field illumination source to illuminate the surface of the special paper in operation; and continuously acquiring surface images of the special paper in operation using the industrial line scan camera under the illumination of the low-angle dark field illumination source.

[0008] Low-angle dark field illumination allows light to pass across the paper surface at a very small incident angle. Areas with flatness defects such as bubbles or creases produce high contrast between light and dark due to the deflection of the surface normal. Combined with continuous acquisition by an industrial line scan camera, this provides a clear physical morphological basis for subsequent feature extraction.

[0009] Preferably, the step of extracting the peak texture intensity and average texture intensity of each pixel in the grayscale image matrix includes: constructing a Gabor filter bank containing multiple spatial scales and multiple directions, and performing two-dimensional convolution calculation on the grayscale image matrix; for any pixel in the grayscale image matrix, obtaining multiple filter response values ​​generated by the Gabor filter bank; traversing multiple filter response values, extracting the maximum value as the peak texture intensity of the corresponding pixel, and calculating the arithmetic mean of the multiple filter response values ​​as the average texture intensity of the corresponding pixel.

[0010] The multi-scale, multi-directional Gabor filter bank covers the gradient response frequency bands of the special paper surface from coarse to fine. The extracted peak texture intensity and average texture intensity reflect the local gradient peak of the strongest direction and the average response level of all directions, respectively, providing reliable macroscopic texture parameters for distinguishing directional defects from isotropic fiber backgrounds.

[0011] Preferably, the step of extracting the local micro-level disorder includes: taking any pixel in the grayscale image matrix as the center point, performing a local binary pattern algorithm to calculate and obtain all local binary pattern feature values ​​in the local region adjacent to the center point; calculating the statistical variance of all local binary pattern feature values ​​within a rectangular sliding window of a set size; and using the calculated statistical variance as the local micro-level disorder of the corresponding pixel.

[0012] Preferably, the fiber hybridity satisfies the following relationship:

[0013] in, This indicates the fiber clutter level of the current pixel. This represents the average texture intensity of the current pixel. This represents the peak texture intensity of the current pixel. Represents the zero bias constant. This indicates the local microscopic disorder level of the current pixel. This represents the natural exponential function. This represents the variance normalization reference constant.

[0014] By employing a formula that combines the natural exponential function with the isotropic ratio of texture intensity to calculate fiber hybridity, the background interference state generated by the dense interweaving of normal, disordered fibers in a local area can be accurately characterized. This provides robust and reliable underlying parameter data for the derivation of dynamic thresholds. At the same time, the division-to-zero anomaly is strictly avoided by using the anti-zero bias parameter, thereby improving the overall security and data rationality of the computing system.

[0015] Preferably, the adaptive defect response threshold of each pixel satisfies the following relationship:

[0016] in, This represents the threshold for adaptive defect response generated by the current pixel. This represents the global arithmetic mean of the peak texture intensity of the entire image matrix, i.e., the baseline threshold. This represents the response adjustment coefficient. This indicates the fiber clutter level of the current pixel. Represents the natural logarithm function. This represents the logarithmic offset constant, whose value is equal to the base of the natural logarithm. This represents the dimensionless local standard deviation obtained by dimensionless processing based on the grayscale standard deviation within a local window centered on the current pixel.

[0017] By employing a nonlinear relationship that combines natural logarithm calculation with a baseline threshold and introducing dimensionless local standard deviation as a joint penalty term parameter, the detection system automatically increases the feature admission stringency in fiber-chaotic regions and automatically lowers the threshold in smooth regions. This suppresses false fiber detections while maintaining high sensitivity to minor undulation defects, significantly improving defect location accuracy in complex environments.

[0018] Preferably, the dimensionless local standard deviation Dimensionless processing is achieved by calculating the standard deviation of gray levels within a local window and dividing it by the gray range constant; the reference threshold line It is obtained by iterating through the peak texture intensity of all pixels in the grayscale image matrix and calculating the global arithmetic mean.

[0019] The grayscale standard deviation is divided by the grayscale range constant and mapped to the [0, 1] interval, which eliminates the numerical magnitude difference between grayscale images of different bit depths. At the same time, it ensures that the independent variable of the logarithmic operation in the adaptive defect response threshold formula is always in a reasonable numerical range, so that the detection system can be directly adapted under different hardware acquisition conditions.

[0020] Preferably, the overall confidence level satisfies the following relationship:

[0021] in, This represents the overall confidence assessment value for suspected defect clusters. This represents the total number of pixels contained in the suspected defect cluster, and ∑ represents the cumulative calculation of the pixels corresponding to all spatial coordinates within the suspected defect cluster. Indicates the peak texture intensity of a pixel. This represents the adaptive defect response threshold for a pixel. This indicates the fiber mixing degree of a pixel. This represents the smoothing buffer constant.

[0022] By employing a formula that combines the square root of the total number of pixels in the suspected defect cluster with the summation of anomalies based on local features, and setting an anti-mutation smoothing buffer constant, the total number of pixels can be non-linearly reduced. Furthermore, by combining the cluttered state of the local background, the feature overflow amplitude can be dynamically reduced, accurately eliminating tiny volume false detections caused by the accidental breach of the threshold due to extreme slurry aggregation, thus further purifying the final output defect localization results.

[0023] Preferably, the step of comparing the peak texture intensity of each pixel with the adaptive defect response threshold to screen abnormal candidate points, and performing connectivity clustering on the abnormal candidate points to obtain suspected defect clusters includes: traversing the grayscale image matrix, comparing the peak texture intensity of each pixel with the adaptive defect response threshold corresponding to each pixel; when the peak texture intensity is greater than the adaptive defect response threshold, determining the corresponding pixel as an abnormal candidate point, and recording the spatial coordinates of the corresponding pixel into the candidate set; using a density clustering algorithm based on a preset geometric distance retrieval radius to perform connectivity clustering on the abnormal candidate points in the candidate set, and outputting at least one independent suspected defect cluster.

[0024] Since the pre-processing dynamic threshold comparison only retains pixels whose peak texture intensity is strictly greater than the adaptive defect response threshold, a large number of pseudo-feature noise generated by the normal background is blocked before entering the clustering stage. Therefore, the density clustering algorithm can quickly complete the spatial merging of adjacent candidate points on a candidate set with higher purity and efficiently output an independent set of suspected defect clusters.

[0025] Preferably, the step of determining whether a defect is a genuine smoothness defect includes: obtaining a pre-set factory standard confidence threshold; comparing the comprehensive confidence assessment value with the factory standard confidence threshold; when the comprehensive confidence assessment value is greater than the factory standard confidence threshold, determining that the corresponding suspected defect cluster is a genuine smoothness defect; extracting the region coordinate information of the genuine smoothness defect in the image matrix; generating a warning signal containing the defect location and the comprehensive confidence assessment value based on the region coordinate information; and outputting the warning signal externally.

[0026] The technical solution of the present invention has the following beneficial technical effects: This invention integrates peak texture intensity, average texture intensity, and local microscopic disorder to calculate fiber impurity index. Based on this, it deduces the adaptive defect response threshold for each pixel, allowing the judgment standard to automatically adjust according to the degree of local background disorder. In complex background areas with extremely dense fibers, it automatically increases the feature admission stringency, while maintaining high sensitivity to minor bubbling defects in smooth paper areas. On this basis, it combines the total number of pixels contained in the suspected defect cluster with the degree of abnormality of local features to conduct a comprehensive confidence assessment, further shielding scattered false detection points caused by accidental threshold breaches due to extreme pulp aggregation. Finally, it outputs the true flatness defect location results that have been verified through multiple levels to the industrial site. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating a visual inspection method for the surface flatness of special paper based on texture feature extraction, provided in an embodiment of the present invention. Figure 2This is a schematic diagram comparing the original surface image provided in this embodiment of the invention with the extraction results of existing technologies; Figure 3 This is a spatial distribution heatmap of fiber hybridity and adaptive defect response threshold provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the final extraction result provided by an embodiment of the present invention. Detailed Implementation

[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0029] like Figure 1 As shown, the visual inspection method for surface flatness of special paper based on texture feature extraction includes steps S101 to S105, which are described in detail below.

[0030] S101: Acquire the surface image of the special paper in the running state, and then perform smoothing filtering processing after converting the surface image into a grayscale image matrix.

[0031] Industrial line scan cameras and low-angle dark-field illumination sources are configured on the production line. Image data acquired by the industrial line scan cameras is sent to an industrial control computer configured on the production floor via a data transmission interface. All subsequent image processing operations are executed on the processor of the industrial control computer. The surface of specialty paper is illuminated by the low-angle dark-field illumination source during operation, and the surface images of the specialty paper are continuously acquired using the industrial line scan camera. The low-angle dark-field illumination design maximizes the highlighting of the three-dimensional undulations of the paper surface, creating high-contrast light and dark contrasts when light encounters flatness defects such as bubbles or creases. After acquiring the raw color image data, the brightness channel of the image is extracted and converted into a grayscale image matrix to reduce data dimensionality and focus on the calculation of morphological features.

[0032] It should be noted that actual industrial manufacturing environments involve vibration and electromagnetic interference, inevitably resulting in random hardware electrical noise in the raw images acquired by the camera. Therefore, a Gaussian smoothing filter algorithm is used to denoise the grayscale image matrix. The Gaussian smoothing filter algorithm is a well-known technique in image processing and will not be elaborated upon here. The filtering process involves sliding a Gaussian kernel matrix of a set size across the image range and calculating a weighted average, effectively smoothing electrical noise. The preprocessed grayscale image matrix is ​​defined as... ,in These are the column coordinates of the pixel in the image matrix. represents the row coordinates of the pixel in the image matrix.

[0033] S102. Extract the peak texture intensity, average texture intensity, and local micro-disorder of each pixel in the grayscale image matrix.

[0034] Based on the preprocessed grayscale image matrix, the initial texture features of special paper are extracted from two dimensions: macroscopic gradient directionality and microscopic morphology.

[0035] In one embodiment, a Gabor filter bank containing multiple spatial scales and multiple directions is first constructed for the grayscale image matrix. Two-dimensional convolution calculations are performed. The construction of Gabor filter banks and convolution calculations are well-known techniques in image texture extraction, and will not be elaborated upon here. In practical engineering configurations, it is preferable to construct a Gabor filter bank containing four spatial scales and eight directions, thus enabling processing of any pixel in the image. 32 filter response values ​​are generated. These 32 values ​​are then compared, and the maximum value is extracted as the peak texture intensity of the pixel. Simultaneously, the arithmetic mean of these 32 response values ​​is calculated as the average texture intensity of the pixel. Extracted here and They all have the same texture intensity dimension.

[0036] Furthermore, in terms of pixels Centered on a pixel, a local binary pattern algorithm is performed within the local region adjacent to the center point to obtain the local binary pattern feature values ​​at each local location. The local binary pattern algorithm is a well-known technique in the field of image micro-texture analysis and will not be elaborated upon here. To evaluate the degree of disorder in the local micro-texture, the statistical variance of all extracted local binary pattern feature values ​​is calculated within a rectangular sliding window of a set size, centered on the pixel, and this statistical variance is directly used as the degree of local micro-texture disorder. For example, if the micro-feature values ​​fluctuate drastically within the sliding window, the calculated statistical variance will increase significantly, reflecting a highly chaotic micro-morphology in the corresponding local area.

[0037] S103. Based on the peak texture intensity, average texture intensity and local micro-disorder of each pixel, calculate the corresponding fiber messiness. The fiber messiness is positively correlated with the ratio of average texture intensity to peak texture intensity, and also positively correlated with local micro-disorder.

[0038] Normal fiber interweaving in specialty paper exhibits texture distribution response in all directions and has extremely high microstructural disorder, while real flatness defects have a clear directionality and a relatively simple internal microstructure. Based on this physical difference, to accurately measure the degree of background interference caused by dense interweaving of normal fibers in a local area, a fiber hybridity index is constructed using pre-extracted basic features. The following formula is used for calculation:

[0039] in, This represents the dimensionless fiber hybridity calculated for the current pixel. and These are the average texture intensity and peak texture intensity extracted from the previous step, respectively. To prevent zero bias constant, the physical dimensions are kept consistent with the texture intensity dimensions. The value range is [0.1, 10] texture intensity units. In this embodiment... The value is set to 1 texture intensity unit, ensuring that in absolutely smooth areas of the image... When the denominator of the expression is 0, the denominator is not zero, thus maintaining the engineering stability of the computational system. When the value is too small, the peak texture intensity In the extremely smooth region approaching zero, a denominator that is too small can cause the ratio term to be abnormally amplified, leading to distortion in the fiber mixing degree calculation results; when When the value is too large, the dominant effect of the bias term in the denominator is too strong, which will suppress the distinguishing ability of the peak texture intensity contrast term and weaken the sensitivity of the fiber mixing index to distinguish different background regions. In other embodiments, the value can be set according to the grayscale dynamic range and texture intensity distribution characteristics of the actual acquired image. .

[0040] This refers to the degree of local microscopic disorder. Represents the natural exponential function; The standard constant for variance normalization needs to be set numerically in accordance with... It has the exact same microscopic disorder metric dimension, used to perform dimensionless processing on fractional operations within the exponential term. Its core function is to control the exponential saturation term. The convergence speed, in this embodiment Set it to 100. If... If the value is too small, the exponent term rapidly approaches the saturation value of 1 when the local microscopic disorder is still at a moderate level, causing the fiber mixing degree to lose its sensitivity in distinguishing between moderately disordered and highly disordered regions; conversely, if... Choosing an excessively large value results in a slow convergence of the exponential term, making it difficult to output a saturated response close to 1 even in densely fiber-rich areas with extremely high microscopic disorder. This weakens the fiber mixing index's ability to identify extreme background regions. Based on the statistical variance distribution range of the local binary pattern eigenvalues ​​on the surface of specialty paper... The value range is [50, 500], and can be flexibly adjusted accordingly in other embodiments.

[0041] In contrast, existing local adaptive thresholding methods typically generate thresholds directly based on grayscale statistics such as local mean and local variance, without considering the unique background interference patterns generated by the isotropic interweaving of recycled fibers on the surface of specialty paper. The fiber hybridity index, by fusing the isotropic ratio of texture intensity with the exponential saturation mapping of microscopic disorder, specifically characterizes the essential difference between densely interwoven areas of recycled fibers and directional defects. This feature evaluation dimension has not yet been introduced into existing adaptive thresholding systems. Therefore, the adaptive defect response threshold derived from fiber hybridity has more accurate background suppression and defect retention capabilities in the scenario of extremely uneven fiber distribution in specialty paper.

[0042] To clearly demonstrate the logical rationality of the fiber mixing degree formula, this invention provides a specific engineering calculation example: assuming that in a normal, densely packed area of ​​disordered fibers, the average texture intensity of a certain pixel is detected. Peak texture intensity is 60 intensity units. With 80 intensity units, local microscopic disorder To reach 300, let there be a normalized reference constant of the same dimension. It is 100. At this time, the pre-ratio term is calculated as follows: The exponential term is calculated as follows: ,but The final calculation yields the fiber mix of each pixel. If a pixel is located at the edge of a crease defect with a clear direction, the peak value will be much larger than the average value due to the extremely strong response in one direction and the microscopic uniformity, and the result of its noise calculation will be much closer to 0.

[0043] Therefore, by integrating the relationship between the natural exponential function and the isotropic ratio of texture intensity to calculate fiber hybridity, we can accurately measure the physical interference state of the local background and output evaluation parameters with significant discriminative power, thus separating the feature overlap between defects and the background from the source.

[0044] S104. Based on the fiber mixing degree of each pixel, the gray-level standard deviation characteristics in the local area, and the baseline threshold of the overall image matrix, dynamically generate the adaptive defect response threshold for each pixel.

[0045] In existing technologies, the use of a globally fixed clustering threshold is prone to failure in special paper scenarios. To completely overcome this vulnerability, an independent adaptive defect response threshold is tailored for each pixel in the grayscale image matrix using the fiber hybridity index. The following formula is used for calculation:

[0046] in, An adaptive defect response threshold is generated adaptively for the current pixel, and its dimension is consistent with the peak texture intensity. It is the global arithmetic mean of the overall image matrix in the peak texture intensity distribution, with the dimension of texture intensity, and serves as the baseline threshold of the system.

[0047] For the response adjustment coefficient, it has the same characteristics as... The same dimension of texture intensity. In actual engineering deployment, several calibration images of known qualified and known defective products are acquired under standard lighting conditions at the testing site. The maximum fluctuation amplitude of the peak texture intensity in the dense fiber area of ​​the qualified product image is calculated, and this fluctuation amplitude is used as... The calibration reference, in this embodiment Set to 80 texture intensity units. This directly determines the extent to which the adaptive defect response threshold increases with fiber hybridity. If the threshold is too small, the dynamic adjustment of the threshold will be insufficient, and false detections of the background in dense fiber areas will be difficult to suppress effectively. If the threshold is too large, the threshold in the fiber-mixed area will be excessively raised, and small-area real defects may be missed as a result. The value range is [20, 200] texture intensity units. In other embodiments, it can be adjusted according to the fiber density grade of the special paper, the illumination intensity, and the gray range constant. .

[0048] The dimensionless fiber hybridity is calculated. Represents the natural logarithm function; This represents the logarithmic offset constant, which takes the value equal to the base of the natural logarithm; in engineering calculations, it is taken as 2.718. This represents the dimensionless local standard deviation of the original grayscale image within a local window centered on the current pixel. By calculating the grayscale image matrix within a local window centered on the current pixel. Original grayscale standard deviation Then divide by the gray range constant. Achieve dimensionless processing. Gray range constant. The value of corresponds to the bit depth of the image grayscale data. In this embodiment, an 8-bit grayscale image is used. The value is set to 255, thus mapping the local standard deviation to the interval [0, 1], ensuring that the independent variable within the parentheses of the logarithmic function is... Always greater than The reasonable computation range. In other embodiments, if grayscale images with different bit depths are used, the range is adjusted according to the actual bit depth. The value of , The value range is [1, 65535]. Meanwhile, The addition of this ensures that the natural logarithm variable is always greater than 1, completely avoiding the logical risk of negative logarithmic output or data overflow.

[0049] In other words, assuming the baseline threshold obtained from the current industrial field calibration. For 50 intensity units, the response adjustment coefficient The strength unit is set to 80. The fiber blending degree was obtained from the previous calculation stage. For a strong background pixel with a value of 0.704, if the grayscale fluctuation in the local area where the pixel is located is large, the original grayscale standard deviation calculated within the local window will be used. It is 8 grayscale units, divided by the grayscale range constant. After setting the value to 255, the dimensionless local standard deviation is obtained. for The internal independent variable of the natural logarithm term is , The adaptive defect response threshold generated by the pixel is then determined. The intensity unit is [number]. Therefore, in complex background areas with extremely dense fibers, due to high mixing and high local fluctuations, the judgment threshold is automatically and significantly raised by the system to more than twice the baseline threshold; conversely, in smooth paper areas, the fiber mixing... Approaching zero, the threshold approaches the baseline threshold. It maintains high sensitivity to minute bubbling defects.

[0050] S105. The peak texture intensity of each pixel is compared with the adaptive defect response threshold to screen abnormal candidate points. The abnormal candidate points are clustered by connectivity to obtain suspected defect clusters. The comprehensive confidence is evaluated by combining the total number of pixels contained in the suspected defect clusters with the degree of abnormality of local features to determine whether it is a real smoothness defect.

[0051] The system algorithm first traverses the entire image matrix, and then obtains the peak texture intensity of each pixel. Its proprietary adaptive defect response threshold Perform numerical comparisons. Only if the condition is met. Only when the time is right will the system determine that a pixel is an abnormal candidate point and record the spatial coordinates of the corresponding pixel into the candidate set.

[0052] Subsequently, density clustering is directly applied to perform connectivity clustering on the pixels in the candidate set. Density clustering is a well-known technique in data mining, and it includes, but is not limited to, density-based spatial clustering applications with noise; these will not be elaborated upon here. Since the preceding dynamic threshold comparison has accurately blocked a large number of pseudo-feature noise points generated by the normal background, only a pre-set fixed geometric distance retrieval radius is needed for neighbor point search. The geometric distance retrieval radius is a standard hyperparameter of the density clustering algorithm, with a value range of [3, 30] pixel units. In this embodiment, the geometric distance retrieval radius is set to 10 pixel units. Considering that the preceding dynamic threshold comparison has significantly filtered background noise, a fixed geometric distance retrieval radius is sufficient to meet the spatial merging requirements of adjacent candidate points. In other embodiments, the geometric distance retrieval radius can be adjusted according to the image resolution and the typical spatial scale of the defects. This allows for rapid spatial merging of adjacent candidate points, outputting at least one independent set of suspected defect clusters to the system, denoted as... .

[0053] If the density clustering algorithm does not output any suspected defect clusters, that is, if the abnormal candidate points in the candidate set are all isolated scattered points and do not meet the clustering conditions, the system directly determines that the current image does not have flatness defects and skips the subsequent comprehensive confidence evaluation step.

[0054] Furthermore, to thoroughly eliminate false detections of minute volumetric defects caused by accidental breaches of dynamic thresholds due to extreme abnormal pulp aggregation in localized areas of specialty paper, the system targets each suspected defect cluster. The total number of pixels contained in the defect cluster and the degree of anomaly of local features are combined to calculate the final comprehensive confidence assessment value. The following relationship is used:

[0055] In the relation, This represents the total number of pixels contained in the suspected defect cluster W. This indicates that the pixel data corresponding to all spatial coordinates within the suspected defect cluster is accumulated and iteratively calculated. The purpose of introducing a smoothing buffer constant is to prevent fiber mixing. In the smooth region of the paper approaching zero, the denominator value is too small, leading to an abnormal amplification of the single-point confidence contribution. In this embodiment... The value is 1, at which point the denominator term... Even in regions with the lowest fiber mixing, a lower limit of no less than 1 can be maintained, ensuring the numerical stability of the cumulative operation. The value range is [0.5, 5]. If the buffer term is too large, its proportion in the denominator will be too high, compressing the confidence contribution differences between individual pixels and reducing the overall confidence score's ability to distinguish between real defects and false points. In other embodiments, the buffer term can be adjusted according to the background complexity of the actual detection scenario. . The total number of pixels is non-linearly shrunk using a square root operation to prevent the over-amplification of extremely weak background texture areas containing a very large number of pixels, which could lead to misjudgment; the numerator in the accumulation term It measures the actual overflow of the pixel's peak texture intensity beyond the adaptive defect response threshold, i.e., the numerical manifestation of the degree of anomaly in local features; denominator This measures the cluttered masking state of the background around a pixel; higher fiber clutter results in a more significant reduction in overflow amplitude. Overall confidence score. It is a custom engineering evaluation index, the value of which is obtained by multiplying the square root of the total number of pixels by the cumulative term of the texture intensity. It represents the joint response intensity of the suspected defect cluster in two dimensions: spatial scale and feature overflow degree. It is used to make a comparison and judgment with the preset factory standard confidence threshold in a consistent order of magnitude.

[0056] As an intuitive data deduction, the output is set to include the total number of pixels. A cluster of suspected defects with a value of 100, wherein the average overflow difference of all internal pixels exceeding the adaptive defect response threshold corresponding to each anomaly candidate point is 10, and the average background clutter of the entire cluster's region is... It is 0.5. Based on If the value is 1, then the average confidence contribution of a single point in the accumulation operation is... The sum of all 100 points is 667. This is combined with the square root of the total number of pixels in the previous image. Finally, calculate the overall confidence level assessment value. .

[0057] Finally, the system extracts a pre-set factory standard confidence threshold for comparison. The factory standard confidence threshold is set according to specific product quality standards and process requirements, with a value range of [1000, 50000]. In this embodiment, the factory standard confidence threshold is set to 3000. When the factory standard confidence threshold is set too low, some tiny volumetric scattering points formed by the accidental breach of the threshold due to extreme pulp aggregation may be judged as real defects, leading to an increased false alarm rate. When the factory standard confidence threshold is set too high, small but genuine smoothness defects may be missed because the overall confidence assessment value does not reach the threshold. In other embodiments, the factory standard confidence threshold can be adjusted according to the grade of the specialty paper, the production line speed, and the tolerance of downstream processes for smoothness. If the overall confidence assessment value... If the value is significantly higher than the factory standard confidence threshold, the suspected defect cluster will be determined as a real flatness defect, and its regional coordinate information can be further extracted to output a warning signal to the outside.

[0058] Reference Figure 2 The image on the left is the original grayscale image of the special paper surface used for testing. The background shows a dense alternating texture of light and dark, with a bright real abnormal patch in the center area. The image on the right is the result of extraction using existing technology. While the central patch is marked, the background produces a large number of dense, scattered dots due to the inability to resist interference from high-density fibers, resulting in false detections.

[0059] Reference Figure 3 The left side is a heatmap showing the spatial distribution of fiber mixing. The background area shows a large area of ​​bright bands with corresponding high values, while the central abnormal patch shows a dark area with low values. The right side is a heatmap showing the spatial distribution of adaptive defect response thresholds. The background threshold is globally highlighted to block interference, while the threshold corresponding to the central patch is extremely low. This intuitively reflects the underlying logic of the judgment criteria dynamically adapting to the degree of local background clutter.

[0060] Reference Figure 4 The scattered background points in the image have been completely removed by the system algorithm, leaving only a single, clearly defined, real defect patch in the center, thus achieving accurate and interference-free extraction of the target area.

[0061] In the complete execution flow of the above embodiments, the system starts from the original surface image and goes through a multi-level cascaded process of texture feature extraction, fiber mixing degree numerical evaluation, pixel-by-pixel adaptive threshold generation, dynamic comparison and screening, and comprehensive confidence evaluation, and finally outputs the real flatness defect location result that has been rigorously verified.

[0062] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A visual inspection method for the surface flatness of specialty paper based on texture feature extraction, characterized in that, include: Acquire a surface image of the special paper in operation, and then perform smoothing filtering after converting the surface image into a grayscale image matrix; Extract the peak texture intensity, average texture intensity, and local micro-level disorder of each pixel in the grayscale image matrix; Based on the peak texture intensity, average texture intensity, and local micro-disorder of each pixel, the corresponding fiber messiness is calculated. The fiber messiness is positively correlated with the ratio of average texture intensity to peak texture intensity and with local micro-disorder. Based on the fiber mixing degree of each pixel, the gray-level standard deviation characteristics of the local area, and the baseline threshold of the overall image matrix, an adaptive defect response threshold for each pixel is dynamically generated. The peak texture intensity of each pixel is compared with the adaptive defect response threshold to screen out abnormal candidate points. The abnormal candidate points are then clustered by connectivity to obtain suspected defect clusters. The comprehensive confidence is evaluated by combining the total number of pixels contained in the suspected defect clusters with the degree of abnormality of local features to determine whether they are real smoothness defects.

2. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The steps for acquiring surface images of special paper in operation include: configuring an industrial line scan camera and a low-angle dark field illumination source; controlling the low-angle dark field illumination source to illuminate the surface of the special paper in operation; and continuously acquiring surface images of the special paper in operation using the industrial line scan camera under the illumination of the low-angle dark field illumination source.

3. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The steps for extracting the peak texture intensity and average texture intensity of each pixel in the grayscale image matrix include: constructing a Gabor filter bank containing multiple spatial scales and multiple directions, and performing two-dimensional convolution calculation on the grayscale image matrix; for any pixel in the grayscale image matrix, obtaining multiple filter response values ​​generated by the Gabor filter bank; traversing multiple filter response values, extracting the maximum value as the peak texture intensity of the corresponding pixel, and calculating the arithmetic mean of multiple filter response values ​​as the average texture intensity of the corresponding pixel.

4. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The steps for extracting the local micro-level disorder include: taking any pixel in the grayscale image matrix as the center point, performing a local binary pattern algorithm to calculate and obtain all local binary pattern feature values ​​in the local region adjacent to the center point; calculating the statistical variance of all local binary pattern feature values ​​within a rectangular sliding window of a set size; and using the calculated statistical variance as the local micro-level disorder of the corresponding pixel.

5. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The fiber hybridity satisfies the following relationship: in, This indicates the fiber clutter level of the current pixel. This represents the average texture intensity of the current pixel. This represents the peak texture intensity of the current pixel. Represents the zero bias constant. This indicates the local microscopic disorder level of the current pixel. This represents the natural exponential function. This represents the variance normalization reference constant.

6. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The adaptive defect response threshold of each pixel satisfies the following relationship: in, This represents the threshold for adaptive defect response generated by the current pixel. This represents the global arithmetic mean of the peak texture intensity of the entire image matrix, i.e., the baseline threshold. This represents the response adjustment coefficient. This indicates the fiber clutter level of the current pixel. Represents the natural logarithm function. This represents the logarithmic offset constant, whose value is equal to the base of the natural logarithm. This represents the dimensionless local standard deviation obtained by dimensionless processing based on the grayscale standard deviation within a local window centered on the current pixel.

7. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 6, characterized in that, The dimensionless local standard deviation Dimensionless processing is achieved by calculating the standard deviation of gray levels within a local window and dividing it by the gray range constant; the reference threshold line It is obtained by iterating through the peak texture intensity of all pixels in the grayscale image matrix and calculating the global arithmetic mean.

8. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The overall confidence level satisfies the following relationship: in, This represents the overall confidence assessment value for suspected defect clusters. This represents the total number of pixels contained in the suspected defect cluster, and ∑ represents the cumulative calculation of the pixels corresponding to all spatial coordinates within the suspected defect cluster. Indicates the peak texture intensity of a pixel. This represents the adaptive defect response threshold for a pixel. This indicates the fiber mixing degree of a pixel. This represents the smoothing buffer constant.

9. The method for visually detecting the surface flatness of special paper based on texture feature extraction according to claim 1, characterized in that, The steps of comparing the peak texture intensity of each pixel with the adaptive defect response threshold to screen abnormal candidate points and performing connectivity clustering on the abnormal candidate points to obtain suspected defect clusters include: traversing the grayscale image matrix, comparing the peak texture intensity of each pixel with the adaptive defect response threshold corresponding to each pixel; when the peak texture intensity is greater than the adaptive defect response threshold, determining the corresponding pixel as an abnormal candidate point and recording the spatial coordinates of the corresponding pixel into the candidate set; using a density clustering algorithm based on a preset geometric distance retrieval radius to perform connectivity clustering on the abnormal candidate points in the candidate set, and outputting at least one independent suspected defect cluster.

10. A visual inspection method for the surface flatness of special paper based on texture feature extraction according to claim 8 or 9, characterized in that, The steps for determining whether a defect is a genuine smoothness defect include: obtaining a pre-set factory standard confidence threshold; comparing the comprehensive confidence assessment value with the factory standard confidence threshold; when the comprehensive confidence assessment value is greater than the factory standard confidence threshold, determining that the corresponding suspected defect cluster is a genuine smoothness defect; extracting the region coordinate information of the genuine smoothness defect in the image matrix; generating a warning signal containing the defect location and the comprehensive confidence assessment value based on the region coordinate information; and outputting the warning signal externally.