A Nonwoven Fabric Image Segmentation System Based on Edge Computing
The image segmentation system based on edge computing solves the segmentation accuracy problem caused by fiber texture and weight fluctuations in nonwoven fabric image segmentation, achieves high-precision abnormal region segmentation and contour extraction, reduces false positive and false negative segmentation rates, and meets the real-time segmentation requirements of industrial scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG ATONGMU TECHNOLOGY CO LTD
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing nonwoven fabric image segmentation technologies are susceptible to interference from random fiber textures and production weight fluctuations. It is difficult to achieve the same level of segmentation accuracy for both shallow and deep abnormal regions, resulting in high false positive and false negative segmentation rates, which cannot meet the high-precision segmentation requirements in industrial scenarios.
An edge computing-based image segmentation system is adopted, which includes an image acquisition module for pixel-by-pixel brightness correction, a candidate region generation module for maintaining a dynamic background template for background subtraction, a multi-scale parallel segmentation module for differential segmentation of shallow and deep abnormal regions, and a fiber structure feature library for segmentation and contour extraction of effective target regions.
It achieves high-precision and robust segmentation of non-woven fabric images, significantly reduces false positive and false negative segmentation rates, adapts to the real-time segmentation requirements of high-speed and complex images in industrial scenarios, and improves the integrity of abnormal region boundaries and positioning accuracy.
Smart Images

