An on-line defect detection method for interlining

By acquiring and fusing static and dynamic images, the problem of difficulty in both speed and accuracy in fabric detection is solved, efficient and accurate identification of defects in liner fabrics is achieved, and production efficiency and product quality control are improved.

CN119880938BActive Publication Date: 2025-08-05QIDONG LEXIN TEXTILE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, fabric detection is difficult to achieve high-precision and real-time detection when facing complex and variable defect types, changes in lighting conditions, and dynamic changes in fabrics on high-speed production lines, and the recognition rate is insufficient and the response speed is slow.

Method used

The camera collects static and dynamic images of the lining cloth, establishes a correspondence relationship, sets a multi-size recognition window for segmentation and windowing, and then performs binarization processing to input a defect recognition model, combines the information of static and dynamic images to fuse it, and finally merges and outputs the recognition results.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880938B_ABST
    Figure CN119880938B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of fabric detection and processing, and specifically includes an online defect detection method for lining cloth, comprising: collecting static and dynamic images of the lining cloth by a camera, establishing a corresponding relationship, and segmenting and windowing; binarizing the images of each window and inputting them into a defect recognition model to obtain a recognition result; binary-fusing the corresponding window images and then inputting them into the model to obtain a fusion result, and merging the two results and outputting the result. The method solves the technical problems of difficulty in achieving both speed and precision and limited defect recognition rate in fabric detection, and achieves the technical effect of enhancing the ability to capture surface change features of the fabric by integrating the collection and processing of static and dynamic images, establishing a corresponding relationship 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 recognition accuracy and response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 primarily relies on online machine vision detection technology with synchronous image acquisition and analysis. Although a variety of image processing-based fabric defect detection methods exist, they still face problems such as insufficient recognition accuracy and slow response when faced with complex and changing defect types, changing lighting conditions, and dynamic fabric changes on high-speed production lines. This is especially true for materials such as interlinings, which require high surface flatness and uniformity, making it difficult to meet the needs of high-precision, real-time detection.

[0003] In summary, the existing technology has technical problems such as difficulty in achieving both speed and accuracy in fabric inspection and limited defect recognition rate. 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 of fabric detection in which speed and accuracy are difficult to achieve at the same time and the defect recognition rate is limited.

[0005] In view of the above problems, the technical solution to implement this application is:

[0006] The present application provides an online defect detection method for an interlining cloth, wherein the method comprises: collecting image information of the interlining cloth through a camera, wherein the image information includes a static image and a dynamic image;

[0007] 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;

[0008] Perform binarization processing on each window image and input them into the defect recognition model to obtain the defect recognition results;

[0009] According to the correspondence between the static image and the dynamic image, a corresponding window image is obtained, and binary image fusion is performed;

[0010] Inputting the fused binary image into the defect recognition model to obtain a fused defect recognition result;

[0011] The defect recognition result and the fused defect recognition result are combined and output.

[0012] In summary, the one or more technical solutions provided in this 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 capture of 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

[0013] Figure 1 The present application provides a flow chart of an online defect detection method for an interlining cloth;

[0014] Figure 2 The present application provides a flow chart of determining defect recognition results in an online defect detection method for an interlining cloth. DETAILED DESCRIPTION

[0015] The present application will be 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:

[0016] S1: collecting image information of the lining cloth through a camera, wherein the image information includes static images and dynamic images;

[0017] 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;

[0018] Conventional fabric defect detection primarily relies on online machine vision detection technology with synchronous image acquisition and analysis. Specifically, a high-definition camera (such as a linear array CCD camera) is used to continuously capture the interlining fabric in motion. The captured images are then pre-processed, including denoising, correction (such as exposure correction and geometric correction), and grayscale conversion, to eliminate the impact of environmental factors on image quality. The images are then analyzed using a defect recognition model built using machine learning or deep learning algorithms (which has been trained on a large number of samples and can identify common defect types such as color difference, stains, and holes).

