Lining cloth defect online detection method

By acquiring and processing static and dynamic fabric images, establishing correspondence relationships and performing binary image fusion, the problems of insufficient identification accuracy and slow response speed in existing fabric detection technologies are solved, and high-precision and real-time fabric defect detection are achieved.

CN119880938AActive Publication Date: 2025-04-25QIDONG LEXIN TEXTILE TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510380341.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-25
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

When existing fabric detection technology faces complex and changeable defect types, changes in lighting conditions and dynamic changes in fabrics on high-speed production lines, the identification accuracy is insufficient and the response speed is slow, making it difficult to meet the needs of high-precision and real-time inspection.

Method used

The camera collects static and dynamic image information, establishes the correspondence between static and dynamic images, sets a multi-size recognition window for segmentation and windowing, performs binarization processing and inputs a defect recognition model, combines the information of static and dynamic images to fusion binary image, and finally outputs the fused defect recognition result.

Benefits of technology

It significantly improves the ability to identify subtle defects, enhances the ability to capture changes in the fabric surface, improves the accuracy and response speed of recognition, and meets the needs of high-precision and real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880938A_ABST
    Figure CN119880938A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fabric detection treatment, in particular to a lining cloth defect online detection method which comprises the following steps: collecting static and dynamic images of lining cloth through a camera, establishing a corresponding relation, and segmenting and windowing; binarizing each window image and then inputting the binarized window image into a defect identification model to obtain an identification result; after binary fusion of corresponding window images, a model is input to obtain a fusion result, and the two results are combined and output, so that the technical problems that speed and precision are difficult to combine and the defect recognition rate is limited in fabric detection are solved, and the capture capability of fabric surface change characteristics is enhanced by integrating collection and processing of static and dynamic images; a corresponding relation between images is established and a segmentation windowing strategy is implemented, so that the pertinence and efficiency of image preprocessing are effectively improved, information advantages of static and dynamic images are complementary, the recognition capability of tiny flaws is further improved, fabric flaws and normal textures are more accurately distinguished, and the fabric quality is improved. And the identification accuracy and the response speed are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field related to fabric detection and processing, and in particular to an online defect detection method for lining cloth. Background Art

[0002] In the textile industry, the quality of interlinings directly affects the appearance and durability of clothing. Conventional fabric defect detection mainly relies on online detection technology of machine vision with synchronous image acquisition and analysis. Although there are many fabric defect detection methods based on image processing, there are still problems such as insufficient recognition accuracy and slow response speed when facing complex and changeable defect types, changes in lighting conditions, and dynamic changes of fabrics on high-speed production lines. Especially for materials such as interlinings that have high requirements for surface flatness and uniformity, it is difficult to meet the needs of high-precision and real-time detection.

[0003] In summary, the prior art has technical problems in that it is difficult to achieve both speed and accuracy in fabric inspection and the defect recognition rate is limited. Summary of the invention

[0004] The present application provides an online defect detection method for lining cloth, aiming to solve the technical problems in the prior art that it is difficult to achieve both speed and accuracy in fabric detection and the defect recognition rate is limited.

[0005] In view of the above problems, the technical solution to implement this application is: The present application provides an online defect detection method for lining cloth, wherein the method comprises: collecting image information of the lining cloth through a camera, wherein the image information comprises a static image and a dynamic image; Establishing the correspondence between the static image and the dynamic image, and setting a multi-size recognition window to segment and window the image information; Binarize each window image and input them into the defect recognition model to obtain the defect recognition result; According to the correspondence between the static image and the dynamic image, a corresponding window image is obtained, and binary image fusion is performed; Inputting the fused binary image into the defect recognition model to obtain a fused defect recognition result; The defect recognition result and the fused defect recognition result are combined and output.

[0006] In summary, one or more technical solutions provided in the present application solve the technical problems of difficulty in achieving both speed and accuracy in fabric inspection and limited defect recognition rate, and realize the technical effect of enhancing the ability to capture the changing characteristics of the fabric surface by integrating the acquisition and processing of static and dynamic images, establishing a correspondence between images and implementing a segmentation and windowing strategy, effectively improving the pertinence and efficiency of image preprocessing, complementing the information advantages of static and dynamic images, further improving the ability to recognize subtle defects, more accurately distinguishing fabric defects from normal textures, and significantly improving the accuracy of recognition and response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 A schematic flow chart of an online defect detection method for a lining cloth is provided for the present application; Figure 2 A schematic flow chart of determining defect recognition results in an online defect detection method for lining cloth is provided for the present application. DETAILED DESCRIPTION

