A paper defect detection method and system based on image texture analysis
By fusing color, frequency domain, and shape features of RGB images into paper defect detection, and combining them with the lightweight MobileNetV3 model, the problems of single feature dimension and insufficient generalization ability of classifiers in existing technologies are solved, achieving high accuracy and real-time paper defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANAN UNIV
- Filing Date
- 2026-03-19
- Publication Date
- 2026-05-26
AI Technical Summary
Existing paper defect detection methods based on image texture analysis suffer from limited feature dimensions, making it difficult to accurately identify color-related paper defects. Furthermore, the classifiers lack generalization ability and cannot meet the real-time detection requirements of high-speed paper production lines.
RGB image processing is used to extract color, frequency domain and shape features. Combined with gray-level co-occurrence matrix and wavelet decomposition, multi-source features are fused, and a lightweight MobileNetV3 classification model is used for paper defect identification.
It improves the accuracy of yellow spot recognition to 94.2%, reduces the false negative rate of minor scratches to below 3%, and achieves a frame rate of over 32fps, adapting to different paper types and complex industrial environments to meet the real-time detection needs of high-speed production lines.
Smart Images

Figure CN121883489B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method for detecting paper defects using the texture, color, frequency domain and shape features of paper defects in images. Background Technology
[0002] In the modern papermaking industry, paper defects are one of the core issues affecting the quality of finished paper and the production efficiency of enterprises. Paper defects refer to various defects that occur in paper production due to factors such as raw materials, processes, and equipment. Common types of paper defects include holes, scratches, black spots, yellow spots, wrinkles, burrs, holes, stains, and creases. These defects not only reduce the performance of the paper but also lead to a large number of defective products, increasing the production costs and rework costs of enterprises.
[0003] With the rapid development of machine vision technology, image texture analysis-based paper defect detection methods have gradually replaced traditional manual visual inspection methods, becoming the mainstream technology for paper defect detection in the paper industry. Traditional manual visual inspection methods rely on the experience of inspectors, resulting in high subjectivity, high false negative rates, and low efficiency, making them unsuitable for the inspection needs of high-speed paper production lines. In contrast, image texture analysis-based paper defect detection methods extract texture features from paper images and utilize computer algorithms to automatically identify paper defects. This offers advantages such as high detection efficiency, strong objectivity, and real-time detection capabilities, effectively improving the quality of paper production.
[0004] In existing paper defect detection technologies based on image texture analysis, patent CN111724376A proposes a paper defect detection method based on grayscale texture features. This method preprocesses the paper defect image by performing grayscale conversion, median filtering for noise reduction, and power-law transform for contrast enhancement. Then, it extracts four texture features from the Gray-Level Co-occurrence Matrix (GLCM) and six model parameter features from a 3rd-order Gaussian Markov Random Field (GMRF). These two types of features are concatenated and input into a Support Vector Machine (SVM) for classification, thus achieving the detection of low-contrast paper defects. However, this method has the following two drawbacks:
[0005] 1. Limited Feature Dimension. This method directly converts color paper defect images into grayscale images, losing color difference information about the paper defects. For color-related paper defects such as yellow spots, black spots, and stains, it is difficult to accurately distinguish them based solely on grayscale texture features, resulting in low recognition accuracy for these types of paper defects. Moreover, this method only considers texture features, ignoring the role of color, shape, and other features in paper defect recognition.
[0006] 2. Insufficient classifier adaptability. The support vector machine classifier used in this method has insufficient generalization ability and inference efficiency when processing high-dimensional multi-source features, making it difficult to adapt to the real-time detection requirements of high-speed paper production lines. The inference speed of this method is only about 15fps, which cannot meet the detection requirements of high-speed production lines with speeds of 1000m / min or higher. Summary of the Invention
[0007] This application provides a paper defect detection method and system based on image texture analysis to solve the above two problems in the prior art.
[0008] On the one hand, embodiments of this application provide a paper defect detection method based on image texture analysis, including:
[0009] Collect images of paper defects;
[0010] The paper defect image is denoised and enhanced to obtain a preprocessed RGB (red, green, blue) image;
[0011] Color features are extracted from the preprocessed RGB image, and multi-channel texture features are extracted from the preprocessed RGB image using the gray-level co-occurrence matrix method. Color features and multi-channel texture features are then fused to form color-texture fusion features.
[0012] Wavelet decomposition is performed on the preprocessed RGB image. Low-frequency texture features are extracted from the low-frequency coefficients obtained by wavelet decomposition using the gray-level co-occurrence matrix method. High-frequency texture features are extracted from the high-frequency coefficients obtained by wavelet decomposition using the local binary mode. The low-frequency texture features and high-frequency texture features are fused to obtain the frequency domain-texture fusion features.
[0013] Extract the shape features of the preprocessed RGB image, and fuse the shape features with multi-channel texture features to form shape-texture fusion features;
[0014] The color-texture fusion feature, frequency domain-texture fusion feature, and shape-texture fusion feature are concatenated to obtain a fused multi-source feature vector;
[0015] The preprocessed RGB image and the fused multi-source feature vector are input into the multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3.
[0016] On the other hand, embodiments of this application also provide a paper defect detection system based on image texture analysis, including:
[0017] The image acquisition module is used to acquire images of paper defects;
[0018] The preprocessing module is used to denoise and enhance the paper defect image to obtain a preprocessed RGB image;
[0019] The color and texture extraction module is used to extract the color features of the preprocessed RGB image. It uses the gray-level co-occurrence matrix method to extract the multi-channel texture features of the preprocessed RGB image and fuses the color features and multi-channel texture features to form color-texture fusion features.
[0020] The frequency domain texture extraction module is used to perform wavelet decomposition on the preprocessed RGB image. The low-frequency coefficients obtained by wavelet decomposition are extracted using the gray-level co-occurrence matrix method, and the high-frequency coefficients obtained by wavelet decomposition are extracted using the local binary mode method. The low-frequency texture features and high-frequency texture features are fused to obtain the frequency domain-texture fusion features.
[0021] The shape and texture extraction module is used to extract the shape features of the preprocessed RGB image and fuse the shape features with multi-channel texture features to form shape-texture fusion features.
[0022] The feature concatenation module is used to concatenate color-texture fusion features, frequency domain-texture fusion features, and shape-texture fusion features to obtain a fused multi-source feature vector.
[0023] The paper defect classification module is used to input the preprocessed RGB image and the fused multi-source feature vector into the multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3.
[0024] The paper defect detection method and system based on image texture analysis in this application have the following advantages:
[0025] 1. Deep fusion of multi-source features to enrich feature dimensions. This application integrates color features, frequency domain features, shape features, and texture features. According to experimental data, the method of this application improves the recognition accuracy of macular region to 94.2% and reduces the false negative rate of micro-scratches to below 3%.
[0026] 2. Lightweight multimodal classification model balancing accuracy and real-time performance. This application employs a classification model combining MobileNetV3 and multi-feature fusion. Compared to traditional support vector machines, it can automatically learn the nonlinear relationships between multi-source features, resulting in stronger generalization ability. Simultaneously, the lightweight structure of MobileNetV3 ensures the model's inference speed, meeting the real-time detection requirements of high-speed paper production lines, with frame rates exceeding 32fps. This makes it suitable for industrial applications and adaptable to high-speed production lines with speeds exceeding 1500m / min.
[0027] 3. Strong generalization ability and adaptability to various paper types. The multi-source features of this application can be adapted to different types of paper, such as white cardboard, kraft paper, thin paper, coated paper, and uncoated paper. Whether it is smooth coated paper or rough uncoated paper, it can effectively extract the features of paper defects. Compared with existing methods that can only adapt to the defects of specific types of paper, this method has a stronger generalization ability. When the paper type changes, the recognition accuracy of this method only decreases by about 2%, which can adapt to different production scenarios.
[0028] 4. Strong robustness and adaptability to complex industrial environments. This application adopts adaptive preprocessing methods, such as adaptive median filtering and adaptive contrast enhancement, which can effectively remove noise in industrial environments and adapt to different lighting conditions. When the light intensity changes, the recognition accuracy of this method only decreases by about 1%, while the recognition accuracy of existing methods will decrease by more than 8%, thus adapting to complex industrial production environments. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A flowchart illustrating a paper defect detection method based on image texture analysis, provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] Figure 1 A flowchart illustrating a paper defect detection method based on image texture analysis provided in this application embodiment. This application embodiment provides a paper defect detection method based on image texture analysis, comprising:
[0033] S100, collects images of paper defects.
[0034] For example, an industrial line scan camera is used to acquire images of paper on a papermaking production line. The camera selected is a Basler raL2448-80km line scan camera with a resolution of 2400dpi and a frame rate of 50fps. The acquired images are RGB color images with a size of 2048×2048 pixels to ensure image clarity and complete color information.
[0035] During the data acquisition process, the camera was mounted above the paper production line, 50cm above the paper surface, and equipped with an LED (light-emitting diode) strip light source with a brightness set to 1000 lux to ensure uniform illumination, free of shadows and distortion, in the acquired images. To ensure that the acquired images cover the entire width of the paper, the camera was aligned with the width direction of the paper. When the paper width was 2m, two cameras were used to stitch the images together, ensuring that no images were missed.
[0036] S110 performs noise reduction and enhancement processing on the paper defect image to obtain a preprocessed RGB image.
[0037] For example, adaptive median filtering denoising technology and adaptive contrast-limited histogram equalization enhancement technology are used to denoise and enhance paper defect images, respectively.
[0038] Furthermore, adaptive median filtering denoising includes:
[0039] For each pixel in the paper defect image, calculate the gray value within the initial filtering window;
[0040] Based on the relationship between the current pixel's grayscale value and the maximum and minimum grayscale values in the initial filtering window, determine whether the current pixel is a noise point. If it is a noise point, expand the initial filtering window and re-determine whether the current pixel is a noise point until the initial filtering window is expanded to its maximum. If the current pixel is still a noise point, replace the current pixel's grayscale value with the median grayscale value in the initial filtering window.
[0041] Specifically, adaptive median filtering for noise reduction includes the following steps:
[0042] 1. Traverse each pixel (i,j) in the image. With this pixel as the center, set the initial filter window size to 3×3. The coordinates of the top left pixel of the window are (i-1,j-1) and the coordinates of the bottom right pixel are (i+1,j+1).
[0043] 2. Calculate the pixel values of the three RGB channels within the window, and convert the pixel value of each channel to a grayscale value. The conversion formula is Gray = 0.2989R + 0.5870G + 0.1144B, where Gray is the converted grayscale value, and R, G, and B are the pixel values of the R, G, and B channels, respectively. This yields the maximum grayscale value Gray for all pixels within the window. max Minimum value Gray min and median Gray med ;
[0044] 3. If the grayscale value of the current pixel Gray(i,j) is greater than Gray... max or smaller than Gray min If the pixel is a noise point, increase the window size to 5×5 and repeat step 2 until the window size reaches 9×9. If the current pixel is still a noise point after the window size reaches 9×9, replace the pixel's grayscale value with the median value of the window. med ;
[0045] 4. If the grayscale value of the current pixel Gray(i,j) is in Gray... max and Gray min If the value is between 0 and 1, it indicates that the pixel is not a noise point, and the original RGB value of the pixel is preserved.
[0046] 5. Perform the above processing on the three RGB channels respectively to obtain the denoised RGB image.
[0047] In this step, the maximum size of the filtering window is set to 9×9, which can effectively remove salt-and-pepper noise and Gaussian noise in the industrial environment. The noise removal rate of the denoised image reaches more than 95%, while preserving the edge information of the paper defect area.
[0048] Furthermore, adaptive contrast-limited histogram equalization enhancements include:
[0049] The denoised paper defect image is divided into multiple sub-blocks;
[0050] Calculate the histogram for each sub-block, count the number of pixels at each gray level, and when the number of pixels at a certain gray level exceeds the preset histogram peak, allocate the excess pixels to other gray levels.
[0051] Equalize the histogram of each sub-block and calculate the transformation function for each gray level;
[0052] The transformation functions of adjacent sub-blocks are fused to obtain the overall transformation function of the entire image;
[0053] The total transform function is applied to the denoised paper defect image to obtain the preprocessed RGB image.
[0054] Specifically, adaptive contrast-limited histogram equalization enhancement includes the following steps:
[0055] 1. Process each channel of the denoised RGB image separately, and divide the image of each channel into 8×8 sub-blocks, each sub-block being 256×256 pixels in size;
[0056] 2. Calculate the histogram for each sub-block, count the number of pixels at each gray level, and limit the peak value of the histogram to clipLimit=2.0. That is, when the number of pixels at a certain gray level exceeds clipLimit, the excess part is evenly distributed to other gray levels to avoid excessive enhancement of local contrast.
[0057] 3. Equalize the histogram of each sub-block and calculate the transformation function for each gray level. This transformation function is used to map the original gray values to new gray values to improve the contrast of the sub-block.
[0058] 4. The transformation functions of adjacent sub-blocks are fused using bilinear interpolation to obtain the total transformation function of the entire image, thus avoiding boundary effects between sub-blocks;
[0059] 5. Apply the total transform function to the image of each channel to obtain the contrast-enhanced RGB image, i.e., the preprocessed RGB image.
[0060] In this step, the size of the sub-block is set to 8×8 and the clipLimit is set to 2.0, which can effectively enhance the contrast of the paper defect area while avoiding noise amplification. The contrast of the enhanced image is improved by more than 30%, and the distinction between the paper defect area and the background area is significantly improved.
[0061] S120: Extract color features from the preprocessed RGB image, use the gray-level co-occurrence matrix method to extract multi-channel texture features from the preprocessed RGB image, and fuse color features and multi-channel texture features to form color-texture fusion features.
[0062] For example, a method for extracting color features includes:
[0063] Color distance features are extracted from the R, G, and B channels of the preprocessed RGB image. The color distance features include the mean (i.e., the first moment), variance (i.e., the second moment), and skewness (i.e., the third moment).
[0064] The preprocessed RGB image is converted into an HSV image, and the mean values of the H channel and S channel in the HSV image are calculated.
[0065] The color feature is formed by concatenating the color distance feature, the mean of the H channel, and the mean of the S channel.
[0066] Specifically, the process of color feature extraction is as follows:
[0067] 1. For the R channel, iterate through each pixel (i,j) in the image and calculate the mean M of the R channel pixel values. R ,variance Skewness R :
[0068] Mean M R : Where W is the image width, H is the image height, R(i,j) is the pixel value of the R channel at position (i,j), W=2048, H=2048;
[0069] variance : This reflects the dispersion of pixel values in the R channel;
[0070] Skewness R : This reflects the symmetry of the pixel value distribution in the R channel.
[0071] 2. For both the G and B channels, calculate the mean M of the G channel using the same method. G ,variance Skewness G The mean M of channel B B ,variance Skewness B .
[0072] 3. Convert the RGB image to an HSV image using the following formula:
[0073] V = max(R, G, B), representing brightness;
[0074] When V≠0, otherwise S=0, indicating saturation;
[0075] , indicating hue.
[0076] Where H, S, and V are the values of the H, S, and V channels of the HSV image, respectively.
[0077] Then calculate the mean M of the H channel. H The mean M of the S channel S This reflects the hue and saturation characteristics of paper defects.
[0078] After the above processing, 11-dimensional color features were obtained, including M. R , Skew R M G , Skew G M B , Skew B M H M S .
[0079] Furthermore, methods for extracting multi-channel texture features include:
[0080] Gray-level quantization is performed on the R, G, and B channels of the preprocessed RGB image;
[0081] Calculate the gray-level co-occurrence matrix for each channel after gray-level quantization;
[0082] The gray-level co-occurrence matrix in each direction is normalized.
[0083] Four texture features are extracted from each normalized gray-level co-occurrence matrix, including contrast, correlation, energy, and homogeneity.
[0084] The average value of the texture features in the four directions is taken to obtain the four texture features for each channel;
[0085] The texture features of the R, G, and B channels are spliced together to form a multi-channel texture feature.
[0086] Specifically, the process of multi-channel texture feature extraction is as follows:
[0087] 1. Perform grayscale quantization on each channel of the preprocessed RGB image, quantizing the pixel value of each channel from 0-255 to 0-7, for a total of 8 grayscale levels. The quantization formula is I. q =floor(I / 32), where I is the original pixel value, I q The quantized pixel values reduce computation while preserving key texture information.
[0088] 2. For each quantized channel image, calculate the gray-level co-occurrence matrix, with a step size of 1 and directions of 0°, 45°, 90°, and 135°. The specific process is as follows:
[0089] 2.1 For the 0° direction, count the frequency of grayscale value combinations of each pixel and its right-side adjacent pixel, i.e., count (I q (i,j),I q The number of occurrences of (i,j+1));
[0090] 2.2. For the 45° direction, count the frequency of grayscale value combinations of each pixel and its upper-right adjacent pixel, i.e., count (I q (i,j),I qThe number of occurrences of (i-1,j+1));
[0091] 2.3. For the 90° direction, count the frequency of grayscale value combinations of each pixel and its adjacent pixels above it, i.e., count (I q (i,j),I q The number of occurrences of (i-1,j));
[0092] 2.4. For the 135° direction, count the frequency of grayscale value combinations of each pixel and its upper-left neighbor, i.e., count (I q (i,j),I q The number of occurrences of (i-1,j-1));
[0093] 3. Normalize the gray-level co-occurrence matrix for each direction by dividing each element of the matrix by the sum of its elements to obtain the normalized gray-level co-occurrence matrix. The formula is as follows: , where N(i,j) is the number of occurrences of the gray value combination (i,j), P(i,j) is the normalized frequency, and m and n are both indices of the quantized gray levels;
[0094] 4. Extract four texture features from each normalized gray-level co-occurrence matrix, including contrast, correlation, energy, and homogeneity:
[0095] Contrast: Reflects the sharpness of an image and the depth of its texture grooves; the calculation method is as follows: The higher the contrast, the clearer the texture of the image;
[0096] Correlation: Reflects the directional consistency of textures in an image; the calculation method is as follows. ,in Let m be the mean. Let n be the mean of n. Let m be the standard deviation. Let n be the standard deviation of n. The greater the correlation, the more consistent the texture direction of the images.
[0097] Energy: Reflects the uniformity of image texture, and is calculated using the following method. The greater the energy, the more uniform the texture of the image;
[0098] Homogeneity: Reflects the local uniformity of image texture, and is calculated as follows: The greater the homogeneity, the more uniform the local texture of the image;
[0099] 5. Average the texture features in the four directions to obtain four texture features for each channel. The texture feature of the R channel is Contrast. RCorrelation R Energy R Homogeneity R The G channel is Contrast G Correlation G Energy G Homogeneity G Channel B is Contrast B Correlation B Energy B Homogeneity B .
[0100] After the above processing, 12-dimensional multi-channel texture features were obtained.
[0101] Furthermore, methods for fusing color features and multi-channel texture features include:
[0102] Construct a training dataset containing color features and multi-channel texture features of multiple training images;
[0103] Calculate the F-value for each feature in the training dataset;
[0104] Weights are assigned to each feature based on the F-value;
[0105] The color features and multi-channel texture features extracted from the preprocessed RGB image are corrected according to weights, and the corrected color features and multi-channel texture features are spliced together to form a color-texture fusion feature.
[0106] Specifically, the methods of fusion include:
[0107] 1. Construct a training dataset containing color features and multi-channel texture features of 1000 paper defect images, as well as corresponding paper defect type labels, with labels ranging from 0 to 9, corresponding to 10 paper defect types;
[0108] 2. Calculate the F-score for each feature in the training dataset (including color features and multi-channel texture features). The F-score reflects the contribution of that feature to paper defect classification; the larger the F-score, the higher the contribution. The formula for calculating the F-score is: Where SSB is the between-group sum of squares, SSW is the within-group sum of squares, k is the number of paper disease types, k=10, and N is the sample size, N=1000;
[0109] 3. Assign weights to each feature based on the F-value. The weight calculation formula is as follows: ,in Let be the weight of the k'-th feature. Let F be the F value of the k'th feature, and the sum of the weights is 1;
[0110] 4. Multiply each feature by its corresponding weight to obtain the corrected features. Concatenate all the corrected features to form a 23-dimensional color-texture fusion feature. The formula is as follows: Fe k’ This is the original value of the k'th feature.
[0111] In this step, the F-value of the color feature ranges from 15 to 25, while the F-value of the multi-channel texture feature ranges from 10 to 20. This indicates that the contribution of the color feature to paper defect classification is slightly higher than that of the texture feature, and therefore the weight of the color feature is slightly higher than that of the texture feature.
[0112] S130, perform wavelet decomposition on the preprocessed RGB image, extract low-frequency texture features from the low-frequency coefficients obtained by wavelet decomposition using the gray-level co-occurrence matrix method, extract high-frequency texture features from the high-frequency coefficients obtained by wavelet decomposition using the local binary mode, and fuse the low-frequency texture features and high-frequency texture features to obtain frequency domain-texture fusion features.
[0113] For example, a two-dimensional wavelet decomposition is performed on the preprocessed RGB image, using the db4 wavelet basis function. The decomposition layer is 3. The db4 wavelet basis function has good orthogonality and compact support, which can effectively extract the frequency domain features of the image.
[0114] Methods for wavelet decomposition and extraction of low-frequency and high-frequency texture features include:
[0115] Convert the preprocessed RGB image to a grayscale image;
[0116] A first-order wavelet decomposition is performed on the grayscale image to obtain one first-order low-frequency coefficient and three first-order high-frequency coefficients;
[0117] The first-level low-frequency coefficients are decomposed into a second-level low-frequency coefficient and three second-level high-frequency coefficients.
[0118] The second-level low-frequency coefficients are decomposed into a third-level low-frequency coefficient and three third-level high-frequency coefficients.
[0119] Low-frequency texture features were extracted from the three-level low-frequency coefficients using the gray-level co-occurrence matrix method;
[0120] For each high-frequency coefficient, a local binary mode is used to extract high-frequency texture features;
[0121] Dimensionality reduction of high-frequency texture features using PCA (principal component analysis);
[0122] Low-frequency texture features and dimensionality-reduced high-frequency texture features are spliced together to form frequency domain-texture fusion features.
[0123] The specific steps of the above process include:
[0124] 1. Convert an RGB image to a grayscale image using the formula: Gray = 0.2989R + 0.5870G + 0.1144B;
[0125] 2. Perform first-level wavelet decomposition on the grayscale image to obtain first-level low-frequency coefficients LL1 and first-level high-frequency coefficients LH1 (horizontal high frequency), HL1 (vertical high frequency), and HH1 (diagonal high frequency). The first-level low-frequency coefficient LL1 reflects the overall texture of the image, while the high-frequency coefficients reflect the edge and detail information of the image.
[0126] 3. Perform second-level wavelet decomposition on the first-level low-frequency coefficient LL1 to obtain the second-level low-frequency coefficient LL2 and the second-level high-frequency coefficients LH2, HL2, and HH2;
[0127] 4. Perform third-level wavelet decomposition on the second-level low-frequency coefficient LL2 to obtain the third-level low-frequency coefficient LL3 and the third-level high-frequency coefficients LH3, HL3, and HH3. The size of LL3 is 256×256 pixels, which reflects the lowest-level texture information of the image.
[0128] 5. For the low-frequency coefficient LL3, the same method as S120 is used to extract low-frequency texture features based on the gray-level co-occurrence matrix, resulting in 4-dimensional low-frequency texture features, including the corresponding contrast ratio. LL3 Related Correlation LL3 Energy LL3 Homogeneity LL3 It reflects the overall texture features of the image;
[0129] 6. For each high-frequency coefficient (including first-level, second-level, and third-level high-frequency coefficients), extract high-frequency texture features using Local Binary Pattern (LBP) as the method. The specific process is as follows:
[0130] 6.1 For each high-frequency coefficient in the image, iterate through each pixel (i,j) and set a 3×3 neighborhood window centered on that pixel;
[0131] 6.2 Compare the values of the 8 neighboring pixels with the value of the center pixel. If the neighboring pixel value is greater than the center pixel value, mark it as 1; otherwise, mark it as 0.
[0132] 6.3. Combine the 8 tag values into an 8-bit binary number, convert it to a decimal number, and obtain the LBP value of the pixel. The LBP value ranges from 0 to 255.
[0133] 6.4. Calculate the LBP value histogram of the entire high-frequency coefficient image, normalize the histogram to obtain 256-dimensional LBP features, which reflect the local texture features of the image.
[0134] 6.5 Extract LBP features from the nine high-frequency coefficients (LH1, HL1, HH1, LH2, HL2, HH2, LH3, HL3, HH3) to obtain 9×256=2304-dimensional high-frequency texture features;
[0135] 7. Perform PCA dimensionality reduction on the high-frequency texture features to reduce the 2304-dimensional features to 20-dimensional features, and obtain the dimensionality-reduced high-frequency texture features. PCA dimensionality reduction can remove redundant features and improve the effectiveness of features. The dimensionality-reduced features can retain more than 95% of the original feature information.
[0136] After the above processing, a 24-dimensional frequency domain-texture fusion feature was obtained, which includes 4-dimensional low-frequency texture features and 20-dimensional high-frequency texture features.
[0137] S140: Extract the shape features of the preprocessed RGB image, and fuse the shape features with the multi-channel texture features to form shape-texture fusion features.
[0138] For example, a method for extracting shape features includes:
[0139] Convert the preprocessed RGB image to a grayscale image;
[0140] Thresholding is applied to a grayscale image to obtain a binary image;
[0141] Morphological processing is performed on the binary image to obtain a binary mask of the paper defect region;
[0142] The area, perimeter, circularity, rectangularity, Euler number, and centroid coordinates are extracted sequentially from the binary mask of the paper defect area. These factors together form the shape features.
[0143] Specifically, the process of extracting shape features includes:
[0144] 1. Convert an RGB image to a grayscale image using the formula: Gray = 0.2989R + 0.5870G + 0.1144B;
[0145] 2. The Otsu's method (OTSU) is used to perform threshold segmentation on the grayscale image to obtain a binary image, in which the paper defect area is the foreground (pixel value of 1) and the background area is the background (pixel value of 0). The OTSU method can automatically determine the optimal threshold to achieve effective segmentation of the paper defect area and the background area.
[0146] 3. Perform morphological processing on the binary image. First, perform dilation, then erosion. The structuring element of the dilation operation is a 3×3 rectangle, and the structuring element of the erosion operation is a 3×3 rectangle. Remove small noise areas and fill the holes in the paper defect area to obtain the final binary mask of the paper defect area.
[0147] 4. Extract the area of the paper defect region: Count the number of pixels with a value of 1 in the binary mask to obtain the area A of the paper defect region, in pixels, which reflects the size of the paper defect;
[0148] 5. Extract the perimeter of the paper defect area: Traverse the edge pixels of the binary mask, count the number of edge pixels, and obtain the perimeter P of the paper defect area in pixels, which reflects the boundary length of the paper defect.
[0149] 6. Extract the circularity of the paper defect area: The formula for calculating circularity is as follows: The closer the roundness is to 1, the closer the paper defect area is to a circle, reflecting the regularity of the paper defect shape;
[0150] 7. Extract the rectangularity of the paper defect area: The formula for calculating the rectangularity is as follows: W min H is the width of the minimum bounding rectangle of the paper defect area. min The height of the minimum bounding rectangle is given. The closer the rectangularity is to 1, the closer the paper defect area is to a rectangle, reflecting the shape characteristics of the paper defect.
[0151] 8. Extracting the Euler number of the paper defect area: The Euler number reflects the connectivity of the paper defect area. The calculation formula is Euler=CH, where C is the number of connected regions and H is the number of holes. An Euler number of 0 indicates that the paper defect area has no holes, and a negative Euler number indicates that the paper defect area has holes.
[0152] 9. Extract the centroid coordinates of the paper defect area: Calculate the centroid coordinates (x, y) of the paper defect area. c ,y c The calculation formula is: , , where mask(i,j) is the pixel value of the binary mask at position (i,j), and the centroid coordinates reflect the position of the paper defect in the image.
[0153] After the above processing, 6-dimensional shape features were obtained, including area A, perimeter P, circularity, rectangularity, Euler number, and centroid coordinates (x, y). c ,y c ).
[0154] The extracted 6-dimensional shape features and the 12-dimensional multi-channel texture feature vector obtained from S120 are weighted and fused. The weights are determined by variance analysis. The specific process is the same as that of S120, resulting in 18-dimensional shape-texture fusion features. The fused features can simultaneously reflect the shape and texture features of paper defects, thus improving the distinguishability of the features.
[0155] S150, the color-texture fusion feature, frequency domain-texture fusion feature and shape-texture fusion feature are concatenated to obtain the fused multi-source feature vector.
[0156] For example, color-texture fusion features (23 dimensions), frequency domain-texture fusion features (24 dimensions), and shape-texture fusion features (18 dimensions) are concatenated to obtain a 65-dimensional fused multi-source feature vector. Then, PCA is performed on this feature to reduce the 65-dimensional feature to 30 dimensions, resulting in the final fused multi-source feature vector. PCA dimensionality reduction can remove redundant features and improve the effectiveness of features. The dimensionality-reduced feature can retain more than 98% of the original feature information.
[0157] S160: The preprocessed RGB image and the fused multi-source feature vector are input into the multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3.
[0158] For example, the multimodal classification model has two branches: an image feature branch and a multi-source feature branch. The image feature branch uses the MobileNetV3-Small model, with a preprocessed RGB image as input, measuring 224×224×3. The model structure is as follows:
[0159] Input layer: Input is an RGB image with dimensions of 224×224×3. The image has been normalized using the following formula: , where mean is the mean of the ImageNet dataset, mean=[0.485,0.456,0.406], and std is the standard deviation of the ImageNet dataset, std=[0.229,0.224,0.225];
[0160] Initial convolutional layer: kernel size is 3×3, stride is 2, number of output channels is 16, activation function is Hard-Swish, which can improve the non-linear expressive power of the model;
[0161] Bottleneck layer 1: Uses depthwise separable convolution with a kernel size of 3×3, a stride of 2, 16 output channels, and ReLU activation function. Depthwise separable convolution can reduce the number of model parameters and computational cost.
[0162] Bottleneck layer 2: Uses depthwise separable convolution with a kernel size of 3×3, a stride of 2, 24 output channels, and ReLU activation function;
[0163] Bottleneck layer 3: Uses depthwise separable convolution with a kernel size of 3×3, a stride of 1, 24 output channels, and ReLU activation function;
[0164] Bottleneck layer 4: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 2, 40 output channels, and a Hard-Swish activation function;
[0165] Bottleneck layer 5: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 40 output channels, and a Hard-Swish activation function;
[0166] Bottleneck layer 6: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 40 output channels, and a Hard-Swish activation function;
[0167] Bottleneck layer 7: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 48 output channels, and a Hard-Swish activation function;
[0168] Bottleneck layer 8: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 48 output channels, and a Hard-Swish activation function;
[0169] Bottleneck layer 9: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 2, 96 output channels, and a Hard-Swish activation function;
[0170] Bottleneck layer 10: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 96 output channels, and a Hard-Swish activation function;
[0171] Bottleneck layer 11: Uses depthwise separable convolution with a kernel size of 5×5, a stride of 1, 96 output channels, and a Hard-Swish activation function;
[0172] Convolutional layer: kernel size is 1×1, stride is 1, number of output channels is 576, activation function is Hard-Swish;
[0173] Global average pooling layer: converts the feature map into a 576-dimensional feature vector;
[0174] Dropout layer: The dropout probability is 0.2 to prevent the model from overfitting.
[0175] After processing by the above model, the image feature branch outputs a 576-dimensional image depth feature vector.
[0176] The input to the multi-source feature branch is a 30-dimensional fused multi-source feature vector, with the following structure:
[0177] Input layer: Input a 30-dimensional fused multi-source feature vector. The feature vector is normalized using the following formula: , of which F norm The normalized feature vector, mean F To fuse the mean of multi-source feature vectors, std F To fuse the standard deviation of multi-source feature vectors;
[0178] Fully connected layer 1: The output dimension is 128, the activation function is ReLU, and the formula for the ReLU activation function is ReLU(x)=max(0,x);
[0179] Fully connected layer 2: Output dimension is 256, activation function is ReLU;
[0180] Fully connected layer 3: The output dimension is 576, and the activation function is Hard-Swish, which maps multi-source features to the same dimension as image features.
[0181] After the above processing, the multi-source feature branch outputs a 576-dimensional multi-source feature vector.
[0182] In addition to the two branches mentioned above, the multimodal classification model in this embodiment also includes a fusion layer and a classification layer. The fusion layer uses an attention module to perform weighted fusion of features from the image feature branch and the multi-source feature branch. The specific process is as follows:
[0183] The feature vectors of the two branches are concatenated to obtain a 1152-dimensional feature vector.
[0184] The concatenated feature vector is compressed by using a fully connected layer to compress the 1152-dimensional vector into 288-dimensional vectors, with ReLU as the activation function.
[0185] The compressed feature vector is activated and expanded from 288 dimensions to 1152 dimensions through a fully connected layer. The activation function is Sigmoid, and attention weights are obtained. The attention weights reflect the contribution of each feature to the classification.
[0186] Multiply the attention weights by the concatenated feature vectors to obtain the weighted fused feature vectors.
[0187] The structure of the classification layer is as follows:
[0188] Fully connected layer: The input is a 1152-dimensional fused feature vector, and the output dimension is 10, corresponding to 10 types of paper defects (holes, scratches, black spots, yellow spots, wrinkles, burrs, holes, stains, creases, and others).
[0189] Softmax layer: Converts the output of the fully connected layer into a probability distribution to obtain the confidence level for each paper defect type.
[0190] In the embodiments of this application, the training process of the multimodal classification model is as follows:
[0191] 1. Dataset partitioning. The collected paper defect image dataset was divided into training, validation, and test sets in a ratio of 7:2:1. The training set contained 2800 images, the validation set contained 800 images, and the test set contained 400 images. Each dataset contained 10 types of paper defects, and the number of images of each type was balanced to avoid model overfitting caused by dataset skew.
[0192] 2. Data Augmentation. Augmenting the training set improves the model's generalization ability. Augmentation methods include:
[0193] Random flip: horizontal and vertical flips, with a probability of 0.5;
[0194] Random rotation: rotation angle from -10° to 10°, with a probability of 0.5;
[0195] Random cropping: The cropping size is 200×200, and then it is resized to 224×224;
[0196] Brightness adjustment: The brightness adjustment range is 0.8 to 1.2, with a probability of 0.5.
[0197] Contrast adjustment: The contrast adjustment range is 0.8 to 1.2, with a probability of 0.5.
[0198] 3. Training parameters. The key training parameters are as follows:
[0199] Optimizer: The AdamW optimizer is used with a learning rate of 0.001 and a weight decay of 0.0005. The AdamW optimizer can effectively improve the training speed and generalization ability of the model.
[0200] Loss function: The cross-entropy loss function is used, which can effectively measure the difference between the true label and the predicted probability;
[0201] Batch size: 32. The batch size is determined based on the GPU (graphics processing unit) memory size. A batch size of 32 can ensure the stability and efficiency of training.
[0202] Training rounds: 100. The number of training rounds is determined by the accuracy of the validation set. Training is stopped when the accuracy of the validation set does not improve for 10 consecutive rounds.
[0203] Learning rate scheduling: A cosine annealing scheduler is used, and the learning rate is reduced to 0.9 every 10 rounds. The cosine annealing scheduler can effectively adjust the learning rate and improve the training effect of the model.
[0204] 4. Training process.
[0205] 4.1 Initialize model parameters using the He initialization method, which can effectively avoid the gradient vanishing problem during model training;
[0206] 4.2. Traverse the training set, and input the images of each batch into the model after data augmentation to obtain the prediction results;
[0207] 4.3 Calculate the loss function and update the model parameters using the backpropagation algorithm. The learning rate of the backpropagation algorithm is 0.001 and the weight decay is 0.0005.
[0208] 4.4. After each training round, evaluate the model's accuracy on the validation set and save the model with the highest accuracy on the validation set.
[0209] 4.5 After training, evaluate the model's performance on the test set to obtain the model's accuracy, precision, recall, and F1 score.
[0210] After model training is complete, the preprocessed RGB image and the fused multi-source feature vector can be input into the trained multimodal classification model to obtain the classification result of paper defects. This classification result includes the paper defect type, location, and confidence level. The specific classification process is as follows:
[0211] The preprocessed RGB image is resized to 224×224×3 and input into the image feature branch of the model;
[0212] The multi-source feature branches of the model will be integrated with multi-source feature vectors;
[0213] The model outputs the type and confidence level of the paper defect, and obtains the location (i.e., centroid coordinates) of the paper defect based on the binary mask of the paper defect area.
[0214] The classification results are saved in JSON (JavaScript Object Notation) format, including the paper disease type, confidence score, centroid coordinates, and image file name.
[0215] This application also provides a paper defect detection system based on image texture analysis, the system comprising:
[0216] The image acquisition module is used to acquire images of paper defects;
[0217] The preprocessing module is used to denoise and enhance the paper defect image to obtain a preprocessed RGB image;
[0218] The color and texture extraction module is used to extract the color features of the preprocessed RGB image. It uses the gray-level co-occurrence matrix method to extract the multi-channel texture features of the preprocessed RGB image and fuses the color features and multi-channel texture features to form color-texture fusion features.
[0219] The frequency domain texture extraction module is used to perform wavelet decomposition on the preprocessed RGB image. The low-frequency coefficients obtained by wavelet decomposition are extracted using the gray-level co-occurrence matrix method, and the high-frequency coefficients obtained by wavelet decomposition are extracted using the local binary mode method. The low-frequency texture features and high-frequency texture features are fused to obtain the frequency domain-texture fusion features.
[0220] The shape and texture extraction module is used to extract the shape features of the preprocessed RGB image and fuse the shape features with multi-channel texture features to form shape-texture fusion features.
[0221] The feature concatenation module is used to concatenate color-texture fusion features, frequency domain-texture fusion features, and shape-texture fusion features to obtain a fused multi-source feature vector.
[0222] The paper defect classification module is used to input the preprocessed RGB image and the fused multi-source feature vector into the multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3.
[0223] Experimental instructions
[0224] 1. Experiment setup.
[0225] The dataset used in this experiment is a real paper defect dataset from the paper industry, containing 10 types of paper defects and a total of 4000 images, including 400 images of holes, 400 images of scratches, 400 images of black spots, 400 images of yellow spots, 400 images of wrinkles, 400 images of burrs, 400 images of holes, 400 images of stains, 400 images of creases, and 400 other images. The resolution of the images is 2048×2048 pixels, and they were collected from a high-speed production line of a paper company.
[0226] The experimental environment consisted of an Ubuntu 22.04 operating system, an NVIDIA RTX3080 GPU, 32GB of memory, and the deep learning framework PyTorch 2.0 with CUDA version 11.7 to ensure the training and inference speed of the model.
[0227] 2. Comparison method.
[0228] The comparative method used in this experiment is the method described in existing patent CN111724376A, and the procedure of this method is as follows:
[0229] Image preprocessing: Convert the RGB image to a grayscale image, use median filtering to remove noise, and use power law transform to enhance contrast;
[0230] Feature extraction: Extract four texture features (contrast, correlation, energy, and homogeneity) from the gray-level co-occurrence matrix and six parameter features from the 3rd-order GMRF model, and fuse them into 10-dimensional features;
[0231] Classification: A Support Vector Machine (SVM) classifier was used for classification. The kernel function of the SVM was the RBF kernel, with a penalty parameter C=1.0 and gamma=0.1.
[0232] 3. Evaluation indicators.
[0233] The evaluation metrics used in the experiment included accuracy, precision, recall, F1 score, and inference speed (FPS). Accuracy is the proportion of correctly classified samples out of the total number of samples, reflecting the overall classification performance of the model; precision is the proportion of correctly classified samples out of all samples predicted as having that specific paper defect, reflecting the model's classification accuracy; recall is the proportion of correctly classified samples out of all samples actually containing that specific paper defect, reflecting the model's classification completeness; the F1 score is the harmonic mean of precision and recall, comprehensively reflecting the model's classification performance; and inference speed is the number of images processed per second, reflecting the model's real-time performance, measured in fps.
[0234] 4. Experimental results.
[0235] 4.1 Comparison of classification performance.
[0236] The classification performance comparison results of the two methods are shown in Table 1.
[0237] Table 1 Comparison of classification performance between the two methods
[0238]
[0239] As can be seen from the table, the accuracy of this method is 8.3% higher than that of the existing patented method, the precision is 8.5% higher, the recall is 8.5% higher, and the F1 score is 8.5% higher. This indicates that the classification performance of this method is significantly better than that of the existing patented method, and it can more accurately identify paper defect types.
[0240] 4.2 Comparison of classification performance for different types of paper defects.
[0241] The results of the classification performance comparison for different paper defects are shown in Table 2.
[0242] Table 2 Comparison of classification performance for different types of paper defects
[0243]
[0244] As shown in the table, this method improves the accuracy for all types of paper defects, especially for yellow spots, burrs, and other defects, with the largest improvements of 15.7%, 14.5%, and 15.8%, respectively. This indicates that the multi-source features of this method can effectively characterize the features of these paper defects and improve the identification accuracy. This is because yellow spots and stains have obvious color characteristics, and the color features of this method can effectively distinguish these paper defects; burrs and micro-scratches have obvious frequency domain characteristics, and the frequency domain features of this method can effectively identify these paper defects; other types of paper defects have complex shape and texture characteristics, and the multi-source features of this method can comprehensively characterize the features of these paper defects.
[0245] 4.3 Comparison of reasoning speed.
[0246] The comparison of inference speed between the two methods is shown in Table 3.
[0247] Table 3 Comparison of inference speed between the two methods
[0248]
[0249] As shown in the table, the inference speed of this method is 113.8% faster than existing patented methods, reaching 32.5 fps, which can meet the real-time detection requirements of high-speed paper production lines and is suitable for high-speed production lines with speeds of 1500 m / min and above. This is because the MobileNetV3 model used in this method is a lightweight model with fewer parameters and less computation than the SVM classifier. Furthermore, the fusion of multi-source features employs PCA dimensionality reduction, reducing feature dimensions and improving inference speed.
[0250] 5. Experimental analysis.
[0251] The main reasons why this method outperforms existing patented methods are as follows:
[0252] Multi-source feature fusion: This method integrates color, frequency domain, shape and texture features, which can comprehensively characterize the multi-dimensional attributes of paper defects. In contrast, existing patented methods only use grayscale texture features, which have a single feature dimension and are difficult to characterize paper defect features related to color, frequency domain and shape.
[0253] Multimodal classification model: The MobileNetV3 multimodal fusion model used in this method can automatically learn the nonlinear relationship of multi-source features and has stronger generalization ability, while the SVM classifier used in existing patented methods has insufficient generalization ability when dealing with high-dimensional features.
[0254] Adaptive preprocessing method: This method uses adaptive median filtering and adaptive contrast enhancement, which can better preserve the details of the image and improve the accuracy of feature extraction. In contrast, the fixed median filtering and power law transformation used in existing patented methods are difficult to adapt to different image noise and lighting conditions.
[0255] Feature dimensionality reduction optimization: This method uses PCA dimensionality reduction to remove redundant features, improve the effectiveness of features and the inference speed. In contrast, the feature fusion of existing patent methods does not perform dimensionality reduction, resulting in higher feature dimensions and slower inference speed.
[0256] It is evident that this method is significantly superior to existing patented methods in terms of accuracy and real-time performance in paper defect detection, effectively improving the level of paper defect detection in the papermaking industry and demonstrating promising prospects for industrial application.
[0257] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0258] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A paper defect detection method based on image texture analysis, characterized in that, include: Collect images of paper defects; The paper defect image is subjected to denoising and enhancement processing to obtain a preprocessed RGB image; Color features are extracted from the preprocessed RGB image, and multi-channel texture features of the preprocessed RGB image are extracted using the gray-level co-occurrence matrix method. The color features and the multi-channel texture features are then fused to form a color-texture fusion feature. Wavelet decomposition is performed on the preprocessed RGB image. Low-frequency texture features are extracted from the low-frequency coefficients obtained by wavelet decomposition using the gray-level co-occurrence matrix method. High-frequency texture features are extracted from the high-frequency coefficients obtained by wavelet decomposition using the local binary mode. The low-frequency texture features and the high-frequency texture features are fused to obtain the frequency domain-texture fusion features. Extract the shape features from the preprocessed RGB image, and fuse the shape features with the multi-channel texture features to form a shape-texture fusion feature; The color-texture fusion feature, the frequency domain-texture fusion feature, and the shape-texture fusion feature are concatenated to obtain a fused multi-source feature vector; The preprocessed RGB image and the fused multi-source feature vector are input into a multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3. Specifically, the color feature and the multi-channel texture feature are fused to form the color-texture fusion feature, as follows: Construct a training dataset, which includes the color features and multi-channel texture features of multiple training images; Calculate the F-value for each feature in the training dataset: the F-value reflects the contribution of that feature to the classification of paper defects, and the formula for calculating the F-value is as follows: Where SSB is the between-group sum of squares, SSW is the within-group sum of squares, k is the number of paper disease types, and N is the sample size; Each feature is assigned a weight based on the F value: the weight calculation formula is as follows: ,in Let be the weight of the k'-th feature. Let F be the value of the k'th feature; The color features and multi-channel texture features extracted from the preprocessed RGB image are corrected according to the weights, and the corrected color features and multi-channel texture features are spliced together to form the color-texture fusion feature.
2. The paper defect detection method based on image texture analysis according to claim 1, characterized in that, The paper defect image is denoised and enhanced using adaptive median filtering denoising technique and adaptive contrast-limited histogram equalization enhancement technique, respectively.
3. The paper defect detection method based on image texture analysis according to claim 2, characterized in that, The adaptive median filtering denoising includes: For each pixel in the paper defect image, calculate the gray value within the initial filtering window; Based on the relationship between the current pixel's grayscale value and the maximum and minimum grayscale values in the initial filtering window, determine whether the current pixel is a noise point. If it is a noise point, expand the initial filtering window and re-determine whether the current pixel is a noise point until the initial filtering window is expanded to its maximum. If the current pixel is still a noise point, replace the current pixel's grayscale value with the median grayscale value in the initial filtering window.
4. The paper defect detection method based on image texture analysis according to claim 2, characterized in that, The adaptive contrast-limited histogram equalization enhancement includes: The denoised paper defect image is divided into multiple sub-blocks; Calculate the histogram for each sub-block, count the number of pixels at each gray level, and when the number of pixels at a certain gray level exceeds the preset histogram peak, allocate the excess pixels to other gray levels. The histogram of each sub-block is equalized, and the transformation function for each gray level is calculated; The transformation functions of adjacent sub-blocks are fused to obtain the overall transformation function of the entire image; The total transformation function is applied to the denoised paper defect image to obtain a preprocessed RGB image.
5. The paper defect detection method based on image texture analysis according to claim 1, characterized in that, The method for extracting the color features includes: Color distance features are extracted from the R, G, and B channels of the preprocessed RGB image, and the color distance features include mean, variance, and skewness. The preprocessed RGB image is converted into an HSV image, and the mean value of the H channel and the mean value of the S channel in the HSV image are calculated. The color feature is formed by concatenating the color distance feature, the mean value of the H channel, and the mean value of the S channel.
6. The paper defect detection method based on image texture analysis according to claim 1, characterized in that, The method for extracting the multi-channel texture features includes: Gray-level quantization is performed on the R, G, and B channels of the preprocessed RGB image; Calculate the gray-level co-occurrence matrix for each channel after gray-level quantization; The gray-level co-occurrence matrix in each direction is normalized. Four texture features are extracted from each normalized gray-level co-occurrence matrix, including contrast, correlation, energy, and homogeneity. The average value of the texture features in the four directions is taken to obtain the four texture features for each channel; The texture features of the R, G, and B channels are stitched together to form the multi-channel texture feature.
7. The paper defect detection method based on image texture analysis according to claim 1, characterized in that, The method for performing wavelet decomposition and extracting the low-frequency texture features and the high-frequency texture features includes: Convert the preprocessed RGB image to a grayscale image; The grayscale image is subjected to first-level wavelet decomposition to obtain one first-level low-frequency coefficient and three first-level high-frequency coefficients; The first-level low-frequency coefficients are decomposed into a second-level wavelet coefficient to obtain one second-level low-frequency coefficient and three second-level high-frequency coefficients. The second-level low-frequency coefficients are decomposed into third-level wavelet coefficients to obtain one third-level low-frequency coefficient and three third-level high-frequency coefficients. The gray-level co-occurrence matrix method is used to extract the low-frequency texture features from the three-level low-frequency coefficients; For each high-frequency coefficient, the high-frequency texture features are extracted using a local binary mode. PCA dimensionality reduction is performed on the high-frequency texture features; The low-frequency texture features and the dimensionality-reduced high-frequency texture features are spliced together to form the frequency domain-texture fusion feature.
8. The paper defect detection method based on image texture analysis according to claim 1, characterized in that, The method for extracting the shape features includes: Convert the preprocessed RGB image to a grayscale image; The grayscale image is segmented using a threshold to obtain a binary image; Morphological processing is performed on the binary image to obtain a binary mask of the paper defect region; The area, perimeter, circularity, rectangularity, Euler number, and centroid coordinates are extracted sequentially from the binary mask of the paper defect area. The area, perimeter, circularity, rectangularity, Euler number, and centroid coordinates constitute the shape feature.
9. A system for detecting paper defects based on image texture analysis according to any one of claims 1-8, characterized in that, The system includes: The image acquisition module is used to acquire images of paper defects; The preprocessing module is used to denoise and enhance the paper defect image to obtain a preprocessed RGB image; The color and texture extraction module is used to extract the color features of the preprocessed RGB image, and to extract the multi-channel texture features of the preprocessed RGB image using the gray-level co-occurrence matrix method. The color features and the multi-channel texture features are then fused to form a color-texture fusion feature. The frequency domain texture extraction module is used to perform wavelet decomposition on the preprocessed RGB image, extract low-frequency texture features from the low-frequency coefficients obtained by wavelet decomposition using the gray-level co-occurrence matrix method, extract high-frequency texture features from the high-frequency coefficients obtained by wavelet decomposition using the local binary mode, and fuse the low-frequency texture features and the high-frequency texture features to obtain frequency domain-texture fusion features. The shape and texture extraction module is used to extract the shape features of the preprocessed RGB image and fuse the shape features with the multi-channel texture features to form a shape-texture fusion feature. The feature concatenation module is used to concatenate the color-texture fusion feature, the frequency domain-texture fusion feature, and the shape-texture fusion feature to obtain a fused multi-source feature vector; The paper defect classification module is used to input the preprocessed RGB image and the fused multi-source feature vector into the multimodal classification model to obtain the paper defect classification result. The multimodal classification model is based on MobileNetV3.