Image recognition method and system for non-woven fabric surface quality

By using the collaborative use of dark field correction and flat field correction in nonwoven surface detection, combined with industrial camera acquisition images and multi-scale texture analysis, the pre-trained defect classification model is used to solve the problems of low efficiency and high leakage detection rate in traditional detection technology, and high quality and high accuracy of nonwoven surface defect recognition is achieved.

CN120107248AInactive Publication Date: 2025-06-06SICHUAN KAIPU ECO-FRIENDLY PACKING PROD CO LTD

Patent Information

Application Number
CN202510577889.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional non-woven surface detection technology is low in efficiency and has high leakage detection rate, especially in the case of complex textures, it is difficult to distinguish between normal textures and defects.

Method used

The coordinated use of dark field correction and flat field correction is adopted to collect images under uniform lighting conditions through industrial cameras, perform grayscale, filtered denoising and contrast enhancement, and combine multi-scale texture analysis and wavelet transformation to identify surface defects using a pre-trained defect classification model.

Benefits of technology

It improves the quality and accuracy of non-woven surface detection, reduces leakage detection rate, and can effectively identify defects on the non-woven surface, including holes, stains and uneven fibers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107248A_ABST
    Figure CN120107248A_ABST
Patent Text Reader

Abstract

The invention relates to a non-woven fabric surface quality image recognition method and system, and belongs to the technical field of image data processing, and the method comprises the following steps: S1, collecting an original image of the surface of a non-woven fabric under a uniform illumination condition; s2, preprocessing the original image; s3, performing multi-scale texture analysis on the optimized image, extracting structural features of the surface of the non-woven fabric, and performing wavelet transform decomposition to obtain high-frequency detail information; s4, judging whether surface defects exist or not by utilizing a pre-trained defect classification model based on the structural features and the high-frequency detail information; s5, if the defect is detected, calculating the area proportion of the defect area, comparing the area proportion with a preset threshold value, and if the area proportion exceeds the preset threshold value, judging that the non-woven fabric is an unqualified product; if no defect is detected, judging that the non-woven fabric is a qualified product; s6, outputting a detection result, wherein the detection result comprises a defect position and a defect type; the non-woven fabric surface detection device has the beneficial effect of improving the non-woven fabric surface detection quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image data processing, and in particular relates to an image recognition method and system for the surface quality of non-woven fabrics. Background Art

[0002] As a new type of material that does not require spinning and weaving, but is directly made by interlacing and bonding fibers, non-woven fabrics are widely used in the fields of medical supplies (such as masks, surgical gowns), sanitary materials (such as diapers) and packaging materials because of their light weight, moisture-proof, breathable and biodegradable properties. With the continuous improvement of product quality requirements, non-woven surface defect detection has become a crucial link in the production process. Common non-woven surface defects include: stains, damage, wrinkles, fiber clumping, holes, uneven thickness and uneven edges. These defects not only affect the appearance of the product, but may also cause functional failure of the product (such as: reduced filtration performance of medical non-woven fabrics, insufficient strength of sanitary materials).

[0003] Traditional non-woven surface inspection relies on traditional image processing technology (such as threshold segmentation and edge detection), but it has problems of low efficiency and high missed detection rate. The defects of existing image processing technology include: when the surface texture of non-woven fabrics is complex, traditional algorithms have difficulty distinguishing between normal textures and defects (such as stains, holes and uneven fibers). Therefore, there is an urgent need for an image recognition method for non-woven surface quality that can normally identify defects on the surface of non-woven fabrics. Summary of the invention

[0004] The present invention provides an image recognition method and system for the surface quality of non-woven fabrics, which are used to solve the technical problem of improving the surface detection quality of non-woven fabrics. The surface detection quality of non-woven fabrics is improved by coordinated use of dark field correction and flat field correction, usually dark field correction is performed first and then flat field correction.

[0005] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0006] An image recognition method for nonwoven surface quality comprises the following steps:

[0007] Step S1: collecting an original image of the non-woven fabric surface under uniform lighting conditions using an industrial camera;

[0008] Step S2: preprocessing the original image, including grayscale conversion, filtering and denoising, and contrast enhancement, to generate an optimized image;

[0009] Step S3: performing multi-scale texture analysis on the optimized image, extracting the structural features of the non-woven fabric surface, and obtaining high-frequency detail information through wavelet transform decomposition;

[0010] Step S4: Based on the structural features and high-frequency detail information, a pre-trained defect classification model is used to determine whether there are surface defects; the pre-trained defect classification model is trained on non-woven fabric defect samples through a convolutional neural network, and the defect types include holes, stains, and fiber unevenness;

[0011] Step S5: If a defect is detected, the area ratio of the defective area is calculated and compared with a preset threshold. If it exceeds the preset threshold, the nonwoven fabric is determined to be a defective product; if no defect is detected, the nonwoven fabric is determined to be a qualified product;

[0012] Step S6: Output the detection results, including the defect location and defect type.

[0013] Optionally, in step S1, the industrial camera achieves uniform illumination through non-uniformity compensation, and the non-uniformity compensation is vignetting compensation based on polynomial fitting, specifically: ; ;in, is the brightness value after vignetting compensation, is the coordinate of the image pixel after vignetting compensation, It represents the radial distance from the optical axis of the optical system to a point on the imaging plane. It is used to quantify the distance of different positions on the imaging plane from the optical axis. The vignetting phenomenon is related to the distance from the imaging point to the optical axis. Measure the degree of vignetting effect at different positions. is the center brightness reference value, and is the coefficient that controls the decay speed; and is the image center coordinate.

[0014] Optionally, the original image is collected by: taking a uniform whiteboard image or ; Take dark field images or , the normalized data after data collection is : ; To get the maximum value of the entire matrix, for , the maximum value of the entire matrix is : , take the maximum value of all elements in the entire matrix, for all elements of the entire matrix.

[0015] Optionally, the preprocessing of the original image includes flat field correction and dark field correction. Dark field correction is to eliminate the inherent noise of the sensor, and flat field correction is to eliminate uneven illumination and sensor response differences. The coordinated use of dark field correction and flat field correction is to perform dark field correction first and then flat field correction. The formula is: ,in, For the coordination of dark field correction and flat field correction, is the original image.

[0016] Optionally, in step S2, a weighted average method is used for grayscale conversion: specifically, for grayscale conversion of a color image, each pixel is represented by three color channels: red, green, and blue. The grayscale value is obtained by weighted summing the three channels. The formula is:

[0017] ;

[0018] in, is the grayscale weighted average, R is the red channel, G is the green channel, and B is the blue channel;

[0019] For filtering and denoising, mean filtering is used to take the grayscale average of a pixel point in the image and its surrounding areas as the filtered value of the point. The filter window is:

[0020] ,in, The original image is The gray value at The filtered image is The gray value at is the filter window; the gray value of the current pixel is , the pixel gray value after offset is , Represents the pixel point with coordinates in the original image The gray value of Indicates that the filter window The gray value of all pixels in Sum the gray values ​​of pixels in the neighborhood.

