Cloth inspection method based on machine vision

By setting up multiple detection mechanisms along the fabric running path, using different imaging conditions and camera light source combinations, and combining specific image processing algorithms, the problems of missed detection and accuracy in fabric defect detection in the prior art have been solved, achieving efficient and accurate fabric defect detection.

CN115524337BActive Publication Date: 2025-12-16CHANGZHOU HONGDA INTELLIGENCE TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202211189579.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-12-16
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

Existing machine vision fabric inspection methods cannot effectively distinguish and detect different types of fabric defects, resulting in a high rate of missed detections, poor image quality, and low detection accuracy, which cannot meet the requirements of modern textile production.

Method used

Multiple fabric defect detection mechanisms are set up along the fabric running path. Each detection mechanism uses different imaging conditions and camera light source combinations, combined with specific image processing algorithms, to analyze and process different defect features. The central processing unit integrates the data from multiple detection mechanisms.

Benefits of technology

It enables accurate detection of defects in different types of fabrics, reduces the missed detection rate, improves detection accuracy and efficiency, has wide adaptability, and meets the continuous high-speed detection needs of modern textile production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115524337B_ABST
    Figure CN115524337B_ABST
Patent Text Reader

Abstract

The application discloses a cloth inspecting method based on machine vision, at least two fabric defect detection mechanisms are arranged along a fabric running path, the at least two fabric defect detection mechanisms respectively collect images of a same area of the fabric under different imaging conditions, the images under the different imaging conditions respectively correspond to different defect characteristics, a central processing unit adopts image processing algorithms corresponding to the different defect characteristics to correspondingly analyze and process the images under the different imaging conditions, obtains defect data of the same area of the fabric, the central processing unit continuously obtains defect data of remaining areas of the fabric, and obtains all defect data of the fabric, and the at least two fabric defect detection mechanisms are connected with the central processing unit. The application can more accurately detect fabric defects on line, avoids missing detection, can realize continuous and high-speed detection, can better monitor fabric quality, and meets modern textile production requirements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a method for detecting fabric defects in operation, in particular to a cloth inspection method based on machine vision, belonging to the technical field of fabric defect detection method. BACKGROUND

[0002] The occurrence of fabric defects directly affects the quality, appearance and performance of the fabric, and causes the profits of the production enterprises to be damaged. Therefore, according to the national standard for fabric inspection, the appearance quality of the fabric is inspected one by one to detect defects such as yarn defects and weaving defects on the cloth surface, and corresponding marks are made, which is the most critical detection process in the production process of high-quality fabrics. Defect detection is an important part of product quality control in textile enterprises.

[0003] At present, most domestic textile enterprises adopt manual cloth inspection method, which judges whether there are defects on the cloth surface by naked eye according to experience, and classifies the defects. Due to the limitations of human eye physiological structure and the small size of cloth defects, the detection speed is slow, the miss rate and the false detection rate are high, and the inspection quality is unstable. Moreover, manual cloth inspection cannot realize continuous and high-speed detection, cannot generate usable data, increases the labor cost of enterprises, and cannot meet the requirements of modern textile production.

[0004] With the development of image processing technology, using automatic cloth inspection machine based on machine vision and image analysis technology to replace manual defect detection is an inevitable trend of the development of automation and informatization in the textile industry.

[0005] The existing automatic cloth inspection methods using machine vision and image analysis technology, such as the machine vision cloth inspection system integrated on the loom with the Chinese utility model patent ZL201920914133.8, the cloth inspection machine for garment production with the Chinese utility model patent ZL201921480443.X, the compact intelligent cloth inspection machine with the Chinese utility model patent ZL202120803793.6, the fabric defect online automatic detection method based on machine vision and its device with the Chinese invention patent ZL201110052541.5, the intelligent cloth inspection machine using artificial intelligence technology for automatic cloth inspection with the Chinese invention patent application 202010218387.3, the online automatic cloth inspection machine and cloth inspection method for the machine tail of setting machine with the Chinese invention patent application 202010429520.X, the image acquisition system applied to the cloth inspection machine with the Chinese invention patent application 201910322831.3, etc., all disclose the use of one or several industrial cameras, the illumination of the fabric by one or several light sources, the shooting of the fabric to be inspected by the industrial camera to obtain real-time images, the analysis and processing of the real-time images by the central processing unit using image processing algorithms, and the determination of the defect type, defect position, defect area and defect level of the fabric to be inspected.

[0006] However, the automatic cloth inspection method using machine vision and image analysis technology has the following shortcomings in actual work process:

