A method and system for online defect detection of computerized flat knitting machine

Through pattern files and online image information processing of knitted fabrics, combined with multiple detection algorithms and equipment, real-time defect detection of complex knitted fabrics is achieved, solving the problem of unsatisfactory detection results in the existing technology, and improving production efficiency and products quality.

CN118883580BActive Publication Date: 2024-11-29CANGZHOU INSTITUTE OF TIANGONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411353960.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-11-29
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The existing machine vision defect detection method is not ideal when facing complex and changing patterns and colors of knitted fabrics, and it is difficult to achieve real-time monitoring and dynamic adjustment, especially in the production process of computer flat machine due to changes in fabric tension and space limitations. Causes detection difficulties.

Method used

Provide a vision-based online detection method for computer flat machine defects. By obtaining pattern file information and online image information of knitted fabrics, the mean filter and median filter are used for smoothing processing, combining multi-mesh structure, single color, and multiple Color and complex texture fabric detection algorithms identify defects and realize real-time detection and feedback through image acquisition devices, drive devices and lighting devices.

Benefits of technology

It realizes high precision and real-time detection of defects of knitted fabrics in complex patterns and colors, ensures comprehensive monitoring and dynamic adjustment of knitted fabric quality, and improves production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118883580B_ABST
    Figure CN118883580B_ABST
Patent Text Reader

Abstract

The present invention discloses an online defect detection method and system for a computerized flat knitting machine. The online defect detection method comprises the following steps: obtaining pattern file information of the knitted fabric to be produced; obtaining online image information during the production process of the knitted fabric; calling at least one corresponding detection algorithm according to the pattern file information, detecting and identifying the online image information to obtain defect information; and guiding the adjustment and correction of the knitted fabric production process according to the defect information. The present invention realizes real-time monitoring of the quality of knitted fabrics during the production process, timely discovering and identifying various defects, and realizing dynamic adjustment of the production process through a feedback mechanism, thereby improving product quality and production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knitted fabric defect detection, and in particular to an online defect detection method and system for a computerized flat knitting machine. Background Art

[0002] Computerized flat knitting machines can automatically knit various complex patterns and shapes of knitted products according to preset programs, greatly improving production efficiency and product quality. However, during the production process, knitted fabrics may have various defects, such as broken threads, skipped stitches, wrong yarns, yarn fuzzing, etc. These defects not only affect the appearance quality of the product, but also its performance. Therefore, real-time detection of knitted fabric defects during the production process of computerized flat knitting machines is of great significance.

[0003] With the development of computer vision technology and image processing technology, online defect detection methods based on machine vision have gradually attracted attention. Most of the existing machine vision defect detection methods use static image acquisition and processing technology to detect defects in knitted fabrics by analyzing the collected knitted fabric images. However, these methods often have unsatisfactory detection effects when faced with complex and changeable knitted fabric patterns and colors. Especially in fabric quality inspection, double-sided inspection is required to ensure comprehensive quality control. In addition, the weaving speed of modern computerized flat knitting machines is very fast, which puts higher requirements on real-time inspection. In the cloth-dropping area of ​​the computerized flat knitting machine, the fabric still has tension near the traction roller, making the fabric surface relatively flat and easier to detect defects. However, due to the loss of tension at the position far from the traction roller, the flatness of the fabric surface is reduced, and defect detection becomes difficult. At the same time, the space near the traction roller is small, which puts strict requirements on the volume and layout of the detection equipment.

[0004] In order to overcome the above problems, there is an urgent need to provide a vision-based online defect detection method for computer flat knitting machines, which can monitor the quality of knitted fabrics in real time during the production process, promptly discover and identify various defects, and dynamically adjust the production process through a feedback mechanism to improve product quality and production efficiency. Summary of the invention

[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide an online defect detection method and system for a computerized flat knitting machine, which can realize real-time monitoring of the quality of knitted fabrics during the production process, timely discover and identify various defects, and dynamically adjust the production process through a feedback mechanism, thereby improving product quality and production efficiency.

[0006] The present invention provides an online defect detection method for a computerized flat knitting machine, comprising the following steps:

[0007] 1) Obtain the pattern file information of the knitted fabric to be produced;

[0008] 2) obtaining online image information during the production process of the knitted fabric;

[0009] 3) Smoothing the online image information by using a mean filter and a median filter respectively to reduce high-frequency noise and salt and pepper noise;