[0021] Grayscale contrast Calculation:

[0022] ;

[0023] Represents the number of gray levels in the image, is the gray-level co-occurrence matrix, which describes the The gray value is The pixel and gray value are The probability of pixels appearing simultaneously is is the horizontal, vertical or diagonal direction, for double summation;

[0024] Grayscale contrast It measures the severity of local grayscale changes in the image and is obtained by calculating the weighted sum of the differences between different grayscale values ​​in the grayscale co-occurrence matrix. Reflects the gray value and grayscale value The greater the difference, the greater the contribution of contrast. Images with high contrast have obvious texture edges and larger grayscale changes.

[0025] Optionally, in step S3, multi-scale texture analysis is performed on the optimized image, using grayscale co-occurrence matrix element calculations, angular second-order moment calculations, contrast calculations, correlation calculations, and entropy calculations. Entropy represents the complexity of the image texture, wherein the larger the entropy value, the more complex the image texture and the more random the distribution of grayscale values; the smaller the entropy value, the more regular the texture and the more regular the distribution of grayscale values.

[0026] Optionally, the structural features of the non-woven surface are extracted as texture features: using the basic LBP formula:

[0027] For a pixel in the image , whose gray value is , the area centered on this point has Pixel points with coordinates , , the area radius is , the LBP operator compares the grayscale value of the central pixel with the grayscale value of the domain pixel to generate a binary code. The specific formula is as follows:

[0028] ;in, is a symbolic function , Defined as:

[0029] ;

[0030] The calculation process of this formula is to subtract the gray value of each pixel in the area from the gray value of the central pixel, and use the sign function according to the positive or negative difference. Get 0 or 1, and then these binary values ​​​​are divided according to the corresponding bit weights Perform weighted summation to obtain the LBP value of the pixel.

[0031] Optionally, in step S4, the pre-trained defect classification model is: through the calculation of the fully connected layer, all neurons in the previous layer are weighted summed and a bias term is added: Then, through the activation function Get the output;

[0032] in, Indicates The output vector of the layer neurons, each element represents the The output value of a neuron in a layer is the result of processing by the activation function of that layer; is the weight matrix, which determines the influence of the previous layer of neurons on the current layer of neurons; is the bias vector; For the The linear combination result of the layer neurons before being processed by the activation function, also called the pre-activation value;

[0033] exist In is the activation function, Layer of neurons After the activation function is processed, the The output vector of the neurons in the layer .

[0034] Optionally, in step S5, the area ratio of the defective region is calculated and compared with a preset threshold by the formula:

[0035] The area ratio formula of the defect area is: ,in is the defect area ratio, is the area of ​​the defect region, is the total area of ​​the entire detection area.

[0036] Optionally, in step S6, the test result includes: test time, non-woven fabric sample number and test equipment; the defect type includes: defect serial number, defect description, and the defect location includes: location information.

[0037] An image recognition system for nonwoven surface quality, comprising:

[0038] Computer intelligent image recognition system, which is used to automatically coordinate and process data in various modules;

[0039] Each module includes: image acquisition module, image preprocessing module, feature extraction module, classification and recognition module and result output module;

[0040] The computer intelligent image recognition system connects the image acquisition module, the image preprocessing module, the feature extraction module, the classification recognition module and the result output module.

[0041] Beneficial effects of the present invention:

[0042] 1. The present invention preprocesses the original image, including graying, filtering denoising and contrast enhancement, to generate an optimized image. The original image is preprocessed by: subtracting dark current noise from the original image, subtracting dark noise from the flat field image, obtaining a distribution pattern of system inhomogeneity, normalizing it to multiply by the average brightness of the flat field image, and restoring the absolute brightness level of the original image. Dark field correction is to eliminate the inherent noise of the sensor, and flat field correction is to eliminate uneven illumination and sensor response differences. The dark field correction and flat field correction are used in coordination, usually dark field correction is performed first, and then flat field correction is performed, to improve the surface detection quality of non-woven fabrics.

[0043] 2. The present invention performs multi-scale texture analysis on the optimized image, and adopts the calculation of grayscale co-occurrence matrix elements, the calculation of angular second-order moment, the calculation of contrast, the calculation of correlation and the calculation of entropy. Entropy represents the complexity of image texture. The larger the entropy value, the more complex the texture of the image and the more random the distribution of grayscale values; the smaller the entropy value, the more regular the texture and the more regular the distribution of grayscale values.

[0044] 3. The fully connected layer of the present invention can integrate the local features extracted by the previous convolutional layer and pooling layer to form a higher-level and more abstract feature representation. These features contain comprehensive information of the entire input data, which helps the model to better understand the input data. In the classification task, the output of the fully connected layer is usually converted into a probability distribution of each category through the Softmax function, thereby realizing the classification of the input data, and also realizing the judgment of whether there are surface defects on the surface of the non-woven fabric. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 It is a schematic diagram of the circuit structure of the present invention;

[0047] Figure 2 It is the work flow chart of the present invention. DETAILED DESCRIPTION

[0048] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0049] Embodiment 1:

[0050] like Figure 1As shown, this embodiment provides an image recognition system for the surface quality of non-woven fabrics, including: a computer intelligent image recognition system, the computer intelligent image recognition system is used to automatically coordinate and process data in various modules, each module includes: an image acquisition module, an image preprocessing module, a feature extraction module, a classification recognition module and a result output module, and the computer intelligent image recognition system is connected to the image acquisition module, the image preprocessing module, the feature extraction module, the classification recognition module and the result output module;

[0051] Image acquisition module: Use high-resolution industrial cameras, appropriate light sources and optical imaging systems to collect non-woven fabric surface images in real time on the non-woven fabric production line to ensure that the collected images clearly and accurately reflect the surface conditions of the non-woven fabrics.

[0052] Image preprocessing module: grayscale, denoise and enhance the collected images to improve image quality, reduce noise interference, highlight the feature information in the image, and facilitate subsequent analysis and processing.

[0053] Feature extraction module: Use image processing algorithms, such as edge detection, texture analysis, and morphological processing, to extract characteristic parameters of the non-woven fabric surface, such as holes, cracks, and defects in areas with uneven fiber distribution.

[0054] Classification and recognition module: Compare and analyze the extracted features with the predefined defect feature library, and use pattern recognition algorithms, such as support vector machines and neural networks, to classify and identify the surface quality of non-woven fabrics to determine whether there are defects and the type and severity of the defects.

[0055] Result output module: Display the identification results in an intuitive way, such as marking the defect location and type on the monitoring screen. At the same time, it can output reports and record relevant data on the surface quality of non-woven fabrics, so that production personnel can understand the production situation in time and make corresponding adjustments and processing.

[0056] Specific working principle: The computer intelligent image recognition system automatically coordinates and processes the data in the image acquisition module, image preprocessing module, feature extraction module, classification recognition module and result output module. Specifically, the image information of the non-woven surface is obtained through the image acquisition module, and then the image is optimized through the image preprocessing module. Next, the feature extraction module extracts key features from the preprocessed image, which can characterize various conditions on the non-woven surface. The classification recognition module uses the trained model to analyze and judge the extracted features, and matches them with known defect patterns to determine whether there are quality problems on the non-woven surface and the specific type of the problem. Finally, the result output module presents the recognition results to the operator to provide a basis for quality control of the production process.