[0007] (1) Fabric defects can be generally divided into spinning defects, weaving defects, printing and dyeing defects, which are various in type and form, and different in shape, size, direction and form. In the light source system for shooting fabric defects, the image obtained by the camera needs to have good definition and contrast, and the fabric defects can be clearly found. Different types of fabric defects need to use visual lighting technology suitable for the defects. For example, the front lighting technology using a front light source can shoot the defects of the fabric front image, such as fly-in, thick knots, wrinkles, color spots and stains, etc. The back lighting technology using a back light source can shoot the defects of the light transmission image, such as broken warp, broken weft, sparse and dense roads and holes, etc. The dark field illumination or grazing light illumination technology with a small incident angle between the fabric plane can create strong shadows for the surface patterns of the weaving fabric, which can improve the image contrast and obtain high-definition images, so as to shoot the defects in the weaving process, such as different diameters, different wefts, pattern abnormalities, misprints and local organization errors, etc. Therefore, the visual lighting scheme directly affects the quality and application effect of the fabric image, and is the key to fabric defect detection, that is, different defects need to use different cameras and / or light sources, that is, the imaging conditions must be different. In the above cloth inspection method, the same camera and the same light source are used to shoot all defects, for example, a camera and a light source are used to shoot all defects, for example, several cameras and several light sources are used to shoot all defects, but the illumination angles of the several light sources to the fabric are completely the same, etc. Therefore, the quality of the collected fabric image is poor, and the fabric image shot by the camera can only be used to detect a certain type of defect, and other types of defects cannot be detected. The error caused by poor image quality cannot be corrected by software, which leads to serious missing detection of fabric defects.

[0008] (2) In the fabric defect image processing algorithm, it can be generally summarized into three directions: frequency domain transformation based method, statistical method based method and model based method. The Gabor transform based on frequency domain transformation integrates the characteristics of frequency domain and space domain, and has obvious effect, but is not suitable for high-speed detection system. The FFT transform has fast detection speed, which weakens the information of defects to a certain extent. The gray level co-occurrence matrix based on statistical method has significant effect as a classification feature, but the dimension of the gray level co-occurrence matrix is large, and the real-time performance is difficult to guarantee. The Wold texture model based on model method has obvious effect on warp and weft defects, but has poor effect on oil stains and spots. Therefore, the image processing algorithm has its own application situation and limitation, and lacks self-adaptability for various fabric defects.

[0009] For various defect images, the effects of image processing algorithms need to be distinguished, the amount of calculation, sensitivity, effectiveness, identification categories and process requirements, etc. need to be comprehensively analyzed and processed by using the most suitable image processing algorithm corresponding to the defect image, so that the defect data of the defect image can be accurately obtained and the process requirements can be met. The above cloth inspection method uses the same image processing algorithm for all defect images, which cannot accurately obtain all defect data and cannot guarantee the operability, accuracy and detection precision of defect detection.

[0010] In addition, some foreign fabric defect detection systems on the market, such as the loom defect online detection system of Barco Company in Belgium, Fabriscan of Uster Company in Switzerland and automatic cloth inspection system of EVS in Israel. These automatic detection systems are very expensive, but the use is not ideal, mainly in the adaptability of the detection system to the fabric variety, and the existence of defect missed detection of part of the fabric structure. SUMMARY

[0011] The technical problem to be solved by the present application is to provide a cloth inspection method based on machine vision, which can more accurately detect fabric defects online, avoid missed detection, better monitor fabric quality and meet the requirements of modern textile production.

[0012] To solve the above technical problems, the present application adopts a cloth inspection method based on machine vision, at least two fabric defect detection mechanisms are arranged along the fabric running path, the at least two fabric defect detection mechanisms respectively collect images of the same area of the fabric under different imaging conditions, the images under different imaging conditions correspond to different defect characteristics respectively, the central processing unit adopts image processing algorithms corresponding to the different defect characteristics to analyze and process the images under different imaging conditions, and obtains the defect data of the same area of the fabric. The central processing unit continuously obtains the defect data of the remaining area of the fabric and obtains all the defect data of the fabric, and the at least two fabric defect detection mechanisms are connected with the central processing unit.

[0013] As a preferred embodiment of the present application, the at least two fabric defect detection mechanisms include five fabric defect detection mechanisms or a combination of any two of the five fabric defect detection mechanisms, the five fabric defect detection mechanisms are respectively a first fabric defect detection mechanism, a second fabric defect detection mechanism, a third fabric defect detection mechanism, a fourth fabric defect detection mechanism and a fifth fabric defect detection mechanism, and the first to fifth fabric defect detection mechanisms are arranged at intervals along the fabric running path.

[0014] As a preferred embodiment of the present application, the first fabric defect detection mechanism detects objects including broken warp, broken weft, thin-thick path and holes of the fabric, the second fabric defect detection mechanism detects objects including fly insertion, thick knot, wrinkle, color spot and stain of the fabric, the third fabric defect detection mechanism detects objects including scratch, different diameter, different weft, pattern abnormality, misplacement and local organization error of the fabric, the fourth fabric defect detection mechanism detects objects including different fiber of the fabric, and the fifth fabric defect detection mechanism detects objects including original color difference, front-back color difference and left-center-right color difference of the fabric.

[0015] As a preferred embodiment of the present application, the first fabric defect detection mechanism includes a first industrial camera and a backlight source, the first industrial camera and the backlight source are connected with a central processing unit, the first industrial camera is arranged above the fabric, the backlight source is arranged below the fabric, the central processing unit analyzes and processes images collected by the first industrial camera by using an image processing algorithm including Hough transform and Gabor filtering or an image processing algorithm based on deep learning, and obtains broken warp, broken weft, thin-thick path and hole defect data of the same area of the running fabric, and the measurement resolution of the first industrial camera is ≤0.2mm.

[0016] As another preferred embodiment of the present application, the first fabric defect detection mechanism includes a 3D camera, the 3D camera is connected with a central processing unit, the 3D camera is arranged above the fabric, the 3D camera scans the fabric by using structured light, the central processing unit analyzes and processes images collected by the 3D camera by using an image processing algorithm including binocular image restoration or an image processing algorithm based on deep learning, and obtains broken warp, broken weft, thin-thick path and hole defect data of the same area of the running fabric.