[0010] 4) calling at least one corresponding detection algorithm according to the pattern file information to detect and identify the online image information to obtain defect information; the detection algorithm at least includes a multi-mesh structure fabric detection algorithm, a single color fabric detection algorithm, a multi-color fabric detection algorithm and a complex texture fabric detection algorithm;

[0011] The multi-mesh structure fabric detection algorithm comprises the following steps:

[0012] The edge contour information of the multi-mesh structure fabric is obtained by using an edge extraction algorithm, and then the small holes in the edge contour information are filled by using a morphological closing operation to make the mesh contour complete;

[0013] Use contour extraction algorithm to perform statistical analysis on the size and shape of each mesh of multi-mesh structure fabrics, calculate the area and perimeter of each mesh, identify abnormal meshes as defects, mark the locations of defects, and count the number and distribution of defects;

[0014] The multi-color fabric detection algorithm comprises the following steps:

[0015] The color space of the online image information is segmented into several monochrome regions; first, the image is converted to HSV or Lab color space, and then each pixel in the color space is segmented into several monochrome regions. x i Perform K-means clustering to obtain pixels x i The cluster labels c i ; Update the center of each cluster u j , making it equal to the average value of all pixels assigned to that center;

[0016] in, ;

[0017] ;

[0018] C j To assign to the cluster center u j The set of all pixels of is the size of the set;

[0019] The single color fabric detection algorithm is used to identify defects in each single color area, mark the location of the defects, and count the number and distribution of defects;

[0020] 5) guiding the adjustment and correction of the knitted fabric production process according to the defect information.

[0021] Furthermore, in the step 2), when acquiring the online image information, the highlight area is reduced by adjusting the lighting conditions to avoid bright spots caused by uneven light sources or reflections, and then the influence of uneven lighting is reduced by using histogram equalization technology.

[0022] Furthermore, the mean filter is performed according to the following formula:

[0023] ;

[0024] The median filter is performed according to the following formula:

[0025] ;

[0026] Where: I smooth (x,y) is the filtered image , I(x+s,y+t) is the image to be processed;

[0027] m and n are the sizes of the filters;

[0028] s, t are ( x , y ) is the offset in the neighborhood centered at ;

[0029] S is the neighborhood of the filter.

[0030] Furthermore, the single color fabric detection algorithm comprises the following steps:

[0031] According to local image statistical characteristics, the online image information is converted into a binary image by threshold processing, and then small spots and isolated pixels in the binary image are removed by morphology;

[0032] After extracting each contour of the binary image, the positions with abnormal size and shape are identified as defects, and the positions of the defects are marked, and the number and distribution of the defects are counted.

[0033] Furthermore, the complex texture fabric detection algorithm comprises the following steps:

[0034] Extracting texture features from the smoothed online image information to obtain a detection feature vector;

[0035] The detection feature vector is input into the trained classification model to perform classification prediction, mark the detected defect area, and count the number and distribution of defects.

[0036] Furthermore, the training of the classification model includes the following steps:

[0037] Acquire a training image of the complex texture fabric;

[0038] The training image is smoothed by a mean filter and a median filter respectively to reduce high frequency noise and salt and pepper noise;

[0039] Convolving the training image with a filter to extract texture feature maps in different directions and scales;

[0040] ;

[0041] in, T k For filter F k For training images I The texture feature map after convolution, T k ( x , y ) represents the texture feature map T k exist( x , y ), k Indicates different filter types, ( x , y ) represents the training image I Pixel coordinates in ;

[0042] Constructing the texture feature map into a training feature vector;

[0043] , k =1,2,…,K;

[0044] ;

[0045] in, G k is the global statistical feature, M and N Texture feature map T k The width and height of

[0046] g is the training feature vector, with a length of K, which contains the global statistical features of all filters;

[0047] The training feature vector is used as training data, and a classification algorithm is used for training to obtain the classification model.

[0048] In addition, the present invention also provides a detection system for the above-mentioned defect online detection method, including an image acquisition device, a driving device, an illumination device and an image processing module;

[0049] The image acquisition device is arranged on both sides below the traction roller of the computer flat knitting machine and is arranged close to the traction roller, and is used for online image acquisition of knitted fabrics. The image acquisition device is communicatively connected with the host of the computer flat knitting machine;

[0050] The driving device is in driving connection with the image acquisition device, and is used to drive the image acquisition device to move in a direction parallel to the axis of the traction roller, and the driving device is in communication connection with the host of the computer flat knitting machine;