[0057] Through the image recognition system, the surface quality of non-woven fabrics can be quickly and accurately detected, which can improve production efficiency and product quality and reduce the errors and costs of manual inspection.

[0058] Embodiment 2:

[0059] Based on Example 1, Figure 2 As shown, this embodiment provides an image recognition method for the surface quality of a non-woven fabric, comprising the following steps:

[0060] Step S1: collecting an original image of the non-woven fabric surface under uniform lighting conditions using an industrial camera;

[0061] Specifically, the preprocessing before collecting the original image of the non-woven surface:

[0062] Sample flattening: Use a vacuum adsorption platform or air flotation flattening device to eliminate non-woven fabric wrinkles (for flexible non-woven fabrics), and fix the edges of the non-woven fabric with non-reflective fixtures (such as anodized aluminum) to avoid image distortion at the edges.

[0063] Surface cleaning: Use an electrostatic eliminator to remove dust from the surface of the non-woven fabric, and use a microfiber cloth or dust-free wipe paper to clean the surface of the non-woven fabric to avoid any residual traces on the surface of the non-woven fabric.

[0064] The original image of the non-woven fabric surface is collected using the image acquisition protocol, and the image acquisition protocol is:

[0065] Trigger mode: hardware trigger synchronization (ensuring synchronization of mechanical movement and exposure);

[0066] Exposure time: determined by preliminary experiments (avoiding the trade-off between saturation and noise);

[0067] Sampling frequency: calculated according to the conveyor belt speed (satisfying the Nyquist sampling theorem);

[0068] Industrial cameras achieve uniform illumination through non-uniformity compensation (NUC). Non-uniformity compensation (NUC) is vignetting compensation based on polynomial fitting, specifically: ; ;in, is the brightness value after vignetting compensation, is the coordinate of the image pixel after vignetting compensation, It represents the radial distance from the optical axis of the optical system to a point on the imaging plane. It is used to quantify the distance of different positions on the imaging plane from the optical axis. The vignetting phenomenon is related to the distance from the imaging point to the optical axis. Measure the degree of vignetting effect at different positions, and then use this formula to calculate vignetting compensation. is the center brightness reference value (usually close to 1), and is the coefficient that controls the attenuation speed (negative value indicates brightness attenuation); and is the image center coordinate (need to be calibrated in advance).

[0069] Original image collection:

[0070] Take a uniform whiteboard image or , i.e. flat field image; take dark field image or (Completely shading); the normalized data after data collection is : ; To get the maximum value of the entire matrix, for , the maximum value of the entire matrix is , ; That is, take the maximum value of all elements in the entire matrix, the result is a scalar rather than a matrix, for all elements of the entire matrix.

[0071] Step S2: preprocessing the original image, including grayscale conversion, filtering and denoising, and contrast enhancement, to generate an optimized image;

[0072] The specific steps for obtaining a dark field image using a camera are as follows:

[0073] Equipment preparation and environment selection: Mount the camera on a stable bracket to ensure that the camera does not shake. Choose a completely dark environment, such as a dark indoor room or a remote outdoor area without lights at night to prevent any light from entering the camera lens.

[0074] Camera parameter settings: Set the camera mode to manual mode (M). Set the sensitivity (ISO). Generally, choose the camera's native low ISO value, such as 100 or 200, to reduce noise. However, if the camera performs poorly at low ISO, you can also choose a moderate ISO. Set the shutter speed according to the camera performance and subsequent processing requirements. You can try 1 / 30 second or 1 / 60 second first, and then adjust it according to the shooting effect. Set the aperture to a fixed value, such as f / 8 or f / 11.

[0075] Block the lens: Use the lens cap that comes with the camera to cover the lens tightly, or use opaque material such as thick black cloth to completely block the lens to prevent any light from entering.

[0076] Take dark-field images: Keep the camera steady and press the shutter button to take the image. You can take multiple dark-field images to improve the accuracy and reliability of the image.

[0077] Check and adjust: After shooting, check the dark field image on the camera's display screen to see if the image is too dark or too bright, or if there are obvious noise or other anomalies. If the image is not suitable, adjust the camera's parameters, such as shutter speed and ISO, and then shoot again until you get a satisfactory dark field image.

[0078] Saving and post-processing: Save the captured dark field image in a high-quality format to the camera's memory card, such as RAW format. In post-processing, you can use specialized image processing software to calibrate the dark field image with the corresponding bright field image, remove the dark current noise and fixed pattern noise in the bright field image, and improve the image quality.

[0079] The specific steps for obtaining a flat field image using a camera are as follows:

[0080] Choose a uniform scene and prepare equipment: Find a scene with uniform lighting, such as an outdoor sky on a cloudy day (avoid obvious sun or cloud shadows), a large white wall (to ensure uniform lighting). If using artificial light, place a white diffuse reflector in front of the camera and illuminate the diffuse reflector with a uniform light source. Install the camera on a tripod to ensure that the camera is stable during shooting to avoid shaking that affects the uniformity of the flat field image.

[0081] Set camera parameters: Set the camera to manual mode to fix various parameters. Set a suitable sensitivity (ISO) value, generally choose a lower ISO to reduce noise. Then, according to the light intensity of the scene, set the appropriate aperture and shutter speed combination to make the image moderately bright. These parameters should remain unchanged throughout the flat field image shooting process. Turn off automatic white balance: Set the white balance to a fixed value, such as tungsten light mode or manually set the color temperature value to prevent the camera from automatically adjusting the white balance and causing color deviation, which affects the accuracy of the flat field image.

[0082] Aim the camera at the selected uniform scene, making sure the entire frame is covered with uniform light, with no obvious shadows or highlights. Take multiple images: Take 5-10 flat-field images, and slightly move the camera position or angle while shooting to obtain flat-field images at different viewing angles to improve the accuracy of flat-field correction. At the same time, pay attention to keeping the horizontal and vertical directions of the camera consistent to avoid tilting or deformation of the image.

[0083] Original image preprocessing: Flat-field Correction: Use a blank background image to eliminate illumination unevenness, i.e. ; where the numerator is the dark current noise subtracted from the original image; the denominator is the flat-field image minus the dark noise, which gives the distribution pattern of system inhomogeneity, normalized by multiplying by the average brightness of the flat-field image, restoring the absolute brightness level of the original image, is the average value of the flat-field image signal, It is a flat-field image, that is, an image acquired under uniform illumination.

[0084] When shooting a uniform white flat panel, the high-response pixel output signal is strong, and the low-response pixel output signal is weak. When shooting a completely black scene, record a dark field image , obtained when shooting the actual target By using the flat field correction formula, The intensity difference caused by pixel response difference and uneven illumination is adjusted to make the response of each pixel close to the same, thus eliminating the uneven illumination.