[0008] The present application is described in detail below with reference to the accompanying drawings. Figure 1 As shown, the present application provides a method for online defect detection of lining cloth, wherein the method comprises: S1: collecting image information of the lining cloth through a camera, wherein the image information includes a static image and a dynamic image; S2: establishing a correspondence between the static image and the dynamic image, and setting a multi-size recognition window to segment and window the image information; Conventional fabric defect detection mainly relies on the online detection technology of machine vision with synchronous image acquisition and analysis. Specifically, a high-definition camera (such as a linear array CCD camera) is used to continuously shoot the running lining cloth, and the collected images are pre-processed, including denoising, correction (such as exposure correction, geometric correction), grayscale, etc., to eliminate the impact of environmental factors on image quality. Then, a defect recognition model established by machine learning or deep learning algorithm (after a large number of sample training, it can identify common defect types, such as color difference, stains, holes, etc.) is used for analysis; Limited, it has been found through long-term application that when faced with complex and changeable defect types, changes in lighting conditions and dynamic changes in fabrics on high-speed production lines, fixed detection parameters and models are not flexible enough to adapt to a wide range of production needs, and feature recognition is insufficient, resulting in limited ability to identify subtle or complex defects. Based on this, this application introduces binary image fusion technology to complement the information advantages of static and dynamic images, further improves the ability to identify subtle defects, and merges the two recognition results for output, which integrates the certainty of a single recognition and the comprehensiveness of multi-view detection, ensuring the high reliability of the detection results, and realizing fast and accurate online detection of lining defects, significantly improving production efficiency and product quality control.

[0009] Specifically, a camera installed on the production line is used to capture a static image of the lining cloth at a specific moment, including the overall appearance of the lining cloth and basic information about defects. At the same time, the camera continuously shoots and records dynamic images of the lining cloth during its movement. The dynamic image contains information from multiple angles and time series, which helps to identify defects that are not easily noticeable during movement. Furthermore, the static image and the dynamic image are matched through image processing technology to ensure the consistency of the viewing angle and position between the two. This involves image feature extraction, matching and geometric transformation to ensure that the area in the static image corresponds to the corresponding frame in the dynamic image, and select representative frames (key frames) from the dynamic image. The key frames reflect the state of the lining cloth at different angles or time periods, and establish a one-to-one correspondence with the static image. Based on the lining cloth area of ​​static images and dynamic images, identification windows of different scales are determined. The identification windows have different sizes, aiming to capture potential defects of different sizes and positions. The static image and each key frame dynamic image are segmented according to the pre-set size and layout, and the corresponding image area is allocated to each window, ensuring a comprehensive and detailed inspection of the lining cloth.

[0010] S3: Binarize each window image and input them into the defect recognition model to obtain the defect recognition result; S4: according to the correspondence between the static image and the dynamic image, a corresponding window image is obtained, and binary image fusion is performed; Binarization is performed on each window image after segmentation. Further, a suitable threshold is determined for the binarization process. This can be achieved by using a global threshold method, a local adaptive threshold method (such as the Otsu method) or other advanced image segmentation techniques. The segmented window images are processed using the selected threshold, and the pixels in the image are divided into two categories: foreground (usually defects) and background, thereby generating a binary image, that is, converting the image into black and white, highlighting the contrast between defects and background, and facilitating subsequent feature extraction and recognition. Black pixels usually represent backgrounds, and white pixels usually represent defects. Ensure that a strong classifier (i.e., defect recognition model) composed of one or a group of weak classifiers has been trained. The defect recognition model can recognize defects based on binary images. The binary image of each window is sent to the defect recognition model as an input vector. The defect recognition model adopts a deep learning architecture such as a convolutional neural network (CNN) or other machine learning algorithms. The defect recognition model will output the judgment of whether there is a defect in each window image, which is a probability score or a direct defect / non-defect label; According to the correspondence between the static image and the dynamic image, the respective binary images are fused, usually through the maximum value fusion and other technologies, aiming to combine the advantages of both and improve the recognition accuracy. Furthermore, according to the established correspondence between the static image and the dynamic image, the window images corresponding to the same fabric area under different viewing angles are found. If the resolutions of the static and dynamic images are different, the necessary resolution adjustments are first made to ensure that the binary images can be accurately aligned. The recognition result of a single window is combined with the recognition result after fusion, and logical operations (such as logical "or") are used to ensure that all suspected defects are marked. Furthermore, starting from the lowest resolution layer, the binary layers of the static and dynamic images are aligned and compared pixel by pixel, and the maximum value is selected as the pixel value of the fused image. This is done step by step upward until the highest resolution layer is reached to form a fused binary image, thereby retaining the strongest feature signal in the two images and enhancing the recognition effect. In addition, before fusion, all window images are ensured to be accurately aligned according to their actual positions on the lining cloth to avoid misjudgment caused by position deviation, thereby achieving detailed detection of the lining cloth image and effectively improving the accuracy and reliability of detection, especially the defect recognition capability under complex dynamic conditions.