[0051] The lighting device is arranged on both sides below the traction roller and above the image acquisition device. The illumination angle and brightness of the lighting device are adjustable. The lighting device is connected to the host computer of the computer flat knitting machine in communication.

[0052] The image processing module is communicatively connected with a host computer of the computer flat knitting machine.

[0053] Furthermore, the image acquisition device includes a camera bracket, a high-performance color camera and a lens; the camera bracket is symmetrically arranged on both sides below the traction roller, the high-performance color camera is arranged on the camera bracket, and the lens is arranged on the high-performance color camera;

[0054] The driving device includes a track rod and a linear motor. The track rods are symmetrically arranged on both sides below the traction roller. The camera bracket is slidably connected to the track rods. The linear motor is transmission-connected to the camera bracket and is used to drive the camera bracket to slide along the track rods.

[0055] The lighting device is a linear LED lamp tube.

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

[0057] The present invention arranges the image acquisition device in the cloth drop area near the traction roller to provide good image input for the detection algorithm. A special detection algorithm is developed for knitted fabrics of different structures. Through the specially developed detection algorithm, the detection method provided by the present invention has higher detection accuracy and real-time performance, and is particularly suitable for defect detection of knitted fabrics with various complex patterns and colors. Through double-sided detection and real-time feedback mechanism, the present invention ensures comprehensive monitoring and dynamic adjustment of knitted fabric quality, effectively improving production efficiency and product quality.

[0058] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0060] Figure 1 It is a flow chart of the defect online detection method;

[0061] Figure 2 It is the structural diagram of the detection system;

[0062] Figure 3 It is a schematic diagram of the positional relationship among the high-performance color camera, the track rod and the linear LED light tube;

[0063] Figure 4 It is a side view structural diagram of the detection system;

[0064] Figure 5 Schematic diagram of the positional relationship among the camera bracket, high-performance color camera, track rod and linear LED light tube.

[0065] Numbers in the figure: 1. Computerized flat knitting machine; 2. Traction roller; 3. Knitted fabric; 4. Camera bracket; 5. High-performance color camera; 6. Track rod; 7. Linear LED light tube. DETAILED DESCRIPTION

[0066] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0067] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0068] Please refer to Figure 1 The embodiment of the present invention provides a method for online defect detection of a computerized flat knitting machine, comprising the following steps:

[0069] S1: Obtaining pattern file information of the knitted fabric to be produced, the pattern file information is stored in the memory of the computer flat knitting machine;

[0070] S2: Obtain online image information during the knitted fabric production process, adjust the lighting conditions, reduce the highlight area to avoid bright spots caused by uneven light sources or reflections, and then use histogram equalization technology to reduce the impact of uneven lighting;

[0071] S3: Smoothing the online image information through a mean filter and a median filter to reduce high-frequency noise and salt-and-pepper noise;

[0072] The mean filter is implemented as follows:

[0073] ;

[0074] The median filter is implemented as follows:

[0075] ;

[0076] Where: I smooth (x,y) is the filtered image , I(x+s,y+t) is the image to be processed;

[0077] m and n are the sizes of the filters;

[0078] s, t are ( x , y ) is the offset in the neighborhood centered at ;

[0079] S is the neighborhood of the filter;

[0080] S4: Calling at least one corresponding detection algorithm according to the pattern file information to detect and identify the online image information to obtain defect information; the detection algorithm at least includes a multi-mesh structure fabric detection algorithm, a single color fabric detection algorithm, a multi-color fabric detection algorithm and a complex texture fabric detection algorithm;

[0081] S5: Guide the adjustment and correction of knitted fabric production process based on defect information;

[0082] Among them, the holes of the defect-free mesh cloth are usually arranged neatly, and the shapes are mostly round, square or hexagonal, and the size and distribution of the holes are uniform and consistent. In view of the above characteristics, the detection algorithm for mesh cloth in this application focuses on the extraction and analysis of the above typical features.

[0083] The multi-mesh structure fabric detection algorithm includes the following steps:

[0084] S311: using an edge extraction algorithm to obtain edge contour information of the multi-mesh structure fabric, and then using a morphological closing operation to fill small holes in the edge contour information to make the mesh contour complete;