[0019] Limited, after long-term application, it was found 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 and difficult to adapt to a wide range of production needs. 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 improving the ability to identify subtle defects, and merging the two recognition results into an output, integrating the certainty of 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 level.

[0020] Specifically, a camera installed on the production line captures a static image of the interlining at a specific moment, including its overall appearance and basic information about defects. Simultaneously, the camera continuously shoots and records dynamic images of the interlining as it moves. The dynamic images contain information from multiple angles and time series, helping to identify defects that are difficult to detect during movement. Furthermore, image processing technology is used to match the static and dynamic images to ensure consistency in perspective and position between the two. This involves image feature extraction, matching, and geometric transformation to ensure that regions in the static image correspond to corresponding frames in the dynamic image. Representative frames (key frames) are selected from the dynamic image. These key frames reflect the interlining state at different angles or time periods, establishing a one-to-one correspondence with the static images.

[0021] Based on the interlining area of static and dynamic images, recognition windows of different sizes are determined. The recognition windows vary in size to capture potential defects of different sizes and positions. The static image and each keyframe 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 interlining.

[0022] S3: Binarize the images in each window and input them into the defect recognition model to obtain the defect recognition results;

[0023] 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;

[0024] Each window image after segmentation is binarized. Further, a suitable threshold is determined for the binarization process. This can be achieved through global thresholding, local adaptive thresholding (such as Otsu's method), or other advanced image segmentation techniques. The selected threshold is applied to each segmented window image to divide the pixels in the image into two categories: foreground (usually defects) and background, thereby generating a binary image. That is, the image is converted into black and white, highlighting the contrast between defects and background, which is convenient for subsequent feature extraction and recognition. Black pixels usually represent background, and white pixels usually represent defects.

[0025] Ensure that a strong classifier (i.e., a defect recognition model) composed of one or a group of weak classifiers has been trained. The defect recognition model can identify defects based on binary images. The binary image of each window is fed into the defect recognition model as an input vector. The defect recognition model uses a deep learning architecture such as a convolutional neural network (CNN) or other machine learning algorithm. The defect recognition model outputs a judgment on whether a defect exists in each window image, either as a probability score or a direct defect / non-defect label.

[0026] Based on the correspondence between the static and dynamic images, the respective binary images are fused, usually through techniques such as maximum fusion, aiming to combine the advantages of both and improve recognition accuracy. Furthermore, based on the established correspondence between the static and dynamic images, window images corresponding to the same fabric area at different viewing angles are found. If the resolutions of the static and dynamic images are different, necessary resolution adjustments are first made to ensure that the binary images can be accurately aligned.

[0027] The recognition results of a single window are combined with the fused recognition results, 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. The maximum value is selected as the pixel value of the fused image, and this process is performed step by step upward until the highest resolution layer is reached to form a fused binary image, thereby retaining the strongest feature signals in the two images and enhancing the recognition effect. In addition, before fusion, it is ensured that all window images are accurately aligned according to their actual positions on the lining cloth to avoid misjudgment due to position deviation, thus achieving detailed detection of the lining cloth image and effectively improving the accuracy and reliability of detection, especially the defect recognition ability under complex dynamic conditions.

[0028] S5: inputting the fused binary image into the defect recognition model to obtain a fused defect recognition result;

[0029] S6: Merge and output the defect recognition result and the fused defect recognition result.

[0030] After completing the binarization of static and dynamic images, the corresponding window images are aligned based on the corresponding relationship between the images. A fused binary image is generated using techniques such as maximum fusion. This combines information captured under different viewing angles and lighting conditions to improve the accuracy and completeness of defect detection. Furthermore, a previously trained defect recognition model is called, which is an integrated set of weak classifiers, such as Adaboost, random forest, or a deep learning model.

[0031] Then, the fused binary image is converted into a data format suitable for model input, such as resizing and normalization, and preprocessing operations are performed. The processed fused binary image is input into the defect recognition model, which analyzes the image features and outputs the probability or category label of whether a defect exists 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 its own recognition result. Then, the defect information identified in each window is recorded, including but not limited to the location coordinates, type, and confidence level of the defect.

[0032] 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, existing recognition conflicts are handled. For example, if the fusion result and the single window result have inconsistent judgments on defects in the same area, it can be decided which result to adopt based on the confidence of the model or specific rules. 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.

[0033] Furthermore, before respectively inputting the defect recognition models, the method of the present application includes:

[0034] Obtain defect sample data set;

[0035] Randomly constructing a first training data set based on the defect sample data set, configuring sample weights of the first training data set, where the sample weights of the first training data set are mean values;

[0036] Performing model training using the first training data set to obtain a first weak classifier;

[0037] 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;

[0038] 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;

[0039] Retraining the first weak classifier using the defect sample data set with the newly set weights to obtain a first weak model;

[0040] Reusing the defect sample data set to construct a second training data set, perform model training, and obtain a second weak model;

[0041] Similarly, all weak model training is completed, and the prediction weights of each weak model are calculated. Model combination is performed based on 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.

[0042] Constructing the defect recognition model, specifically, collecting a large number of interlining images with and without defects as a basic dataset to ensure the diversity and representativeness of the dataset, covering various types of defects and interlining textures. Furthermore, constructing a first training dataset, randomly extracting a portion from the original sample dataset as the initial training dataset to ensure the randomness and balance of the dataset. In addition, configuring sample weights, the initial weights of all samples are set to the mean, that is, each sample's contribution to the model training is considered equal at the beginning;

[0043] Using a weak classifier ensemble (such as the Adaboost algorithm), further, using the first training data set to train a first weak classifier, the first weak classifier is a classifier that can correctly classify some samples. Based on the prediction results 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 (inversely proportional). Furthermore, based on the error results of the weak classifier, the weight of the incorrectly classified samples is increased, and the weight of the correctly classified samples is decreased, so as to emphasize the difficult samples that the model needs to focus on in the next round of training;

[0044] 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, each time selecting samples that have not been fully learned from the original data set to construct 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, the prediction weight of each weak model in the final integrated model is calculated based on its performance (i.e., its ability to reduce errors). Furthermore, the prediction results of all weak models are integrated by weighted summation. The weight of each model reflects the contribution of each weak model to the overall prediction accuracy. The combined model is further fine-tuned until the convergence criteria are met or the predetermined number of training rounds is reached;

[0045] The actual operation process also includes using an independent test data set to evaluate the integrated defect recognition model, checking its performance on unseen data, and ensuring the model's generalization ability. 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, etc., to gradually build a strong classifier that can efficiently identify lining defects, namely the defect recognition model. The defect recognition model integrates the predictive capabilities of multiple weak classifiers to effectively improve recognition accuracy and stability.

[0046] Furthermore, the method of reusing the defect sample dataset to construct a second training dataset includes:

[0047] Obtaining correctly classified samples of the first weak model, and adding the correctly classified samples to a sample extraction taboo table;

[0048] Training data outside the taboo table is randomly acquired to construct the second training data set.

[0049] The trained first weak model is run to predict the defect sample dataset, and the prediction results for each sample are recorded. Then, from the model prediction results, the correctly classified samples are identified. 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, a taboo table is created. The taboo table is used to record data samples that should not be selected again for subsequent training. The purpose is to prevent the model from over-learning these known samples and to encourage the model to explore and learn more diverse data features. Furthermore, before constructing the second training dataset, all correctly classified samples that have been added to the taboo table are removed from the original defect sample dataset.

[0050] Then, a certain number of samples are randomly selected from the remaining samples that are not fully captured by the first weak model to ensure the randomness and diversity of the new dataset. Furthermore, the data is balanced to ensure that the ratio of defective and non-defective samples in the new dataset is close to the actual distribution, or the category ratio is adjusted according to actual needs to avoid model skew. These selected samples are combined to form the second training dataset for training the next weak classifier.

[0051] Check whether the second training dataset meets the training requirements, including the number of samples, category balance, and data diversity. Based on the performance of the second training dataset, 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 model's existing learning results 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.

[0052] Furthermore, the correspondence between the static image and the dynamic image is established, and multi-size recognition windows are set to segment and window the image information. The method of the present application includes:

[0053] The dynamic image includes captured images from multiple angles, and image segmentation is performed according to the captured angles, and key frames of the segmented images are extracted to obtain multi-angle image information;

[0054] 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;

[0055] According to the area of the lining cloth 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;

[0056] According to the corresponding relationship, the multi-angle image information is segmented accordingly to construct multiple recognition windows for dynamic images.

[0057] Establish a correspondence between static and dynamic images, and set up multi-size recognition windows. Specifically, use a camera to capture dynamic images of the interlining from different angles, ensuring that multiple viewing angles of the interlining surface are covered. Record the acquisition angle information of each dynamic image. In addition, it is necessary to segment the dynamic image into images corresponding to each viewing angle based on different acquisition angles to facilitate subsequent key frame extraction and analysis.

[0058] From each segmented view, image processing techniques are used to remove the background, retaining only the lining image. Feature comparisons are then performed on consecutive frames from each view to identify frames with significant feature changes. Furthermore, based on the amount of feature change, the image that best represents the feature change for that view is selected as the key frame to reduce redundant information.

[0059] Ensure that the interlining cloth target in the static image and the dynamic image is the same object, that is, the acquisition targets corresponding to the static image and the dynamic image are consistent. Based on the perspective information of the static image (if any), it is matched with the perspective of the key frame of the dynamic image to establish a one-to-one perspective relationship. Furthermore, the total area of the interlining cloth in the static image is measured. Based on the area of the interlining cloth, recognition windows of different sizes are designed to accommodate defects of various sizes on the interlining cloth surface. Then, the static image is segmented according to the preset multi-scale, and a recognition window is assigned to each segmented area to construct a multi-recognition window system for static images.

[0060] Using the previously established perspective 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. This completes the establishment of the correspondence between the static image and the dynamic image, as well as the setting of multi-size recognition windows for the two, providing an accurate image basis for subsequent defect detection.

[0061] Furthermore, the method of extracting key frames for segmenting an image includes:

[0062] Perform foreground extraction based on the segmented image to obtain the lining cloth image;

[0063] Performing frame-by-frame recognition and comparison based on the lining cloth image to obtain feature changes of consecutive frames;

[0064] According to the changing characteristics of each image frame, the image frame with the most identification features is selected as the key frame.

[0065] Each acquisition angle of the dynamic image is segmented into independent image sequences for easy 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 image, removing background interference to obtain a clear lining cloth image. This involves technologies such as grayscale conversion, edge detection, and morphological operations to ensure that the lining cloth portion is prominent and the background is effectively suppressed.

[0066] Extract the foreground image for each frame and use feature recognition techniques (such as SIFT, SURF, ORB, etc.) or deep learning methods to extract image features, which can be color, texture, shape, or motion vectors. Furthermore, design an algorithm to compare the features between consecutive frames and analyze the differences or similarities between the features. This involves calculating the distance between feature vectors, such as Euclidean distance and Hamming distance.

[0067] Quantitatively analyze the feature changes of each frame, calculate the feature changes, and determine which frames have significant feature changes. Then, based on the statistical results of the feature changes, select the frames with the most significant feature changes as candidate key frames. The candidate key frames represent important transition points in the surface state of the interlining, such as the moment when a defect appears or disappears.

[0068] A threshold is set or a ranking mechanism is adopted, such as selecting the first N frames with the largest changes as key frames, or defining frames with changes exceeding a certain threshold as key frames; then, the candidate key frames are further verified to ensure that the selected frames do represent important changes in the surface state of the lining cloth, thereby avoiding misselection or omission. The key frames reflecting the changes in the lining cloth features can be effectively extracted from the continuous frames of the dynamic image, providing accurate target images for subsequent defect detection.

[0069] 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 results, the method of the present application further includes:

[0070] Window splicing is performed according to the segmentation area scale of each window;

[0071] 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;

[0072] 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 total defect recognition features after merging are used as the defect recognition result.

[0073] The segmentation size and layout of each recognition window are analyzed. The size and position of each window are determined based on the interlining area of the static image and the preset multi-scale strategy. Furthermore, the translation amount required for stitching and the overlapping area processing rules are calculated based on the relative position and size of the windows. The binary images of each window are translated to ensure that they are correctly aligned in the predetermined stitching coordinate system. For the overlapping parts between windows, the average value, maximum value or other fusion strategies are used as needed to reduce the visual impact of the stitching seam. Then, after completing the above operations, the binary images of all windows are merged into a complete stitching image, which contains the binary information of the entire interlining surface.

[0074] Re-recognize features on the stitched image, including extraction of features such as the shape, size, and contrast of the defects. Furthermore, the locations and types of all identified defects are marked on the stitched image to form a recognition result map. Then, based on the window segmentation layout, a center point is set 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. Furthermore, the window images before stitching are aligned based on the center point to ensure that the feature information of each window can be accurately matched when the recognition results are merged.

[0075] The defect recognition results after alignment of each window are merged, including integrating the defect feature information identified by each window into a unified data structure. Then, the merged data is sorted, duplicate defects are eliminated, and similar or adjacent features are integrated to finally generate a comprehensive and complete total defect recognition feature set, realizing a seamless transition from local window recognition to the overall image, improving the accuracy and completeness of defect detection, and ensuring the reliability of the detection results.

[0076] Furthermore, according to the correspondence between the static image and the dynamic image, a corresponding window image is obtained and binary image fusion is performed. The method of the present application includes:

[0077] Performing resolution segmentation on the static image and the dynamic image to construct a multi-level image structure, wherein the resolution of each level is smaller than the previous level;

[0078] 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;

[0079] 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;

[0080] In this way, all levels of image fusion are completed to obtain a fused binary image.

[0081] Based on the correspondence between static and dynamic images, a multi-level image structure is constructed and fused step by step. Specifically, the resolution of static and dynamic images is downsampled separately to create a multi-level image structure with gradually decreasing resolution. The resolution of each level of image is half (or other ratio) of the previous level, thus 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.

[0082] The lowest level image is binarized and converted into an initialized binary image, and the initialized binary image is used as the starting point of the fusion process. Furthermore, 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). Furthermore, 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.