[0011] S5: inputting the fused binary image into the defect recognition model to obtain a fused defect recognition result; S6: The defect recognition result and the fused defect recognition result are combined and output.

[0012] After completing the binarization of static and dynamic images, align the corresponding window images according to the corresponding relationship of the images, use the maximum fusion and other technologies to generate fused binary images, combine the information captured under different viewing angles and lighting conditions, improve the accuracy and completeness of defect detection, and further call the previously trained defect recognition model, which is an integrated weak classifier set, such as Adaboost, random forest or deep learning model; Then, the fused binary image is converted into a data format suitable for model input, such as resizing, normalization and other preprocessing operations, and the processed fused binary image is input into the defect recognition model. The defect recognition model will analyze the image features and output the probability or category label of whether there is a defect in each window and its approximate location and type. The binary image of each individual window is also input into the defect recognition model to obtain the respective recognition results. Then, the defect information identified in each window is recorded, including but not limited to the location coordinates, type and confidence of the defect; The recognition results of the fused image are integrated with the recognition results of each single window. The integration method can be a simple result merging, such as merging the defect information in the two result sets to remove duplication, or weighted averaging according to the model confidence to ensure that each defect is only reported once. Furthermore, to deal with existing recognition conflicts, such as inconsistent judgments on defects in the same area between the fusion result and the single window result, it can be decided which result to adopt based on the confidence of the model or specific rules, and the merged defect information is sorted and output in a predetermined format, such as a CSV file or directly displayed on the system interface, including key information such as defect location, type, severity, etc., to improve the accuracy of defect detection and ensure the comprehensiveness of the detection results.

[0013] Furthermore, before respectively inputting the defect recognition models, the method of the present application includes: Obtain a defect sample data set; According to the defect sample data set, randomly construct a first training data set, and configure sample weights of the first training data set, wherein the sample weights of the first training data set are mean values; Using the first training data set to perform model training to obtain a first weak classifier; Based on the first weak classifier, obtaining a physical measurement error, and calculating a weight of the first weak classifier, wherein the weight of the first weak classifier is inversely proportional to an error rate of the physical measurement error; Based on the physical measurement error, the weight of the defect sample data set is reset, wherein the weight of the error sample is higher than the correctly classified sample; Retraining the first weak classifier using the defect sample data set with the newly set weights to obtain a first weak model; Reusing the defect sample data set to construct a second training data set, perform model training, and obtain a second weak model; By analogy, all weak model training is completed, and the prediction weights of each weak model are calculated. Model combination is performed according to the prediction weights of all weak models, and the combined model is trained until the convergence requirement or the number of training times is reached to obtain the defect recognition model.

[0014] Construct the defect recognition model. Specifically, collect a large number of lining cloth images with defects and without defects as basic data sets to ensure the diversity and representativeness of the data sets, covering various types of defects and lining cloth textures. Further, construct a first training data set, randomly extract a part from the original sample data set as the initial training data set, and ensure the randomness and balance of the data set. In addition, configure sample weights, and set the initial weights of all samples to the mean, that is, the contribution of each sample to the model training is considered equal at the beginning. Weak classifier ensemble (such as Adaboost algorithm) is used. Further, a first weak classifier is trained using a first training data set. The first weak classifier is a classifier that can correctly classify some samples. Based on the prediction result of the first weak classifier, its error rate on the training set is calculated, and then its weight is determined. The higher the error rate, the lower its weight (inverse relationship). Further, according to the error result of the weak classifier, the weight of the wrongly classified sample is increased, and the weight of the correctly classified sample is reduced, so as to emphasize the difficult samples that the model needs to pay attention to in the next round of training; Retraining and model iteration: Use the adjusted sample weights to retrain the weak classifier to form the first weak model. Then, repeat the steps corresponding to the first weak model, select samples that have not been fully learned from the original data set each time to build a new training data set, train the next weak classifier, update the sample weights after each training and generate a new weak model. As the training of all weak models is completed, calculate the prediction weight of each weak model in the final integrated model according to its performance (i.e., the ability to reduce errors). Furthermore, integrate the prediction results of all weak models by weighted summation. The weight of each model reflects the contribution of each weak model to the overall prediction accuracy. Further fine-tune the combined model until the convergence criteria are met or the predetermined training rounds are reached. In the actual operation process, it also includes using an independent test data set to evaluate the integrated defect recognition model, checking its performance on unseen data, and ensuring the generalization ability of the model. Then, based on the verification results, if the model performance does not meet expectations, it is necessary to backtrack and adjust the training strategy, such as changing the selection of weak classifiers, sample weight adjustment strategy or training parameters, and gradually build a strong classifier that can efficiently identify lining defects, that is, the defect recognition model. The defect recognition model integrates the prediction capabilities of multiple weak classifiers and effectively improves the recognition accuracy and stability.