[0085] S312: Use contour extraction algorithm to perform statistical analysis on the size and shape of each mesh of the multi-mesh structure fabric, calculate the area and perimeter of each mesh, identify abnormal meshes as defects, mark the locations of the defects, and count the number and distribution of defects.

[0086] The characteristics of single color fabrics are mainly concentrated in color consistency, fabric texture and surface uniformity. In view of the above characteristics, the detection algorithm for single color fabrics in this application mainly adopts grayscale image processing method.

[0087] The single color fabric detection algorithm includes the following steps:

[0088] S321: converting the online image information into a binary image through threshold processing according to local image statistical characteristics, and then using morphology to remove small spots and isolated pixels in the binary image;

[0089] S322: After extracting each contour of the binary image, identify the locations with abnormal size and shape as defects, mark the locations of the defects, and count the number and distribution of the defects.

[0090] The characteristics of knitted fabrics of various colors are mainly concentrated on the accuracy of colors, the clarity of patterns and the coordination of colors. In view of the above characteristics, the present application mainly adopts a color image processing method for knitted fabrics of various colors.

[0091] The multi-color fabric detection algorithm includes the following steps:

[0092] S331: Perform region segmentation on the color space of the online image information and divide it into several monochrome regions; first convert the image to HSV or Lab color space, and then x i Perform K-means clustering to obtain pixels x i The cluster labels c i ; Update the center of each cluster u j , making it equal to the average value of all pixels assigned to that center;

[0093] in, ;

[0094] ;

[0095] C j To assign to the cluster center u j The set of all pixels of is the size of the set;

[0096] S332: Use a single color fabric detection algorithm to identify defects in each single color area, mark the location of the defects, and count the number and distribution of defects.

[0097] The characteristics of complex texture fabrics are mainly concentrated in the complexity of texture, clarity of pattern, three-dimensional sense and consistency of surface structure. In view of the above characteristics, this application mainly adopts texture analysis method for complex texture fabrics.

[0098] The complex texture fabric detection algorithm includes the following steps:

[0099] S341: extracting texture features from the smoothed online image information to obtain a detection feature vector;

[0100] S342: Input the detection feature vector into the trained classification model to perform classification prediction, mark the detected defect areas, and count the number and distribution of defects;

[0101] Among them, the training of the classification model includes the following steps:

[0102] S3421: Obtain training images of complex textured fabrics;

[0103] S3422: Smoothing the training image by using a mean filter and a median filter respectively to reduce high frequency noise and salt and pepper noise;

[0104] S3423: Convolve the training image through the filter to extract texture feature maps in different directions and scales;

[0105] ;

[0106] in, T k For filter F k For training images I The texture feature map after convolution, T k ( x , y ) represents the texture feature map T k exist( x , y ), k Indicates different filter types, ( x , y ) represents the training image I Pixel coordinates in ;

[0107] S3424: constructing the texture feature map into a training feature vector;

[0108] , k =1,2,…,K;

[0109] ;

[0110] in, G k is the global statistical feature, M and N Texture feature map T k The width and height of

[0111] g is the training feature vector, with a length of K, which contains the global statistical features of all filters;

[0112] S3425: Use the training feature vector as training data, use the classification algorithm to train and obtain a classification model. Example 1

[0113] Take the online inspection of the front piece of a fully-formed jacquard wool sweater with alternating red and blue as an example. The specific process is as follows: Steps with attached diagram:

[0114] S1: Input the compiled sweater front pattern file into the memory of the computer flat knitting machine through the input module (touch screen) and save it;

[0115] S2: The image acquisition device is used to obtain images of the sweater front piece during production. For bright spots caused by uneven light sources or reflections, the lighting conditions are adjusted to reduce the highlight areas, and the histogram equalization technology is used to reduce the impact of uneven lighting.

[0116] S3: Image preprocessing;

[0117] Wool has a certain degree of curl and will produce reflective highlights under certain lighting conditions, forming bright spots. Therefore, a 3×3 mean filter is first used to smooth the fabric image to reduce high-frequency noise, and then a 3×3 median filter is used to remove salt and pepper noise such as white or black dots that appear randomly in the image. At the same time, the edge details of the image are maintained.

[0118] S4: Calling multiple color fabric detection algorithms and complex texture fabric detection algorithms according to the sweater front piece pattern file to detect and identify online image information to obtain defect information;

[0119] S41: Color space conversion and region segmentation

