A grey cloth defect detection method and system based on image processing

By using multi-scale texture decomposition and dynamic defect judgment threshold surface technology, the problems of high false alarm rate and missed detection in defect identification in automated fabric production have been solved, achieving accurate detection of fabric defects and efficient detection of weak defects.

CN122243890APending Publication Date: 2026-06-19CHONGQING RUIMINGHONG TEXTILE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING RUIMINGHONG TEXTILE CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively distinguish between normal texture cycles and actual defects in automated fabric production, and are sensitive to light fluctuations and fabric deformation, resulting in high false alarm rates and a coexistence of missed and false detections.

Method used

Multi-scale texture decomposition is performed by acquiring images of the fabric surface to construct a periodic analysis model, generate a standard defect-free texture template, and calculate the local response intensity map using a pre-trained abnormality sensitive filter bank to establish a dynamic defect judgment threshold surface for pixel-by-pixel defect marking.

Benefits of technology

It achieves accurate identification of defects in greige fabric, reduces false alarm rate, improves the ability to detect minor defects, and is insensitive to changes in light and fabric deformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243890A_ABST
    Figure CN122243890A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for detecting defects in greige fabric based on image processing, belonging to the field of textile production defect detection technology. The method includes acquiring original images of the greige fabric surface and performing multi-scale texture decomposition to obtain a low-level texture image and a high-frequency detail image; constructing a periodic analysis model to calculate warp and weft texture repeating units and generate a standard defect-free texture template; inputting the high-frequency detail image into a pre-trained anomaly-sensitive filter bank to obtain a multi-dimensional local response intensity map; fusing the defect-free texture template and the local response map to establish a dynamic defect judgment threshold surface, and performing pixel-by-pixel defect marking accordingly. This method can accurately model ideal texture backgrounds and achieve adaptive defect discrimination, effectively improving the accuracy and stability of defect detection against complex weave backgrounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of textile production defect detection technology, specifically a method and system for detecting defects in greige fabric based on image processing. Background Technology

[0002] In the automated production of fabric, surface defect detection based on machine vision is a key step in ensuring product quality. Existing technologies mainly rely on two paradigms: directly acquiring images of defect-free areas as fixed templates and identifying differences through image differencing or pattern matching; or applying general operators such as Gabor filters and edge detection to extract features, and then using fixed or simple adaptive thresholds for binarization segmentation to locate defects.

[0003] These methods have technical limitations. The fixed template method cannot isolate random yarn details and the influence of acquisition conditions in the image; the template itself is not an ideal texture representation, making the system extremely sensitive to lighting fluctuations and normal fabric deformation, resulting in a high false alarm rate. General feature extraction methods lack specificity for fabric defects and struggle to effectively respond to diverse, small, or blurred defects. Furthermore, segmentation mechanisms based on fixed thresholds cannot handle natural intensity variations caused by complex weave backgrounds; when the contrast between the background and defect signals is low, segmentation accuracy drops significantly, leading to both false negatives and false negatives.

[0004] Current technological bottlenecks are mainly reflected in two aspects: the lack of ability to extract random factors from actual images and accurately reconstruct the inherent ideal periodic texture model of the fabric; and the lack of a dynamic threshold mechanism that can deeply integrate multi-dimensional defect features and texture background information to achieve pixel-level adaptive and accurate discrimination. A new method is needed that can fundamentally distinguish between normal texture periods and real defects. Summary of the Invention

[0005] This invention aims to solve at least one of the technical problems existing in the prior art;

[0006] Therefore, this invention proposes an image processing-based method for detecting defects in raw fabric, comprising:

[0007] A continuous image sequence of the fabric production line is acquired, and the surface of the fabric is illuminated by a uniform illumination unit to obtain an original image of the fabric surface with standard brightness.

[0008] A multi-scale texture decomposition operation is performed on the original image of the fabric surface to separate the underlying texture image that characterizes the basic fabric texture and the high-frequency detail image that contains random yarn details.

[0009] A periodic analysis model for the underlying texture image is constructed, and the size of the texture repeating unit in the longitudinal and latitudinal directions is calculated through the periodic analysis model to generate a standard defect-free texture template image.

[0010] The high-frequency detail image is input into a pre-trained abnormally sensitive filter bank for convolution response calculation to obtain the local response intensity map of the fabric surface in multiple feature dimensions.

[0011] By fusing the standard defect-free texture template image with the local response intensity map, a dynamic defect determination threshold surface is established, and pixel-by-pixel defect marking is performed on the original image of the fabric surface based on the dynamic defect determination threshold surface.

[0012] Further, the step of performing a multi-scale texture decomposition operation on the original image of the fabric surface to separate the underlying texture image characterizing the basic fabric texture and the high-frequency detail image containing random yarn details includes:

[0013] The original image of the fabric surface is converted into a grayscale image, and the blurred version of the grayscale image under different scale Gaussian kernels is calculated.

[0014] The difference image obtained by subtracting the blurred version corresponding to the maximum scale from the grayscale image pixel by pixel serves as the base image characterizing global illumination changes and gradual texture.

[0015] The difference image obtained by subtracting the blurred version corresponding to the smallest scale from the grayscale image pixel by pixel is used as an ultra-high frequency noise image containing yarn fuzz and fine impurities.

[0016] The base image is smoothed by median filtering and morphological closing operation to remove residual local irregularities and generate the underlying texture image.

[0017] The ultra-high frequency noise image is inversely processed with the smoothed base image to extract the texture variation components between the minimum and maximum scales, thereby generating the high-frequency detail image.

[0018] Further, the construction of a periodic analysis model for the underlying texture image, the calculation of the texture repeating unit size in the longitudinal and latitudinal directions using the periodic analysis model, and the generation of a standard defect-free texture template image include:

[0019] Perform a two-dimensional Fourier transform on the underlying texture image to obtain the spectral distribution image of the fabric texture in the frequency domain;

[0020] In the spectral distribution image, the horizontal main frequency component representing the periodicity of the warp yarn arrangement and the vertical main frequency component representing the periodicity of the weft yarn arrangement are identified.

[0021] Based on the relationship between the horizontal main frequency component and the image width, the width of the repeating pixels of the warp texture is calculated as the size of the warp texture repeating unit;