Figure CN122493060A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital image processing technology, and more specifically to a nonwoven fabric image segmentation system based on edge computing. Background Technology
[0002] Nonwoven fabrics rely on the disordered stacking of fibers to form a loose three-dimensional structure. During continuous industrial production, the material's texture exhibits obvious random undulations. Furthermore, influenced by raw material conditions and production processes, the weight of the roll material often fluctuates dynamically, leading to continuous changes in the product's light transmittance, posing a significant challenge to subsequent image segmentation. Currently, the industry commonly uses conventional image segmentation algorithms to extract abnormal regions on the surface of nonwoven fabrics. These algorithms primarily rely on differences in image grayscale to distinguish between normal background areas and abnormal areas. Because normal fiber clusters, texture undulations, and various abnormal regions highly overlap in grayscale representation, the algorithm is prone to missegmenting normal textures as abnormal regions, generating numerous false positives. Simultaneously, the background model update speed used in existing image segmentation schemes is limited, making it difficult to adapt to the slow changes in production conditions in real time. It also easily includes slowly changing abnormal region pixels incorrectly in the background template, further causing widespread false positives and false negatives. Moreover, traditional segmentation methods mostly use a single fixed threshold for abnormal region extraction, failing to simultaneously adapt to deep and shallow abnormal regions with significant differences in morphology and features. Increasing the segmentation sensitivity exacerbates missegmentation due to fiber texture noise; conversely, decreasing the segmentation sensitivity misses shallow abnormalities such as thin paste blocks and slight color differences, creating significant segmentation blind spots. The overall segmentation accuracy and adaptability are insufficient to meet the demands of real-time, high-precision segmentation of nonwoven fabric images in industrial settings. Therefore, to overcome these limitations, this invention proposes a nonwoven fabric image segmentation system based on edge computing. Summary of the Invention
[0003] To address the shortcomings of existing technologies, the present invention aims to provide a nonwoven fabric image segmentation system based on edge computing, which solves the problems of existing nonwoven fabric image segmentation technologies being susceptible to interference from random fiber textures and production weight fluctuations, difficulty in achieving accurate segmentation of shallow and deep abnormal regions, and high false positive and false negative segmentation rates.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A nonwoven fabric image segmentation system based on edge computing, comprising:
[0006] The image acquisition module is used to acquire the detection image of the non-woven fabric to be processed, and to perform pixel-by-pixel linear brightness correction to generate a normalized image;
[0007] The candidate region generation module is used to maintain a dynamically updated background template. By performing background difference operation between the current normalized image and the background template, a grayscale difference map is obtained, potential abnormal pixels are identified, and connected component analysis and morphological dilation processing are performed to divide the candidate regions to be segmented.
[0008] The multi-scale parallel segmentation module is used to extract the fiber structure features of the corresponding candidate regions according to the type of potential abnormal pixels. Combined with the fiber structure statistical feature library, it selects the effective target regions to be segmented. Then, it adopts a multi-scale parallel segmentation architecture for shallow and deep abnormal regions to segment and extract the contours of the effective target regions to be segmented, and outputs the contours of the effective target regions to be segmented.
[0009] Specifically, the steps of employing a multi-scale parallel segmentation architecture for shallow and deep anomalies to segment and extract contours of the effective target region to be segmented, and outputting the contours of the effective target region to be segmented, include:
[0010] Retrieve each effective target region to be segmented and quantify the shallow and deep abnormal region features of the effective target regions to be segmented. The shallow and deep abnormal region features include the effective pixel area of the region, the average gray level difference, and the distribution density of abnormal pixels.
[0011] Retrieve a preset set of threshold values for deep and shallow anomalies, and divide the effective target region into deep and shallow anomalies based on the characteristics of the deep and shallow anomalies.
[0012] Based on the physical dimensions of the minimum bounding rectangles of deep and shallow anomaly regions, multi-scale analysis windows are set for deep and shallow anomaly regions respectively.
[0013] The multi-scale analysis window bound to the deep anomaly region and the shallow anomaly region are invoked respectively. A differentiated parallel segmentation strategy is used to traverse all pixels in the effective target region to be segmented, perform pixel-level segmentation marking, and obtain the contour of the effective target region to be segmented.
[0014] Specifically, the steps of using a differentiated parallel segmentation strategy to traverse all pixels within the effective target region to be segmented and performing pixel-level segmentation marking include:
[0015] For deep anomaly regions, the bound multi-scale analysis window is enabled, and a pixel-by-pixel parallel scan of the entire region is performed. The pixel grayscale distribution, local gradient changes and fiber edge orientation extracted from each analysis window are fused, and pixel-level segmentation and labeling of the deep anomaly region are performed to obtain the contour of the deep anomaly region.
[0016] For shallow anomaly regions, the bound multi-scale analysis window is enabled, and a full-area pixel-by-pixel parallel scan is performed. The effective pixels of the shallow anomaly region are identified by multi-scale neighborhood pixel correlation determination, and pixel-level segmentation and labeling of the shallow anomaly region are performed to obtain the contour of the shallow anomaly region.
[0017] Specifically, the steps for performing pixel-level segmentation and labeling of deep anomaly regions include:
[0018] All multi-scale analysis windows simultaneously perform sliding scans on the deep anomaly region, outputting pixel grayscale statistical parameters within the corresponding spatial range, which are used to calculate the global adaptive segmentation threshold for the deep anomaly region.
[0019] Pixels whose grayscale value differs from the mean grayscale value of the background template by more than the global adaptive segmentation threshold are marked as main pixels of deep anomaly regions.
[0020] Taking the main pixel of the deep anomaly region as the core, the boundary transition zone is formed by expanding outward. The boundary transition zone is slid-scanned through a multi-scale analysis window, and the gray-level gradient magnitude and direction of all pixels in the boundary transition zone are calculated to identify the boundary of the deep anomaly region.
[0021] Extract the fiber edge direction within each analysis window, statistically analyze the dominant fiber arrangement direction within the deep anomaly region, and interpolate and connect the boundary pixels of the deep anomaly region with breakpoints along the dominant fiber direction to obtain the contour of the deep anomaly region.
[0022] Specifically, the steps of identifying valid pixels in shallow anomaly regions through multi-scale neighborhood pixel association and performing pixel-level segmentation and labeling of shallow anomaly regions include:
[0023] All analysis windows perform pixel-by-pixel sliding scans centered on the current pixel, calculating the grayscale deviation and texture density deviation between the current pixel and the average grayscale value of normal background pixels within the neighborhood covered by the corresponding analysis window, and identifying suspected abnormal pixels.
[0024] For all suspected anomalous pixels, multi-scale analysis windows are used sequentially to perform multi-scale neighborhood association verification, count the number of other suspected anomalous pixels in the neighborhood of each suspected anomalous pixel in the corresponding analysis window, and identify effective shallow anomalous pixels.
[0025] The analysis window with the largest coverage area is used to perform region aggregation verification on all valid shallow anomalous pixels, merge them into anomalous sub-regions, and perform region correction to form the outline of the shallow anomalous region.
[0026] Specifically, the steps for identifying candidate regions to be segmented include:
[0027] Perform pixel-by-pixel gray-level difference operation between the current normalized image and the updated background template to obtain a gray-level difference map;
[0028] For the grayscale difference map, based on the preset difference threshold and the grayscale gradient consistency and continuity discrimination within the preset local analysis window, potential abnormal pixels are identified, and a grayscale difference marker map with potential abnormal pixel type labels is generated; the types of potential abnormal pixels include discrete suspicious pixels and structural abnormal pixels;
[0029] Connectivity traversal analysis is performed on potential abnormal pixels within the grayscale difference marker image. Based on the spatial adjacency relationship and the consistency rule of potential abnormal pixel type, potential abnormal pixels are merged into independent connected regions to generate initial candidate regions. Morphological dilation processing is then performed to obtain the final candidate regions.
[0030] Specifically, the steps for identifying potential anomalous pixels and generating a grayscale difference marker map with potential anomalous pixel type labels include:
[0031] Traverse every pixel in the grayscale difference image, compare the absolute value of the grayscale difference with the preset difference threshold, and identify normal background pixels and first-class candidate pixels.
[0032] Centered on the first type of candidate pixel, a local neighborhood set is constructed according to the preset size parameters of the local analysis window;
[0033] The gradient of the gray-level difference values of all pixels in the local neighborhood set is calculated to obtain the gray-level gradient variance in the local neighborhood set. Combined with the preset gradient stability threshold, the first type of candidate pixels are divided into discrete suspicious pixels and structurally abnormal pixels.
[0034] The total number of discrete suspicious pixels within a preset local analysis window is counted for each discrete suspicious pixel. This count is used to determine whether the corresponding discrete suspicious pixel is an isolated noise pixel. If so, the corresponding discrete suspicious pixel is removed.
[0035] Based on normal background pixels, structurally abnormal pixels, and discrete suspicious pixels, a grayscale difference marker map with potential abnormal pixel type labels is generated.
[0036] Specifically, the steps for selecting valid target regions to be segmented include:
[0037] Read each candidate region one by one, and take the smallest bounding rectangle of the candidate region as the boundary to extract a local image patch from the normalized image as the target image region of the candidate region.
[0038] The extraction dimensions are divided according to the potential abnormal pixel types of the candidate region, and the fiber structure features of the target image region are extracted. The fiber structure features include structural features and subtle features.
[0039] Retrieve the preset fiber structure statistical feature library, compare the fiber structure features extracted from the current target image region with the normal threshold range of the corresponding fiber structure features in the fiber structure statistical feature library one by one, and calculate the feature deviation value of the candidate region.
[0040] If the feature deviation value of the candidate region is less than the preset normal texture threshold, the current candidate region is determined to be a normal texture fluctuation region; otherwise, the current candidate region is determined to be a valid target region to be segmented.
[0041] Traverse all candidate regions, complete the judgment of all candidate regions, and form a set of valid target regions to be segmented.
[0042] Specifically, the steps for extracting fiber structure features of the target image region include:
[0043] For candidate regions containing structurally anomalous pixels, structural features of the target image region are extracted. These structural features include the magnitude of gray-level abrupt changes in the region, the abrupt change rate of local texture structure, and edge gradient features.
[0044] The amplitude of the gray-level change in the region is obtained by calculating the absolute difference between the average gray-level value of all pixels in the target image region and the average gray-level value of the surrounding normal background pixels; the local texture structure change rate is obtained by calculating the gray-level gradient value in the target image region pixel by pixel and statistically analyzing the proportion of pixels whose gray-level gradient value is greater than a preset normal texture gradient threshold; the edge gradient feature is obtained by extracting the gray-level gradient values of all pixels on the boundary line of the target image region and calculating the arithmetic mean.
[0045] Specifically, the steps for extracting the fiber structure features of the target image region also include:
[0046] For candidate regions containing discrete suspicious pixels, extract subtle features, including texture density variance, grayscale gradient uniformity, and abnormal pixel dispersion.
[0047] The texture density variance is obtained by dividing the target image region into multiple non-overlapping neighborhoods with the same size as the preset texture neighborhood, calculating the average gray value of each neighborhood, and then calculating the variance of the average gray values of all neighborhoods; the gray level gradient uniformity is obtained by linearly fitting the horizontal and vertical gray level distributions of the target image region, calculating the horizontal and vertical direction fitting determination coefficients, and taking the minimum value; the abnormal pixel dispersion is obtained by calculating the mean of the Euclidean distance between each pair of spatial coordinates of all potential abnormal pixels, and then normalizing it by dividing it by the length of the diagonal of the circumscribed rectangle of the target image region.
[0048] Specifically, the steps for calculating the feature deviation value of the candidate region include:
[0049] Based on the current nonwoven fabric roll number, the median value of the normal threshold range of each fiber structure feature is retrieved from the fiber structure statistical feature library and used as the standard feature value.
[0050] Based on the standard feature value, the single fiber structure feature deviation is normalized for each extracted fiber structure feature, and the single fiber structure feature deviation value is mapped to the interval between 0 and 1.
[0051] If any single fiber structure feature deviation value is greater than or equal to the preset single feature anomaly threshold, then the candidate region feature deviation value is set to 1;
[0052] Otherwise, assign fiber structure feature weights based on the types of potentially anomalous pixels contained in the candidate region;
[0053] The feature deviation values of each single fiber structure feature are multiplied by the corresponding fiber structure feature weights and then summed to obtain the feature deviation values of the candidate region.
[0054] Specifically, the steps for generating a normalized image include:
[0055] Retrieve the reference brightness parameter that matches the current roll material, the reference brightness parameter including the global reference average brightness value;
[0056] Real-time acquisition of detection images of the non-woven fabric surface, and synchronous completion of acquisition timestamp marking and spatial position calibration for each frame of detection image;
[0057] Perform global grayscale statistics on the current frame detection image to calculate the actual average brightness value of the current frame detection image;
[0058] A linear brightness transformation coefficient is constructed based on the global baseline average brightness value and the actual average brightness value. The pixel-by-pixel brightness adjustment is performed on the current frame detection image based on the linear brightness transformation coefficient to complete the first-level brightness normalization process.
[0059] Based on the first-level brightness normalization processing, edge region recognition and local brightness compensation processing are performed on the current frame detection image to obtain a normalized image.
[0060] Specifically, the steps for maintaining a dynamically updated background template include:
[0061] When image acquisition and processing is started, the reference gray value of the currently detected nonwoven fabric roll is obtained, and an initial background template with the same size as the detected image is generated.
[0062] Get the region in the previous frame of the detection image that is determined to be a non-valid target to be segmented, take all pixels in the non-valid target region as valid pixels, generate a valid detection sub-image, and add the valid detection sub-image to the reference sample set.
[0063] Perform pixel-by-pixel grayscale statistics on all valid detection sub-images in the benchmark sample set, calculate the average grayscale value at each pixel location, and update the background template pixel value at the corresponding location with the average grayscale value;
[0064] When the number of valid detected sub-images in the benchmark sample set is greater than the preset benchmark number, the valid detected sub-image with the earliest acquisition timestamp in the benchmark sample set is removed, so that the number of benchmark samples is maintained within the preset benchmark number range.
[0065] The beneficial effects of this invention are:
[0066] This invention achieves image brightness normalization through pixel-by-pixel linear brightness correction and local brightness compensation in the image acquisition module, effectively offsetting image noise interference caused by weight fluctuations and uneven imaging brightness during nonwoven fabric production. It utilizes a dynamically iteratively updated background template to accurately adapt to the slow changes in production conditions, avoiding false positive and false negative segmentation problems easily caused by traditional fixed background models. Simultaneously, by distinguishing between structurally abnormal pixels and discrete suspicious pixels and matching corresponding fiber structure feature discrimination dimensions, this invention accurately identifies normal fiber random texture fluctuations and effective target areas for segmentation, eliminating erroneous segmentation caused by texture interference. Furthermore, through a deep and shallow anomaly region classification mechanism and a differentiated multi-scale parallel segmentation strategy, it specifically adapts to the needs of high-precision contour extraction in deep anomaly regions and weak feature capture in shallow anomaly regions, overcoming the technical shortcomings of a single segmentation threshold that cannot simultaneously handle deep and shallow anomaly region segmentation. Ultimately, this invention achieves high-precision, robust pixel-level segmentation and contour extraction of various anomaly regions in nonwoven fabrics at the edge, significantly reducing false positive and false negative segmentation rates, greatly improving the integrity and positioning accuracy of anomaly region boundaries, and adapting to the high-speed and complex real-time segmentation needs of nonwoven fabric images in industrial scenarios. Attached Figure Description
[0067] Figure 1 This is a flowchart of a nonwoven fabric image segmentation system based on edge computing according to the present invention;
[0068] Figure 2 This is a flowchart illustrating the generation of a normalized image in this invention;
[0069] Figure 3 A flowchart for maintaining a dynamically updated background template for this invention;
[0070] Figure 4 A flowchart for identifying potential abnormal pixels and generating a grayscale difference marker map in this invention;
[0071] Figure 5 This is a flowchart illustrating how the present invention filters out effective target regions to be segmented. Detailed Implementation
[0072] In current nonwoven fabric image segmentation processing, conventional image segmentation algorithms mainly rely on grayscale differences to distinguish normal texture regions from abnormal regions. However, nonwoven fabrics, with their randomly stacked fibers forming a random three-dimensional loose structure, exhibit a high degree of overlap in grayscale representation between normal fiber clusters and texture undulations and the effective target to be segmented, resulting in a persistently high false positive segmentation rate. Furthermore, the weight fluctuations during nonwoven fabric production cause changes in the transmittance of the imaging background. Existing background model update mechanisms are slow to respond, easily including slowly changing abnormal region pixels incorrectly in the background template, leading to widespread false positives and false negatives. In addition, a single fixed segmentation threshold cannot simultaneously meet the segmentation accuracy requirements for both deep and shallow abnormal regions: increasing segmentation sensitivity exacerbates fiber texture noise interference, generating numerous incorrect segmentations; decreasing segmentation sensitivity fails to effectively extract thin paste blocks and slightly color-difference shallow abnormal regions, creating significant segmentation blind spots. To address these technical problems, this embodiment provides a nonwoven fabric image segmentation system based on edge computing. Please refer to... Figure 1 The system includes:
[0073] The image acquisition module is used to acquire the nonwoven fabric to be processed detection image, and according to the pre-stored variety-specific reference parameter library, to perform pixel-by-pixel linear brightness correction on each frame of detection image, normalize the global average brightness of the detection image to the reference brightness value of the corresponding variety, and generate a normalized image.
[0074] The detected image refers to a continuous grayscale image formed by a line-scan camera scanning the continuously moving nonwoven fabric surface line by line. Each pixel corresponds to a specific physical area on the nonwoven fabric surface, and the pixel grayscale value characterizes the light transmittance of that area. The image is acquired line by line by line by the line-scan camera triggered by pulse signals output from an incremental encoder coaxially mounted with the production line's drive roller. The acquisition frequency is automatically matched according to a preset longitudinal resolution to ensure that no images are missed or stretched within the production line speed range. Each frame of the detected image is timestamped and its spatial position is calibrated using a hardware clock synchronized with the encoder pulses. The preset longitudinal resolution... Resolution refers to the number of image pixels per unit physical length along the direction of movement of the nonwoven fabric roll. It characterizes the fineness of image sampling in the direction of production line movement, and the unit is generally pixels per millimeter. Its setting is based on the physical size of the smallest detectable anomaly on the nonwoven fabric surface, the pixel size of the line scan camera, the lens magnification, and the maximum operating speed of the production line. It must ensure that the smallest target anomaly covers at least 2 to 3 pixels in the longitudinal direction, while also considering the computational load at the edge and the real-time requirements of detection. For example, for the detection scenario of spunbond nonwoven fabric with a minimum detectable defect size of 0.1 mm, the preset longitudinal resolution can be set to 10 pixels per millimeter. Spatial position refers to the physical coordinates of the image area on the entire roll of nonwoven fabric, including absolute longitudinal position and lateral position. The absolute longitudinal position is calculated by multiplying the cumulative number of encoder pulses by the pulse equivalent, and the unit is meters. The lateral position is calculated by multiplying the image pixel coordinates by a preset lateral precision, and the unit is millimeters. The lateral precision is pre-calibrated according to the camera resolution and the width of the nonwoven fabric.
[0075] Please see Figure 2 Furthermore, the steps for generating a normalized image include:
[0076] Step S1.1: Obtain the serial number information of the currently detected nonwoven fabric roll, and retrieve the reference brightness parameter matching the current roll from the reference parameter library for different types of rolls according to the roll number; the reference brightness parameter is a statistical parameter used to characterize the brightness distribution of normal nonwoven fabric images, which is obtained in advance through the calibration of samples without abnormal areas. The reference brightness parameter includes at least a global reference average brightness value and a reference gray value. The global reference average brightness value is a target brightness value pre-set according to the nonwoven fabric basis weight grade, and its setting is based on the light transmittance characteristics of the roll and the stability of the imaging gray value distribution; for example, for rolls with a basis weight range of 15 g / m² to 25 g / m², the corresponding global reference average brightness value can be set to a gray value between 100 and 140. The baseline grayscale value refers to the pixel-wise average grayscale value of the normalized image of the anomaly-free area of the corresponding variety, obtained by statistically analyzing the pixel-wise average grayscale value of the anomaly-free area samples. For example, the baseline grayscale value of spunbond nonwoven fabric with a weight of 15g / m² to 25g / m² can be set to a grayscale value of 120. The nonwoven fabric roll number information refers to the coding information used to uniquely identify the current production roll, including roll number, variety code, shift number, and production batch information, used to distinguish different rolls, varieties, and production periods, ensuring the uniqueness of parameter matching and data traceability. The variety-specific baseline parameter library refers to a standardized parameter set pre-established according to the nonwoven fabric material, weight, and process type. Each variety corresponds to an independent set of parameters, including baseline brightness parameters, background template initialization parameters, morphological processing parameters, fiber structure feature thresholds, depth and shallowness anomaly area grading thresholds, analysis window parameters, and various judgment thresholds, etc., which are the baseline parameters required for the entire process, used to provide matching processing benchmarks and normalization basis for rolls of different specifications.
[0077] Step S1.2: Real-time acquisition of detection images of the non-woven fabric surface using a line scan camera, and synchronous completion of acquisition timestamp marking and spatial position calibration for each frame of detection image, so that each frame of image carries unique time information and physical position information;
[0078] Step S1.3: Perform global grayscale statistics on the current frame detection image to calculate the actual average brightness value of the current frame detection image. The actual average brightness value is the arithmetic mean of the grayscale values of all valid pixels in the current frame. Valid pixels are the set of pixels excluding non-detection areas at the edge of the roll material.
[0079] Step S1.4: Construct a linear brightness transformation coefficient based on the global reference average brightness value and the actual average brightness value. The linear brightness transformation coefficient is the ratio of the global reference average brightness value to the actual average brightness value. Based on this linear brightness transformation coefficient, perform pixel-by-pixel brightness adjustment on the current frame detection image so that the adjusted global average brightness of the image approaches the global reference average brightness value, completing the first-level brightness normalization process. Specifically, the step of performing pixel-by-pixel brightness adjustment on the current frame detection image based on the linear brightness transformation coefficient includes: multiplying the original grayscale value of each effective pixel in the detection image by the linear brightness transformation coefficient to obtain the corrected target grayscale value; and after performing a traversal calculation on all pixels, obtaining a first-level normalized image with unified global brightness.
[0080] Step S1.5: Based on the completion of the first-level brightness normalization processing, edge region identification and local brightness compensation processing are performed on the current frame detection image. The edge region is the image area within a preset width range on both sides of the roll material. The preset width is set according to the roll material width and the process cutting allowance. For example, the preset width can be set to 20 mm to 50 mm. In response to the uneven light transmission phenomenon in the edge region, a local weighted average correction method is adopted to compensate the brightness of each pixel in the edge region, so that the brightness distribution of the edge region and the image center region tends to be consistent, eliminating the brightness gradient difference caused by weight fluctuation, width change or edge drift, so that the entire detection image meets the uniform and stable imaging conditions.
[0081] Step S1.6: The image after first-level brightness normalization and local brightness compensation is determined as the normalized image, which is used for subsequent candidate region extraction, abnormal region identification and segmentation.
[0082] Specifically, the image acquisition module is designed to address four core issues in nonwoven fabrics: strong interference from random textures, significant impact from weight fluctuations, easy distortion in motion imaging, and lack of a unified spatiotemporal reference for multi-frame images. During high-speed online production of nonwoven fabrics, the random three-dimensional fiber texture makes it difficult to distinguish between effective targets and normal textures; real-time weight fluctuations cause continuous background brightness drift; high-speed motion easily causes image stretching and blurring; and the lack of unified timestamps and location markers in images acquired at different times leads to large deviations in the location of abnormal areas. Traditional acquisition methods only perform simple image acquisition without considering the material characteristics of the nonwoven fabric and the production conditions for dynamic correction. This fails to eliminate inconsistencies in imaging caused by weight variations, edge drift, and motion distortion, directly resulting in high error rates, inaccurate positioning, and difficulty in detecting shallow abnormal areas in subsequent abnormal area segmentation. The image acquisition module achieves stable acquisition, uniform brightness, and accurate positional calibration of images of high-speed moving nonwoven fabric surfaces through a systematic operation involving encoder-triggered acquisition, standardized image recording with spatiotemporal markers, dynamic brightness normalization by product type, and local brightness compensation for edge areas.
[0083] The candidate region generation module maintains a dynamically updated background template. It obtains a grayscale difference map by performing background subtraction on the current normalized image and the background template, identifies potential abnormal pixels, and performs connected component analysis and morphological dilation to delineate candidate regions for segmentation. The background template is a full-frame grayscale template with the same size and resolution as the detection image, used to characterize the standard grayscale distribution of the nonwoven fabric surface in the absence of abnormal regions.
[0084] Please see Figure 3 Furthermore, the steps for maintaining a dynamically updated background template include:
[0085] Step S2.1: When image acquisition and processing is started, the reference gray value of the nonwoven fabric roll being detected is obtained based on the reference parameter library for different product types, and an initial background template with the same size as the detected image is generated to ensure that there is still a valid initial background when there are no historical samples or insufficient samples.
[0086] Step S2.2: Obtain the region in the previous frame of the detection image that is determined to be a non-valid target to be segmented, take all pixels in the non-valid target region as valid pixels, generate a valid detection sub-image, and add the valid detection sub-image to the reference sample set;
[0087] Step S2.3: Perform pixel-by-pixel grayscale statistics on all valid detection sub-images in the benchmark sample set, calculate the average grayscale value at each pixel position, and update the background template pixel value at the corresponding position with the average grayscale value; if there is no valid data at a certain pixel position to participate in the calculation, directly use the benchmark grayscale value at the corresponding position in the variety benchmark parameter library for fallback assignment to ensure that there are no invalid pixels in the background template.
[0088] Step S2.4: When the number of valid detection sub-images in the benchmark sample set is greater than the preset benchmark number, the valid detection sub-image with the earliest acquisition timestamp in the benchmark sample set is removed, so that the number of benchmark samples is maintained within the preset benchmark number range, to ensure that the background template changes slowly with the process, and at the same time avoids the update lag caused by too many samples; the preset benchmark number refers to the number of historical valid image frames used for background template update, and its setting is based on the following: the higher the production speed, the more drastic the weight fluctuation, and the more frequent the texture change, the smaller the preset benchmark number; the lower the speed and the more stable the texture, the larger the preset benchmark number. For example, for a nonwoven fabric production line with a speed of 300-800m / min, the preset benchmark number is set to 8 to 16 frames.
[0089] Furthermore, the steps for generating candidate regions include:
[0090] Step S3.1: Perform pixel-by-pixel gray-level difference operation between the current normalized image and the updated background template to obtain a gray-level difference map. The gray-level difference map is used to characterize the degree of deviation of the current image from the standard background without abnormal areas.
[0091] Step S3.2: For the grayscale difference map, based on the preset difference threshold and the grayscale gradient consistency and texture continuity discrimination within the preset local analysis window, potential abnormal pixels are identified, and a grayscale difference marker map with potential abnormal pixel type labels is generated. The preset difference threshold refers to the minimum grayscale difference value for judging whether a single pixel deviates from the normal background. The setting basis is that the larger the nonwoven fabric basis weight, the worse the light transmittance, and the rougher the texture, the larger the preset difference threshold; the smaller the basis weight, the more uniform the light transmittance, and the finer the texture, the smaller the threshold. For example, the preset difference threshold for 15-25g / ㎡ nonwoven fabric is 5 to 10 grayscale values. The preset local analysis window refers to the neighborhood range centered on the current pixel for judging whether the local texture is continuous. The setting basis is the average length of the nonwoven fabric fibers and the longitudinal resolution of the camera, ensuring that the window can cover the texture period of at least 3 to 5 fibers. For example, the preset local analysis window is 3×3 or 5×5 pixels. The types of potential abnormal pixels include structural abnormal pixels and discrete suspicious pixels. Specifically, this step achieves refined anomaly identification by retaining only structural abnormal pixels and eliminating random isolated noise through a multi-level processing flow of pixel-by-pixel threshold determination, local neighborhood gradient statistics, texture continuity judgment, potential abnormal pixel type classification, isolated noise removal, and tag write-back, providing an accurate and reliable set of effective pixels for subsequent connected component analysis.
[0092] Please see Figure 4 Furthermore, the steps of identifying potential anomalous pixels and classifying them into different types include:
[0093] Step S3.21: Traverse each pixel in the grayscale difference map, obtain the grayscale difference value corresponding to the current pixel, and compare the absolute value of the grayscale difference value with the preset difference threshold. If the absolute value of the grayscale difference value is greater than or equal to the preset difference threshold, then mark the pixel as a first-class candidate pixel. If the absolute value of the grayscale difference value is less than the preset difference threshold, then mark the pixel as a normal background pixel and do not enter the subsequent texture continuity discrimination process.
[0094] Step S3.22: Based on the size parameters of the preset local analysis window, determine the range of neighboring pixels centered on the first type of candidate pixel. Taking the current first type of candidate pixel as the center, extract all pixels in the corresponding area of the grayscale difference map according to the horizontal and vertical radii of the preset local analysis window to form a local neighborhood set. The local neighborhood set includes the grayscale difference values of the central first type of candidate pixel and the surrounding adjacent pixels.
[0095] Step S3.23: Calculate the gradient of the grayscale difference values of all pixels within the local neighborhood set, obtaining the horizontal and vertical grayscale gradient values respectively. The horizontal grayscale gradient value is the difference in grayscale difference values between adjacent horizontal pixels at the same vertical coordinate, and the vertical grayscale gradient value is the difference in grayscale difference values between adjacent vertical pixels at the same horizontal coordinate. Statistically analyze all horizontal and vertical grayscale gradient values within the local neighborhood set to calculate the variance of the grayscale gradient within the local neighborhood set.
[0096] Step S3.24: Compare the gray-level gradient variance with a preset gradient stability threshold. If the gray-level gradient variance is less than the preset gradient stability threshold, it is determined that the pixel gray-level change in the local neighborhood is stable and the texture structure remains continuous. The first type of candidate pixel is marked as a second type of candidate pixel, i.e., a discrete suspicious pixel. If the gray-level gradient variance is greater than or equal to the preset gradient stability threshold, it is determined that the pixel gray-level change in the local neighborhood is drastic and the texture structure undergoes abrupt changes. The first type of candidate pixel is marked as a third type of candidate pixel, i.e., a structurally abnormal pixel. The preset gradient stability threshold is the critical gradient variance value used to distinguish between stable local texture changes and abrupt local texture changes. It is set based on the uniformity of the nonwoven fabric texture, the camera imaging noise level, and the sharpness of the abnormal area edge. The more uniform the texture, the lower the noise, and the clearer the abnormal area edge, the smaller the preset gradient stability threshold. For example, for real-time processing applications of nonwoven fabric, the preset gradient stability threshold can be set to 8 to 15. Traverse the entire local neighborhood set, classify the first type of candidate pixels into structurally abnormal pixels and discrete suspicious pixels, form a standardized abnormal pixel classification result, store the structurally abnormal pixels into the structurally abnormal pixel set, and store the discrete suspicious pixels into the discrete suspicious pixel set.
[0097] Step S3.25: For each pixel in the discrete suspicious pixel set, perform isolation determination. Count the total number of discrete suspicious pixels within the preset local analysis window. If the total number of pixels is less than the preset connectivity determination threshold, it is determined to be an isolated noise pixel and directly removed. If the total number of pixels is greater than or equal to the preset connectivity determination threshold, it indicates that this type of pixel is not random noise, but a weakly distributed abnormal region. This type of non-isolated discrete suspicious pixel is uniformly reclassified into the structural abnormal pixel set. The preset connectivity determination threshold refers to the minimum number of neighboring abnormal pixels used to determine whether a discrete suspicious pixel is a valid anomaly. Its setting is based on the physical size of the smallest detectable abnormal area of the nonwoven fabric, the physical resolution of a single pixel in the camera, and the on-site imaging noise distribution characteristics. The minimum number of neighboring abnormal pixels is calculated by combining the actual physical size corresponding to a single pixel. This ensures that small abnormal regions are not mistakenly removed and can distinguish between weakly distributed anomalies and random scattered noise. For example, the preset connectivity determination threshold can be set to 2 to 3.
[0098] Step S3.26: Based on the above classification and verification results, all pixels are finally divided into three categories: normal background pixels, structurally abnormal pixels, and discrete suspicious pixels. Only structurally abnormal pixels and discrete suspicious pixels are used as valid pixels for subsequent connected component analysis. Isolated noise pixels do not participate in the subsequent connected component merging and candidate region generation process.
[0099] Step S3.27: Write back the classified abnormal pixel labeling information to the grayscale difference map to form a grayscale difference labeling map with potential abnormal pixel type labels. The grayscale difference labeling map is used to provide a unified data foundation and a basis for potential abnormal pixel types for subsequent connected component traversal analysis.
[0100] Step S3.3: Perform connected component traversal analysis on potential anomalous pixels within the grayscale difference marker image. According to the consistency rule between spatial adjacency and potential anomalous pixel type, merge interconnected potential anomalous pixels into independent connected regions to generate initial candidate regions. Specifically, use the eight-connected component retrieval rule to traverse the entire grayscale difference marker image row by row and column by column. Only perform connectivity determination on the points marked as structural anomalous pixels in the image. Sequentially search the adjacent pixels above, below, left, right, and four diagonal positions of the current pixel. If adjacent pixels are also structural anomalous pixels, it is determined that the two have a connectivity relationship and are classified into the same connected region. During the traversal, assign a unique region number to each independent connected region and simultaneously record the pixel coordinate set, region area, and bounding rectangle coordinates of each connected region. After the traversal is completed, summarize all independent connected regions to form a complete set of initial candidate regions.
[0101] Step S3.4: Perform morphological dilation processing on the initial candidate region. The size of the dilation structural element is adaptively determined based on the current nonwoven fabric weight grade and the corresponding typical abnormal region size stored in the benchmark parameter library for each variety. The dilation range matches the common diffusion range of the abnormal region, so that the boundary of the dilated region can completely wrap the physical region where the abnormal region is located. The region after dilation processing is determined as the final candidate region for use by the subsequent abnormal region identification and multi-scale parallel segmentation module. Specifically, firstly, based on the current roll material number, the preset morphological expansion reference size in the reference parameter library for each product type is retrieved. Combined with the real-time detected nonwoven fabric weight grade, the size is corrected. The larger the weight and the wider the overall extension range of the abnormal area, the larger the corresponding expansion structural element size is. The smaller the weight and the more concentrated the abnormal area shape, the smaller the expansion size is selected. Then, the corrected structural element is used to perform morphological expansion operation on each initial candidate region, and the edge pixels of the region are expanded and filled outward to eliminate the edge defects and pixel disconnection problems of the abnormal region, ensuring that the main body of the abnormal region and the weak feature area of the edge are all included in the region. After all candidate regions have completed the expansion processing, the region coordinates and region morphological parameters are output uniformly to obtain the final candidate region.
[0102] Specifically, the candidate region generation module is specifically designed to address industry pain points such as the chaotic and disordered texture of nonwoven fabric fibers, continuous background drift caused by weight fluctuations, weak signals in shallow anomalous areas, difficulty in distinguishing between random imaging noise and small anomalous areas, and the tendency of traditional background updates to introduce anomalous area contamination. This module employs a pre-frame independent update mechanism, using only historical normal region data to maintain the background template. It controls the background update rate using a sliding sample set and relies on grayscale thresholds, local gradient variance, and isolation-based multi-level discrimination logic to distinguish texture fluctuations, random noise, and real anomalies. Adaptive morphological processing is then used to refine the candidate region contours. This module can dynamically adapt to the background as the production process slowly changes, preventing anomalous areas from blending into the background and causing missed detections. It can also filter out interference information while fully preserving small and weakly characterized anomalous areas, providing high-purity candidate regions for accurate anomalous region identification and contour segmentation in the backend. Compared to traditional single grayscale difference and fixed threshold filtering methods for region extraction, it has stronger adaptability to various working conditions and stronger anti-interference capabilities.
[0103] The multi-scale parallel segmentation module is used to extract the fiber structure features of the corresponding candidate regions according to the type of potential abnormal pixels. Combined with the fiber structure statistical feature library, it selects the effective target regions to be segmented. The multi-scale parallel segmentation architecture of shallow and deep abnormal regions is used to segment and extract the contours of the effective target regions to be segmented, and outputs the contours of the effective target regions to be segmented. This effectively solves the problems of missed segmentation of shallow abnormal regions, distorted abnormal region contours, and high false positive rate of abnormal regions in traditional detection methods.
[0104] Please see Figure 5 Furthermore, the steps for filtering out valid target regions to be segmented include:
[0105] Step S4.1: Read each candidate region one by one, and use the smallest bounding rectangle of the candidate region as the boundary to extract a local image patch from the normalized image as the target image region of the candidate region; specifically, use the smallest bounding rectangle of the candidate region as the cropping boundary, and reserve an edge extension area of 2 to 5 pixels outward to complete the image cropping, so as to avoid the cropping boundary cutting off the weak feature area of the abnormal area edge, and provide complete and effective image data support for subsequent multi-dimensional feature extraction.
[0106] Step S4.2: Divide the extraction dimensions according to the potential abnormal pixel types of the candidate region, and extract the fiber structure features of the target image region. The fiber structure features refer to the normalized statistical indicators used to quantify the fiber arrangement order, local light transmission characteristics and texture distribution rules of non-woven fabrics. They can distinguish between normal fiber random fluctuations and structural damage caused by abnormal regions, including structural features and subtle features.
[0107] Specifically, for candidate regions containing structurally anomalous pixels, structural features of the target image region are extracted. These structural features refer to strong feature indicators that can reflect the degree of disruption of the overall fiber arrangement order within the region. They are used to identify deep anomalous regions with significant features, including the amplitude of gray-level abrupt changes in the region, the abrupt change rate of local texture structure, and edge gradient features.
[0108] The grayscale mutation amplitude refers to the absolute difference between the average grayscale value inside the target image region and the average grayscale value of the normal background region within a range extending outward from the target image region as a multiple of the preset background region width. It is obtained by calculating the absolute value of the average grayscale value of all pixels in the target image region and the average grayscale value of the surrounding normal background pixels. It is used to quantify the degree of abnormal fluctuation in the light transmittance of the local region and to distinguish between small light transmittance fluctuations in normal fiber texture and significant light transmittance mutations caused by abnormal regions such as holes and thick lumps. The preset background region width multiple refers to the proportional coefficient used to determine the range of the background reference region. Its setting is based on the typical influence range of the nonwoven fabric abnormal region and the spatial correlation of the fiber texture, ensuring that it can represent the normal texture state around the abnormal region and is not affected by the abnormal region itself. For example, the preset background region width multiple can be set to 3.
[0109] The local texture structure mutation rate refers to the proportion of pixels in the target image region whose texture gradient exceeds the preset normal texture gradient threshold to the total number of pixels in the region. It is obtained by calculating the gray-level gradient value in the target image region pixel by pixel and statistically analyzing the proportion of pixels whose gray-level gradient value is greater than the preset normal texture gradient threshold. It is used to characterize the degree of damage to the overall fiber arrangement order and identify structurally abnormal areas such as fiber breakage, misalignment, and aggregation. The preset normal texture gradient threshold is a critical value used to distinguish between normal texture gradient fluctuations and abnormal texture mutations. It is set based on the statistical distribution of gray-level gradients of samples without abnormal areas of the corresponding variety. The 95th percentile of the gradient value of the samples without abnormal areas is taken to ensure coverage of more than 95% of normal texture gradient changes. For example, the preset normal texture gradient threshold for 15g / ㎡ to 25g / ㎡ spunbond nonwoven fabric can be set to 6.
[0110] The edge gradient feature refers to the average gray-level gradient value of the boundary pixels of the target image region. It is obtained by extracting the gray-level gradient values of all pixels on the boundary line of the target image region and calculating the arithmetic mean. It is used to determine the transition shape of the edge of the abnormal region and distinguish the clear boundary of the abnormal region from the transition zone of the normal fiber natural texture.
[0111] For candidate regions containing discrete suspicious pixels, subtle features are extracted. These subtle features refer to weak feature indices that can reflect subtle changes in the local distribution of fibers within the region. They are used to identify shallow abnormal regions with weak signals, including texture density variance, grayscale gradient uniformity, and abnormal pixel dispersion.
[0112] The texture density variance refers to the statistical variance of local fiber density within a preset texture neighborhood size in the target image region. It is obtained by dividing the target image region into several non-overlapping neighborhoods with the same preset texture neighborhood size, calculating the average gray value of each neighborhood to characterize fiber density, and then statistically analyzing the variance of the average gray values of all neighborhoods. This variance is used to identify texture density anomalies caused by shallow abnormal areas such as sparse fibers and local material shortages. The preset texture neighborhood size refers to the window size used to statistically analyze local fiber density. It is set based on the average length of nonwoven fabric fibers and camera resolution to ensure that a single neighborhood can cover the distribution range of 3 to 5 fibers, accurately reflecting the local texture density. For example, the preset texture neighborhood size can be set to 3×3 pixels.
[0113] The grayscale gradient uniformity refers to the minimum value of the linear fitting determination coefficient of grayscale values in the target image area along the horizontal and vertical directions. It is obtained by performing linear fitting on the grayscale distribution in the horizontal and vertical directions of the target image area respectively, calculating the fitting determination coefficient in the two directions and taking the minimum value. It is used to measure the stability of continuous grayscale changes within the area and to identify areas with slight color difference, thin slurry layer and other progressive grayscale shift anomalies.
[0114] The abnormal pixel dispersion refers to the ratio of the average Euclidean distance between all potential abnormal pixels in the target image region to the length of the diagonal of the circumscribed rectangle of the target image region. It is obtained by calculating the average Euclidean distance between all potential abnormal pixels and dividing it by the length of the diagonal of the circumscribed rectangle of the target image region for normalization. It is used to distinguish between patchy slurry abnormal regions and randomly scattered imaging noise points.
[0115] Step S4.3: Retrieve the preset fiber structure statistical feature library, and compare the fiber structure features extracted from the current target image region with the normal threshold intervals of the corresponding fiber structure features in the fiber structure statistical feature library one by one to calculate the feature deviation value of the candidate region. The fiber structure statistical feature library refers to the set of normal threshold intervals of normalized fiber structure features that are classified and stored according to non-woven fabric material, weight, and process type, based on the benchmark parameter library for each variety. It is composed of the feature statistical distribution of the normalized image of the non-abnormal region of the corresponding variety. The normal threshold interval is obtained by calculating the mean and standard deviation of the corresponding features of all non-abnormal region samples, and taking the mean ± 2 times the standard deviation as the normal threshold interval. This not only covers the normal random arrangement of fibers and small fluctuations in gray level during the production process, but also clearly distinguishes the feature boundaries between normal and abnormal regions. For example, for spunbond nonwoven fabrics with a weight of 15 g / m² to 25 g / m², the normal threshold range for the amplitude of regional grayscale abrupt changes is 0 to 9 grayscale values, the normal threshold range for the rate of abrupt changes in local texture structure is 0 to 5%, and the normal threshold range for edge gradient features is 0 to 7; the normal threshold range for texture density variance is 0 to 4.2, the normal threshold range for grayscale gradient uniformity is 0.91 to 1.0, and the normal threshold range for abnormal pixel dispersion is 0.75 to 1.0; for high-grammage needle-punched nonwoven fabrics with a weight of 30 g / m² to 40 g / m², due to the thicker fibers and greater texture undulations, the corresponding normal threshold range is simultaneously widened by 15% to 20%.
[0116] Further steps for calculating the feature deviation value of the candidate region include:
[0117] Step S4.31: Based on the current nonwoven fabric roll number, retrieve the median value of the normal threshold range of each fiber structure feature that matches the material, weight, and process type of the roll from the fiber structure statistical feature library, and use it as the standard feature value;
[0118] Step S4.32: Based on the standard feature value, perform single fiber structure feature deviation normalization processing on each extracted fiber structure feature. The calculation formula is: single fiber structure feature deviation value = |current fiber structure feature - standard feature value| / (upper limit of normal threshold interval - lower limit of normal threshold interval). Map all single fiber structure feature deviation values to the interval of 0 to 1 to eliminate the differences in different feature dimensions and numerical ranges.
[0119] Step S4.33: Perform pre-judgment of single fiber structure feature anomalies. If the deviation value of any single fiber structure feature is greater than or equal to the preset single feature anomaly threshold, the feature deviation value of the candidate region is directly set to the highest value of 1 without subsequent weighted calculation; otherwise, fiber structure feature weights are assigned according to the types of potential abnormal pixels contained in the candidate region. The preset single feature anomaly threshold is a critical value used to determine that a single feature seriously deviates from the normal range. It is set based on the maximum single feature deviation value of samples without abnormal regions. For example, the preset single feature anomaly threshold can be set to 0.8. The fiber structure feature weight is a feature importance coefficient assigned within the corresponding category of fiber structure features according to the type of potential abnormal pixels in the candidate region. It is used to quantify the discrimination contribution of different fiber structure features to this type of potential abnormal pixels. The sum of the weights of all fiber structure features in the same category is 1.0. Based on the high incidence type of abnormal regions, feature recognition, and the impact of abnormal regions on production of the corresponding variety. The weighting of all fiber structural features is pre-stored in a benchmark parameter library for each product type, and can be iteratively optimized based on statistical data of abnormal areas from long-term production line operation. For example, for conventional spunbond nonwoven fabrics with a weighting of 15g / m² to 25g / m², if the candidate area is dominated by structurally abnormal pixels, the basic weighting is configured as follows: regional grayscale mutation amplitude 1 / 3, local texture structure mutation rate 1 / 3, and edge gradient feature 1 / 3. Considering the high incidence of abnormal pore areas in this product type, the weighting of regional grayscale mutation amplitude can be adjusted to 0.4, and the weightings of local texture structure mutation rate and edge gradient feature can each be adjusted to 0.3. If the candidate area is dominated by discrete suspicious pixels, the basic weighting is configured as follows: texture density variance 1 / 3, grayscale gradient uniformity 1 / 3, and abnormal pixel dispersion 1 / 3. Considering the high incidence of abnormal areas in the thin paste of this product type, the weighting of grayscale gradient uniformity can be adjusted to 0.4, and the weightings of texture density variance and abnormal pixel dispersion can each be adjusted to 0.3.
[0120] Step S4.34: Multiply each single fiber structure feature deviation value by the corresponding fiber structure feature weight and sum them to obtain the feature deviation value of the candidate region. The feature deviation value ranges from 0 to 1. The larger the value, the higher the degree of deviation of the region from the normal texture.
[0121] Step S4.4: If the feature deviation value of the candidate region is less than the preset normal texture threshold, the current candidate region is determined to be a normal texture fluctuation region and does not belong to the valid target region to be segmented, and the candidate region is directly removed; otherwise, the current candidate region is determined to be a valid target region to be segmented, the region is retained and enters the subsequent segmentation process. The preset normal texture threshold is set according to the maximum comprehensive feature deviation value of the sample without abnormal regions of the corresponding variety, and is independent of the size of the candidate region. For example, the preset normal texture threshold for 15g / ㎡ to 25g / ㎡ spunbond nonwoven fabric is 0.22, that is, when the feature deviation value of the candidate region is ≥0.22, it is determined to be a valid target to be segmented.
[0122] Step S4.5: Traverse all candidate regions, complete the judgment of all candidate regions, summarize them to form a set of valid target regions to be segmented, and push only the set of valid target regions to be segmented to the segmentation process.
[0123] Furthermore, a multi-scale parallel segmentation architecture for shallow and deep anomalies is adopted. The steps for segmenting and contour extraction of the effective target region to be segmented include:
[0124] Step S5.1: Retrieve each valid target region to be segmented and quantify the characteristics of the shallow and deep anomaly regions of the valid target regions to be segmented. The characteristics of the shallow and deep anomaly regions include the effective pixel area of the region, the average gray level difference, and the distribution density of the abnormal pixels. The effective pixel area of the region refers to the total number of all potential abnormal pixels in the valid target region to be segmented, reflecting the actual physical size of the abnormal region. The average gray level difference refers to the arithmetic mean of the absolute values of the gray level differences between all pixels in the valid target region to be segmented and the corresponding pixels in the background template. It is obtained by calculating the absolute value of the gray level difference between the current pixel and the background template pixel pixel one by one, and then averaging all the results in the valid target region to be segmented. It is used to quantify the overall anomaly intensity of the abnormal region. The distribution density of the abnormal pixels refers to the ratio of the potential abnormal pixel area of the valid target region to the total number of pixels in the minimum bounding rectangle of the candidate region. It is obtained by dividing the potential abnormal pixel area of the region by the total number of pixels in the minimum bounding rectangle. It is used to characterize the degree of pixel aggregation in the abnormal region and distinguish between concentrated deep anomaly regions and dispersed shallow anomaly regions.
[0125] Step S5.2: Retrieve the preset set of threshold values for classifying deep and shallow anomalies. Based on the characteristics of deep and shallow anomalies in the effective target area to be segmented, divide the target area into deep and shallow anomalies. The preset set of threshold values for classifying deep and shallow anomalies refers to a combination of multi-dimensional critical values used to distinguish different levels of anomalies, including threshold values corresponding to different dimensions of deep and shallow anomaly features. Specifically, when an effective target area to be segmented simultaneously meets all deep anomaly threshold conditions, it is determined to be a deep anomaly area; if it does not meet any deep anomaly threshold condition, it is determined to be a shallow anomaly area. All threshold values are stored in a product-specific benchmark parameter library, and are set based on the characteristic statistical distribution of samples without anomalies in the corresponding product. They can be dynamically adjusted according to the actual operation of the production line. For example, for spunbond nonwoven fabrics with a density of 15g / m² to 25g / m², the preset set of thresholds for different levels of anomalous areas can be configured as follows: a threshold of 30 pixels for the area of anomalous areas, a threshold of 10 gray values for the gray values of anomalous areas, and a threshold of 0.62 for the density of anomalous areas; the corresponding thresholds for high-grammage needle-punched nonwoven fabrics with a density of 30g / m² to 40g / m² can be adjusted upwards by 15% to 20% simultaneously.
[0126] Step S5.3: Based on the physical dimensions of the minimum bounding rectangles of the deep and shallow anomaly regions, set up multi-scale analysis windows for the deep and shallow anomaly regions respectively to cover the full range detection requirements of the effective target region to be segmented; the multi-scale analysis window contains at least two analysis windows of different scales, and the size of the analysis window is proportional to the physical dimensions of the corresponding deep and shallow anomaly regions.
[0127] Specifically, the steps for setting up multi-scale analysis windows for deep and shallow anomaly regions separately include:
[0128] Step S5.31: For each deep anomaly region, extract the horizontal and vertical side lengths of its minimum bounding rectangle, and take the maximum value as the anomaly region feature size. Based on the anomaly region feature size, generate a first-scale window and a second-scale window. The side length of the first-scale window is 1 / 3 to 1 / 2 of the anomaly region feature size, used to extract the overall main outline of the deep anomaly region. The side length of the second-scale window is 1 / 5 to 1 / 4 of the anomaly region feature size, used to refine the edge transition area of the deep anomaly region. Simultaneously, set upper and lower limits for the window size: the maximum size of the first-scale window should not exceed 2 / 3 of the side length of the minimum bounding rectangle of the deep anomaly region; the maximum size of the second-scale window should not exceed 1 / 2 of the side length of the first-scale window. This setting is based on the following: the first-scale window needs to cover the core main area of the anomaly region to avoid interference from local fiber texture fluctuations in the main subject extraction; the second-scale window needs to match the transition width of the anomaly region's edge to ensure accurate identification of the boundary between the anomaly region and normal texture.
[0129] Step S5.32: For shallow anomaly regions, extract the horizontal and vertical side lengths of their minimum bounding rectangle, and take the maximum value as the feature size of the anomaly region. Based on the anomaly region feature size, generate a third-scale window and a fourth-scale window. The side length of the third-scale window is 1 / 2 to 2 / 3 of the anomaly region feature size, used for neighborhood association verification of suspected anomaly pixels. The side length of the fourth-scale window is 1 / 4 to 1 / 3 of the anomaly region feature size, used to capture subtle local features of the shallow anomaly region. Simultaneously, set upper and lower limits for the window size: the maximum size of the third-scale window cannot exceed the side length of the minimum bounding rectangle of the shallow anomaly region; the maximum size of the fourth-scale window cannot exceed 1 / 2 of the side length of the third-scale window. This setting is based on the following: the fourth-scale window needs to be sufficiently fine to capture subtle grayscale and texture changes in the shallow anomaly region; the third-scale window needs to cover a sufficient neighborhood range to distinguish between patches of shallow anomaly regions and random single-point noise.
[0130] Step S5.33: All generated multi-scale analysis windows are uniquely bound to the corresponding abnormal regions and stored in the abnormal region attribute information for subsequent segmentation steps.
[0131] For example, for a deep anomaly region with a minimum bounding rectangle of 60×60 pixels, its anomaly region feature size is 60 pixels, and a combination of a first-scale window of 20×20 pixels and a second-scale window of 12×12 pixels can be generated; for a shallow anomaly region with a minimum bounding rectangle of 15×15 pixels, its anomaly region feature size is 15 pixels, and a combination of a third-scale window of 8×8 pixels and a fourth-scale window of 4×4 pixels can be generated; for tiny shallow anomaly regions with a size of less than 5×5 pixels, a third-scale window of 5×5 pixels and a fourth-scale window of 3×3 pixels are uniformly used for processing.
[0132] Step S5.4: Call the bound multi-scale analysis window for deep and shallow anomaly regions respectively, and use a differentiated parallel segmentation strategy to traverse all pixels in the effective target region to be segmented, and perform pixel-level segmentation marking; the multi-scale analysis window contains at least two scale windows of different levels, and the different level windows are responsible for the extraction and segmentation of different dimensions of the anomaly region; the deep anomaly region adopts a segmentation strategy that focuses on the integrity of the overall contour and the accuracy of the edge, and the shallow anomaly region adopts a segmentation strategy that focuses on weak feature capture and noise suppression, and finally obtain the contour of the effective target region to be segmented.
[0133] Furthermore, a differentiated parallel segmentation strategy is employed to traverse all pixels within the effective target region to be segmented, performing pixel-level segmentation labeling including:
[0134] Step S5.41: For deep anomaly regions, enable the multi-scale analysis window bound to it, perform a full-area pixel-by-pixel parallel scan, fuse the pixel grayscale distribution, local gradient changes and fiber edge direction extracted by each analysis window, perform pixel-level segmentation and marking of deep anomaly regions, obtain the contour of deep anomaly regions, and correct the contour loss problem caused by fiber occlusion and uneven light transmission.
[0135] Specifically, step 5.41 includes the following steps:
[0136] Step S5.411: All multi-scale analysis windows simultaneously perform sliding scans on the deep anomaly region, outputting pixel grayscale statistical parameters within the corresponding spatial range, including mean, variance, and histogram distribution; the grayscale statistical parameters of all analysis windows are fused to calculate the global adaptive segmentation threshold for the deep anomaly region, and pixels whose grayscale value differs from the mean grayscale value of the background template exceeding the global adaptive segmentation threshold are marked as the main pixels of the deep anomaly region, thus locking in the core range of the anomaly region; this operation avoids missing segmentation of the main body caused by random fluctuations in local fiber texture at a single scale through cross-validation of multi-scale grayscale information.
[0137] Specifically, the steps for calculating the global adaptive segmentation threshold for deep anomaly regions by integrating the grayscale statistical parameters of all analysis windows include:
[0138] Each analysis window is assigned a grayscale fusion weight, which is positively correlated with the spatial coverage of the analysis window. Large-scale windows are assigned higher weights because they can more accurately reflect the overall grayscale distribution characteristics of the abnormal area, while small-scale windows are assigned lower weights to correct local grayscale deviations. The sum of the weights of all windows is 1.0.
[0139] Based on the gray-level fusion weights of each analysis window, the gray-level histograms of all analysis windows are weighted and superimposed to generate a fused gray-level histogram of the deep anomaly region.
[0140] The Otsu's method is used to calculate the fused gray-level histogram to obtain the global adaptive segmentation threshold for deep anomaly regions.
[0141] For example, for a multi-scale combination of windows containing 30×30 pixels, 15×15 pixels, and 7×7 pixels, the weights can be assigned as 0.6, 0.3, and 0.1, respectively. The gray-level histograms of the three windows are multiplied by their corresponding weights and then superimposed to obtain a fused histogram. The global adaptive segmentation threshold is then calculated using the maximum inter-class variance method. This global adaptive segmentation threshold reflects both the overall gray-level difference of the abnormal region and corrects the gray-level deviation caused by local fiber clusters.
[0142] Step S5.412: Taking the main pixel of the deep anomaly region as the core, expand outward to form a boundary transition zone. Perform a sliding scan on the boundary transition zone through a multi-scale analysis window, and calculate the gray-level gradient magnitude and direction of all pixels within the boundary transition zone. Merge the gray-level gradient magnitude and direction of all analysis windows to identify the boundary of the deep anomaly region. That is, mark the continuous pixels with gray-level gradient magnitudes exceeding the preset boundary gradient threshold and consistent directions as boundary pixels of the deep anomaly region, and accurately locate the boundary between the anomaly region and the normal texture. This operation utilizes the sensitivity differences of different scale windows to edges of different widths to take into account the segmentation accuracy of coarse and fine edges. The boundary transition zone refers to a region 1 to 2 pixels wide surrounding the main pixel of the deep anomaly region. It is used to limit the boundary search range and avoid misidentifying the edge of normal texture as the boundary of the anomaly region. The preset boundary gradient threshold is stored in the variety-specific benchmark parameter library and is set based on the statistical distribution of texture gradients of samples without anomalies of the corresponding variety. The 99th percentile of the gradient values of samples without anomalies is taken to ensure that only significant gray-scale abrupt changes are identified as the boundary of the anomaly region. For example, the preset boundary gradient threshold for 15g / ㎡ to 25g / ㎡ spunbond nonwoven fabric can be set to 8.
[0143] Step S5.413: Extract the fiber edge orientation within each analysis window using the multi-scale Sobel gradient direction statistical method, and statistically analyze the dominant fiber orientation within the deep anomaly region; for candidate boundary pixels in the deep anomaly region with breakpoints, interpolate and connect them along the dominant fiber orientation to correct the contour breakpoints caused by single fiber occlusion; at the same time, remove false boundary pixels that are completely consistent with the fiber orientation to ensure that the contour is consistent with the actual physical shape of the anomaly region.
[0144] Specifically, the steps for extracting the fiber edge orientation within each analysis window include:
[0145] The 3×3 Sobel operator is used to perform convolution operation on the pixels in each analysis window to calculate the horizontal and vertical gradients of each pixel in the window, thereby obtaining the gradient magnitude and gradient direction of each pixel.
[0146] For each analysis window, pixels with gradient amplitudes greater than a preset fiber gradient threshold are selected as fiber edge pixels, and angle intervals are divided. The number of fiber edge pixels in each angle interval is counted. The preset fiber gradient threshold is the critical gradient amplitude used to distinguish fiber edge pixels. It is set based on the statistical distribution of fiber edge gradients in samples without abnormal areas of the corresponding variety. The 95th percentile of the fiber edge gradient values of samples without abnormal areas is taken to ensure that the vast majority of normal fiber edges can be accurately identified, while eliminating imaging noise interference. For example, the preset fiber gradient threshold for 15g / ㎡ to 25g / ㎡ spunbond nonwoven fabric can be set to 4.
[0147] The center value of the angle interval with the most pixels in each analysis window is taken as the local fiber dominant orientation corresponding to that analysis window; the local fiber dominant orientations of all analysis windows are counted, and the fiber dominant arrangement direction of the entire deep anomaly region is determined by voting.
[0148] For example, for a 90×90 pixel thick slurry block with a deep anomaly region, the preset fiber gradient threshold can be set to 4; the local fiber dominant orientations obtained from the statistical analysis windows are mostly concentrated in the 30° to 40° range, and the region fiber dominant orientation is determined to be 35° by voting; when a breakpoint with a length of 5 pixels is detected in the candidate boundary, continuous boundary pixels are generated by interpolation between the two ends of the breakpoint along the 35° direction, and all pseudo boundary pixels with gradient directions having an angle of less than 10° with 35° are removed, resulting in a complete and accurate anomaly region contour.
[0149] Step S5.42: For shallow anomalous regions, enable the multi-scale analysis window bound to it, perform a full-area pixel-by-pixel parallel scan, identify the effective pixels of the shallow anomalous region by determining the correlation of neighboring pixels at multiple scales, perform pixel-level segmentation and marking of the shallow anomalous region, obtain the contour of the shallow anomalous region, avoid the normal fiber texture being mis-segmented, and completely extract the fine contour and continuous distribution range of the shallow anomalous region.
[0150] Specifically, step S5.42 includes the following steps:
[0151] Step S5.421: All analysis windows perform pixel-by-pixel sliding scans centered on the current pixel, calculating the grayscale deviation and texture density deviation between the current pixel and the average grayscale value of normal background pixels within the neighborhood covered by the corresponding analysis window. If the grayscale deviation and texture density deviation of the current pixel in any analysis window simultaneously exceed the corresponding preset deviation threshold, the pixel is marked as a suspected abnormal pixel. The preset deviation thresholds include a preset grayscale deviation threshold for shallow abnormal regions and a preset texture deviation threshold for shallow abnormal regions. This operation captures weak pixel-level anomalies through small-scale windows, avoiding the omission of weak features in shallow abnormal regions, while simultaneously filtering out obvious random noise through multi-scale cross-validation. The texture density deviation value is the difference between the variance of the pixel gray level in the current neighborhood and the variance of the normal texture of the corresponding variety; the preset shallow abnormal area gray level deviation threshold and the preset shallow abnormal area texture deviation threshold are both stored in the variety-specific benchmark parameter library, and are set based on the gray level fluctuation range and texture fluctuation range of the samples without abnormal areas of the corresponding variety. For example, the preset shallow abnormal area gray level deviation threshold of 15g / ㎡ to 25g / ㎡ spunbond nonwoven fabric can be set to a gray level value of 3, and the preset shallow abnormal area texture deviation threshold can be set to 1.5.
[0152] Step S5.422: For all suspected anomalous pixels, multi-scale analysis windows are used sequentially to perform multi-scale neighborhood association verification, and the number of other suspected anomalous pixels in the neighborhood of each suspected anomalous pixel in the corresponding analysis window is counted; if the number of suspected anomalous pixels in the neighborhood of at least two different scale windows meets the preset association judgment threshold, it is determined to be a valid shallow anomalous pixel; otherwise, it is determined to be a normal fiber texture fluctuation pixel and is removed; this operation effectively distinguishes between patchy shallow anomalous regions and randomly scattered imaging noise through multi-scale cross-validation, and solves the problem of missegmentation caused by the overlap of gray levels between shallow anomalous regions and normal textures.
[0153] The preset association determination threshold is set based on the physical size of the smallest detectable abnormal area of the non-woven fabric and the single pixel resolution of the camera, ensuring that a small, shallow abnormal area consisting of at least 3 consecutive pixels can be detected, while eliminating single-point and two-point random noise. For example, the preset association determination threshold can be set to 2.
[0154] Step S5.423: Use the analysis window with the maximum coverage to perform region aggregation verification on all valid shallow anomalous pixels, merge spatially adjacent valid shallow anomalous pixels with consistent grayscale and texture features into complete anomalous sub-regions; perform region correction on the merged anomalous sub-regions, including filling micro-holes, eliminating isolated blank points with an area smaller than a preset hole threshold within the region, and forming a continuous and complete shallow anomalous region outline; the preset hole threshold is set based on the minimum anomalous region size allowed in the industry, for example, the preset hole threshold can be set to 3 pixels.
[0155] For example, for a shallow anomaly region of a thin slurry layer with a minimum bounding rectangle of 24×24 pixels, the bound multi-scale analysis window combination includes three different neighborhood ranges: 12×12 pixels, 8×8 pixels, and 4×4 pixels. The 4×4 pixel window is used to calculate grayscale deviation and texture density deviation pixel by pixel, marking all suspected anomalous pixels with local anomalies. The 8×8 pixel window is used to perform preliminary neighborhood association verification, counting the number of suspected pixels within an 8×8 range around each suspected pixel, and eliminating obvious single-point noise. The 12×12 pixel window is used to perform secondary association verification and region aggregation, merging spatially continuous effective pixels into a complete thin slurry layer anomaly region, and filling in micro-holes smaller than 3 pixels within the region, finally obtaining a continuous and accurate shallow anomaly region segmentation contour.
[0156] Step S5.5: Map the image pixel coordinates of the effective target region to be segmented to the physical coordinate system of the entire roll of nonwoven fabric to complete the precise physical positioning of the abnormal region; combine the acquisition timestamp marked during the detection image acquisition stage, the pre-calibrated lateral precision parameters and encoder pulse equivalent parameters to calculate the actual physical position of the abnormal region on the roll, where the lateral physical coordinates are obtained by multiplying the pixel horizontal coordinates by the lateral precision, and the vertical physical coordinates are obtained by multiplying the cumulative number of encoder pulses by the pulse equivalent; simultaneously record all dimensions of data such as abnormal region type, physical area, location coordinates, generation time, and feature deviation value to generate a standardized abnormal region segmentation result data set, completing the entire process of abnormal region segmentation and contour extraction of the detection image in this frame.
[0157] Specifically, the multi-scale parallel segmentation module is specifically designed to address industry pain points such as the easy confusion between normal texture and abnormal region features caused by the random stacking of nonwoven fibers, weak signals in shallow abnormal regions, and poor adaptability of traditional fixed-scale segmentation. This module relies on single-type candidate regions generated during the candidate region generation stage and effectively captures extreme abnormal situations through a single-feature anomaly pre-judgment mechanism. Combined with a statistical feature library of fiber structures for different product varieties, it achieves accurate genuine / false identification of different types of candidate regions. Furthermore, a dynamic multi-scale analysis window generation mechanism is adopted, and differentiated parallel segmentation strategies are designed for deep and shallow abnormal regions. Deep abnormal regions achieve overall contour and edge accuracy through multi-scale feature fusion, while shallow abnormal regions achieve weak feature enhancement and noise suppression through multi-scale neighborhood correlation verification. This deeply adapts to the complex working conditions of high-speed nonwoven production, weight fluctuations, and random textures, significantly improving the segmentation accuracy and robustness of all types of abnormal regions.
[0158] The collaborative update module is used to establish a two-way data interaction channel between the edge and the cloud. It uploads the full-dimensional information of the effective target area to be segmented obtained in real time from the edge to the cloud for aggregation and analysis. Based on the spatiotemporal distribution characteristics, type characteristics and statistical characteristics of the effective target area to be segmented, it identifies abnormal production conditions.
[0159] Further steps for identifying abnormal production conditions include:
[0160] Step S6.1: Standardize the effective target area information to be segmented obtained from edge detection to generate a structured abnormal area data packet, and upload it to the cloud server in real time via industrial Ethernet; the structured abnormal area data packet contains three types of data: basic information of the abnormal area, production-related information and image feature information. All data carries a unique roll number and timestamp to ensure that the data is traceable and associative.
[0161] Specifically, the basic information of the abnormal area includes the unique identifier of the abnormal area, the type of abnormal area, the physical area, the horizontal physical coordinates, the vertical physical coordinates, the generation time, and the outline of the effective target area to be segmented; the abnormal area type is deep abnormal area and shallow abnormal area; the production-related information includes the roll number, variety code, shift number, production batch, real-time production speed, and real-time weight detection value; the image feature information includes the normalized local image block of the effective target area to be segmented.
[0162] Step S6.2: The cloud server receives structured abnormal area data packets uploaded by all edge terminals, establishes a distributed abnormal area database, classifies and stores them according to variety, batch, and time period, and performs multi-dimensional statistical analysis on the abnormal area data of the same production batch to generate an abnormal area statistical report; the multi-dimensional statistical analysis includes time dimension statistics, spatial dimension statistics, and type dimension statistics.
[0163] Specifically, the content of multidimensional statistical analysis includes:
[0164] The total number of abnormal regions, the density of abnormal regions, and the average area of abnormal regions are counted per unit time, and a trend curve of the number of abnormal regions changing over time is generated.
[0165] The distribution of abnormal areas in the horizontal and vertical directions of nonwoven fabric is statistically analyzed, generating a heat map of the distribution of abnormal areas in the horizontal direction and a curve of the distribution of abnormal areas in the vertical direction, and identifying the physical locations where abnormal areas are concentrated.
[0166] The percentage, frequency of occurrence, and average severity of different types of abnormal areas were statistically analyzed.
[0167] Step S6.3: Based on the results of multi-dimensional statistical analysis and combined with the preset abnormal working condition judgment rules, identify abnormal working conditions in the production process; the abnormal working condition judgment rules are established based on industry production experience and historical abnormal area data, different abnormal working conditions correspond to different abnormal area feature patterns, and all abnormal working condition judgment thresholds are stored in the cloud parameter library, which can be dynamically adjusted according to the quality requirements of different products.
[0168] The abnormal operating condition judgment rule refers to a standardized judgment logic system used to correlate and match the statistical characteristics of abnormal areas with abnormal states in the production process. It consists of feature extraction rules, pattern matching rules, and threshold judgment rules. Its setting is based on industry-wide production experience, the correlation analysis results of historical abnormal area data and corresponding production process parameters, and the quality control level requirements of different products. It can transform abstract abnormal area distribution characteristics into specific production anomaly diagnostic results. The abnormal operating condition refers to equipment failures, process fluctuations, or raw material quality problems that deviate from normal process conditions during production, causing the frequency, spatial distribution, or severity of abnormal areas to significantly exceed the normal range. These include abnormal roller operating conditions, spinneret clogging conditions, raw material fluctuation conditions, process parameter drift conditions, and batch quality anomaly conditions.
[0169] Specifically, the collaborative update module uploads the processing data from the edge to the cloud for big data analysis. This not only enables timely detection of equipment and process anomalies during production, allowing for early intervention to prevent batch quality accidents, but also provides data support for optimizing production processes by utilizing the massive amounts of data accumulated over a long period.
[0170] Working principle and its effects:
[0171] This invention combines image normalization, dynamic background updating, feature discrimination, and multi-scale segmentation to address the industry pain points of numerous imaging interferences and the difficulty in detecting shallow and deep abnormal areas in nonwoven fabric production. The entire process is adaptable to the high-speed continuous production conditions of nonwoven fabrics, suppressing interference and improving recognition accuracy across the entire link from image source to abnormal area output.
[0172] First, the image acquisition module retrieves the baseline brightness parameters of the matching roll material, completing image acquisition, spatiotemporal marking, pixel-by-pixel brightness correction, and edge brightness compensation to achieve image normalization and effectively offset the effects of roll material weight fluctuations and uneven imaging brightness. Then, the candidate region generation module continuously maintains and updates the background template dynamically, using only data from areas without anomalies to iterate the template and avoid missing detections caused by anomalies. Next, grayscale difference and gradient analysis are used to classify abnormal pixels. After removing isolated noise, connected component analysis and morphological processing are combined to obtain candidate regions, significantly reducing misjudgments caused by random fiber textures and imaging noise. Finally, the multi-scale parallel segmentation module extracts fiber structure features based on pixel type differences, calculates deviation values using a fiber structure statistical feature library to determine the authenticity of anomalies, and then classifies effective targets into light and dark types, matching corresponding multi-scale analysis windows and differentiated segmentation strategies to accurately extract and locate anomaly contours. This ensures both the complete and clear contours of deep anomalies and the effective capture of weak features in shallow anomalies, eliminating the segmentation blind spots present in traditional single-threshold methods.
[0173] In summary, this invention balances anti-interference capability with abnormal area identification accuracy, effectively reducing the probability of false detection and missed detection. It can stably adapt to high-speed real-time processing scenarios of non-woven fabrics of different specifications, meeting the quality control requirements in industrial production.
[0174] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A nonwoven fabric image segmentation system based on edge computing, characterized in that, include: The image acquisition module is used to acquire the detection image of the non-woven fabric to be processed, and to perform pixel-by-pixel linear brightness correction to generate a normalized image; The candidate region generation module is used to maintain a dynamically updated background template. By performing background difference operation between the current normalized image and the background template, a grayscale difference map is obtained, potential abnormal pixels are identified, and connected component analysis and morphological dilation processing are performed to divide the candidate regions to be segmented. The multi-scale parallel segmentation module is used to extract the fiber structure features of the corresponding candidate regions according to the type of potential abnormal pixels. Combined with the fiber structure statistical feature library, it selects the effective target regions to be segmented. Then, it adopts a multi-scale parallel segmentation architecture for shallow and deep abnormal regions to segment and extract the contours of the effective target regions to be segmented, and outputs the contours of the effective target regions to be segmented.
2. The nonwoven fabric image segmentation system based on edge computing as described in claim 1, characterized in that, The steps of employing a multi-scale parallel segmentation architecture for shallow and deep anomalies to segment and extract contours of the effective target region to be segmented, and outputting the contours of the effective target region to be segmented, include: Retrieve each effective target region to be segmented and quantify the shallow and deep abnormal region features of the effective target regions to be segmented. The shallow and deep abnormal region features include the effective pixel area of the region, the average gray level difference, and the distribution density of abnormal pixels. Retrieve a preset set of threshold values for deep and shallow anomalies, and divide the effective target region into deep and shallow anomalies based on the characteristics of the deep and shallow anomalies. Based on the physical dimensions of the minimum bounding rectangles of deep and shallow anomaly regions, multi-scale analysis windows are set for deep and shallow anomaly regions respectively. The multi-scale analysis window bound to the deep anomaly region and the shallow anomaly region are invoked respectively. A differentiated parallel segmentation strategy is used to traverse all pixels in the effective target region to be segmented, perform pixel-level segmentation marking, and obtain the contour of the effective target region to be segmented.
3. The nonwoven fabric image segmentation system based on edge computing as described in claim 2, characterized in that, The step of using a differentiated parallel segmentation strategy to traverse all pixels within the effective target region to be segmented and performing pixel-level segmentation marking includes: For deep anomaly regions, the bound multi-scale analysis window is enabled, and a pixel-by-pixel parallel scan of the entire region is performed. The pixel grayscale distribution, local gradient changes and fiber edge orientation extracted from each analysis window are fused, and pixel-level segmentation and labeling of the deep anomaly region are performed to obtain the contour of the deep anomaly region. For shallow anomaly regions, the bound multi-scale analysis window is enabled, and a full-area pixel-by-pixel parallel scan is performed. The effective pixels of the shallow anomaly region are identified by multi-scale neighborhood pixel correlation determination, and pixel-level segmentation and labeling of the shallow anomaly region are performed to obtain the contour of the shallow anomaly region.
4. The nonwoven fabric image segmentation system based on edge computing as described in claim 3, characterized in that, The step of performing pixel-level segmentation and marking of deep anomaly regions includes: All multi-scale analysis windows simultaneously perform sliding scans on the deep anomaly region, outputting pixel grayscale statistical parameters within the corresponding spatial range, which are used to calculate the global adaptive segmentation threshold for the deep anomaly region. Pixels whose grayscale value differs from the mean grayscale value of the background template by more than the global adaptive segmentation threshold are marked as main pixels of deep anomaly regions. Taking the main pixel of the deep anomaly region as the core, the boundary transition zone is formed by expanding outward. The boundary transition zone is slid-scanned through a multi-scale analysis window, and the gray-level gradient magnitude and direction of all pixels in the boundary transition zone are calculated to identify the boundary of the deep anomaly region. Extract the fiber edge direction within each analysis window, statistically analyze the dominant fiber arrangement direction within the deep anomaly region, and interpolate and connect the boundary pixels of the deep anomaly region with breakpoints along the dominant fiber direction to obtain the contour of the deep anomaly region.
5. The nonwoven fabric image segmentation system based on edge computing as described in claim 3, characterized in that, The step of identifying valid pixels in shallow anomaly regions through multi-scale neighborhood pixel correlation and performing pixel-level segmentation and labeling of shallow anomaly regions includes: All analysis windows perform pixel-by-pixel sliding scans centered on the current pixel, calculating the grayscale deviation and texture density deviation between the current pixel and the average grayscale value of normal background pixels within the neighborhood covered by the corresponding analysis window, and identifying suspected abnormal pixels. For all suspected anomalous pixels, multi-scale analysis windows are used sequentially to perform multi-scale neighborhood association verification, count the number of other suspected anomalous pixels in the neighborhood of each suspected anomalous pixel in the corresponding analysis window, and identify effective shallow anomalous pixels. The analysis window with the largest coverage area is used to perform region aggregation verification on all valid shallow anomalous pixels, merge them into anomalous sub-regions, and perform region correction to form the outline of the shallow anomalous region.
6. The nonwoven fabric image segmentation system based on edge computing as described in claim 1, characterized in that, The step of dividing the candidate regions to be segmented includes: Perform pixel-by-pixel gray-level difference operation between the current normalized image and the updated background template to obtain a gray-level difference map; For the grayscale difference map, based on the preset difference threshold and the grayscale gradient consistency and continuity discrimination within the preset local analysis window, potential abnormal pixels are identified, and a grayscale difference marker map with potential abnormal pixel type labels is generated; the types of potential abnormal pixels include discrete suspicious pixels and structural abnormal pixels; Connectivity traversal analysis is performed on potential abnormal pixels within the grayscale difference marker image. Based on the spatial adjacency relationship and the consistency rule of potential abnormal pixel type, potential abnormal pixels are merged into independent connected regions to generate initial candidate regions. Morphological dilation processing is then performed to obtain the final candidate regions.
7. The nonwoven fabric image segmentation system based on edge computing as described in claim 6, characterized in that, The step of identifying potential abnormal pixels and generating a grayscale difference marker map with potential abnormal pixel type labels includes: Traverse every pixel in the grayscale difference image, compare the absolute value of the grayscale difference with the preset difference threshold, and identify normal background pixels and first-class candidate pixels. Centered on the first type of candidate pixel, a local neighborhood set is constructed according to the preset size parameters of the local analysis window; The gradient of the gray-level difference values of all pixels in the local neighborhood set is calculated to obtain the gray-level gradient variance in the local neighborhood set. Combined with the preset gradient stability threshold, the first type of candidate pixels are divided into discrete suspicious pixels and structurally abnormal pixels. The total number of discrete suspicious pixels within a preset local analysis window is counted for each discrete suspicious pixel. This count is used to determine whether the corresponding discrete suspicious pixel is an isolated noise pixel. If so, the corresponding discrete suspicious pixel is removed. Based on normal background pixels, structurally abnormal pixels, and discrete suspicious pixels, a grayscale difference marker map with potential abnormal pixel type labels is generated.
8. The nonwoven fabric image segmentation system based on edge computing as described in claim 1, characterized in that, The step of filtering out the valid target regions to be segmented includes: Read each candidate region one by one, and take the smallest bounding rectangle of the candidate region as the boundary to extract a local image patch from the normalized image as the target image region of the candidate region. The extraction dimensions are divided according to the potential abnormal pixel types of the candidate region, and the fiber structure features of the target image region are extracted. The fiber structure features include structural features and subtle features. Retrieve the preset fiber structure statistical feature library, compare the fiber structure features extracted from the current target image region with the normal threshold range of the corresponding fiber structure features in the fiber structure statistical feature library one by one, and calculate the feature deviation value of the candidate region. If the feature deviation value of the candidate region is less than the preset normal texture threshold, the current candidate region is determined to be a normal texture fluctuation region; otherwise, the current candidate region is determined to be a valid target region to be segmented. Traverse all candidate regions, complete the judgment of all candidate regions, and form a set of valid target regions to be segmented.
9. The nonwoven fabric image segmentation system based on edge computing as described in claim 8, characterized in that, The step of extracting the fiber structure features of the target image region includes: For candidate regions containing structurally anomalous pixels, structural features of the target image region are extracted. These structural features include the magnitude of gray-level abrupt changes in the region, the abrupt change rate of local texture structure, and edge gradient features. The amplitude of the gray-level change in the region is obtained by calculating the absolute difference between the average gray-level value of all pixels in the target image region and the average gray-level value of the surrounding normal background pixels; the local texture structure change rate is obtained by calculating the gray-level gradient value in the target image region pixel by pixel and statistically analyzing the proportion of pixels whose gray-level gradient value is greater than a preset normal texture gradient threshold; the edge gradient feature is obtained by extracting the gray-level gradient values of all pixels on the boundary line of the target image region and calculating the arithmetic mean.
10. The nonwoven fabric image segmentation system based on edge computing as described in claim 9, characterized in that, The step of extracting the fiber structure features of the target image region further includes: For candidate regions containing discrete suspicious pixels, extract subtle features, including texture density variance, grayscale gradient uniformity, and abnormal pixel dispersion. The texture density variance is obtained by dividing the target image region into multiple non-overlapping neighborhoods with the same size as the preset texture neighborhood, calculating the average gray value of each neighborhood, and then calculating the variance of the average gray values of all neighborhoods; the gray level gradient uniformity is obtained by linearly fitting the horizontal and vertical gray level distributions of the target image region, calculating the horizontal and vertical fitting determination coefficients, and taking the minimum value; the abnormal pixel dispersion is obtained by calculating the mean of the Euclidean distance between each pair of spatial coordinates of all potential abnormal pixels, and then normalizing it by dividing it by the length of the diagonal of the circumscribed rectangle of the target image region.