[0120] For multi-color wool sweater fabrics, the pre-processed image is first converted from the RGB color space to the HSV color space (including but not limited to RGB or HSV). The HSV color space divides the color information of the image into three components: hue, saturation, and lightness. Then, according to the characteristics of alternating red and blue, the upper and lower limits of the HSV color space are set to perform color segmentation.

[0121] Red area segmentation:

[0122] The hue is 0-10 degrees or 350-360 degrees, the saturation is 60%-100%, and the lightness is 40%-100%;

[0123] Blue area segmentation:

[0124] The hue is 200-240 degrees, the saturation is 60%-100%, and the brightness is 40%-100%.

[0125] Use the above range (the range needs to be adjusted according to the actual color) to generate a binary mask to separate the red and blue areas respectively.

[0126] S42: performing defect detection of single color fabrics on the segmented red and blue areas respectively;

[0127] Since the front piece of the red and blue alternating jacquard wool sweater also has a complex jacquard texture, a single color fabric detection method and a complex texture fabric detection method are combined to detect it. The specific steps are as follows:

[0128] Take the red area as an example:

[0129] The segmented area image is preprocessed and texture features are extracted. The detection feature vector of the segmented area image is input into the trained classification model for classification prediction. The detected defect area is marked, and the number and distribution of defects are counted.

[0130] The training method of the classification model in this embodiment is:

[0131] First, a 5×5 Gabor filter is used to convolve the training image to extract texture information at directions such as 0°, 45°, 90°, and 135° at multiple frequencies. Then, a suitable wavelet basis (such as Haar wavelet, Daubechies wavelet, etc.) is selected, and the scale level is selected as 4 by default. The training image is further decomposed to obtain texture feature maps at different scales.

[0132] Then, the eigenvalues ​​extracted by Gabor filter and wavelet transform are extracted by comparing the mean, variance and other statistics, and are constructed into feature vectors; then, a convolutional neural network (CNN) (including but not limited to support vector machine (SVM), random forest) with different network structures (including but not limited to LeNet, AlexNet, VGG, ResNet, etc.) is used to train the texture classification model;

[0133] Select a suitable activation function (including but not limited to ReLU, Sigmoid, tanh, etc.), adjust the learning rate through the adaptive learning rate method, select an optimization algorithm to update the network parameters (including but not limited to stochastic gradient descent (SGD), Adam, RMSProp, etc.), and tune the parameters through experiments and cross-validation to achieve the best classification performance.

[0134] The training images are a set of images collected containing various features of the front piece of a jacquard wool sweater.

[0135] Develop a special detection algorithm for knitted fabrics with different patterns and colors. In order to ensure the high speed and efficiency of the detection process, this application first analyzes the knitting process corresponding to the jacquard pattern file, then obtains the actual fabric surface of the computer flat knitting machine under the knitting process, and designs a special detection algorithm by analyzing the characteristics of the fabric surface, thereby achieving high-precision detection of jacquard pattern fabrics.

[0136] After analysis, the characteristics of knitted fabrics with jacquard patterns are mainly concentrated in complex textures, color accuracy, pattern clarity, and color coordination. In view of these characteristics, the detection algorithm needs to accurately identify and process image features of different color areas to ensure that defects can be accurately detected and marked.

[0137] S5: Defect detection and feedback

[0138] During the actual inspection process, the image processing module processes and analyzes the collected fabric images in real time, detects fabric defects, and displays the results on the display screen; based on the inspection results, it provides real-time feedback on defect information to guide adjustments and corrections during the production process, ensuring that the quality of the knitted fabrics produced meets the requirements.

[0139] The defect online detection method of the present invention realizes real-time monitoring of knitted fabric quality during the production process, timely discovers and identifies various defects, and realizes dynamic adjustment of the production process through a feedback mechanism, thereby improving product quality and production efficiency.

[0140] Also, please refer to Figure 2~Figure 5 , an embodiment of the present invention further provides a detection system for the above-mentioned defect online detection method, comprising an image acquisition device, a driving device, an illumination device and an image processing module;

[0141] The image acquisition device is arranged on both sides below the traction roller 2 of the computer flat knitting machine 1 and is arranged close to the traction roller 2, and is used for online image acquisition of the knitted fabric 3. The image acquisition device is connected to the host of the computer flat knitting machine 1 for communication; the image acquisition device includes a camera bracket 4, a high-performance color camera 5 and a lens; the camera bracket 4 is symmetrically arranged on both sides below the traction roller 2, the high-performance color camera 5 is arranged on the camera bracket 4, and the high-performance color camera 5 is arranged on the lens;