[0022] Based on the relationship between the vertical main frequency component and the image height, the height of the repeating pixels of the latitudinal texture is calculated as the size of the latitudinal texture repeating unit;

[0023] Based on the dimensions of the longitudinal and latitudinal texture repeating units, a complete texture periodic unit is cropped from the underlying texture image, and a seamlessly stitched standard, defect-free texture template image larger than the original image size is generated through edge mirroring extension and average fusion operations.

[0024] Further, the step of inputting the high-frequency detail image into a pre-trained anomaly-sensitive filter bank for convolutional response calculation to obtain local response intensity maps of the fabric surface in multiple feature dimensions includes:

[0025] The abnormally sensitive filter bank includes multiple Gabor filters in different directions and multiple Gaussian-Laplace filters of different sizes;

[0026] The high-frequency detail image is convolved with each Gabor filter to calculate the texture response intensity of each pixel in each direction. The maximum response value in all directions is taken as the directional texture intensity of the pixel to generate a directional texture response map in the first feature dimension.

[0027] The high-frequency detail image is convolved with each Gaussian Laplacian filter to calculate the blotty defect response intensity of each pixel at different scales. The maximum response value among all scales is taken as the blotty defect intensity of the pixel to generate a blotty defect response map in the second feature dimension.

[0028] Local binary pattern features are calculated for the high-frequency detail image, the texture coding histogram in the neighborhood of each pixel is statistically analyzed, and the entropy value of the histogram is used as the local texture disorder of the pixel to generate a texture disorder map under the third feature dimension.

[0029] The directional texture response map, the speckle defect response map, and the texture disorder map are integrated to form the local response intensity map, which contains multiple feature dimensions.

[0030] Furthermore, the process of fusing the standard defect-free texture template image with the local response intensity map to establish a dynamic defect determination threshold surface includes:

[0031] Align the standard defect-free texture template image with the original image of the fabric surface to be inspected in spatial position;

[0032] The standard defect-free texture template image is subjected to the same multi-scale texture decomposition operation and anomaly-sensitive filter bank convolution response calculation as the original image of the fabric surface to obtain the local response reference map of the template image.

[0033] For each pixel in the local response intensity map of the image to be detected, calculate the absolute difference between it and the corresponding pixel in the local response benchmark map of the template image in multiple feature dimensions;

[0034] Based on the position of each pixel in the original image of the fabric surface, and combined with the corresponding texture period phase in the underlying texture image, a basic threshold offset is assigned to each pixel. The basic threshold offset is assigned based on the position of the pixel within the texture period. The principle for assigning the basic threshold offset is as follows: a relatively higher threshold is assigned to pixels at the edge of the texture period to suppress false alarms caused by texture transition, and a threshold that is relatively closer to the global adaptive threshold is assigned to pixels at the center of the texture period to avoid missed detections.

[0035] The global preset base threshold, the absolute difference value of each pixel, and the base threshold offset are weighted and summed to obtain the final defect judgment threshold of the pixel. The defect judgment thresholds of all pixels together constitute the dynamic defect judgment threshold surface.

[0036] Further, the step of marking defects pixel-by-pixel on the original image of the fabric surface based on the dynamic defect determination threshold surface includes:

[0037] The value of the local response intensity map corresponding to each pixel in the original image of the fabric surface is compared with the defect judgment threshold of the pixel in the dynamic defect judgment threshold surface.

[0038] If the local response intensity value of a pixel exceeds its corresponding defect judgment threshold, the pixel is initially marked as a suspected defect point.

[0039] Spatial connectivity analysis is performed on the initially marked suspected defect points to merge spatially adjacent suspected defect points into the same suspected defect region;

[0040] Calculate the average and maximum values ​​of the local response intensity of all pixels within each suspected defect region;

[0041] For each suspected defective region, the average and maximum values ​​of its local response intensity are compared with the average value of the defect determination threshold of the pixels covered by the suspected defective region. If the average or maximum value exceeds the average value of the region threshold by a certain proportion, the suspected defective region is finally determined to be a defective region, and a unique defect mark number is assigned to the suspected defective region.

[0042] Furthermore, it also includes the steps of extracting and classifying defect features from the finally identified defective regions:

[0043] For each defect region with a unique defect marker number, extract the aspect ratio of its bounding rectangle, the variance of pixel intensity within the region, and the tortuosity of the defect region's edge.

[0044] Based on the aspect ratio of the circumscribed rectangle, the defect region is initially divided into strip-shaped defect candidate regions and block-shaped defect candidate regions.

[0045] For the initially identified candidate areas of strip-shaped defects, the angle between their main axis direction and the warp or weft direction of the fabric is further calculated, and they are further subdivided into warp streak defects or weft streak defects according to the size of the angle.

[0046] For the initially identified blocky defect candidate regions, the similarity between their internal texture and the surrounding normal texture, as well as the average value of the texture disorder map within the region, are further calculated. Based on the characteristics of low similarity and high average disorder, they are classified as holes or stains.

[0047] The classification results, location coordinates, and extracted feature vectors of all defective regions are saved to the defect record database.

[0048] Furthermore, it also includes a dynamic threshold surface optimization step based on a historical defect record database:

[0049] Historical defect data in the defect record database are periodically summarized, and the distribution pattern of the local response intensity values ​​detected by various types of defects under different texture period phases is statistically analyzed.

[0050] Analyze the missed defect samples and calculate the difference between the local response intensity value at the location of the missed defect and the corresponding threshold in the dynamic defect judgment threshold surface used at that time;

[0051] Based on the distribution pattern and the gap, the allocation strategy of the basic threshold offset and the weight coefficient of each component in the weighted summation formula are adjusted in reverse during the calculation of the dynamic defect judgment threshold surface.

[0052] The process of establishing the dynamic defect judgment threshold surface is re-executed using the adjusted parameters to generate an optimized dynamic defect judgment threshold surface for subsequent detection.

[0053] Furthermore, it also includes real-time lighting status feedback and adjustment steps during the detection process:

[0054] While acquiring a continuous operating image sequence of the fabric production line, the actual illuminance output of the uniform lighting unit is monitored by an independent brightness sensor;

[0055] The actual illuminance output is compared with the preset standard illuminance value, and the illuminance deviation ratio is calculated.