[0017] As a preferred embodiment of the present application, the second fabric defect detection mechanism includes a second industrial camera and a positive light source, the second industrial camera and the positive light source are connected with a central processing unit, the second industrial camera and the positive light source are arranged above the fabric, and the central processing unit analyzes and processes images collected by the second industrial camera by using an image processing algorithm including a frequency domain screen filter or an image processing algorithm based on deep learning, and obtains fly insertion, thick knot, wrinkle, color spot and stain defect data of the same area of the running fabric.

[0018] As a preferred embodiment of the present application, the third fabric defect detection mechanism comprises a third industrial camera and a grazing light source, the third industrial camera and the grazing light source are connected with the central processing unit, the third industrial camera and the grazing light source are arranged above the fabric, the central processing unit analyzes and processes the image collected by the third industrial camera by using an image processing algorithm based on deep learning, and obtains the scratch, different diameter, different weft, abnormal pattern, misregistration and local organization error defect data of the same area of the running fabric.

[0019] As a preferred embodiment of the present application, the fourth fabric defect detection mechanism comprises a fourth industrial camera and a polarized light source, the fourth industrial camera and the polarized light source are connected with the central processing unit, the fourth industrial camera is additionally provided with a polarized mirror, and the fourth industrial camera and the polarized light source are arranged above the fabric, the central processing unit analyzes and processes the image collected by the fourth industrial camera by using an image processing algorithm based on a gray level co-occurrence matrix or an image processing algorithm based on deep learning, and obtains the heterogeneous fiber defect of the same area of the running fabric.

[0020] As a preferred embodiment of the present application, the fifth fabric defect detection mechanism comprises a color camera and a D65 illumination light source, the color camera and the D65 illumination light source are connected with the central processing unit, the color camera and the D65 illumination light source are arranged above the fabric, the central processing unit analyzes and processes the image collected by the color camera by using an image processing algorithm based on a color difference detection of HSI color space or an image processing algorithm based on deep learning, and obtains the original color difference, front and back color difference and left, middle and right color difference defects of the same area of the running fabric.

[0021] As a preferred embodiment of the present application, the central processing unit is an electric control device of the cloth inspection machine, or is a digital controller, an embedded control system or an industrial computer independently provided with a man-machine interface.

[0022] After the above method is used, the present application has the following beneficial effects:

[0023] To ensure the classification record marking of spinning defects, weaving defects, printing and dyeing defects detection, the score assessment of defects, improve the operability, accuracy and detection precision of the system, reduce the missed detection rate and misjudgment rate of various defects, at least two fabric defect detection mechanisms are arranged along the fabric running path, preferably five, the imaging conditions of each fabric defect detection mechanism are different, that is, different cameras and / or light sources are used for different defect characteristics, for example, a first industrial camera and a backlight source are used for broken warp, broken weft, sparse dense path and hole defects, or a 3D camera is used, and a second industrial camera and a front light source are used for flying thread weaving, thick knot, wrinkle, color point and stain defects, and a third industrial camera and a grazing light source are used for scratch, different diameter, different weft, pattern abnormality, wrong pattern and local organization error defects, and the like, and the image processing algorithm corresponding to different defect images is used for analysis and processing, for example, the image processing algorithm corresponding to broken warp, broken weft, sparse dense path and hole defects is used for analysis and processing of the image collected under the imaging condition of the first industrial camera and the backlight source, such as the image processing algorithm based on Hough transform and Gabor filtering, and the like. That is, different imaging condition defect images are used for different defect characteristics, and the image processing algorithm corresponding to the defect characteristics is used for analysis and processing, so that the fabric defects can be more accurately detected online, the missed detection is avoided, the detection efficiency is improved, the fabric quality can be better monitored, and the modern textile production requirements are met.

[0024] The fabric inspection method of the present application can realize continuous and high-speed detection, stable detection quality and wide adaptability to fabric varieties. BRIEF DESCRIPTION OF DRAWINGS

[0025] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0026] Figure 1 It is a detection structure schematic diagram of the fabric inspection method based on machine vision of the present application.

[0027] Figure 2 It is a top view schematic diagram of the fabric defect detection mechanism of the present application. Figure 1

[0028] Figure 3 It is a 3D camera calibration part flow chart in the present application.

[0029] Figure 4 It is a fabric three-dimensional skeleton defect recognition part flow chart in the present application.

[0030] Figure 5 It is an image processing algorithm part flow chart of the frequency domain screen filter in the present application. DETAILED DESCRIPTION ​