[0085] By formula , the signal intensity of the original image after removing the dark current is normalized according to the signal intensity of the flat field image after removing the dark current, and finally multiplied by (average value of the flat field image signal) so that the corrected image Achieve uniform lighting effect.

[0086] Dark field correction (Dark Subtraction): subtract the camera dark current noise, that is, ,in, is the original image (including real signal and noise), It is a dark field image (containing only noise). After removing the fixed noise, the image only retains the target signal and random noise.

[0087] The preprocessing of the original image includes dark field correction and flat field correction. Dark field correction is to eliminate the inherent noise of the sensor (additive noise), and flat field correction is to eliminate uneven illumination and sensor response differences (multiplicative noise). The dark field correction and flat field correction are used in coordination. Usually, dark field correction is performed first, and then flat field correction is performed. The formula is: , It is the coordination of dark field correction and flat field correction.

[0088] The weighted average method is used for grayscale conversion: For the grayscale conversion of color images, each pixel is represented by three color channels: red (R), green (G), and blue (B), that is, R is the red channel, G is the green channel, and B is the blue channel. The grayscale value is obtained by weighted summing of the three channels. The formula is:

[0089] ;in, is the grayscale weighted average;

[0090] This method is consistent with the sensitivity of the human eye to different colors and can better preserve the visual effect of the image; considering the characteristics of different lighting conditions and image content, the weighting coefficients can be dynamically adjusted. For example, the weights of R, G, and B can be adaptively changed according to the brightness information or local contrast of the image. Assume that the average brightness of the image is , using the following adaptive weight formula:

[0091] ;

[0092] in, , and is the adjustment coefficient, It is a reference brightness value. When the image is brighter, the adaptive weight of the red channel is appropriately reduced. , increase the adaptive weight of the green channel and adaptive weights for the blue channel , to avoid color distortion in overly bright areas; when the image is dark, the opposite is true, which can better preserve the details and color perception of the image under different lighting conditions.

[0093] For filtering and denoising, mean filtering is used to take the grayscale average of a pixel point in the image and its surrounding areas as the filtered value of the point. The filter window is:

[0094] ,in, The original image is The gray value at The filtered image is The gray value at is the filter window; the gray value of the current pixel is , the pixel gray value after offset is , Represents the pixel point with coordinates in the original image The gray value of Indicates that the filter window The gray value of all pixels in Sum the gray values ​​of pixels in the neighborhood.

[0095] The filter window is for multi-channel (such as RGB color) images. Assume that the image has channel, then for the channels, , the pixel value after filtering The calculation formula is:

[0096] ;in, The original image Channels at coordinates The pixel value at .

[0097] Taking RGB images as an example, when performing mean filtering, the red channel, green channel, and blue channel are operated separately. For each pixel in the image, a pixel with a size of The window (usually And is an odd number). Then, according to the mean filter, the average value of all pixel values ​​in each channel window is calculated, and the original value of the pixel in the corresponding channel is replaced by this average value. After performing this operation on all pixels in the image, an RGB image processed by the mean filter is obtained. Since each channel is smoothed, the final image will be smoother in color and details.

[0098] Multi-channel images contain multiple channels, each channel represents different information of the image, such as the red, green, and blue channels of an RGB image, which respectively store the intensity information of the corresponding colors. These channels are combined to form a color image, and different combinations of channel values ​​determine the color of each pixel.

[0099] Window size Determines the range of the neighborhood involved in the mean calculation. And it is an odd number, so that there is a clear center pixel. For example: When the window size is smaller, the image details are better preserved, but the filtering effect may be weaker and the noise suppression effect is not obvious.

[0100] Indicates the number of channels in the image. For common RGB images, =3; if it is an RGBA image (with an transparency channel), then = 4. When performing mean filtering, each channel needs to be processed separately, that is, the same mean filtering algorithm is applied to each channel to ensure that the pixel values ​​of each channel are smoothed, thereby ensuring the color and overall effect of the image.

[0101] In addition, when performing mean filtering on edge pixels of an image, since the neighborhood of edge pixels is incomplete, some boundary processing methods need to be used, such as filling and mirroring. Different boundary processing parameters will affect the filtering effect of the edge part. For example, when using filled boundary processing, a certain number of pixels are usually filled outside the edge of the image. The values ​​of these filled pixels can be fixed values ​​(such as 0 or 255) or values ​​calculated according to certain rules. The purpose of filling is to allow edge pixels to have a complete neighborhood for mean calculation, thereby avoiding abnormal filtering effects on the edges.

[0102] The mean filter uses a fixed filter window and weight for all pixels, while the adaptive mean filter can adjust the size and weight of the filter window according to the local characteristics of the pixel. For example, for the edge area of ​​the image, a smaller filter window is used to avoid blurring the edge; for the flat area, a larger filter window is used to better remove noise. In specific implementation, the gradient of the pixel can be calculated to determine whether it is in the edge area.

[0103] Set pixel Horizontal gradient and vertical gradient It can be calculated by Sobel operator and other methods, the gradient amplitude , define a threshold ,when When , the pixel is considered to be in the edge area and a smaller filter window is used ;when When using a larger filter window At the same time, the weight can be adjusted according to the gradient direction, and a higher weight can be given to the pixels in the direction perpendicular to the gradient direction to better preserve the edge information.

[0104] For contrast enhancement, linear transformation is used: the grayscale value of the image is transformed by a linear function to enhance the contrast. The formula is: ,in, is the grayscale value of the original image, is the enhanced gray value, and is a constant, is the image contrast enhancement coefficient, which is a parameter used to adjust the image contrast. When , the image contrast is enhanced; , the image contrast decreases. Used to adjust the brightness of an image. In image processing, contrast enhancement is a common operation that increases the difference between different gray levels in an image to make the image clearer and more vivid. By multiplying a contrast enhancement coefficient, the pixel value of the image can be adjusted.

[0105] Such as: image contrast enhancement factor If it is greater than 1, the dynamic range of the image pixel value will be expanded, making the bright part of the image brighter and the dark part darker, thereby enhancing the contrast; if the image contrast enhancement coefficient If the value is between 0 and 1, the dynamic range of the pixel value will be reduced and the contrast will be reduced. Each pixel value of the image is multiplied by 1.5, that is, 1.5 times is used as the contrast enhancement factor to enhance the image contrast, which will make the difference between light and dark in the image more obvious.

[0106] Specifically, piecewise linear transformation is used: Linear transformation uniformly stretches or compresses the grayscale value of the entire image, which may cause the loss of some details. Piecewise linear transformation divides the grayscale value of the image into multiple intervals, and uses different linear transformation parameters for different intervals, so as to enhance the contrast of the image more flexibly. For example: divide the grayscale value into three intervals , and ,in, is the maximum grayscale value of the image, and Are two thresholds. Perform linear transformation in each interval:

[0107] Through reasonable selection and , ( ) value can enhance the contrast of the dark, middle and bright parts of the image to different degrees, highlighting different details of the image.