[0015] Furthermore, the method of reusing the defect sample data set to construct a second training data set includes: Acquire correctly classified samples of the first weak model, and add the correctly classified samples to a sample extraction taboo table; Training data outside the taboo table is randomly acquired to construct the second training data set.

[0016] Run the trained first weak model to predict the defect sample data set, record the prediction results of each sample, and then identify the correctly classified samples from the model prediction results. The correctly classified samples are considered to be data points that the first weak model has mastered well. Based on the correctly classified samples screened out, create an extraction taboo table. The extraction taboo table is used to record data samples that should not be selected for subsequent training again. The purpose is to avoid the model from over-learning these known samples and promote the model to explore and learn more diverse data features. Furthermore, before constructing the second training data set, remove all correctly classified samples that have been added to the taboo table from the original defect sample data set. Then, from the remaining samples that are not fully mastered by the first weak model, a certain number of samples are randomly selected to ensure the randomness and diversity of the new data set. Furthermore, balanced data is set to ensure that the ratio of defective and flawless samples in the new data set is close to the actual distribution, or the category ratio is adjusted according to actual needs to avoid model skewness. These selected samples are integrated to form the second training data set for training the next weak classifier. Check whether the second training data set meets the training requirements, including the number of samples, category balance, and data diversity. According to the performance of the second training data set, it is necessary to repeatedly adjust the rules of the taboo table or the data selection strategy to optimize the model learning effect. This can not only effectively utilize the existing learning results of the model and avoid overfitting, but also enable the model to continuously learn new knowledge and improve its recognition ability for complex and difficult-to-classify samples.

[0017] Furthermore, the correspondence between the static image and the dynamic image is established, and a multi-size recognition window is set to segment and window the image information. The method of the present application includes: The dynamic image includes captured images at multiple angles, image segmentation is performed according to the captured angles, and key frames of the segmented images are extracted to obtain multi-angle image information; Establishing a correspondence between the static image and the dynamic image according to the acquisition target consistency of the static image and the multi-angle image information; According to the area of ​​the lining cloth of the static image, multiple scales of the window are configured, the static image is segmented according to different area scales, and multiple recognition windows of the static image are constructed; According to the corresponding relationship, the multi-angle image information is segmented accordingly to construct multiple recognition windows for dynamic images.

[0018] Establish the correspondence between static images and dynamic images, and set multi-size recognition windows. Specifically, use the camera to capture dynamic images of the lining cloth from different angles to ensure that multiple viewing angles of the lining cloth surface are covered, and record the acquisition angle information of each dynamic image. In addition, it is necessary to divide the dynamic image into pictures corresponding to each viewing angle according to different acquisition angles, so as to facilitate subsequent key frame extraction and analysis; From each segmented view, the background is removed using image processing technology, and only the lining cloth image is retained. The features of the consecutive frames of each view are compared to identify the frames with significant feature changes. Furthermore, based on the feature change amount, the image that best represents the feature change of the view is selected as the key frame to reduce redundant information. Ensure that the interlining cloth target in the static image and the dynamic image is the same object, that is, the acquisition target corresponding to the static image and the dynamic image is consistent. According to the perspective information of the static image (if any), match it with the key frame perspective of the dynamic image to establish a one-to-one corresponding perspective relationship. Further, measure the total area of ​​the interlining cloth in the static image; design recognition windows of different sizes according to the area of ​​the interlining cloth to adapt to the defects of various sizes appearing on the surface of the interlining cloth, and then segment the static image according to the preset multi-scale, and assign a recognition window to each segmented area to build a multi-recognition window system for static images; Using the previously established view correspondence, similar segmentation is performed on the key frames of the dynamic image to ensure that the segmented area corresponds to the static image window. Furthermore, based on the position and size of the static image window, a recognition window of the same size and position is set in the corresponding dynamic image segmentation area to construct multiple recognition windows for the dynamic image. The correspondence between the static image and the dynamic image is established, as well as the multi-size recognition windows set for the two, providing an accurate image basis for subsequent defect detection.