[0056] If the illuminance deviation ratio exceeds the allowable range, the exposure time or gain parameter of the image acquisition sensor is dynamically adjusted according to the deviation ratio to compensate for the change in illumination.

[0057] Meanwhile, the illuminance deviation ratio is used as an additional input in the calculation of the dynamic defect judgment threshold surface, so that the defect judgment threshold can be adaptively adjusted according to real-time lighting conditions.

[0058] Furthermore, the present invention also includes an image processing-based fabric defect detection system, the system including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the computer program, implements the steps of the image processing-based fabric defect detection method described above.

[0059] Compared with the prior art, the beneficial effects of the present invention are:

[0060] By constructing a periodic analysis model, the separated underlying texture image undergoes automatic calculation and quantitative analysis of the warp and weft texture periods, generating a standard, theoretically defect-free texture template image. This technology replaces the traditional method that relies on physical sample images as references, eliminating the random yarn distribution and acquisition noise inevitably contained in the sample images. The resulting standard template provides a pure and stable ideal texture background benchmark, making the subsequent defect comparison process insensitive to background changes caused by normal production fluctuations, lighting variations, or slight fabric deformation. This improves the system's tolerance to normal texture variations and reduces the fundamental possibility of false alarms.

[0061] The algorithm inputs a high-frequency detail image into a pre-trained anomaly-sensitive filter bank, and computes the local responses of multiple targeted feature dimensions in parallel to generate a series of response intensity maps characterizing different defect features. The algorithm then integrates the aforementioned standard defect-free texture template with these multi-dimensional response maps to construct a non-uniform dynamic defect judgment threshold surface for the entire image. This threshold surface is not a fixed value; the threshold for each pixel is dynamically determined by the intensity of the ideal texture background corresponding to that point and the multi-dimensional anomaly response. This mechanism enables the discrimination criteria to adaptively adjust according to the strength of the texture substrate, effectively suppressing interference from complex texture backgrounds while keenly capturing real defect signals with varying contrasts to the background. This results in more accurate defect segmentation at the pixel level and improves the detection capability of weak defects. Attached Figure Description

[0062] Figure 1This is a flowchart illustrating the steps of the image processing-based fabric defect detection method described in this invention.

[0063] Figure 2 A flowchart for generating a defect-free texture template image. Detailed Implementation

[0064] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0065] See Figure 1 A continuous sequence of images from the fabric production line is acquired. Illumination compensation is applied to the fabric surface using a uniform illumination unit to obtain an original image of the fabric surface with standard brightness. Multi-scale texture decomposition is performed on the original image of the fabric surface to separate the underlying texture image representing the basic fabric texture and the high-frequency detail image containing random yarn details. A periodic analysis model is constructed for the underlying texture image. The size of the texture repeating units in the warp and weft directions is calculated using this periodic analysis model, and a standard defect-free texture template image is generated. The high-frequency detail image is input into a pre-trained anomaly-sensitive filter bank for convolutional response calculation to obtain local response intensity maps of the fabric surface in multiple feature dimensions. The standard defect-free texture template image and the local response intensity maps are fused to establish a dynamic defect judgment threshold surface. Pixel-by-pixel defect marking is then performed on the original image of the fabric surface based on this dynamic defect judgment threshold surface.

[0066] See Figure 2 In one embodiment of the present invention, the original image of the fabric surface is a color image after illuminance compensation by a uniform illumination unit. In a specific implementation, the original image of the fabric surface is converted into a grayscale image, and the conversion process adopts the standard RGB to grayscale weighted average method. When calculating the blurred version of the grayscale image under different scale Gaussian kernels, a series of Gaussian kernels are defined, with the scale parameter of the Gaussian kernels increasing from small to large. The smallest Gaussian kernel is used to capture the finest details in the image, and the largest Gaussian kernel is used to characterize the most macroscopic structure in the image. During the calculation process, the grayscale image is sequentially convolved with each specified scale Gaussian kernel in a two-dimensional manner to generate a set of blurred images with the same size as the original grayscale image but different degrees of blur.

[0067] Subtracting the corresponding maximum-scale blurred version pixel by pixel from the grayscale image, the maximum-scale blurred version reflects the global distribution trend of illumination and the macroscopic gradual variation characteristics of texture in the image. The difference image obtained after pixel-by-pixel subtraction is called the base image. The base image removes the influence of global illumination changes and gradual texture, mainly retaining the main periodic structural components of the texture. Subtracting the corresponding minimum-scale blurred version pixel by pixel from the grayscale image, the minimum-scale blurred version removes extremely high-frequency noise and isolated points in the image. The difference image obtained after pixel-by-pixel subtraction is called the ultra-high frequency noise image. The ultra-high frequency noise image mainly contains pixel intensity abrupt information corresponding to yarn fuzz and small impurities.

[0068] In some embodiments, the base image is smoothed using median filtering and morphological closing operations to remove residual local irregularities, thereby generating a low-level texture image. The window size for median filtering is chosen to match the pixel size of the average diameter of the fabric yarns in the image, and the structuring element used in the morphological closing operation is a circle with a radius slightly less than half the texture period. The purpose of the smoothing process is to eliminate non-periodic interference introduced into the base image by uneven local illumination or minute yarn twists, so that the final generated low-level texture image can more purely represent the periodicity of the fabric's basic texture.

[0069] In practice, the ultra-high frequency noise image and the smoothed base image are inversely processed to extract texture variation components between the minimum and maximum scales, generating a high-frequency detail image. The inverse processing involves subtracting the smoothed base texture image from the original grayscale image, then subtracting the ultra-high frequency noise image; the remaining image components are the high-frequency detail image. It can be understood that the high-frequency detail image contains texture details between the yarn diameter and the texture periodic unit size. These details are usually random representations of normal yarn arrangement, but may also contain abnormal variations caused by defects.