[0083] It should be noted that maximum fusion: after processing each layer of the pyramid, you can start from the bottom and perform maximum fusion on the images of two adjacent layers. Maximum fusion means 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; step-by-step image reconstruction: starting from the bottom layer of the pyramid, gradually synthesize the fused image with the image of the previous layer until you reach the top layer of the pyramid;

[0084] 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 binary image of the next clearer (higher resolution) level. 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;

[0085] After all levels of images 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 actual application, 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. Furthermore, 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.

[0086] Furthermore, the present application method also includes:

[0087] Monitor the interlining output speed through sensors to obtain online production speed;

[0088] Constructing an adaptive setting module, and adaptively setting the recognition step length according to the online production speed through the adaptive setting module;

[0089] Setting a collection window according to the multi-size recognition window and the field of view of the camera;

[0090] 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.

[0091] 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 interlining's instantaneous output speed 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.

[0092] Constructing an adaptive setting module, further comprising a preset analysis step length, wherein if the online production speed does not change within the preset analysis step length, a fixed recognition step length is set according to the online production speed; when the online production speed changes within the preset analysis step length, the recognition step length is adaptively adjusted according to the frequency of the change until the online production speed does not change within the preset analysis step length, at which time the fixed recognition step length is restored;

[0093] 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.

[0094] Setting a capture window based on the multi-size recognition window and the camera's field of view. Specifically, based on defect detection requirements, different sizes of recognition windows are set to cover potential defects of different sizes. Furthermore, the position and size of the capture window are determined based on the camera's actual field of view and resolution, combined with the size of the recognition window, to ensure that the entire production width or a specific area of interest can be effectively covered.