[0019] Furthermore, the key frame extraction of the segmented image, the method of the present application includes: Perform foreground extraction based on the segmented image to obtain a lining cloth image; Perform frame-by-frame recognition and comparison based on the lining cloth image to obtain feature changes of consecutive frames; According to the changing characteristics of each image frame, the image frame with the most identification features is selected as the key frame.

[0020] For each acquisition angle of the dynamic image, it is segmented into independent picture sequences for separate processing. Then, image processing algorithms, such as background subtraction or motion segmentation based on optical flow, are applied to separate the lining cloth as the foreground from each segmented picture and remove background interference, thereby obtaining a clear lining cloth image. This involves technologies such as grayscale, edge detection, and morphological operations to ensure that the lining cloth part is prominent and the background is effectively suppressed. Extract the image for the foreground of each frame, use feature recognition technology (such as SIFT, SURF, ORB, etc.) or deep learning methods to extract image features, which can be color, texture, shape or motion vector, etc. Furthermore, design an algorithm to compare the features between consecutive frames and analyze the differences or similarities between the features, involving the distance calculation of feature vectors, such as Euclidean distance, Hamming distance, etc.; Quantitatively analyze the feature changes of each frame image, count the feature changes, determine which frames have significant feature changes, and then, based on the statistical results of feature changes, select the frames with the most significant feature changes as candidate key frames, where the candidate key frames represent important transition points of the surface state of the lining cloth, such as the moment when defects appear or disappear; Set a threshold or adopt a ranking mechanism, such as selecting the first N frames with the largest changes as key frames, or define the frames with changes exceeding a certain threshold as key frames; then, further verify the candidate key frames to ensure that the selected frames do represent important changes in the surface state of the lining cloth, thereby avoiding misselection or omission, and being able to effectively extract key frames reflecting changes in lining cloth features from continuous frames of dynamic images, providing accurate target images for subsequent defect detection.

[0021] Furthermore, if Figure 2 As shown, after the binarization processing is performed on each window image and the defect recognition model is input respectively to obtain the defect recognition result, the method of the present application further includes: Window splicing is performed according to the segmented area scale of each window; Based on the window splicing result, the defect recognition result is spliced ​​and recognized, and the spliced ​​defect recognition features are used as the defect recognition result; According to the segmentation and positioning of each window, a center point is set, and the center of each window image is aligned with the center point. The defect recognition results are merged based on the alignment results, and the merged total defect recognition features are used as the defect recognition result.

[0022] Analyze the segmentation size and layout of each recognition window, determine the size and position of each window according to the interlining area of ​​the static image and the preset multi-scale strategy, and further calculate the translation amount and overlapping area processing rules required for stitching according to the relative position and size between the windows; perform translation operations on the binary images of each window to ensure that they are correctly aligned in the predetermined stitching coordinate system, and use the average value, maximum value or other fusion strategies to process the overlapping parts between the windows as needed to reduce the visual impact of the stitching seam; and then, after completing the above operations, merge the binary images of all windows into a complete stitching image, which contains the binary information of the entire interlining surface; Re-perform feature recognition on the stitched image, including extraction of features such as the shape, size, and contrast of the defect. Further, mark the locations and types of all identified defects on the stitched image to form a recognition result map. Then, according to the window segmentation layout, set a center point for each window. The center point is usually located at the geometric center of the window or an alignment reference point determined by a specific algorithm. Further, align the window images before stitching based on the center point to ensure that the feature information of each window can be accurately matched when the recognition results are merged. The defect recognition results after the alignment of each window are merged, including integrating the defect feature information recognized by each window into a unified data structure. Then, the merged data is sorted, the defects that are repeatedly recognized are eliminated, and similar or adjacent features are integrated. Finally, a comprehensive and complete total defect recognition feature set is generated, which realizes a seamless transition from the recognition of local windows to the overall image, improves the accuracy and completeness of defect detection, and ensures the reliability of the detection results.