[0142] The driving device is connected to the image acquisition device in a transmission manner, and is used to drive the image acquisition device to move in a direction parallel to the axis of the traction roller 2. The driving device is connected to the host of the computer flat knitting machine 1 for communication; the driving device includes a track rod 6 and a linear motor, and track rods 6 are symmetrically arranged on both sides below the traction roller 2. The track rods 6 are slidably connected to the camera bracket 4, and the linear motor is connected to the camera bracket 4 in a transmission manner, and is used to drive the camera bracket 4 to slide along the track rod 6;

[0143] The lighting device is arranged on both sides below the traction roller 2 and above the image acquisition device. The illumination angle and brightness of the lighting device are adjustable. The lighting device is connected to the host computer of the computer flat knitting machine 1 in communication. The lighting device is a linear LED lamp tube.

[0144] The image processing module is connected to the host computer of the computerized flat knitting machine 1 for communication.

[0145] In this embodiment, a motion scanning image system based on a visual sensor is constructed, such as Figure 2 and Figure 4 As shown, the traction roller 2 in the cloth drop area (the dotted box position) drives the knitted fabric 3 to move from top to bottom. The effective collection area is within 20 cm of the cloth drop area close to the traction roller 2, but the longitudinal length of this area is about 1 meter and the width is about 50 cm, which requires a high volume of the collection equipment. Since the width of this area increases as it goes down, the camera bracket 4 is designed in this application to move the installation position downward, and the high-performance color camera 5 is installed on the top of the camera bracket 4 to ensure that the field of view of the high-performance color camera 5 is in the best collection area as much as possible.

[0146] The highly flexible camera bracket 4 can realize multi-directional adjustment of the height and acquisition angle of the high-performance color camera 5 to adapt to the characteristics of different fabrics. Under the action of the driving device, the high-performance color camera 5 reciprocates at a speed v on the track rod 6 to realize large-scale dynamic image acquisition and save hardware costs. The high-brightness linear LED light tube 7 provides uniform lighting to reduce shadows and reflections on the surface of the fabric.

[0147] The image processing module processes and analyzes the collected fabric images in real time, detects fabric defects, and displays the results on the touch screen of the computer flat knitting machine.

[0148] The linear LED lamp tube 7 is fixed on the mechanical wall on both sides of the cloth drop area, and is located above the image acquisition device. The light source angle and brightness are adjustable, and the overall structure is located near the traction roller 2 in the cloth drop area of ​​the computerized flat knitting machine 1. By adjusting the angle of the lighting device, ideal lighting conditions are provided for image acquisition, and shadows and reflections on the surface of the fabric are reduced, thereby improving image quality and the accuracy of defect detection. The detection system of the present application can capture fabric surface image information at high speed, ensuring clear images under different fabric types and lighting conditions.

[0149] In the description of this specification, the terms "connection", "installation", "fixation" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0150] In the description of this specification, the description of the terms "one embodiment", "some embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0151] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for online defect detection of a computerized flat knitting machine, characterized in that: The steps include: 1) Obtain the pattern file information of the knitted fabric to be produced; 2) obtaining online image information during the production process of the knitted fabric; 3) Smoothing the online image information by using a mean filter and a median filter respectively to reduce high-frequency noise and salt and pepper noise; 4) calling at least one corresponding detection algorithm according to the pattern file information to detect and identify the online image information to obtain defect information; the detection algorithm at least includes a multi-mesh structure fabric detection algorithm, a single color fabric detection algorithm, a multi-color fabric detection algorithm and a complex texture fabric detection algorithm; The multi-mesh structure fabric detection algorithm comprises the following steps: The edge extraction algorithm is used to obtain the edge contour information of the multi-mesh structure fabric, and then the morphological closing operation is used to fill the small holes in the edge contour information to make the mesh contour complete; Use contour extraction algorithm to perform statistical analysis on the size and shape of each mesh of multi-mesh structure fabrics, calculate the area and perimeter of each mesh, identify abnormal meshes as defects, mark the locations of defects, and count the number and distribution of defects; The multi-color fabric detection algorithm comprises the following steps: The color space of the online image information is segmented into several monochrome regions; first, the image is converted to HSV or Lab color space, and then each pixel in the color space is segmented into several monochrome regions. x i Perform K-means clustering to obtain pixels x i The cluster labels c i ; Update the center of each cluster u j , making it equal to the average value of all pixels assigned to that center; in, ; ; C j To assign to the cluster center u j The set of all pixels of is the size of the set; The single color fabric detection algorithm is used to identify defects in each single color area, mark the location of the defects, and count the number and distribution of defects; 5) guiding the adjustment and correction of the knitted fabric production process according to the defect information.