[0108] Contrast enhancement based on Retinex theory: Retinex theory believes that the color and brightness of an image are determined by the reflective properties of the object and the lighting conditions. By decomposing the image into a reflective component and an illumination component, the reflective component can be enhanced to improve the contrast and details of the image. A simple implementation method is to use a Gaussian pyramid to approximate the illumination component. First, convert the original image Get images at different scales through Gaussian filtering ,in, Then, the image at the minimum scale is used as the estimation of the illumination component . Reflection Component Can be After normalizing and enhancing the reflection component, it is combined with the illumination component to obtain the enhanced image. This method can effectively remove the influence of uneven illumination and enhance the local contrast and details of the image.

[0109] Step S3: performing multi-scale texture analysis on the optimized image, extracting the structural features of the non-woven fabric surface, and obtaining high-frequency detail information through wavelet transform decomposition;

[0110] Gray-level co-occurrence matrix element calculation: Assume the image gray level is , at a distance of In the case of is The displacement in the direction (which can be horizontal), is The displacement in the direction (which can be vertical), gray-level co-occurrence matrix The elements represent the grayscale value To grayscale value , in the direction The frequency of occurrence on , the specific formula is:

[0111] ;

[0112] in, The image is The gray value at and is the size of the image.

[0113] This formula iterates over every pixel in the image , if the gray value of the current pixel is , and in the specified direction The pixel gray value after upward shift is , then the corresponding The element value is increased by 1. In this way, the number of gray values ​​at a given distance and direction is counted. To grayscale value The number of times the pixel pairs appear is calculated to construct the gray-level co-occurrence matrix.

[0114] Energy (angular second moment ) calculation:

[0115] Specific formula: ;

[0116] Energy is the sum of the squares of each element in the gray-level co-occurrence matrix, which reflects the uniformity of the image grayscale distribution and the coarseness of the texture. If the image texture is relatively uniform, the element values ​​in the gray-level co-occurrence matrix are relatively concentrated, and the energy value will be larger; conversely, if the texture is complex, the element values ​​are dispersed, and the energy value is smaller.

[0117] Grayscale contrast Calculation:

[0118] ;

[0119] in, Represents the number of gray levels in the image, is the gray-level co-occurrence matrix, which describes the The gray value is The pixel and gray value are The probability of pixels appearing simultaneously is is the horizontal, vertical or diagonal direction, for double summation;

[0120] Grayscale contrast It measures the severity of local grayscale changes in the image and is obtained by calculating the weighted sum of the differences between different grayscale values ​​in the grayscale co-occurrence matrix. Reflects the gray value and grayscale value The greater the difference, the greater the contribution of contrast. Images with high contrast have obvious texture edges and larger grayscale changes.

[0121] For all gray level combinations , first calculate the square of the gray level difference , then multiply by the direction Probability of simultaneous occurrence , and obtain the contribution of each pair of grayscale combination contrast. Finally, all contributions are accumulated to obtain .like A large value means that there is a high probability of pixel pairs with large grayscale differences in the image, the image has strong contrast, and rich texture details; a small value means that there are more pixel pairs with small grayscale differences, the image is smoother, and the contrast is weak.

[0122] Contrast measures the severity of local grayscale changes in an image and is obtained by calculating the weighted sum of the differences between different grayscale values ​​in the gray level co-occurrence matrix. Reflects the gray value and grayscale value The greater the difference, the greater the contribution to contrast. Therefore, images with high contrast usually have obvious texture edges and larger grayscale changes.

[0123] Contrast relevance calculate:

[0124] The formula is: ,in, , , and Respectively with gray level The mean value and gray level of the correlation The mean of the correlation, is with grayscale The associated standard deviation, With grayscale The standard deviation of the correlation plays a normalization role and is used to adjust the numerical range of the numerator so that the value of the contrast correlation is in a suitable range for easy comparison and analysis. Correlated variance and grayscale Correlated variance They are:

[0125] , .

[0126] Correlation is used to measure the linear correlation between image grayscales. It takes into account the relationship between the distribution and mean of the elements in the grayscale co-occurrence matrix, and measures the degree of linear dependence between two grayscale values ​​by calculating the ratio of covariance to standard deviation. The higher the correlation value, the stronger the linear relationship between the grayscale values ​​at different positions in the image, and the texture has a certain directionality and regularity.

[0127] entropy Calculation: ;

[0128] entropy Indicates the complexity of image texture. It is based on the concept of entropy in information theory and is obtained by calculating the uncertainty of the probability distribution of elements in the gray-level co-occurrence matrix. The larger the entropy value, the more complex the texture of the image and the more random the distribution of gray values; the smaller the entropy value, the more regular the texture and the more regular the distribution of gray values.

[0129] Extract the structural features of the non-woven surface as texture features: Use the basic LBP formula:

[0130] For a pixel in the image , whose gray value is , the area centered on this point has Pixel points with coordinates , , the area radius is The LBP operator compares the grayscale value of the center pixel with the grayscale value of the area pixel to generate a binary code. The specific formula is as follows:

[0131] ;in, is a symbolic function , Defined as:

[0132] ;

[0133] The calculation process of this formula is to subtract the gray value of each pixel in the area from the gray value of the central pixel, and use the sign function according to the positive or negative difference. Get 0 or 1, and then these binary values ​​​​are divided according to the corresponding bit weights Perform weighted summation to obtain the LBP value of the pixel.

[0134] For each pixel in the area , , calculate its gray value and the gray value of the center pixel The difference .

[0135] According to the positive and negative of the difference, the sign function Convert it to 0 or 1.

[0136] Will get Binary values ​​are calculated according to the corresponding bit weights Perform weighted summation to obtain the LBP value of the pixel.

[0137] For example: In a 3×3 field ( =8, =1), the gray value of the center pixel is 10, and the grayscale values ​​of the 8 neighborhood points are , , , , , , , .

[0138] Compute the difference and determine the binary value based on the sign function:

[0139] ;

[0140] ;

[0141] ;

[0142] ;

[0143] ;

[0144] ;

[0145] ;

[0146] .

[0147] Calculate according to the above formula:

[0148] .

[0149] Wavelet transform is decomposed into: Wavelet transform is based on wavelet function, and performs multi-resolution analysis on the signal through operations such as scaling and translation, decomposing the signal at different time and frequency scales, and can provide localized information in both time domain and frequency domain. Various features of the signal can be extracted from the coefficients after wavelet decomposition for pattern recognition.

[0150] For discrete wavelet transform, For the Layer scale, The wavelet coefficients at the position, then the wavelet coefficient energy at this scale , which can be expressed as: ;

[0151] The energy of wavelet coefficients reflects the energy distribution of the signal at different scales (frequency ranges). Different scales correspond to different frequency resolutions. The low-frequency scale contains the main energy of the signal and represents the general outline and trend of the signal; the energy at the high-frequency scale is usually smaller, corresponding to the detailed information and rapidly changing parts of the signal. By analyzing the distribution of wavelet coefficient energy at various scales, we can understand how the energy of the signal is distributed among different frequency components, thereby revealing the frequency characteristics of the signal, which can be used as a feature of the signal to distinguish different types of signals or identify specific patterns in the signal. In image recognition, images of different objects have different wavelet coefficient energy distribution characteristics after wavelet transform, and these characteristics can help computers recognize different objects. In speech signal processing, the energy distribution of wavelet coefficients of different speech is also different, which can be used for speech recognition and classification.