[0095] An image acquisition instruction is generated based on the recognition step length and the acquisition window. Specifically, the image acquisition instruction is designed based on 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 include information for triggering full-frame image capture once per second. Subsequently, a specific instruction code or signal is generated. 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 (e.g., a camera) can accurately perform image capture operations according to these instructions.

[0096] In addition, the control system issues instructions based on the generated image acquisition instructions and sends control signals to the camera in real time. Based on the received instructions, the camera captures the interlining image within the specified time interval and field of view. 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 image quality and detection efficiency. This enables real-time monitoring of the interlining production speed and adaptive adjustment of the image acquisition strategy, ensuring the efficiency and accuracy of online defect detection.

[0097] In summary, the beneficial effects of the embodiments of the present application are:

[0098] The integrated learning method is used, 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.

[0099] The introduction of sensor monitoring and adaptive setting modules dynamically adjusts 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.

[0100] Establish an accurate correspondence between static images and dynamic images, and enhance image details through image pyramid and maximum fusion technology to improve recognition capabilities under complex texture and lighting conditions.

[0101] By using 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.

[0102] 5. By using sensors to monitor interlining production speed, an adaptive setting module is constructed based on the online production speed. This module adaptively sets the recognition step length according to the online production speed. The acquisition window is set based on the multi-size recognition window and the camera's field of view. Image acquisition instructions are generated based on the recognition step length and acquisition window size. These image acquisition instructions are used to capture interlining images online according to the recognition step length and acquisition window size. This enables real-time monitoring of interlining production speed and adaptive adjustment of image acquisition strategies, ensuring the efficiency and accuracy of online defect detection.