[0070] A two-dimensional Fourier transform is performed on the underlying texture image to obtain the spectral distribution image of the fabric texture in the frequency domain. The two-dimensional Fourier transform converts the periodic texture structure in the spatial domain into a series of discrete bright spots in the frequency domain. The center point of the spectral distribution image represents the DC component, and the bright spots away from the center represent texture components of different spatial frequencies. In the spectral distribution image, the dominant frequency components in the horizontal direction representing the periodicity of the warp yarn arrangement and the dominant frequency components in the vertical direction representing the periodicity of the weft yarn arrangement are identified. The identification method involves searching for the non-central bright spot with the highest intensity along the horizontal axis, with the center point as the origin; the corresponding frequency is the dominant frequency component in the horizontal direction. Similarly, searching for the non-central bright spot with the highest intensity along the vertical axis yields the dominant frequency component in the vertical direction.

[0071] Based on the relationship between the horizontal dominant frequency component and the image width, the width of the repeating pixels in the warp texture is calculated as the size of the warp texture repeating unit. The calculation relationship is: the size of the warp texture repeating unit equals the image width divided by the number of periods corresponding to the horizontal dominant frequency component. Based on the relationship between the vertical dominant frequency component and the image height, the height of the repeating pixels in the latitudinal texture is calculated as the size of the latitudinal texture repeating unit. The calculation relationship is: the size of the latitudinal texture repeating unit equals the image height divided by the number of periods corresponding to the vertical dominant frequency component.

[0072] Based on the warp and weft texture repeating unit sizes, a complete texture periodic unit is cropped from the underlying texture image. During cropping, a rectangular region is selected in the center of the underlying texture image, with a width equal to the warp texture repeating unit size and a height equal to the weft texture repeating unit size. Optionally, to avoid selecting regions that contain texture seams or anomalies, cropping attempts can be made at multiple different locations in the underlying texture image, and the region with the most consistent periodicity can be selected as the texture periodic unit. Through edge mirroring and averaging operations, a seamless, standard, defect-free texture template image larger than the original image size is generated. Edge mirroring involves mirroring each edge of the cropped texture periodic unit to expand its size. Averaging involves weighted averaging of pixel values ​​from different mirror copies in the overlapping area generated by the mirroring to eliminate seams. The size of the generated standard, defect-free texture template image should not be smaller than the size of the original image of the fabric surface to be inspected, to support free-sliding matching during image alignment.

[0073] In one embodiment of the invention, the anomaly-sensitive filter bank comprises multiple Gabor filters with different orientations and multiple Laplace Gaussian filters of different sizes. The Gabor filters are used to capture directional texture features, and the Laplace Gaussian filters are used to respond to abrupt changes in intensity of spots or patches. In a specific implementation, a set of Gabor filter orientation parameters θ are defined, with values ​​ranging from 0 to π radians, and samples are taken uniformly at equal angular intervals. Wavelength, phase shift, spatial aspect ratio, and bandwidth parameters are defined for each Gabor filter to cover different spatial frequencies and directional characteristics that may appear in the fabric texture. The Laplace Gaussian filters are constructed from the second derivative of a two-dimensional Gaussian function, and a set of Laplace Gaussian filter size parameters σ are defined, with values ​​of σ varying from small to large to correspond to the detection of spot-like defects of different sizes.

[0074] The high-frequency detail image is convolved with each Gabor filter, and the texture response intensity of each pixel in each direction is calculated. For a single Gabor filter, the convolution operation with the high-frequency detail image is performed in the spatial or frequency domain, producing a response map of the same size as the high-frequency detail image. Each pixel value in the response map represents the degree of matching between the texture at that location and the filter kernel in a specific direction and scale. The maximum response value in all directions is taken as the directional texture intensity of the pixel, generating the directional texture response map in the first feature dimension. Specifically, for each pixel location in the image, the response values ​​produced by Gabor filters in all different directions at that location are compared, and the maximum value is assigned to the corresponding pixel location in the directional texture response map.

[0075] In practice, the high-frequency detail image is convolved with each Laplacian Gaussian filter to calculate the speckled defect response intensity of each pixel at different scales. The Laplacian Gaussian filter produces strong negative or positive responses to regions of abrupt intensity change in the image, especially speckled structures. The maximum response value across all scales is taken as the speckled defect intensity of the pixel, generating a speckled defect response map in the second feature dimension. Specifically, for each pixel location in the image, the absolute values ​​of the response values ​​produced by all Laplacian Gaussian filters of different sizes at that location are compared, and the pixel location with the maximum absolute value is assigned to the corresponding pixel location in the speckled defect response map.

[0076] In some embodiments, local binary pattern features are calculated for high-frequency detail images, a texture encoding histogram is plotted in the neighborhood of each pixel, and the entropy value of the histogram is used as the local texture disorder of the pixel to generate a texture disorder map in the third feature dimension. When calculating the local binary pattern, a radius is defined with each pixel as the center. A circular neighborhood is selected at equal intervals on the circumference. Each sampling point. It can be understood that local texture disorder reflects the statistical complexity of a local image patch. The disorder in normal texture areas usually fluctuates within a certain range, while the disorder in areas with breaks, stains, or holes will significantly increase or decrease. The entropy calculation of the neighborhood of a local binary pattern follows the definition of entropy in information theory, and its formula is:

[0077]

[0078] in: Indicates the degree of local texture disorder. This represents the number of histogram bars in the local binary pattern encoding histogram. Indicates the first The normalized frequency value of each histogram bar represents the probability of the coding pattern occurring in its local neighborhood. For each pixel in the high-frequency detail image, a normalized frequency value is calculated based on its neighborhood. Value, all The image formed by these values ​​is the texture disorder map.

[0079] The directional texture response map, blob defect response map, and texture disorder map are integrated to form a local response intensity map containing multiple feature dimensions. The integration operation is not a simple pixel overlay of the three images, but rather combines the values ​​of the three feature dimensions at each pixel location into a multi-dimensional feature vector. In practice, the local response intensity map can be represented as a three-dimensional data cube, with its spatial dimensions consistent with the original image and its depth dimension being... The system stores three feature values: directional texture intensity, speckle defect intensity, and local texture disorder. Optionally, before proceeding to the subsequent defect determination step, each feature dimension can be normalized to eliminate differences in the units and numerical ranges of different features. The normalization method can be min-max normalization or Z-score normalization.