[0023] Furthermore, according to the correspondence between the static image and the dynamic image, the corresponding window image is obtained, and binary image fusion is performed. The method of the present application includes: Performing resolution segmentation on the static image and the dynamic image to construct a multi-level image structure, wherein each level of resolution is smaller than the previous level; Based on the multi-level image structure, image binary images are compared level by level from bottom to top, and the binary maximum values ​​in adjacent first-level and second-level images are fused to generate a first fused binary image; Based on the first fused binary image, continue to compare the binary image with the third-level image, and generate a second fused binary image using the maximum binary value between the third-level image and the first fused binary image; In this way, all levels of image fusion are completed to obtain a fused binary image.

[0024] Based on the correspondence between static images and dynamic images, a multi-level image structure is constructed and merged step by step. Specifically, the resolution of static images and dynamic images is downsampled respectively to create a multi-level image structure with gradually decreasing resolution, wherein the resolution of each level of image is half (or other proportions) of the previous level, thereby forming an image pyramid structure, for example, the original image is the first level, followed by the second level, the third level, and so on, until a predetermined minimum resolution level is reached; The image at the lowest level is binarized and converted into an initialization binary image, and the initialization binary image is used as the starting point of the fusion process. Further, starting from the lowest level, the fusion is performed from bottom to top, and the binary image of the current level (assuming it is the nth level) is compared with the binary image of the previous level (the n+1th level). Further, when comparing, for each pair of corresponding pixels, the maximum value of the two is selected as the fusion result to generate a new fused binary image. For example, the binary images of the first level and the second level are compared, and the maximum value of each pixel position is selected to generate the first fused binary image. It should be noted that maximum fusion: after processing each layer of the pyramid, you can start from the bottom layer and perform maximum fusion on the images of the two adjacent layers. The maximum fusion refers to taking the maximum pixel value of the two images at the corresponding pixel point as the pixel value of the fused image at that point, which helps to retain more image details; gradually reconstruct the image: starting from the bottom layer of the pyramid, gradually synthesize the fused image with the image of the previous layer until reaching the top layer of the pyramid; The newly generated fused binary image (such as the first fused binary image) is used as the input of the next stage, and the comparison and fusion process is repeated with the binary image of the next higher level. Each fusion is based on the maximum value selection between the current fused image and the next clearer (higher resolution) level binary image, and the second fused binary image, the third fused binary image, and so on are completed in sequence until the top original resolution level is reached; When images of all levels have gone through the above fusion steps, the highest level fused binary image is the fused binary image. The fused binary image combines the binary information of each level, retains the global features at low resolution and the detail information at high resolution, and optimizes the detail performance of the image. In practical applications, image processing tasks such as edge detection and feature extraction can be performed independently on each layer of the pyramid. In short, the details of the image are enhanced at different resolution levels, and finally an image with richer details is obtained. Further, it is conducive to improving the accuracy of defect detection, ensuring the effective capture of defects of different scales during the recognition process, and providing a high-quality image foundation for subsequent defect recognition.

[0025] Furthermore, the present application method also includes: Monitor the interlining output speed through sensors to obtain online production speed; Constructing an adaptive setting module, through which the recognition step length is adaptively set according to the online production speed; Setting a collection window according to the multi-size recognition window and the field of view of the camera; An image acquisition instruction is generated according to the recognition step length and the acquisition window, and the image acquisition instruction is used to perform online lining cloth image acquisition according to the recognition step length and the acquisition window size.

[0026] Install appropriate sensors, such as photoelectric sensors or encoders, at key locations on the production line. These sensors can monitor the speed of the interlining in real time. The sensors continuously monitor and transmit the instantaneous output speed of the interlining to the control system; build an adaptive setting module to determine a time interval (preset analysis step), such as every 10 seconds or every minute, to analyze whether the production speed is stable; Constructing an adaptive setting module, further, the adaptive setting module includes a preset analysis step length, within which the online production speed does not change, a fixed identification step length is set according to the online production speed; when the online production speed changes within the preset analysis step length, the identification step length is adaptively adjusted according to the change frequency until the online production speed does not change within the preset analysis step length, and the fixed identification step length is restored; If the production speed remains unchanged within the preset analysis step, a fixed recognition step is set. The recognition step should ensure that the camera can capture clear and comprehensive images when moving or shooting continuously on the production line. If the production speed changes within the preset analysis step, the recognition step is dynamically adjusted according to the frequency of the change. Specifically, when the production speed increases, the recognition step is reduced to increase the image acquisition frequency, and vice versa. The recognition step is appropriately increased. Furthermore, a logic function is set. The logic function receives the production speed data as input, automatically adjusts the recognition step according to the rules corresponding to the adaptive setting module, and restores the fixed recognition step after the production speed stabilizes.