[0103] 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, without any unnecessary restrictions.

[0104] Furthermore, the above technical solution only reflects the preferred technical solution of the technical solution of the embodiment of the present application. Some changes that may be made to certain parts thereof by technical personnel in this technical field all reflect the novel principles of the embodiment of the present application. Obviously, technical personnel 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 static images and dynamic images; 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; Perform binarization processing on each window image and input them into the defect recognition model to obtain the defect recognition results; 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, wherein Before respectively inputting the defect recognition models, the method includes: Obtain defect sample data set; Randomly construct a first training data set based on the defect sample data set, and configure sample weights of the first training data set, where the sample weights of the first training data set are mean values; Performing model training using the first training data set 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; Similarly, all weak model training is completed, and the prediction weights of each weak model are calculated. Model combination is performed based on 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, wherein The reusing of the defect sample data set to construct a second training data set includes: Obtaining correctly classified samples of the first weak model, and adding 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, wherein 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 includes: The dynamic image includes captured images from multiple angles, and 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 between the static image and the multi-angle image information; According to the area of the lining cloth 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, wherein The key frame extraction of the segmented image includes: Perform foreground extraction based on the segmented image to obtain the lining cloth image; Performing 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, wherein After performing binarization processing on each window image and inputting each into the defect recognition model to obtain the defect recognition results, the method further includes: Window splicing is performed according to the segmentation 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 total defect recognition features after merging are used as the defect recognition result.

7. The method according to claim 4, wherein 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 the resolution of each level 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, wherein The method further comprises: Monitor the interlining output speed through sensors to obtain online production speed; Constructing an adaptive setting module, and adaptively setting the recognition step length according to the online production speed through the adaptive setting module; 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

  • X-ray flaw detection intelligent detection method

    CN114119475A