[0080] In one embodiment of the present invention, a standard defect-free texture template image is spatially aligned with the original image of the fabric surface to be inspected. This alignment operation is based on image registration technology, typically employing phase correlation or feature point matching to calculate the translational offset between the two images. One of the images is then subjected to a corresponding translational transformation to ensure that the standard defect-free texture template image and the original image of the fabric surface to be inspected achieve spatial consistency in texture structure. In a specific implementation, the standard defect-free texture template image undergoes the same multi-scale texture decomposition operation and anomaly-sensitive filter bank convolution response calculation as the original image of the fabric surface, obtaining a local response baseline map of the template image. This calculation process is pre-executed. The Gaussian kernel scale parameters, median filter window size, morphological operation structuring element size used in the multi-scale texture decomposition operation of the template image, as well as all parameters of the Gabor filter and Laplacian filter in the anomaly-sensitive filter bank, must be completely consistent with the parameters used when processing the original image of the fabric surface to be inspected. This ensures that the local response baseline map of the template image and the local response intensity map of the image to be inspected are comparable in feature space.

[0081] For each pixel in the local response intensity map of the image to be detected, calculate the absolute difference between it and the corresponding pixel in the local response baseline map of the template image across multiple feature dimensions. Since the local response intensity map is a three-dimensional data cube, calculate the absolute values ​​of the differences between the feature vectors of the image to be detected and the feature vectors of the template image in each dimension, in the corresponding spatial coordinates. These absolute values ​​constitute a difference vector. In some embodiments, the difference vector can be calculated according to the following formula:

[0082]

[0083] in: Indicates the location in the image. The multidimensional absolute difference vector calculated at that point, This means taking the absolute value of each component of the vector. Indicates the location of the image to be detected. The local response intensity feature vector at that location, Indicates that the template image is in the same position The local response baseline feature vector at the point. This difference vector can be understood as quantifying the degree of deviation between the features of the point to be detected and the corresponding features of the ideal, defect-free template.

[0084] Based on the position of each pixel in the original image of the fabric surface, and combined with its corresponding texture period phase in the underlying texture image, a basic threshold offset is assigned to each pixel. The calculation of the texture period phase depends on the previously determined warp and weft texture repeating unit sizes. For any pixel in the image, its relative position to the start of the texture period determines its phase. The basic threshold offset is assigned based on the pixel's position within the texture period. The allocation principle for the basic threshold offset is: assigning a relatively higher threshold to pixels at the edges of the texture period to suppress false alarms caused by texture transitions, and assigning a threshold closer to the global adaptive threshold to pixels at the center of the texture period to avoid missed detections. In specific implementations, the basic threshold offset can be a phase-related function value. For example, near the edges of the texture period, the function outputs a positive offset, and near the center of the texture period, the function outputs zero or a very small offset.

[0085] The final defect threshold for each pixel is obtained by weighted summation of the globally preset base threshold, the absolute difference value of each pixel, and the base threshold offset. The defect thresholds of all pixels collectively constitute the dynamic defect threshold surface. The weighted summation process is performed independently for each pixel. The absolute difference value needs to be scalarized before summation; one method is to convert the multidimensional absolute difference vector... norm, for example norm or Norm, used as a scalarized measure of difference. Optional, dynamic defect determination threshold surface. The calculation formula can be expressed as:

[0086]

[0087] in: It is a location The final defect determination threshold at the location, It is a globally preset base threshold. It is a measure of difference obtained by scaling up the absolute difference value. Based on texture phase The base threshold offset obtained by looking up a table or calculation. and These are pre-set weighting coefficients used to balance the impact of the difference value and the phase offset on the final threshold.

[0088] The value of the local response intensity map corresponding to each pixel in the original image of the fabric surface is compared with the defect judgment threshold of the pixel in the dynamic defect judgment threshold surface. The comparison operation is performed independently for each feature dimension, or the values ​​of the local response intensity maps are aggregated before comparison. If the local response intensity value of a pixel exceeds its corresponding defect judgment threshold, the pixel is initially marked as a suspected defect point. The result of the initial marking is a binary image, where the marked pixels have a value of 1, representing a suspected defect point, and the unmarked pixels have a value of 0.

[0089] Spatial connectivity analysis is performed on the initially marked suspected defect points to merge spatially adjacent suspected defect points into a single suspected defect region. Adjacency is typically defined using an 8-connected neighborhood. Spatial connectivity analysis identifies all discrete suspected defect regions by scanning a binary image and assigning a unique region label to each connected region with a pixel value of 1. The average and maximum local response intensity values ​​of all pixels within each suspected defect region are calculated. The average and maximum values ​​are calculated using the feature values ​​corresponding to all pixels within that region in the local response intensity map; these values ​​can be calculated for a single feature dimension or by using aggregated feature values.

[0090] For each suspected defect region, its average and maximum local response intensities are compared with the average defect threshold of the pixels covered by the suspected defect region. The comparison method calculates the ratio of the average local response intensity of the suspected defect region to the average regional threshold, and the ratio of the maximum local response intensity to the average regional threshold. If the average or maximum value exceeds the average regional threshold by a certain proportion, the suspected defect region is ultimately determined to be a defect region, and a unique defect marker number is assigned to it. This proportion is a preset parameter. In some embodiments, the determination rule can be set as follows: when the average feature value of the suspected defect region is greater than its corresponding regional average threshold... Multiples, or the largest eigenvalue is greater than the average threshold of its corresponding region. When the time is doubled, the area is ultimately determined to be a defective area, among which and It is a coefficient greater than 1.

[0091] In one embodiment of the present invention, for each defect region with a unique defect marker number, the aspect ratio of its circumscribed rectangle, the variance of pixel intensity within the region, and the tortuosity of the defect region's edge are extracted. The circumscribed rectangle is the smallest regular rectangle that can completely enclose the pixels of the defect region; its aspect ratio is the ratio of its longer side to its shorter side. The variance of pixel intensity within the region is calculated based on the grayscale values ​​of all pixels covered by the defect region in the original image of the fabric surface. The tortuosity of the defect region's edge is used to quantify the irregularity of the edge; it is defined as the ratio of the actual perimeter of the defect region to the perimeter of a circle with the same area, or as the ratio of the chain code length of the edge pixels to the perimeter of the convex hull. A larger tortuosity value indicates a more complex and irregular edge shape.