2. The method for online defect detection for a computerized flat knitting machine according to claim 1, characterized in that: In the step 2), when acquiring the online image information, the lighting conditions are adjusted to reduce the highlight area to avoid bright spots caused by uneven light sources or reflections, and the influence of uneven lighting is reduced by using histogram equalization technology.

3. The method for online defect detection for a computerized flat knitting machine according to claim 1, characterized in that: The mean filter is implemented as follows: ; The median filter is performed according to the following formula: ; Where: I smooth (x,y) is the filtered image , I(x+s,y+t) is the image to be processed; m and n are the sizes of the filters; s, t are ( x , y ) is the offset in the neighborhood centered at ; S is the neighborhood of the filter.

4. The method for online defect detection for a computerized flat knitting machine according to claim 1, characterized in that: The single color fabric detection algorithm comprises the following steps: According to local image statistical characteristics, the online image information is converted into a binary image by threshold processing, and then small spots and isolated pixels in the binary image are removed by morphology; After extracting each contour of the binary image, the positions with abnormal size and shape are identified as defects, and the positions of the defects are marked, and the number and distribution of the defects are counted.

5. The method for online defect detection for a computerized flat knitting machine according to claim 1, characterized in that: The complex texture fabric detection algorithm comprises the following steps: Extracting texture features from the smoothed online image information to obtain a detection feature vector; The detection feature vector is input into the trained classification model to perform classification prediction, mark the detected defect area, and count the number and distribution of defects.

6. The method for online defect detection for a computerized flat knitting machine according to claim 5, characterized in that: The training of the classification model includes the following steps: Acquire a training image of the complex texture fabric; The training image is smoothed by a mean filter and a median filter respectively to reduce high frequency noise and salt and pepper noise; Convolving the training image with a filter to extract texture feature maps in different directions and scales; ; in, T k For filter F k For training images I The texture feature map after convolution, T k ( x , y ) represents the texture feature map T k exist( x , y ), k Indicates different filter types, ( x , y ) represents the training image I Pixel coordinates in ; Constructing the texture feature map into a training feature vector; , k =1,2,…,K; ; in, G k is the global statistical feature, M and N Texture feature map T k The width and height of g is the training feature vector, with a length of K, which contains the global statistical features of all filters; The training feature vector is used as training data, and a classification algorithm is used for training to obtain the classification model.

7. A detection system using the online defect detection method for a computerized flat knitting machine according to any one of claims 1 to 6, characterized in that: It includes an image acquisition device, a driving device, a lighting device and an image processing module; The image acquisition device is arranged on both sides below the traction roller of the computer flat knitting machine and is arranged close to the traction roller, and is used for online image acquisition of knitted fabrics. The image acquisition device is communicatively connected with the host of the computer flat knitting machine; The driving device is in driving connection with the image acquisition device, and is used to drive the image acquisition device to move in a direction parallel to the axis of the traction roller, and the driving device is in communication connection with the host of the computer flat knitting machine; The lighting device is arranged on both sides below the traction roller and above the image acquisition device. The illumination angle and brightness of the lighting device are adjustable. The lighting device is connected to the host computer of the computer flat knitting machine in communication. The image processing module is communicatively connected with a host computer of the computer flat knitting machine.

8. The detection system according to claim 7, characterized in that: The image acquisition device comprises a camera bracket, a high-performance color camera and a lens; the camera bracket is symmetrically arranged on both sides below the traction roller, the high-performance color camera is arranged on the camera bracket, and the lens is arranged on the high-performance color camera; The driving device includes a track rod and a linear motor. The track rods are symmetrically arranged on both sides below the traction roller. The camera bracket is slidably connected to the track rods. The linear motor is transmission-connected to the camera bracket and is used to drive the camera bracket to slide along the track rods. The lighting device is a linear LED lamp tube.

Citation Information

Patent Citations

  • Fabric defect detection method based on distance matching function and perceptual hash algorithm

    CN108090894A

  • Progressive fabric defect automatic detection system and detection method

    CN117517321A