[0031] Referring to Figure 1 , 2 , the present application provides a cloth inspection method based on machine vision, at least two fabric defect detection mechanisms are arranged along the running path of the fabric 6, the at least two fabric defect detection mechanisms are connected with a central processing unit, the at least two fabric defect detection mechanisms respectively collect images of the same area of the fabric under different imaging conditions, the images under different imaging conditions respectively correspond to different defect characteristics, the central processing unit uses image processing algorithms corresponding to the different defect characteristics to analyze and process the images under different imaging conditions, and obtains defect data of the same area of the fabric, the central processing unit continuously obtains defect data of the remaining area of the fabric, and obtains all defect data of the fabric. In the present application, the at least two fabric defect detection mechanisms are preferably arranged at intervals along the running path of the fabric 6 as shown in Figure 1 , of course, the at least two fabric defect detection mechanisms can be arranged at intervals along the width of the fabric 6 or arranged up and down as shown in the figure, and the at least two fabric defect detection mechanisms are connected with the central processing unit through wired or wireless electrical signals. Referring to Figure 1 , when the at least two fabric defect detection mechanisms are arranged at intervals along the running path of the fabric 6, the central processing unit can calculate the time for the fabric to reach another fabric defect detection mechanism from one fabric defect detection mechanism according to the distance between the fabric defect detection mechanisms and the speed of the fabric running, so that the images of the same area of the fabric under different imaging conditions can be collected by controlling the time for each fabric defect detection mechanism to start collecting images, and similarly, the images of the remaining area of the fabric under different imaging conditions can be continuously collected by the at least two fabric defect detection mechanisms, and the central processing unit can continuously obtain defect data of the remaining area of the fabric through the above processing, and finally obtain all defect data of the fabric, the defect data including defect type, defect position, defect area and defect grade of the fabric.

[0032] As a preferred embodiment of the present application, referring to Figure 1, the at least two fabric defect detection mechanisms include five fabric defect detection mechanisms or a combination of any two of the five fabric defect detection mechanisms, the five fabric defect detection mechanisms are respectively a first fabric defect detection mechanism 1, a second fabric defect detection mechanism 2, a third fabric defect detection mechanism 3, a fourth fabric defect detection mechanism 4 and a fifth fabric defect detection mechanism 5, the first to fifth fabric defect detection mechanisms 1-5 are sequentially or arbitrarily spaced along the fabric running path, and the combination of any two of the five fabric defect detection mechanisms means that the first and second fabric defect detection mechanisms can be combined, the third and fifth fabric defect detection mechanisms can be combined, the second and fourth fabric defect detection mechanisms can be combined, and the like. In the present application, the first to fifth fabric defect detection mechanisms 1-5 can be arranged at equal intervals from each other, for example, the distance W between them is a set value, such as 1 meter, 1.5 meters, 2 meters, 3 meters, etc. Of course, they can also be arranged at unequal intervals, that is, the distance W between them is not the same. Each fabric defect detection mechanism is connected to the central processing unit through wired or wireless electrical signals.

[0033] As a preferred embodiment of the present application, the detection objects of the first fabric defect detection mechanism 1 include broken warp, broken weft, thin-thick path and holes of the fabric, the detection objects of the second fabric defect detection mechanism 2 include lint weaving, knots, wrinkles, color spots and stains of the fabric, the detection objects of the third fabric defect detection mechanism 3 include scratches, different diameters, different wefts, pattern abnormalities, misprints and local organization errors of the fabric, the detection objects of the fourth fabric defect detection mechanism 4 include different fibers of the fabric, and the detection objects of the fifth fabric defect detection mechanism 5 include original color difference, front-back color difference and left-center-right color difference of the fabric.