[0092] Based on the aspect ratio of the circumscribed rectangle, the defect region is initially divided into strip-shaped defect candidate regions and block-shaped defect candidate regions. This initial distinction is based on a preset aspect ratio threshold. In specific implementations, an aspect ratio threshold is set. When the aspect ratio of the bounding rectangle of the defect area is greater than 1, When the aspect ratio is less than or equal to 1, the region is classified as a candidate region for strip-shaped defects; when the aspect ratio is less than or equal to 1, the region is classified as a candidate region for strip-shaped defects. At that time, the region was classified as a candidate region for blocky defects. Threshold The typical value range is 3 to 5, and the specific value can be adjusted according to the fabric texture density and the sensitivity requirements for strip defects.

[0093] For the initially identified candidate regions of strip-shaped defects, the angle between their principal axis direction and the warp or weft direction of the fabric is further calculated. Based on the size of the angle, they are further subdivided into warp streak defects or weft streak defects. The principal axis direction can be obtained by calculating the second-order central moment of the defect region or by performing principal component analysis on the region's pixels. In practice, the principal axis direction is compared with the known warp direction of the fabric (usually corresponding to the vertical direction of the image or 0 degrees), and the angle between them is calculated. Set an angle threshold. For example, 15 degrees. If the included angle Less than If the direction of the strip-shaped defect is parallel to the meridional direction, it is classified as a meridional streak defect; if the included angle is... Greater than If the angle is between the latitude and longitude, it is determined to be parallel to the latitude (usually perpendicular to the longitude) and classified as a latitude streak defect; streak defects with an angle between the two can be classified as oblique streaks or treated separately.

[0094] For the initially identified blocky defect candidate regions, the similarity between their internal texture and the surrounding normal texture, as well as the average value of the texture disorder map within the region, are further calculated. Based on the characteristic of low similarity and high average disorder map value, defects are classified as holes or stains. The similarity calculation between the internal texture and the surrounding normal texture can be performed by extracting gray-level co-occurrence matrix features or local binary pattern histogram features from the original grayscale image, both inside the defect region and within the annular normal region surrounding the defect region. Distance metrics such as Bach distance or chi-square distance are then calculated between these two feature distributions; a larger distance indicates lower similarity. The average value of the texture disorder map within the region refers to the average value of all pixels in the texture disorder map belonging to the defect region. The values ​​are calculated as an arithmetic mean. During classification, two thresholds can be set: a similarity threshold and a distance threshold. and the average threshold of disorder When the similarity distance of the candidate regions for blocky defects is greater than... And its average texture disorder is greater than When the similarity distance is large but the average texture disorder is moderate, it can be classified as a hole-type defect because holes typically manifest as missing texture and high irregularity. When the similarity distance is large but the average texture disorder is moderate, it may be classified as a stain-type defect. See Table 1 for a possible correspondence between features and defect types.

[0095] Table 1: Correspondence between the characteristics and classification of candidate regions for blocky defects

[0096] Similarity distance Average texture disorder Possible classifications High (>) ) High (>) ) Hole-type defects High (>) ) medium (≤ ) Stain defects Low (≤ ) Low / Medium / High Further analysis is needed or it may be classified as a pseudo-defect.

[0097] The classification results, location coordinates, and extracted feature vectors of all defective regions are saved to a defect record database. The defect record database can be a relational database table, with each row corresponding to a detected defective region. Each record typically contains the following fields: a unique defect identifier, the coordinates of the top-left and bottom-right corners of the bounding rectangle of the defective region, the defect classification result, the extracted feature vector, the detection time, and the batch number of the corresponding fabric roll. Historical defect data in the defect record database is periodically summarized, and the distribution patterns of local response intensity values ​​detected for various types of defects under different texture period phases are statistically analyzed. Periodic summarization can be performed by day, week, or the number of fabric rolls detected. During summarization, historical data are grouped according to defect category and the texture period phase of the pixel where the defect is located. For each group, the distribution of local response intensity values ​​of defect points is statistically analyzed, and its mean, median, quantiles, and other statistics are calculated to obtain the range of response intensity values ​​required to detect a specific type of defect under different phases.

[0098] The method analyzes missed defect samples and calculates the difference between the local response intensity value at the location of the missed defect and the corresponding threshold in the dynamic defect judgment threshold surface used at the time. Missed defect samples are those discovered by subsequent manual re-inspection or more sophisticated offline detection equipment, but which this method failed to successfully mark. For each missed defect, its position in the image is located, and the local response intensity value at that position is retrieved back from the original detection record. The threshold set at this location by the dynamic defect determination threshold surface. Understandable, the gap It is a positive value; the larger the difference, the higher the threshold is set when there is a missed detection.

[0099] Based on the distribution patterns and discrepancies, the allocation strategy for the basic threshold offset and the weighting coefficients of each component in the weighted summation formula are adjusted in reverse during the calculation of the dynamic defect judgment threshold surface. For example, the allocation strategy for the basic threshold offset is adjusted if statistics show that a certain type of defect is frequently missed at the texture periodic edge phase, and the discrepancy... If the value is generally large, the base threshold offset at that phase can be reduced. Adjust the weighting coefficients of each component in the weighted summation formula; for example, if the analysis of missed samples indicates that the difference measure... If the false negatives are generally small and insufficient to raise the threshold to a sufficiently high level, then increasing the weighting coefficient of the difference measure can be considered. In some embodiments, an optimization algorithm may be used to maximize the defect detection rate on historical data and minimize the false alarm rate, adjusting the base threshold offset function and weighting coefficients. , Solve the problem.

[0100] In one embodiment of the invention, while acquiring a continuous sequence of images of the fabric production line, an independent brightness sensor monitors the actual illuminance output of the uniform illumination unit. The uniform illumination unit typically consists of an LED array of specific wavelengths. The brightness sensor is installed independently of the image acquisition sensor, with its photosensitive surface facing the fabric surface and covered by the light from the uniform illumination unit. The brightness sensor samples the brightness of the illuminated area at a fixed frequency, for example, tens of times per second, and converts the sampled analog signal into a digital signal. This digital signal represents the actual illuminance output of the uniform illumination unit acting on the fabric surface at the current moment. In specific implementations, the spectral response characteristics of the brightness sensor should match the photosensitive characteristics of the image acquisition sensor, and its installation position should ensure that the monitored area represents the average illuminance level across the entire field of view, avoiding inaccurate monitoring values ​​due to local shadows or reflections.