[0152] Signal denoising: In the wavelet domain, noise usually has a higher frequency, and its energy is mainly distributed in the wavelet coefficients of the high-frequency scale. The energy of the useful signal is mainly concentrated in the low-frequency and part of the medium-frequency scale. By setting a threshold, setting the high-frequency wavelet coefficients less than the threshold to zero, and then using the remaining wavelet coefficients to reconstruct the signal, the noise can be effectively removed while retaining the main features of the signal. In this process, the distribution characteristics of the wavelet coefficient energy provide an important basis for denoising, helping to determine the appropriate threshold and denoising strategy.

[0153] Data compression: Since most of the energy of the signal is concentrated in a few important wavelet coefficients, the wavelet coefficients can be quantized and encoded, retaining only the coefficients with larger energy and discarding those that contribute less to the signal energy. In this way, data compression can be achieved without losing too much signal information. The calculation of wavelet coefficient energy helps to determine which coefficients are important and need to be retained, thereby improving compression efficiency and the quality of restored signals.

[0154] Step S4: Based on the structural features and high-frequency detail information, a pre-trained defect classification model is used to determine whether there are surface defects; the pre-trained defect classification model is trained on non-woven fabric defect samples through a convolutional neural network, and the defect types include holes, stains, and fiber unevenness (cracks);

[0155] Specific training method of the pre-trained defect classification model (optimization algorithm-Adam optimizer):

[0156] First, at the time , calculate the current gradient First moment estimate (mean) of and the second moment estimate (uncorrected variance) :

[0157] ;in, is the exponential decay rate of the first-order moment estimate, usually taken as 0.9. According to this formula, In fact, it is a weighted average of past gradients, focusing more on recent gradient information.

[0158] ;in, is the exponential decay rate of the second-order moment estimate, which is generally taken as 0.999. It is a weighted average of the squared gradients and is used to estimate the variance of the gradient.

[0159] because, and There will be deviations in the initial stage, which need to be corrected:

[0160] Corrected first moment estimate ;in, The exponential of the first-order moment estimate at time The decay rate of

[0161] Corrected second moment estimate ;in, The exponential of the second-order moment estimate at time The decay rate.

[0162] Finally, the model parameters are updated based on the corrected first-order moment estimate and second-order moment estimate. :

[0163] ,in, is the learning rate, is a small constant, usually set to , which is used to prevent the denominator from being zero. Through the optimization algorithm-Adam optimizer, the update step size of the parameters is adjusted according to the current gradient information and the statistical information of the historical gradient, so that the parameters can converge to the optimal value faster.