[0027] According to the multi-size recognition window and the field of view of the camera, a collection window is set. Specifically, according to the defect detection requirements, recognition windows of different sizes are set to cover potential defects of different sizes. Furthermore, according to the actual field of view and resolution of the camera, combined with the size of the recognition window, the position and size of the collection window are determined to ensure that the entire production width or a specific area of ​​interest can be effectively covered; Generate an image acquisition instruction according to the recognition step length and the acquisition window. Specifically, design the image acquisition instruction according to the parameters of the recognition step length and the acquisition window. For example, if the recognition step length is once per second and the acquisition window covers the entire width of the production line, the image acquisition instruction will contain information for triggering full-frame image shooting once per second. Then, generate a specific instruction code or signal. The image acquisition instruction stores the recognition step length (i.e., time interval), the coordinates and size of the acquisition window, etc., to ensure that the image acquisition device (such as a camera) can accurately perform the image capture operation according to these instructions. In addition, the control system issues instructions based on the generated image acquisition instructions and sends control signals to the camera in real time; the camera captures the lining cloth image within the specified time interval and field of view according to the received instructions; the quality and frequency of the acquired images can be evaluated through system feedback, and the acquisition parameters can be fine-tuned when necessary to optimize the image quality and detection efficiency, realize real-time monitoring of the lining cloth production speed and adaptive adjustment of the image acquisition strategy, and ensure the efficiency and accuracy of online defect detection.

[0028] In summary, the beneficial effects of the embodiments of the present application are: The integrated learning method is adopted, combined with multi-scale recognition window technology and dynamic image key frame extraction, to improve the recognition accuracy of various types of defects, significantly reduce the missed detection and false detection rates, and ensure the detection quality.

[0029] The sensor monitoring and adaptive setting modules are introduced to dynamically adjust the image acquisition and processing strategies according to the actual operating speed of the production line, ensuring accurate online detection at different speeds and improving the flexibility and practicality of the system.

[0030] Establish the precise correspondence between static images and dynamic images, and enhance image details through image pyramid and maximum fusion technology to improve recognition ability under complex texture and lighting conditions.

[0031] Through strategies such as binarization of segmented windows, window splicing and result merging, the image processing process is optimized, the processing speed is improved, the real-time performance of online detection is ensured, and the needs of large-scale production environments are met.

[0032] 5. As the output speed of the lining cloth is monitored by the sensor, the online production speed is obtained to build an adaptive setting module, and the recognition step length is adaptively set according to the online production speed through the adaptive setting module; the acquisition window is set according to the multi-size recognition window and the field of view of the camera; the image acquisition instruction is generated according to the recognition step length and the acquisition window, and the image acquisition instruction is used to collect the online lining cloth image according to the recognition step length and the acquisition window size. Real-time monitoring of the lining cloth production speed and adaptive adjustment of the image acquisition strategy are realized to ensure the efficiency and accuracy of online defect detection.

[0033] In summary, any step can be stored as a computer instruction or program in an unlimited computer memory, and can be called and recognized by an unlimited computer processor, and no unnecessary restrictions are made here.

[0034] Furthermore, the above-mentioned technical scheme only reflects the preferred technical scheme of the technical scheme of the embodiment of the present application. Some changes that may be made to some parts thereof by technicians in this technical field all reflect the novel principles of the embodiment of the present application. Obviously, technicians in this field can make various changes and modifications to the present application without departing from the scope of the present application.

Claims

1. A method for online defect detection of lining cloth, characterized in that: The method comprises: Collecting image information of the lining cloth through a camera, wherein the image information includes a static image and a dynamic image; Establishing the correspondence between the static image and the dynamic image, and setting a multi-size recognition window to segment and window the image information; Binarize each window image and input them into the defect recognition model to obtain the defect recognition result; According to the correspondence between the static image and the dynamic image, a corresponding window image is obtained, and binary image fusion is performed; Inputting the fused binary image into the defect recognition model to obtain a fused defect recognition result; The defect recognition result and the fused defect recognition result are combined and output.