[0101] The actual illuminance output is compared with the preset standard illuminance value to calculate the illuminance deviation ratio. The preset standard illuminance value is the optimal working illuminance determined through calibration during the system debugging phase. This illuminance value ensures that the acquired original image of the fabric surface has moderate overall brightness, sufficient contrast, and clear detail in both highlight and shadow areas. The formula for calculating the illuminance deviation ratio is:

[0102]

[0103] in: This represents the calculated illuminance deviation ratio. This represents the actual illuminance output value measured by the luminance sensor. This represents the preset standard illuminance value. Deviation percentage. A positive value indicates that the lighting is too bright, while a negative value indicates that the lighting is insufficient.

[0104] If the illuminance deviation ratio exceeds the allowable range, the exposure time or gain parameter of the image acquisition sensor is dynamically adjusted according to the deviation ratio to compensate for the illumination change. The allowable range is a preset positive and negative percentage interval. In some embodiments, the calculated illuminance deviation ratio is calculated when the monitored actual illuminance output continues for multiple sampling periods. The absolute values ​​of all exceed the upper limit of the allowable range, for example... If the illumination condition is insufficient, then compensation is required. The adjustment process is implemented through the control interface of the image acquisition sensor. It can be understood that increasing the exposure time or improving the gain can compensate for insufficient illumination, while decreasing the exposure time or reducing the gain can compensate for excessive illumination. Simultaneously, the illuminance deviation ratio is used as an additional input in the calculation of the dynamic defect judgment threshold surface, enabling the defect judgment threshold to be adaptively adjusted according to real-time lighting conditions. In specific implementation, the dynamic defect judgment threshold surface... The calculation formula can be extended to include an illuminance compensation term:

[0105]