[0034] As a preferred embodiment of the present application, referring to Figure 1 、 2 , the first fabric defect detection mechanism 1 includes a first industrial camera 1-1 and a backlight source 1-2, the first industrial camera 1-1 and the backlight source 1-2 are connected to the central processing unit through wired or wireless electrical signals, the first industrial camera 1-1 is arranged above the fabric 6, and the backlight source 1-2 is arranged below the fabric 6. The central processing unit analyzes and processes the image collected by the first industrial camera 1-1, such as the image of region A, using an image processing algorithm based on Hough transform and Gabor filtering or an image processing algorithm based on deep learning, to obtain broken warp, broken weft, thin-thick path and hole defect data of the same region, such as region A, of the fabric. The measurement resolution of the first industrial camera 1-1 is ≤0.2mm, the first industrial camera 1-1 can use a linear array or a planar array industrial camera, and the backlight source 1-2 can use infrared light. In the present application, according to the shooting range of the industrial camera, the fabric 6 can be divided into several regions, such as Figure 2The diagram shows regions A to L. Additionally, the first industrial camera 1-1 can be a single camera, meaning it captures an image of region A. Alternatively, there can be multiple first industrial cameras 1-1, arranged along the fabric width, simultaneously capturing partial images of region A. The central processing unit then stitches and merges these partial images from each camera 1-1 to obtain an image covering the entire fabric width, for example, region A. The backlight 1-2 can be one or multiple. In this invention, the image processing algorithm based on Hough transform and Gabor filtering is a well-known algorithm. First, Hough transform is used to obtain the main direction of texture features. After grayscale conversion of the image, skeleton processing is completed. Difference and Hough transform processing are performed on the image boundaries. A threshold is set to extract points with high superposition at a certain angle; the angle of these points is the vector angle of the image texture features. Second, Gabor filtering is applied... f Convolution of (x, y) and β(x, y), i.e., β f (x, y) = β(x, y) ⊕g f (x, y) = β(x, y){exp{- } In the formula: (x0, y0) is the center position of the Gabor filter; (α, β) is the scaling factor of the Gaussian function in the Gabor filter; These represent the direction and frequency of the Gabor filter, respectively. The density of the fabric's texture can be used to determine... The size of the convolution result is taken as the modulus to obtain the output image, i.e., B. f (x, y) = B f (x, y)┃, Finally, the maximum entropy is used to apply to image B. f Segmenting (x, y) to obtain image T f(x, y); the images obtained in two directions of the texture are fused by using the XOR operation, and the obtained image is R(x, y) = T1(x, y) ⊕ T2(x, y); since the fused image can be discontinuous, morphological operation is needed to obtain the image P(x, y). Then, the isolated point elimination operation is performed, and a better defect segmentation image Q(x, y) containing detailed information of the defects can be obtained. In addition, the central processing unit can also use an image processing algorithm based on deep learning, including collecting or calling sufficient broken warp, broken weft, sparse and dense path and broken hole defect images and establishing a defect image training set; filtering the defect image training set, then performing Fourier transform on each image in the filtered defect image training set to obtain a frequency spectrum of the defect image training set, and performing binaryzation processing on the frequency spectrum to obtain a binary frequency spectrum of the defect image training set; constructing and training a deep convolutional neural network classification model, the deep convolutional neural network classification model includes a convolutional layer, a fully connected feature layer, a fully connected classification layer and a classifier, each layer in the deep convolutional neural network classification model is connected to each other through neurons, the binary frequency spectrum is used to train the deep convolutional neural network classification model to realize correct classification and identification of the images in the defect image training set; and the trained deep convolutional neural network classification model is used to analyze and process the images collected by the first industrial camera 1-1, such as the images of the A region, to obtain the broken warp, broken weft, sparse and dense path and broken hole defect data of the same region of the fabric, such as the A region.

[0035] As another preferred embodiment of the application, the first fabric defect detection mechanism 1 comprises a 3D camera connected to the central processing unit through wired or wireless electrical signals, not shown in the figure, the 3D camera comprises two high-speed cameras, which can also be binocular cameras, and is arranged above the fabric, the 3D camera scans the fabric by using structured light, preferably MEMS coded grating structured light, the central processing unit analyzes and processes the images collected by the camera by using an image processing algorithm including binocular image restoration or an image processing algorithm based on deep learning to obtain the broken warp, broken weft, sparse and dense path and broken hole defect data of the same region of the fabric. In the application, the binocular image restoration image processing algorithm uses the VC development platform to process powerful digital operation solution and the powerful image processing module of OpenCV to complete camera calibration and establishment of a three-dimensional space environment. The image processing algorithm is divided into two processes, i.e. a camera calibration part and a fabric three-dimensional skeleton defect recognition part, the process of the camera calibration part is shown in Figure 3 , and the process of the fabric three-dimensional skeleton defect recognition part is shown in Figure 4For online real-time detection, a fixed coded color grating is projected, and RGB color space is used on the recognition grating. Then, pre-processing and thinning are performed to lay a foundation for establishing a fabric three-dimensional skeleton. The least square method is used to solve the matching of left and right image coordinates to three-dimensional coordinates, wherein the internal and external parameters of the camera are obtained from the calibration process. Finally, the three-dimensional skeleton data is classified, and defects are identified and classified accordingly. Further, to improve the operation speed, the two-coordinate analysis data method is used to convert the three-dimensional coordinates of the three-dimensional fabric skeleton to a two-dimensional coordinate system for data processing, which can quickly obtain the broken warp, broken weft, sparse and dense path, and hole defect data of the same area of the fabric.

[0036] As a preferred embodiment of the present application, referring to Figure 1 、 2 , the second fabric defect detection mechanism 2 includes a second industrial camera 2-1 and a front light source 2-2, and the second industrial camera 2-1 and the front light source 2-2 are connected to the central processing unit through wired or wireless signals. The central processing unit analyzes and processes the image collected by the second industrial camera 2-1, such as the image of region A, using an image processing algorithm based on a frequency domain screen filter or an image processing algorithm based on deep learning, to obtain the flying thread insertion, knot, wrinkle, color point, and stain defect data of the same region, such as region A, of the fabric. As in the first embodiment, the second industrial camera 2-1 and the front light source 2-2 can be one or several. The second industrial camera 2-1 can be a linear array or a planar array industrial camera, and the front light source 2-2 can be visible light. In the present application, the image processing algorithm based on the frequency domain screen filter is a known algorithm, which generally includes first obtaining a fabric frequency spectrum graph containing defects by Fourier transform, then designing a frequency domain filter to remove normal texture background and retain defect information, performing inverse Fourier transform to reconstruct, obtaining an image without normal texture, and finally obtaining a defect image through binaryzation after Gaussian smoothing, performing Fourier transform on the obtained fabric image, using the maximum inter-class variance method to complete binaryzation on the frequency domain graph after Gaussian smoothing, then performing particle filtering through the size screening of the segmented particles, determining the required parameters of the frequency domain filter through the particle parameters, performing inverse Fourier transform on the filtered frequency domain graph to obtain a reconstructed grayscale graph, and performing OTSU segmentation and morphological processing to obtain a defect image, as shown in Figure 5The algorithm has fast detection speed and can quickly obtain the fly insertion, thick knot, wrinkle, color spot and stain defect data of the same area, for example, area A, of the fabric. In addition, the central processing unit can also use an image processing algorithm based on deep learning, including collecting or calling a sufficient number of fly insertion, thick knot, wrinkle, color spot and stain defect images and establishing a defect image training set; filtering the defect image training set, then performing Fourier transform on each image in the filtered defect image training set to obtain a frequency spectrum of the defect image training set, and performing binaryzation processing on the frequency spectrum to obtain a binary frequency spectrum of the defect image training set; constructing and training a deep convolutional neural network classification model, the deep convolutional neural network classification model including a convolution layer, a fully connected feature layer, a fully connected classification layer and a classifier, each layer in the deep convolutional neural network classification model being connected to each other through neurons, using the binary frequency spectrum to train the deep convolutional neural network classification model to realize correct classification and identification of the images in the defect image training set; using the trained deep convolutional neural network classification model to analyze and process the images collected by the second industrial camera 2-1, for example, the images of area A, to obtain the fly insertion, thick knot, wrinkle, color spot and stain defect data of the same area, for example, area A, of the fabric.

[0037] As a preferred embodiment of the present application, see Figure 1 、 2The third fabric defect detection mechanism 3 includes a third industrial camera 3-1 and a grazing light source 3-2, and the third industrial camera 3-1 and the grazing light source 3-2 are connected with the central processing unit through wired or wireless telecommunication signals. The third industrial camera 3-1 and the grazing light source 3-2 are arranged above the fabric 6. The central processing unit analyzes and processes the images collected by the third industrial camera 3-1, such as the images of the A area, by using an image processing algorithm based on deep learning, to obtain the scratch, different diameter, different weft, abnormal pattern, misplacement and local organization error defect data of the same area, such as the A area, of the fabric. Like the first embodiment, the third industrial camera 3-1 and the grazing light source 3-2 can be one or several. The third industrial camera 3-1 can be a linear array or a planar array industrial camera. In the present application, the image processing algorithm based on deep learning is a known algorithm, which includes collecting or calling a sufficient number of scratch, different diameter, different weft, abnormal pattern, misplacement and local organization error defect images and establishing a defect image training set; filtering the defect image training set, then performing Fourier transform on each image in the filtered defect image training set to obtain a frequency spectrum graph of the defect image training set, and performing binaryzation processing on the frequency spectrum graph to obtain a binaryzation frequency spectrum graph of the defect image training set; constructing and training a deep convolutional neural network classification model, which includes a convolutional layer, a fully connected feature layer, a fully connected classification layer and a classifier, and the layers in the deep convolutional neural network classification model are connected with each other through neurons. The binaryzation frequency spectrum graph is used to train the deep convolutional neural network classification model to realize correct classification and identification of the images in the defect image training set; and the trained deep convolutional neural network classification model is used to analyze and process the images collected by the third industrial camera 3-1, such as the images of the A area, to obtain the scratch, different diameter, different weft, abnormal pattern, misplacement and local organization error defect data of the same area, such as the A area, of the fabric.

[0038] As a preferred embodiment of the present application, see Figure 1 、 2, the fourth fabric defect detection mechanism 4 includes a fourth industrial camera 4-1 and a polarized light source, the fourth industrial camera 4-1 is equipped with a polarized mirror 4-2, the polarized light source is composed of a three-primary-color light source 4-3 and a polarizer 4-4, the fourth industrial camera 4-1 and the polarized light source are arranged above the fabric 6, and the fourth industrial camera 4-1 and the polarized light source are connected with the central processing unit through wired or wireless signals. In work, the three-primary-color light passes through the polarizer, is transmitted or diffusely reflected by a transparent / semi-transparent film 4-5, and is projected onto the surface of the fabric 6, so that the camera imaging produces a color or brightness different from that of the fabric fiber, and the characteristic information of the heterogeneous fiber on the fabric is easily extracted. The central processing unit analyzes and processes the image collected by the fourth industrial camera 4-1, such as the image of the A area, by using an image processing algorithm based on a gray level co-occurrence matrix or a deep learning-based image processing algorithm, to obtain the heterogeneous fiber defect of the same area of the fabric, such as the A area. As in the first embodiment, the fourth industrial camera 4-1 and the polarized light source can be one or several. The fourth industrial camera 4-1 can adopt a linear array or a planar array industrial camera. In the present application, the image processing algorithm based on the gray level co-occurrence matrix is a known algorithm, which obtains a first gray level distribution sequence and a second gray level distribution sequence from the collected pattern gray level image and the standard pattern gray level image; classifies the pixel points of the to-be-detected pattern gray level image by using the difference values of the corresponding elements of the first gray level distribution sequence and the second gray level distribution sequence to obtain a pixel point category image; calculates the gray level co-occurrence matrix of each pixel point in the pixel point category image to obtain the probability that the pixel point is a defect; and converts the gray value of each pixel point in the to-be-detected pattern gray level image into the probability that the pixel point is a defect to obtain a defect co-occurrence representation image; threshold segmentation is performed on the defect co-occurrence representation image to obtain a defect area, so as to identify the defects in the fabric. In addition, the central processing unit can also use a deep learning-based image processing algorithm, including collecting or calling a sufficient number of heterogeneous fiber defect images and establishing a defect image training set; filtering the defect image training set, then performing Fourier transform on each image in the filtered defect image training set to obtain a frequency spectrum image of the defect image training set, and performing binaryzation processing on the frequency spectrum image to obtain a binary frequency spectrum image of the defect image training set; constructing and training a deep convolutional neural network classification model, the deep convolutional neural network classification model includes a convolutional layer, a fully connected feature layer, a fully connected classification layer and a classifier, the layers in the deep convolutional neural network classification model are connected to each other through neurons, the binary frequency spectrum image is used to train the deep convolutional neural network classification model, so that the images in the defect image training set are correctly classified and identified; and the trained deep convolutional neural network classification model is used to analyze and process the image collected by the fourth industrial camera 4-1, such as the image of the A area, to obtain the heterogeneous fiber defect data of the same area of the fabric, such as the A area.

[0039] As a preferred embodiment of the present application, seeFigure 1 、 2, the fifth fabric defect detection mechanism 5 includes a color camera 5-1 and a D65 illumination light source, the color camera 5-1 and the D65 illumination light source are connected with the central processing unit through wired or wireless signals, the D65 illumination light source is a built-in light source of the color camera 5-1, the color camera 5-1 and the D65 illumination light source are arranged above the fabric, the central processing unit analyzes and processes the image of the color camera 5-1 such as the image of the A area by using an image processing algorithm based on the HSI color space or a deep learning-based image processing algorithm, and obtains the original color difference, front and back color difference and left, middle and right color difference defects of the same area such as the A area of the fabric. As in the first embodiment, the color camera 5-1 and the D65 illumination light source can be one or several. In the present application, the color difference detection image processing algorithm based on the HSI color space is a known algorithm, which generally includes image segmentation, image preprocessing and color feature extraction. A threshold setting image segmentation method is used to complete image segmentation, and in view of the color deviation, noise points and color information points discontinuity and other distortion phenomena of the image color, the image is preprocessed to adjust the color information; an automatic iterative adjustment Gamma color deviation correction algorithm is used to realize the restoration of the authenticity of the image color information, a color histogram equalization based on the HSI color space is used to improve the overall contrast of the image color, a filtering processing algorithm is used to remove redundant noise points and fabric texture features, and finally a K-means clustering algorithm is used to extract the color features of the image information. When color evaluation is performed, the CIELAB color space is used to analyze the color features, the extracted color feature information is substituted into the commonly used color difference evaluation formula, the color difference result is calculated, and the original color difference, front and back color difference and left, middle and right color difference defects of the same area such as the A area of the fabric are obtained. The color difference evaluation formula can be a known CMC(l:c) or CIE94 color difference formula or CIEDE2000 color difference formula.In addition, the central processing unit can also adopt a deep learning-based image processing algorithm, including collecting or calling sufficient original color difference, front-back color difference and left-middle-right color difference defect image and establishing a defect image training set; filtering the defect image training set, then performing Fourier transform on each image in the filtered defect image training set to obtain a frequency spectrum image of the defect image training set, and performing binaryzation processing on the frequency spectrum image to obtain a binary frequency spectrum image of the defect image training set; constructing and training a deep convolutional neural network classification model, the deep convolutional neural network classification model including a convolution layer, a fully connected feature layer, a fully connected classification layer and a classifier, each layer in the deep convolutional neural network classification model being connected to each other through neurons, the deep convolutional neural network classification model being trained using the binary frequency spectrum image to realize correct classification and identification of the images in the defect image training set; and using the trained deep convolutional neural network classification model to analyze and process the images collected by the color camera 5-1, for example, the images of the A region, to obtain original color difference, front-back color difference and left-middle-right color difference defect data of the same region of the fabric, for example, the A region.

[0040] As a preferred embodiment of the present application, the central processing unit is an electric control device of the cloth inspection machine, or a digital controller with a human-machine interface, such as a DDC digital controller, an embedded control system or an industrial computer, etc., not shown in the figure.

[0041] As a preferred working process of the present application, see Figure 1 、 2, five fabric defect detection mechanisms are arranged along the running path of the fabric 6, which are a first fabric defect detection mechanism 1, a second fabric defect detection mechanism 2, a third fabric defect detection mechanism 3, a fourth fabric defect detection mechanism 4 and a fifth fabric defect detection mechanism 5, the first to fifth fabric defect detection mechanisms 1-5 are arranged at equal intervals along the running path of the fabric 6, and the distance W therebetween can be set to, for example, 1 meter, the first to fifth fabric defect detection mechanisms 1-5 respectively collect images of the same area, for example, area A, of the fabric under different imaging conditions, specifically, first, the first industrial camera 1-1 uses a backlight source to shoot images of the broken warp, broken weft, sparse and dense path and hole defects of area A, according to the running speed of the fabric 6, for example, 1 meter / 1 second, and W is 1 meter, 1 second after the first industrial camera 1-1 shoots, the central processing unit starts the second industrial camera 2-1 to shoot images of the flying thread, thick knot, wrinkle, color point and stain defects of area A using a front light source, 1 second after the second industrial camera 2-1 shoots, the central processing unit starts the third industrial camera 3-1 to shoot images of the scratch, different diameter, different weft, abnormal pattern, misplacement and local organization error defects of area A using a grazing light source, 1 second after the third industrial camera 3-1 shoots, the central processing unit starts the fourth industrial camera 4-1 to shoot images of the heterogeneous fiber defects of area A using a polarized light source, 1 second after the fourth industrial camera 4-1 shoots, the central processing unit starts the color camera 5-1 to shoot images of the original color difference, front and back color difference and left, middle and right color difference defects of area A using a D65 light source, it can be seen that the images under the above different imaging conditions correspond to different defect characteristics, the central processing unit uses image processing algorithms corresponding to the different defect characteristics to analyze and process the images under the different imaging conditions, as described in the above embodiment, to obtain defect data of the same area, for example, area A, of the fabric, similarly, in the continuous running process of the fabric 6, the central processing unit can obtain defect data of area B of the fabric and defect data of areas C-L, and the central processing unit obtains all defect data of the fabric 6 according to the defect data of areas A-L of the fabric 6, the defect data includes the defect type, defect position, defect area and defect level of the fabric, etc.

[0042] Through tests, the present application can accurately detect fabric defects online, avoid missed detection, realize continuous and high-speed detection, and has stable detection quality, and good effects have been achieved.

Claims

1. A machine vision based cloth inspection method, characterized by: At least two fabric defect detection mechanisms are arranged along the fabric running path, and the at least two fabric defect detection mechanisms respectively acquire images of the same area of the fabric under different imaging conditions, the images under the different imaging conditions correspond to different defect characteristics respectively, the central processing unit analyzes and processes the images under the different imaging conditions correspondingly by using image processing algorithms corresponding to the different defect characteristics, and defect data of the same area of the fabric is obtained, the central processing unit continuously obtains defect data of the remaining areas of the fabric, and all defect data of the fabric is obtained, and the at least two fabric defect detection mechanisms are connected with the central processing unit; The at least two fabric defect detection mechanisms include five fabric defect detection mechanisms, namely a first fabric defect detection mechanism, a second fabric defect detection mechanism, a third fabric defect detection mechanism, a fourth fabric defect detection mechanism and a fifth fabric defect detection mechanism arranged along the fabric running path in sequence or at any interval, and the distance between adjacent ones is not less than 1 meter; The first fabric defect detection mechanism includes a first industrial camera and a backlight source, the first industrial camera and the backlight source are connected with the central processing unit, the first industrial camera is arranged above the fabric, the backlight source is arranged below the fabric, the central processing unit analyzes and processes the images acquired by the first industrial camera by using an image processing algorithm including Hough transform and Gabor filtering or an image processing algorithm based on deep learning, and obtains end break, broken weft, thin-thick places and hole defect data of the same area of the fabric; or the first fabric defect detection mechanism includes a 3D camera, the 3D camera is connected with the central processing unit, the 3D camera is arranged above the fabric, the 3D camera scans the fabric by using structured light, the central processing unit analyzes and processes the images acquired by the 3D camera by using an image processing algorithm including binocular image restoration or an image processing algorithm based on deep learning, and obtains end break, broken weft, thin-thick places and hole defect data of the same area of the fabric; The second fabric defect detection mechanism includes a second industrial camera and a front light source, the second industrial camera and the front light source are connected with the central processing unit, the second industrial camera and the front light source are arranged above the fabric, and the central processing unit analyzes and processes the images acquired by the second industrial camera by using an image processing algorithm including a frequency domain screen filter or an image processing algorithm based on deep learning, and obtains flying thread insertion, thick knot, wrinkle, color point and stain defect data of the same area of the fabric; The third fabric defect detection mechanism includes a third industrial camera and a grazing light source, the third industrial camera and the grazing light source are connected with the central processing unit, the third industrial camera and the grazing light source are arranged above the fabric, and the central processing unit analyzes and processes the images acquired by the third industrial camera by using an image processing algorithm based on deep learning, and obtains scratch, different diameter, different weft, abnormal pattern, misregistration and local weave error defect data of the same area of the fabric; The fourth fabric defect detection mechanism comprises a fourth industrial camera and a polarized light source, the fourth industrial camera and the polarized light source are connected with the central processing unit, a polarizing mirror is additionally arranged on the lens of the fourth industrial camera, the fourth industrial camera and the polarized light source are arranged above the fabric, the central processing unit analyzes and processes the image collected by the fourth industrial camera by using an image processing algorithm based on a gray level co-occurrence matrix or an image processing algorithm based on deep learning, and obtains the heterogeneous fiber defects of the same region of the fabric. The fifth fabric defect detection mechanism comprises a color camera and a D65 illumination light source, the color camera and the D65 illumination light source are connected with the central processing unit, the color camera and the D65 illumination light source are arranged above the fabric, the central processing unit analyzes and processes the image collected by the color camera by using a color difference detection image processing algorithm based on an HSI color space or an image processing algorithm based on deep learning, and obtains the original color difference, the front and back color difference and the left, middle and right color difference defects of the same region of the fabric.

2. The machine vision-based cloth inspection method according to claim 1, characterized in that: The measurement resolution of the first industrial camera is less than or equal to 0.2 mm.

3. The machine vision-based cloth inspection method according to claim 1 or 2, characterized in that: The central processing unit is an electric control device of the cloth inspection machine, or is a digital controller, an embedded control system or an industrial computer independently arranged with a man-machine interface.

Citation Information

Patent Citations

  • Online automatic detection method of fabric defects based on machine vision and device thereof

    CN102221559A

  • Image acquisition system applied to cloth inspecting machine

    CN110006908A

  • Intelligent cloth inspecting machine for automatically inspecting cloth by adopting artificial intelligence technology

    CN111340802A

  • Online type automatic cloth inspecting machine at tail of setting machine and cloth inspection method

    CN111424413A

  • Cloth inspecting machine for garment production

    CN210975310U