[0164] Learning rate (usually expressed as The learning rate is expressed as (): determines the step size of the model parameter update. The initial value can generally be set between 0.001 and 0.01, and the specific value needs to be adjusted according to different tasks and data. If the learning rate is too large, the model may not converge or even diverge, while if the learning rate is too small, the training process will become very slow.

[0165] Exponential decay rate of first-order moment estimates : The first-order moment estimate (mean) used to calculate the gradient is usually set to 0.9. This parameter controls the weight of past gradient information in the current estimate. The closer it is to 1, the more importance is attached to past gradient information.

[0166] Exponential decay rate of second-order moment estimate : The second moment estimate (not variance corrected) used to compute the gradient, typically set to 0.999. The closer it is to 1, the smoother the second-order moment estimate is, and the better it can estimate the variance of the gradient.

[0167] Small constant to prevent the denominator from being zero : Usually set to Its function is to avoid the situation where the denominator is zero when calculating the update step size, thus ensuring the stability of the algorithm.

[0168] The default values ​​of the parameters can achieve good results in most cases, but in practical applications, you may need to fine-tune them according to specific problems and datasets to obtain better model performance and training results.

[0169] Improve the adaptability of the pre-trained defect classification model to different types of non-woven fabrics: This can be done through data enhancement. During the training process of the pre-trained model, image data enhancement techniques for different types of non-woven fabrics are added, such as rotation, scaling, translation, and noise addition, to simulate various situations that may occur in actual production and increase the adaptability of the model to different appearance features.

[0170] The specific operation method of rotation is to rotate the non-woven fabric image at a certain angle, such as 90°, 180° or any other angle. This simulates the different placement angles or shooting angles that non-woven fabrics may have in the actual production process. This enables the model to learn the characteristics of defects at different angles, enhance the model's adaptability to changes in defect direction, avoid the model being sensitive only to defects at specific angles, and improve the robustness of the model.

[0171] The specific operation method of scaling is to enlarge or reduce the image. You can scale it at a fixed ratio, such as enlarging the image by 1.5 times or reducing it by 0.5 times, or you can scale it randomly within a certain range. Simulate the performance of defects at different sizes. Because in actual inspection, the size of the defect in the image may be different due to the accuracy of the inspection equipment and the detection distance. Through the scaling operation, the model can learn the defect characteristics at different scales, which helps to improve the model's ability to recognize defects of different sizes and prevent the model from overfitting to defects of a specific size.

[0172] The specific operation method of translation is to translate the image horizontally or vertically. The moving distance can be fixed or random. Simulate the distribution of defects in different positions on the non-woven fabric. In actual production, defects may appear at any position of the non-woven fabric. Through translation operation, the model can learn the characteristics of defects at different positions, enhance the model's adaptability to changes in defect positions, and improve the model's ability to detect defects at any position in the image.

[0173] The specific operation method of adding noise is to add various types of noise to the image, such as Gaussian noise and salt and pepper noise. The intensity of the noise can be adjusted according to the actual situation. Simulate the interference factors that may be encountered during the actual shooting process, such as equipment noise and uneven light. Enable the model to learn the characteristics of identifying defects in the presence of noise interference, improve the model's anti-interference ability and generalization ability, and enable it to better cope with various complex image acquisition environments in practical applications.

[0174] The pre-trained defect classification model is: through the calculation of the fully connected layer, all neurons in the previous layer are weighted summed and the bias term is added: Then, through the activation function The output is, Indicates The output vector of the layer neurons, each element represents the The output value of a neuron in a layer is the result of processing by the activation function of that layer. is the weight matrix, and the row number corresponds to The number of neurons in the layer, and the number of columns corresponds to the The number of neurons in the layer, each element in the matrix Indicates that from Layer Neuron to Layer The weights determine the influence of the neurons in the previous layer on the neurons in the current layer.

[0175] is the bias vector. Its dimension is the same as The number of neurons in each layer is the same. The bias term can be understood as a learnable constant added to the neuron, making the activation of the neuron easier or more difficult, increasing the fitting ability of the model.

[0176] For the The linear combination result of the layer neurons before being processed by the activation function, also called the pre-activation value.

[0177] in addition, In is the activation function, Layer of neurons After the activation function is processed, the The output vector of the neurons in the layer .

[0178] The specific calculation process is:

[0179] Assume that the input of the fully connected layer is a length Vector , this layer has neurons. Each neuron has a corresponding weight vector (Length is ) and a bias ( ).

[0180] For neurons, the weighted sum of their inputs It can be calculated by the following formula:

[0181] ;

[0182] in, It is The neurons in the previous layer In order to calculate the dot product of the weight vector and the input vector, the weight vector Transpose and get a The row vector of .so, and We can perform matrix multiplication and finally get a scalar .

[0183] The calculation results of all neurons are combined and expressed in matrix form as follows:

[0184] here, is a The weight matrix of OK ; is the bias vector; is the linear output of the fully connected layer.

[0185] Usually, in order to introduce nonlinearity, Apply an activation function , and get the final output : ; Common activation functions include ReLU, Sigmoid and Tanh.

[0186] The fully connected layer can integrate the local features extracted by the previous convolutional layer and pooling layer to form a higher-level and more abstract feature representation. These features contain comprehensive information of the entire input data, which helps the model better understand the input data. In the classification task, the output of the fully connected layer is usually converted into a probability distribution of each category through the Softmax function, thereby realizing the classification of the input data. In the formula related to the fully connected layer, Represents the transpose operation of a matrix.

[0187] Matrix form calculated from the fully connected layer as a whole Let’s see:

[0188] yes The weight matrix here is is the number of neurons in the fully connected layer, is the number of neurons in the previous layer. Each row of the matrix Representative The transpose of the weight vector corresponding to each neuron. yes The input vector. yes The output vector of .

[0189] In this matrix multiplication, the weight matrix Each weight vector has been transposed, so it can be directly compared with the input vector Multiply them together to get the weighted sum vector of each neuron in the fully connected layer .

[0190] Training on non-woven fabric defect samples is cross entropy (Categorical Cross-Entropy) is:

[0191] ;

[0192] in, is the number of defect categories (such as holes, stains and cracks); One-hot encoded labels; Predict samples for the model Belongs to category probability; is the number of defective samples of non-woven fabrics; the sample statistics of specific defect categories are as follows in Table 1:

[0193] Table 1 / Statistics of defect categories

[0194]

[0195] Table 1 shows the number of holes, stains, cracks and total defects for batches 1 to 4.

[0196] Step S5: If a defect is detected, the area ratio of the defective area is calculated and compared with a preset threshold. If it exceeds the preset threshold, the nonwoven fabric is determined to be a defective product; if no defect is detected, the nonwoven fabric is determined to be a qualified product;

[0197] Calculate the area ratio of the defective area and compare it with the preset threshold, involving the following key formulas:

[0198] Defect area ratio formula: ,in is the defect area ratio, is the area of ​​the defect region, is the total area of ​​the entire detection area.

[0199] Compare the area ratio of the defective area with the preset threshold: With preset threshold For comparison, if , it means that the defect area ratio exceeds the preset threshold; if , it means that the defect area ratio does not exceed the preset threshold; if , it means that the defect area ratio is exactly equal to the preset threshold.

[0200] The preset threshold is obtained through industry standards and experimental verification, that is, referring to ISO, ASTM international standards or industry association specifications, conducting simulation experiments in combination with the company's own product characteristics, and determining the preset threshold through destructive testing and functional testing.

[0201] The following is a table of preset threshold parameters for holes, stains, and fiber unevenness in the sorted non-woven fabrics, as shown in Table 2:

[0202] Table 2 / Preset threshold parameters for non-woven fabric holes, stains, and fiber unevenness

[0203]

[0204] Table 2 contains preset threshold parameters for holes, preset threshold parameters for stains, and preset threshold parameters for fiber unevenness.

[0205] In practical applications, the defect area is calculated The method will vary depending on the specific situation. For example, in digital image processing, the area of ​​the defect area can be estimated by counting the number of white pixels (representing the defect area) in the binary image; for regular-shaped defects, the area can also be calculated by measuring its geometric dimensions and using the corresponding geometric formula. The total area of ​​the entire inspection area Usually it can be determined according to the setting of the detection range or the size of the image.

[0206] Step S6: Output the detection results, including the defect location and defect type.

[0207] Basic information about the test:

[0208] Testing time: record the specific time when the test is conducted so as to trace the timeliness and batch information of the test results.

[0209] Non-woven fabric sample number: Each sample has a unique number, which is used to identify the information of the non-woven fabric in terms of production batch, source, etc., to facilitate subsequent inquiries and analysis of related issues of specific samples.

[0210] Testing equipment: clearly specify the name and model of the testing equipment used. Different equipment may have different testing accuracy and principles.

[0211] Defect type and location information:

[0212] Defect serial number: Each defect is numbered to facilitate the individual identification and description of different defects in the report, and to facilitate the statistics of the number and distribution of defects.

[0213] Defect type: clearly indicate the specific types of defects on the surface of non-woven fabrics. For example, holes may be caused by loose fiber interweaving or foreign matter penetration during the production process; stains may be caused by raw material pollution, unclean production environment or contamination by other substances during processing; fiber bundle agglomeration is caused by insufficient dispersion of fibers during combing or laying; wrinkles may be caused by factors such as uneven tension during molding, pulling or winding.

[0214] Defect location: With the upper left corner of the sample as the origin, the horizontal and vertical coordinates are used to accurately indicate the location of the defect on the non-woven fabric. This allows the defect to be accurately located, which is of great significance for subsequent analysis of the causes of the defect and the links where problems may occur on the production line. At the same time, it is also convenient to quickly find the corresponding location when further observation or treatment of the defect is required.

[0215] Defect description: Describe the characteristics of the defect in detail, such as the diameter of the hole, the shape and area of ​​the stain, the diameter and protrusion of the fiber bundle, the extension direction and length of the wrinkles, etc. These descriptions can more comprehensively reflect the situation of the defect, help technicians accurately judge the severity of the defect and its impact on product performance, and take corresponding measures to improve it.

[0216] The total number of defects found in this test gives the report users an intuitive understanding of the overall situation. At the same time, it is recommended to adjust and optimize the production process according to the defect situation. For example, if a large number of hole defects are found, it may be necessary to check the quality of the fiber raw materials and whether the combing process is reasonable; if the stain problem is prominent, it is necessary to pay attention to the cleanliness of the production environment and the storage conditions of the raw materials. By improving the production process in a targeted manner, the probability of defects can be effectively reduced and the product quality of non-woven fabrics can be improved.

[0217] The specific output test results are shown in Table 3 below:

[0218] Table 3 / Test results of defect location and defect type

[0219]

[0220] Table 3 contains the defect type, defect location and defect description for each defect number.

[0221] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An image recognition method for the surface quality of a nonwoven fabric, characterized in that: The steps include: Step S1: collecting an original image of the non-woven fabric surface under uniform lighting conditions using an industrial camera; Step S2: preprocessing the original image, including grayscale conversion, filtering and denoising, and contrast enhancement, to generate an optimized image; Step S3: performing multi-scale texture analysis on the optimized image, extracting the structural features of the non-woven fabric surface, and obtaining high-frequency detail information through wavelet transform decomposition; Step S4: Based on the structural features and high-frequency detail information, a pre-trained defect classification model is used to determine whether there are surface defects; the pre-trained defect classification model is trained on non-woven fabric defect samples through a convolutional neural network, and the defect types include holes, stains, and fiber unevenness; Step S5: If a defect is detected, the area ratio of the defective area is calculated and compared with a preset threshold. If it exceeds the preset threshold, the nonwoven fabric is determined to be a defective product; If no defects are detected, the nonwoven fabric is judged to be qualified; Step S6: Output the detection results, including the defect location and defect type.

2. The image recognition method for the surface quality of a nonwoven fabric according to claim 1, characterized in that: In step S1, the industrial camera achieves uniform illumination through non-uniformity compensation, and the non-uniformity compensation is vignetting compensation based on polynomial fitting, specifically: ; ;in, is the brightness value after vignetting compensation, is the coordinate of the image pixel after vignetting compensation, It represents the radial distance from the optical axis of the optical system to a point on the imaging plane. It is used to quantify the distance of different positions on the imaging plane from the optical axis. The vignetting phenomenon is related to the distance from the imaging point to the optical axis. Measure the degree of vignetting effect at different positions. is the center brightness reference value, and is the coefficient that controls the decay speed; and is the image center coordinate.

3. The image recognition method for the surface quality of a nonwoven fabric according to claim 2, characterized in that: The original image is collected by: shooting a uniform whiteboard image or ; Take dark field images or , the normalized data after data collection is : ; To get the maximum value of the entire matrix, for , the maximum value of the entire matrix is : , take the maximum value of all elements in the entire matrix, for all elements of the entire matrix; The preprocessing of the original image includes flat field correction and dark field correction. The dark field correction is to eliminate the inherent noise of the sensor, and the flat field correction is to eliminate uneven illumination and sensor response differences. The coordinated use of dark field correction and flat field correction is to perform dark field correction first and then perform flat field correction. The formula is: ,in, For the coordination of dark field correction and flat field correction, is the original image.

4. The image recognition method for the surface quality of a nonwoven fabric according to claim 1, characterized in that: In step S2, the grayscale is converted by weighted average method: specifically, the grayscale of a color image is converted, each pixel is represented by three color channels: red, green, and blue. The grayscale value is obtained by weighted summing the three channels. The formula is: ; in, is the grayscale weighted average, R is the red channel, G is the green channel, and B is the blue channel; For the filtering and denoising, mean filtering is used to take the grayscale average of a pixel point in the image and the pixels in its surrounding area as the filtered value of the point. The filter window is: ,in, The original image is The gray value at The filtered image is The gray value at is the filter window; the gray value of the current pixel is , the pixel gray value after offset is , Represents the pixel point with coordinates in the original image The gray value of Indicates that the filter window The gray value of all pixels in Sum the gray values ​​of pixels in the neighborhood. Grayscale contrast Calculation: ; Represents the number of gray levels in the image, is the gray-level co-occurrence matrix, which describes the The gray value is The pixel and gray value are The probability of pixels appearing simultaneously is is the horizontal, vertical or diagonal direction, for double summation; Grayscale contrast It measures the severity of local grayscale changes in the image and is obtained by calculating the weighted sum of the differences between different grayscale values ​​in the grayscale co-occurrence matrix. Reflects the gray value and grayscale value The greater the difference, the greater the contribution of contrast. Images with high contrast have obvious texture edges and larger grayscale changes.

5. The image recognition method for the surface quality of a nonwoven fabric according to claim 1, characterized in that: In step S3, multi-scale texture analysis is performed on the optimized image, using grayscale co-occurrence matrix element calculations, angular second-order moment calculations, contrast calculations, correlation calculations, and entropy calculations. Entropy represents the complexity of image texture, wherein the larger the entropy value, the more complex the texture of the image and the more random the distribution of grayscale values; the smaller the entropy value, the more regular the texture and the more regular the distribution of grayscale values.

6. The image recognition method for the surface quality of nonwoven fabric according to claim 5, characterized in that: The structural features of the non-woven fabric surface are extracted as texture features: Using the basic LBP formula: For a pixel in the image , whose gray value is , the area centered on this point has Pixel points with coordinates , , the area radius is , the LBP operator compares the grayscale value of the central pixel with the grayscale value of the domain pixel to generate a binary code. The specific formula is as follows: ;in, is a symbolic function , Defined as: ; The calculation process of this formula is to subtract the gray value of each pixel in the area from the gray value of the central pixel, and use the sign function according to the positive or negative difference. Get 0 or 1, and then these binary values ​​​​are divided according to the corresponding bit weights Perform weighted summation to obtain the LBP value of the pixel.

7. The image recognition method for the surface quality of nonwoven fabric according to claim 1, characterized in that: In step S4, the pre-trained defect classification model is: through the calculation of the fully connected layer, all neurons in the previous layer are weighted summed and a bias term is added: Then, through the activation function Get the output; in, Indicates The output vector of the layer neurons, each element represents the The output value of a neuron in a layer is the result of processing by the activation function of that layer; is the weight matrix, which determines the influence of the previous layer of neurons on the current layer of neurons; is the bias vector; For the The linear combination result of the layer neurons before being processed by the activation function, also called the pre-activation value; exist In is the activation function, Layer of neurons After the activation function is processed, the The output vector of the neurons in the layer .

8. The image recognition method for the surface quality of nonwoven fabric according to claim 1, characterized in that: In step S5, the area ratio of the defective area is calculated and compared with the preset threshold value using the formula: The area ratio formula of the defect area is: ,in is the defect area ratio, is the area of ​​the defect region, is the total area of ​​the entire detection area.

9. The image recognition method for the surface quality of nonwoven fabric according to claim 1, characterized in that: In the step S6, the detection result includes: detection time, non-woven fabric sample number and detection equipment; the defect type includes: defect serial number, defect description, and the defect location includes: location information.

10. An image recognition system for nonwoven surface quality, used to execute an image recognition method for nonwoven surface quality according to any one of claims 1 to 9, characterized in that: include: A computer intelligent image recognition system, which is used to automatically coordinate and process data in various modules; The modules include: image acquisition module, image preprocessing module, feature extraction module, classification and recognition module and result output module; The computer intelligent image recognition system is connected to the image acquisition module, the image preprocessing module, the feature extraction module, the classification recognition module and the result output module.

Citation Information

Patent Citations

  • Product edge defect detection method

    CN113450307A

  • Textile quality detection method fusing multi-scale features

    CN119444670A

  • Non-woven fabric quality detection method

    CN119624955A

Cited By

  • Non-woven fabric surface defect detection method and system

    CN120807498A

  • Non-woven fabric quality detection method and system based on image recognition and AI analysis

    CN120953199A

  • A Method and System for Nonwoven Fabric Quality Inspection Based on Image Recognition and AI Analysis

    CN120953199B

  • Textile automatic production line control system and method based on Internet of Things

    CN121068600A

  • Non-woven fabric quality online detection method and system

    CN121120562A