[0106] in: It is the final defect judgment threshold after real-time lighting condition adjustment. The original dynamic defect determination threshold surface is calculated according to the method described in the embodiment. It is a preset lighting sensitivity coefficient. This is the proportion of illuminance deviation calculated in real time. Illumination sensitivity coefficient. The value of determines the sensitivity of the defect judgment threshold to changes in lighting; its sign is usually negative, meaning that when the actual illuminance is lower than the standard value ( When the image is dark, the contrast between the defect and the background may be reduced. To maintain detection sensitivity, the defect judgment threshold should be appropriately lowered. Conversely, when the actual illumination is too high ( When overexposure or reflection occurs, the risk of false alarms may be increased, and the defect judgment threshold should be appropriately increased. Optional, light sensitivity coefficient. The absolute value is typically less than 1 to ensure the adjustment is moderate. Finally, in the defect marking step, the local response intensity value of each pixel is compared with the adjusted threshold. Comparison, rather than the original. In this way, the dynamic defect detection threshold surface not only considers the texture phase and the difference from the template, but also incorporates real-time lighting status information. This allows it to maintain the stability of defect detection performance and reduce false alarms or missed detections caused by changes in ambient light when lighting conditions drift or fluctuate slowly.

[0107] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for detecting defects in raw fabric based on image processing, characterized in that, The method includes: A continuous sequence of images from the fabric production line is collected, and the surface of the fabric is illuminated by a uniform illumination unit to obtain an original image of the fabric surface with standard brightness. A multi-scale texture decomposition operation is performed on the original image of the fabric surface to separate the underlying texture image that characterizes the basic fabric texture and the high-frequency detail image that contains random yarn details. A periodic analysis model for the underlying texture image is constructed, and the size of the texture repeating unit in the longitudinal and latitudinal directions is calculated through the periodic analysis model to generate a standard defect-free texture template image. The high-frequency detail image is input into a pre-trained abnormally sensitive filter bank for convolution response calculation to obtain the local response intensity map of the fabric surface in multiple feature dimensions. By fusing the standard defect-free texture template image with the local response intensity map, a dynamic defect determination threshold surface is established, and pixel-by-pixel defect marking is performed on the original image of the fabric surface based on the dynamic defect determination threshold surface.

2. The method for detecting defects in raw fabric based on image processing according to claim 1, characterized in that, The step of performing a multi-scale texture decomposition operation on the original image of the fabric surface to separate the low-level texture image characterizing the basic fabric texture and the high-frequency detail image containing random yarn details includes: The original image of the fabric surface is converted into a grayscale image, and the blurred version of the grayscale image under different scale Gaussian kernels is calculated. The difference image obtained by subtracting the blurred version corresponding to the maximum scale from the grayscale image pixel by pixel serves as the base image characterizing global illumination changes and gradual texture. The difference image obtained by subtracting the corresponding smallest scale blurred version from the grayscale image pixel by pixel is used as an ultra-high frequency noise image containing yarn fuzz and fine impurities. The base image is smoothed by median filtering and morphological closing operation to remove residual local irregularities and generate the underlying texture image. The ultra-high frequency noise image is inversely processed with the smoothed base image to extract the texture variation components between the minimum and maximum scales, thereby generating the high-frequency detail image.

3. The method for detecting defects in raw fabric based on image processing according to claim 2, characterized in that, The construction of a periodic analysis model for the underlying texture image, the calculation of the texture repeating unit size in the longitudinal and latitudinal directions using the periodic analysis model, and the generation of a standard, defect-free texture template image include: Perform a two-dimensional Fourier transform on the underlying texture image to obtain the spectral distribution image of the fabric texture in the frequency domain; In the spectral distribution image, the horizontal main frequency component representing the periodicity of the warp yarn arrangement and the vertical main frequency component representing the periodicity of the weft yarn arrangement are identified. Based on the relationship between the horizontal main frequency component and the image width, the width of the repeating pixels of the warp texture is calculated as the size of the warp texture repeating unit; Based on the relationship between the vertical main frequency component and the image height, the height of the repeating pixels of the latitudinal texture is calculated as the size of the latitudinal texture repeating unit; Based on the dimensions of the longitudinal and latitudinal texture repeating units, a complete texture periodic unit is cropped from the underlying texture image, and a seamlessly stitched standard, defect-free texture template image larger than the original image size is generated through edge mirroring extension and average fusion operations.

4. The method for detecting defects in raw fabric based on image processing according to claim 3, characterized in that, The step of inputting the high-frequency detail image into a pre-trained anomaly-sensitive filter bank for convolutional response calculation to obtain local response intensity maps of the fabric surface in multiple feature dimensions includes: The abnormally sensitive filter bank includes multiple Gabor filters in different directions and multiple Gaussian-Laplace filters of different sizes; The high-frequency detail image is convolved with each Gabor filter to calculate the texture response intensity of each pixel in each direction. The maximum response value in all directions is taken as the directional texture intensity of the pixel to generate a directional texture response map in the first feature dimension. The high-frequency detail image is convolved with each Gaussian Laplacian filter to calculate the blotty defect response intensity of each pixel at different scales. The maximum response value among all scales is taken as the blotty defect intensity of the pixel to generate a blotty defect response map in the second feature dimension. Local binary pattern features are calculated for the high-frequency detail image, the texture coding histogram in the neighborhood of each pixel is statistically analyzed, and the entropy value of the histogram is used as the local texture disorder of the pixel to generate a texture disorder map under the third feature dimension. The directional texture response map, the speckle defect response map, and the texture disorder map are integrated to form the local response intensity map, which contains multiple feature dimensions.

5. The method for detecting defects in raw fabric based on image processing according to claim 1, characterized in that, The process of fusing the standard defect-free texture template image with the local response intensity map to establish a dynamic defect determination threshold surface includes: Align the standard defect-free texture template image with the original image of the fabric surface to be inspected in spatial position; The standard defect-free texture template image is subjected to the same multi-scale texture decomposition operation and anomaly-sensitive filter bank convolution response calculation as the original image of the fabric surface to obtain the local response reference map of the template image. For each pixel in the local response intensity map of the image to be detected, calculate the absolute difference between it and the corresponding pixel in the local response reference map of the template image in multiple feature dimensions; Based on the position of each pixel in the original image of the fabric surface, and combined with the corresponding texture period phase in the underlying texture image, a basic threshold offset is assigned to each pixel. The basic threshold offset is assigned based on the position of the pixel within the texture period. The principle for assigning the basic threshold offset is as follows: a relatively higher threshold is assigned to pixels at the edge of the texture period to suppress false alarms caused by texture transition, and a threshold that is relatively closer to the global adaptive threshold is assigned to pixels at the center of the texture period to avoid missed detections. The global preset base threshold, the absolute difference value of each pixel, and the base threshold offset are weighted and summed to obtain the final defect judgment threshold of the pixel. The defect judgment thresholds of all pixels together constitute the dynamic defect judgment threshold surface.

6. The method for detecting defects in raw fabric based on image processing according to claim 5, characterized in that, The step of marking defects pixel-by-pixel on the original image of the fabric surface based on the dynamic defect determination threshold surface includes: The value of the local response intensity map corresponding to each pixel in the original image of the fabric surface is compared with the defect determination threshold of the pixel in the dynamic defect determination threshold surface. If the local response intensity value of a pixel exceeds its corresponding defect judgment threshold, the pixel is initially marked as a suspected defect point. Spatial connectivity analysis is performed on the initially marked suspected defect points to merge spatially adjacent suspected defect points into the same suspected defect region; Calculate the average and maximum values ​​of the local response intensity of all pixels within each suspected defect region; For each suspected defective region, the average and maximum values ​​of its local response intensity are compared with the average value of the defect determination threshold of the pixels covered by the suspected defective region. If the average or maximum value exceeds the average value of the region threshold by a certain proportion, the suspected defective region is finally determined to be a defective region, and a unique defect mark number is assigned to the suspected defective region.

7. The method for detecting defects in raw fabric based on image processing according to claim 6, characterized in that, It also includes the steps of extracting and classifying defect features from the finally identified defective areas: For each defect region with a unique defect marker number, extract the aspect ratio of its bounding rectangle, the variance of pixel intensity within the region, and the tortuosity of the defect region's edge. Based on the aspect ratio of the circumscribed rectangle, the defect region is initially divided into strip-shaped defect candidate regions and block-shaped defect candidate regions. For the initially identified candidate areas of strip-shaped defects, the angle between their main axis direction and the warp or weft direction of the fabric is further calculated, and the areas are further subdivided into warp streak defects or weft streak defects according to the size of the angle. For the initially identified blocky defect candidate regions, the similarity between their internal texture and the surrounding normal texture, as well as the average value of the texture disorder map in the region, are further calculated. Based on the characteristics of low similarity and high average disorder, they are classified as holes or stains. The classification results, location coordinates, and extracted feature vectors of all defective regions are saved to the defect record database.

8. The method for detecting defects in raw fabric based on image processing according to claim 7, characterized in that, It also includes a dynamic threshold surface optimization step based on a historical defect record database: Historical defect data in the defect record database are periodically summarized, and the distribution pattern of the local response intensity values ​​detected by various types of defects under different texture period phases is statistically analyzed. Analyze the missed defect samples and calculate the difference between the local response intensity value at the location of the missed defect and the corresponding threshold in the dynamic defect judgment threshold surface used at that time; Based on the distribution pattern and the gap, the allocation strategy of the basic threshold offset and the weight coefficient of each component in the weighted summation formula are adjusted in reverse during the calculation of the dynamic defect judgment threshold surface. The process of establishing the dynamic defect judgment threshold surface is re-executed using the adjusted parameters to generate an optimized dynamic defect judgment threshold surface for subsequent detection.

9. The method for detecting defects in raw fabric based on image processing according to claim 1, characterized in that, It also includes real-time lighting status feedback and adjustment steps during the testing process: While acquiring a continuous operating image sequence of the fabric production line, the actual illuminance output of the uniform lighting unit is monitored by an independent brightness sensor; The actual illuminance output is compared with the preset standard illuminance value, and the illuminance deviation ratio is calculated. If the illuminance deviation ratio exceeds the allowable range, the exposure time or gain parameter of the image acquisition sensor is dynamically adjusted according to the deviation ratio to compensate for the change in illumination. Meanwhile, the illuminance deviation ratio is used as an additional input in the calculation of the dynamic defect judgment threshold surface, so that the defect judgment threshold can be adaptively adjusted according to real-time lighting conditions.

10. A fabric defect detection system based on image processing, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the image processing-based fabric defect detection method as described in any one of claims 1 to 9.