2. The method according to claim 1, characterized in that Before respectively inputting the defect recognition models, the method includes: Obtain a defect sample data set; According to the defect sample data set, randomly construct a first training data set, and configure sample weights of the first training data set, wherein the sample weights of the first training data set are mean values; Using the first training data set to perform model training to obtain a first weak classifier; Based on the first weak classifier, obtaining a physical measurement error, and calculating a weight of the first weak classifier, wherein the weight of the first weak classifier is inversely proportional to an error rate of the physical measurement error; Based on the physical measurement error, the weight of the defect sample data set is reset, wherein the weight of the error sample is higher than the correctly classified sample; Retraining the first weak classifier using the defect sample data set with the newly set weights to obtain a first weak model; Reusing the defect sample data set to construct a second training data set, perform model training, and obtain a second weak model; By analogy, all weak model training is completed, and the prediction weights of each weak model are calculated. Model combination is performed according to the prediction weights of all weak models, and the combined model is trained until the convergence requirement or the number of training times is reached to obtain the defect recognition model.

3. The method according to claim 2, characterized in that The reusing of the defect sample data set to construct a second training data set includes: Acquire correctly classified samples of the first weak model, and add the correctly classified samples to a sample extraction taboo table; Training data outside the taboo table is randomly acquired to construct the second training data set.

4. The method according to claim 1, characterized in that Establishing the correspondence between the static image and the dynamic image, and setting a multi-size recognition window to segment and window the image information, including: The dynamic image includes captured images at multiple angles, image segmentation is performed according to the captured angles, and key frames of the segmented images are extracted to obtain multi-angle image information; Establishing a correspondence between the static image and the dynamic image according to the acquisition target consistency of the static image and the multi-angle image information; According to the lining cloth area of ​​the static image, multiple scales of windows are configured, the static image is segmented according to different area scales, and multiple recognition windows of the static image are constructed; According to the corresponding relationship, the multi-angle image information is segmented accordingly to construct multiple recognition windows for dynamic images.

5. The method according to claim 4, characterized in that The step of extracting key frames for segmenting an image comprises: Perform foreground extraction based on the segmented image to obtain a lining cloth image; Perform frame-by-frame recognition and comparison based on the lining cloth image to obtain feature changes of consecutive frames; According to the changing characteristics of each image frame, the image frame with the most identification features is selected as the key frame.

6. The method according to claim 4, characterized in that After the binarization process is performed on each window image and the defect recognition models are input respectively to obtain the defect recognition results, the method further comprises: Window splicing is performed according to the segmented area scale of each window; Based on the window splicing result, the defect recognition result is spliced ​​and recognized, and the spliced ​​defect recognition features are used as the defect recognition result; According to the segmentation and positioning of each window, a center point is set, and the center of each window image is aligned with the center point. The defect recognition results are merged based on the alignment results, and the merged total defect recognition features are used as the defect recognition result.

7. The method according to claim 4, characterized in that According to the correspondence between the static image and the dynamic image, a corresponding window image is obtained, and binary image fusion is performed, including: Performing resolution segmentation on the static image and the dynamic image to construct a multi-level image structure, wherein each level of resolution is smaller than the previous level; Based on the multi-level image structure, image binary images are compared level by level from bottom to top, and the binary maximum values ​​in adjacent first-level and second-level images are fused to generate a first fused binary image; Based on the first fused binary image, continue to compare the binary image with the third-level image, and generate a second fused binary image using the maximum binary value between the third-level image and the first fused binary image; In this way, all levels of image fusion are completed to obtain a fused binary image.

8. The method according to claim 1, characterized in that The method further comprises: Monitor the interlining output speed through sensors to obtain online production speed; Constructing an adaptive setting module, through which the recognition step length is adaptively set according to the online production speed; Setting a collection window according to the multi-size recognition window and the field of view of the camera; An image acquisition instruction is generated according to the recognition step length and the acquisition window, and the image acquisition instruction is used to perform online lining cloth image acquisition according to the recognition step length and the acquisition window size.

Citation Information

Patent Citations

  • Seed identification method based on multi-scale feature fusion and extreme learning machine

    CN105139023A

  • Video sequence segmentation method for fusing static information and dynamic information

    CN107045722A

  • Cloth defect detection method based on image processing

    CN107870172A

  • A method for detecting and classifying cloth defects

    CN109145985A

  • X-ray flaw detection intelligent detection method

    CN114119475A