A zipper quality online detection method and system based on machine vision

Online zipper quality inspection is carried out through machine vision technology, and a small number of reference images are used for component segmentation and clustering processing, which solves the problem of existing technology's dependence on large amounts of data, achieves rapid deployment and adaptability detection, and satisfies the production environment's need for accurate and The need for rapid testing.

CN118297931BActive Publication Date: 2024-10-11GUANGXI JINGJI ZIPPER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410540796.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-10-11
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

Existing zipper defect detection technology based on deep learning highly relies on a large amount of pre-annotated training data, resulting in high data acquisition costs, poor real-time adaptability and difficulty in model update, and cannot meet the needs of complex and changing production environments for accurate, fast, and adaptive detection. .

Method used

An online zipper quality inspection method based on machine vision is adopted. By obtaining the zipper images to be inspected and the reference zippers, component segmentation, grayscale threshold detection, internal isometric segmentation and clustering processing are performed to generate defect data, and a small number of reference images are used to achieve rapid deployment. Reduced reliance on large amounts of data.

Benefits of technology

It realizes online detection that can be quickly deployed without requiring a large amount of data for early model training, shortens the online cycle of the detection system, can quickly respond to changes in production needs, adapt to new production lines and quality standard adjustments, and ensure product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118297931B_ABST
    Figure CN118297931B_ABST
Patent Text Reader

Abstract

The present invention discloses a zipper quality online detection method based on machine vision and its system, the method comprising: obtaining a first image of a zipper to be detected and a second image of a normal reference; performing component segmentation on the two images, extracting sub-images corresponding to the cloth tape, the pull head, the chain tooth and the limit code; using the grayscale threshold method to detect the pull head and the limit code images, and generating preliminary defect data; equidistantly segmenting the cloth tape and the chain tooth sub-images to form multiple groups of sub-images; mixing the same type of pull tape and chain tooth sub-images, performing the first and second clustering processing respectively, and obtaining two types of classified data; constructing the second defect data according to the obtained classified data. The present invention uses image processing technology to perform component segmentation, grayscale detection and cluster analysis on the zipper to be detected and the normal reference zipper, and generates zipper defect data, so as to solve the problems that the existing zipper defect detection technology is limited by the reliance on a large amount of pre-labeled training data, and faces the problems of data cost, real-time adaptability and difficulty in model updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision detection, and in particular to a machine vision-based zipper quality online detection method and system thereof. Background Art

[0002] At present, although the zipper defect detection system based on deep learning has improved the efficiency and accuracy of traditional manual detection to a certain extent, it is highly dependent on a large amount of pre-labeled training data, resulting in a series of challenges such as high data acquisition costs, difficulty in meeting real-time and adaptability requirements, and difficulty in model update and maintenance. Therefore, faced with the complex and changing production environment and the urgent need for accurate, fast, and adaptive zipper defect detection, the industry is in urgent need of developing an innovative detection technology that can overcome the above limitations. Summary of the invention

[0003] In order to solve at least one of the technical problems mentioned above, the present invention provides a zipper quality online detection method and system based on machine vision, so as to solve the problems that the existing zipper defect detection technology based on deep learning is limited by the reliance on a large amount of pre-labeled training data, and faces data cost, real-time adaptability and difficulty in model updating.

[0004] On the one hand, a method for online detection of zipper quality based on machine vision is provided, the method comprising:

[0005] Acquire a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference;

[0006] Performing component segmentation processing on the first zipper image and the second zipper image respectively to obtain a tape image, a slider image, a chain tooth image, and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image, and a reference limit code image of the second zipper image;

[0007] Performing grayscale threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, respectively, and generating first defect data according to the detection results;

[0008] Performing internal equidistant segmentation processing on the tape image, the reference tape image, the fastener tooth image, and the reference fastener tooth image to generate a plurality of sub-images corresponding to each of them;

[0009] Mixing a plurality of sub-images of the tape image and a plurality of sub-images of the reference tape image, and performing a first clustering process on the mixed data set to obtain first classification data;

[0010] Mixing a plurality of sub-images of the fastener tooth images and a plurality of sub-images of the reference fastener tooth images, and performing a second clustering process on the mixed data set to obtain second classification data;

[0011] Second defect data is generated based on the first classification data and the second classification data.

[0012] Preferably, the step of performing internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image and the reference tooth image to generate a plurality of sub-images corresponding to each other includes:

[0013] The link tooth size information is obtained, and based on the link tooth size information, the tape image, the reference tape image, the link tooth image and the reference link tooth image are internally equidistantly segmented along the direction of travel of the slider to obtain a plurality of sub-tape images, a plurality of sub-reference tape images, a plurality of sub-link tooth images and a plurality of sub-reference link tooth images.

[0014] Preferably, the step of mixing the plurality of sub-images of the tape image and the plurality of sub-images of the reference tape image, and performing a first clustering process on the mixed data set to obtain the first classification data comprises:

[0015] Mixing the plurality of sub-tape images and the plurality of sub-reference tape images to obtain a tape image dataset;

[0016] Feature extraction is performed on the images in the tape image data set, and the extracted features are input into a preset first DBSCAN algorithm to obtain the first classification data.

[0017] Preferably, the step of mixing the plurality of sub-images of the fastener tooth images with the plurality of sub-images of the reference fastener tooth images and performing a second clustering process on the mixed data set to obtain the second classification data comprises:

[0018] Mixing the plurality of sub-chain element images and the plurality of sub-reference chain element images to obtain a chain element image dataset;

[0019] Feature extraction is performed on the images in the chain tooth image data set, and the extracted features are input into a preset second DBSCAN algorithm to obtain the second classification data.

[0020] Preferably, generating second defect data according to the first classification data and the second classification data includes:

[0021] detecting the number of categories of the first classified data and the second classified data;

[0022] If the number of categories of the first classification data is greater than 1, calculating the category reference tape ratio of the number of the sub-reference tape images in each category to the total number of the sub-reference tape images, determining the category whose category reference tape ratio is greater than a preset first ratio as a normal tape category, determining the category whose calculation result is less than a preset second ratio as a defective tape category, and the first ratio is greater than the second ratio;

[0023] If the number of categories of the second classification data is greater than 1, calculating the category reference tooth ratio of the number of the sub-reference tooth images in each category to the total number of the sub-reference tooth images, determining the category whose category reference tooth ratio is greater than the first ratio as a normal tooth category, and determining the category whose calculation result is less than the second ratio as a defective tooth category;

[0024] The sub-tape image in the defective tape category and the sub-linker element image in the defective linker element category are integrated to obtain the second defect data.

[0025] Preferably, before integrating the sub-tape images in the defective tape category and the sub-linker element images in the defective linker element category, the method further includes:

[0026] It is determined whether the category reference tape ratio and the category reference chain element ratio are greater than the second ratio and less than the first ratio. If any one of them is satisfied, the currently detected zipper is re-detected and the number of re-detections is recorded.

[0027] Preferably, after re-testing the currently detected zipper and recording the number of re-tests, the method further includes:

[0028] When the number of re-detection times exceeds the preset warning threshold, the detection process is stopped.

[0029] Preferably, the method further comprises:

[0030] Based on the size of the sub-image after the internal equidistant segmentation process, the sub-tape image and the sub-element image in the second defect data are marked as defects and presented on a display module.

[0031] Preferably, after generating the second defect data according to the first classification data and the second classification data, the method further includes:

[0032] The first defect data and the second defect data are integrated to obtain a zipper defect data report.

[0033] On the other hand, a zipper quality online detection system based on machine vision is provided, the system comprising:

[0034] An image acquisition unit, used to acquire a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference;

[0035] A first image segmentation unit is used to perform component segmentation processing on the first zipper image and the second zipper image respectively to obtain a tape image, a slider image, a chain tooth image and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image and a reference limit code image of the second zipper image;

[0036] a slider limit code detection unit, used to perform grayscale threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, respectively, and generate first defect data according to the detection results;

[0037] A second image segmentation unit is used to perform internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image and the reference tooth image to generate a plurality of sub-images corresponding to each of them;

[0038] a tape detection unit, configured to mix a plurality of sub-images of the tape image and a plurality of sub-images of the reference tape image, and perform a first clustering process on the mixed data set to obtain first classification data;

[0039] A tooth detection unit, used for mixing the plurality of sub-images of the tooth image and the plurality of sub-images of the reference tooth image, and performing a second clustering process on the mixed data set to obtain second classification data;

[0040] The fabric belt and fastener element detection unit is used to generate second defect data according to the first classification data and the second classification data.

[0041] The beneficial effects of the present invention are:

[0042] The online zipper quality detection method does not need to rely on a large amount of data for preliminary model training, and can be quickly deployed using only a small amount of reference images, greatly shortening the online cycle of the detection system. It enables companies to quickly establish an effective online detection mechanism and respond to changes in production needs in a timely manner when introducing new production lines, changing product models or responding to temporary quality standard adjustments.

[0043] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0045] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions disclosed in the present invention.

[0046] Figure 1 A schematic diagram of a flow chart of a zipper quality online detection method based on machine vision provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of a process for detecting defects in a tape provided by an embodiment of the present invention;

[0048] Figure 3 A schematic structural diagram of a zipper quality online detection system based on machine vision provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0051] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0053] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

[0054] At present, the existing zipper defect detection technology is dependent on a large amount of pre-labeled training data, and faces problems such as data cost, real-time adaptability and difficulty in model updating.

[0055] Embodiment 1 provides a method for online detection of zipper quality based on machine vision, referring to Figure 1 , methods include:

[0056] S100, acquiring a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference;

[0057] S200, performing component segmentation processing on the first zipper image and the second zipper image respectively, to obtain a tape image, a slider image, a chain tooth image and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image and a reference limit code image of the second zipper image;

[0058] S300, performing grayscale threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, respectively, and generating first defect data according to the detection results;

[0059] S400, performing internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image and the reference tooth image to generate a plurality of sub-images corresponding to each of them;

[0060] S500, mixing a plurality of sub-images of the tape image and a plurality of sub-images of the reference tape image, and performing a first clustering process on the mixed data set to obtain first classification data;

[0061] S600, mixing a plurality of sub-images of the fastener tooth images with a plurality of sub-images of the reference fastener tooth images, and performing a second clustering process on the mixed data set to obtain second classification data;

[0062] S700: Generate second defect data according to the first classification data and the second classification data.

[0063] Preferably, the tape image, the reference tape image, the tooth image and the reference tooth image are subjected to internal equidistant segmentation processing to generate a plurality of sub-images corresponding to each other, including:

[0064] The link tooth size information is obtained, and based on the link tooth size information, the tape image, the reference tape image, the link tooth image and the reference link tooth image are internally equidistantly segmented along the direction of travel of the slider to obtain a plurality of sub-tape images, a plurality of sub-reference tape images, a plurality of sub-link tooth images and a plurality of sub-reference link tooth images.

[0065] In this embodiment, a high-resolution industrial camera is installed at the inspection station of the zipper production line to capture a first zipper image of the zipper to be inspected in a closed state. At the same time, the system stores a set of second zipper images known to be flawless as normal reference standards.

[0066] After receiving the first zipper image, the image quality is improved through preprocessing methods such as image enhancement and noise reduction. Then, the edge detection algorithm is used to segment the preprocessed image, and the tape image, slider image, chain tooth image and limit code image of the first zipper image are accurately extracted. The same processing is also applied to the second zipper image to obtain the reference tape image, reference slider image, reference chain tooth image and reference limit code image.

[0067] Furthermore, the pull head image and the reference pull head image are converted into grayscale, and a suitable threshold is set to distinguish between normal and abnormal areas. By comparing the grayscale distribution difference between the pull head image and the reference pull head image, it is identified whether the pull head has problems such as wear, deformation, color difference, etc., and the corresponding pull head defect data is generated. Similarly, the limit code image and the reference limit code image are processed in a similar way to identify abnormal conditions such as the integrity, position deviation, and clarity of the limit code, generate limit code defect data, and merge the defect data of the pull head and the limit code to form the first defect data.

[0068] According to the typical size information of a single link tooth, the tape image, reference tape image, link tooth image and reference link tooth image are internally equidistantly segmented to ensure that each sub-image contains a complete link tooth structure. This process generates multiple sub-tape images, multiple sub-reference tape images, multiple sub-link tooth images and multiple sub-reference link tooth images, providing fine basic units for subsequent feature analysis. The segmentation operation is mainly to segment the regular link tooth image and tape image into multiple images with consistent size and basically consistent texture so as to facilitate the subsequent selection of defective parts. For example, in a possible embodiment, the tape size is 10×100mm, the link tooth size is 3×80, and the size of a single link tooth is 2×1mm. Based on the size information of a single link tooth, the tape image can be segmented into 100 10×1mm sub-tape images (the same applies to the sub-reference tape image) along the direction of the slider, and the link tooth image can be segmented into 80 3×1mm sub-tape images (the same applies to the sub-reference link tooth image). In general, it is sufficient to segment into multiple sub-images with consistent size and basically consistent texture.

[0069] Multiple sub-tape images are mixed with multiple sub-reference tape images to form a tape image data set. A preset first clustering algorithm is applied to perform feature extraction and clustering processing on the mixed data set to obtain first classification data reflecting the quality difference of the tape. Because the sub-chain tooth image and the sub-reference chain tooth image (or the sub-tape image and the sub-reference tape image) are in the same size and texture under normal circumstances, if the first classification data (or the second classification data) has only one category, it means that all the chain teeth of the current zipper are normal. If the first classification data (or the second classification data) has multiple categories, it means that the zipper has defects. According to the continued analysis of the first classification data (or the second classification data), the specific location of the defect can be obtained.

[0070] According to the number of categories, center point location, distance between categories and other information in the first classification data and the second classification data, normal categories and defect categories are automatically identified. The fabric and chain tooth defect data identified based on the clustering results are merged to generate comprehensive second defect data, including but not limited to the location, quantity and severity of fabric defects (such as color difference, stains, and breakage) and chain tooth defects (such as missing teeth, skewness, and poor coating).

[0071] The zipper quality online detection method of this embodiment does not need to rely on a large amount of data for preliminary model training, and can be quickly deployed using only a small amount of reference images, which greatly shortens the online cycle of the detection system, allowing enterprises to quickly establish an effective online detection mechanism and respond to changes in production needs in a timely manner when introducing new production lines, changing product models, or responding to temporary quality standard adjustments. In addition, it is often difficult to accumulate enough sample data for model training for small-batch production, customized orders, or experimental samples. With the efficient use of a small amount of reference images, zipper defects in such orders can be accurately identified, ensuring product quality even in the case of scarce data, and meeting customers' high-quality requirements for special orders.

[0072] Preferably, reference Figure 2 , mixing the plurality of sub-images of the tape images with the plurality of sub-images of the reference tape images, and performing a first clustering process on the mixed data set to obtain first classification data, including:

[0073] S510, mixing a plurality of sub-tape images and a plurality of sub-reference tape images to obtain a tape image dataset;

[0074] S520, extracting features from images in the tape image data set, and inputting the extracted features into a preset first DBSCAN algorithm to obtain first classification data.

[0075] In this embodiment, feature extraction is performed on each sub-image in the tape image data set. The extracted features may include but are not limited to color histogram, texture features (such as gray level co-occurrence matrix, local binary pattern, etc.), morphological features (such as area, perimeter, shape factor, etc.) and high-level semantic features extracted by deep learning. These features can fully reflect the characteristics of the tape in terms of color consistency, texture uniformity, shape integrity, etc., and provide a rich source of information for subsequent clustering analysis. The extracted features are input into the preset first DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm for clustering analysis. DBSCAN is a density-based clustering algorithm that can effectively process noise and non-spherical clusters in a data set without presetting the number of clusters. In this embodiment, by adjusting the parameters of DBSCAN (such as neighborhood radius ε and minimum number of points MinPts), the algorithm can identify high-density clusters representing normal tape features and low-density clusters or outliers representing defective tape features in the tape sub-image. The DBSCAN algorithm first constructs a neighborhood relationship by calculating the Euclidean distance or correlation measure between samples, and then searches for core objects (i.e., points in the neighborhood that contain at least MinPts objects) and their directly density-reachable objects based on the neighborhood relationship, and divides these objects into the same category. Outlier points that are not assigned to any cluster are merged into one category, and all categories are integrated to obtain the first classification data.

[0076] According to the clustering results of the DBSCAN algorithm, the sub-images in the tape image dataset are divided into several categories. The information such as the number of categories, the distribution of samples within categories, and the boundary characteristics between categories together constitute the first classification data. Normal tape sub-images are usually assigned to the core clusters with higher density, while defective tape sub-images may be distributed in low-density categories or regarded as outliers.

[0077] In this embodiment, by mixing the sub-images of the to-be-detected and reference tapes, the subtle differences between the two at the same position can be directly compared, thereby improving the accuracy of defect recognition. Combined with the DBSCAN algorithm, the feature distribution patterns of normal and defective tapes can be automatically identified in an unsupervised environment, effectively distinguishing common tape defects such as color difference, stains, breakage, and inconsistent weave. Furthermore, the DBSCAN algorithm does not need to pre-set the number of clusters, and can flexibly adapt to tapes of different materials, colors, and textures, as well as the diversity and complexity of tape defects. Regardless of the feature distribution of the tape, as long as there is a significant difference in its density distribution in the feature space, the algorithm can accurately classify it into normal and defective categories.

[0078] Preferably, a plurality of sub-images of the chain tooth images and a plurality of sub-images of the reference chain tooth images are mixed, and a second clustering process is performed on the mixed data set to obtain second classification data, including:

[0079] Mixing the plurality of sub-chain tooth images and the plurality of sub-reference chain tooth images to obtain a chain tooth image dataset;

[0080] Feature extraction is performed on the images in the chain tooth image data set, and the extracted features are input into a preset second DBSCAN algorithm to obtain second classification data.

[0081] Similarly, the fastener image dataset may be processed similarly to the above-mentioned tape image dataset to obtain second classification data.

[0082] Preferably, generating the second defect data according to the first classification data and the second classification data includes:

[0083] Detecting the number of categories of the first classification data and the second classification data;

[0084] If the number of categories of the first classification data is greater than 1, the category reference tape ratio of the number of sub-reference tape images in each category to the total number of sub-reference tape images is calculated, and the category whose category reference tape ratio is greater than a preset first ratio is determined to be a normal tape category, and the category whose calculation result is less than a preset second ratio is determined to be a defective tape category, and the first ratio is greater than the second ratio;

[0085] If the number of categories of the second classification data is greater than 1, the category reference tooth ratio of the number of sub-reference tooth images in each category to the total number of sub-reference tooth images is calculated, and the category whose category reference tooth ratio is greater than the first ratio is determined to be a normal tooth category, and the category whose calculated result is less than the second ratio is determined to be a defective tooth category;

[0086] The sub-tape images in the defective tape category and the sub-linker element images in the defective linker element category are integrated to obtain second defect data.

[0087] In this embodiment, the number of categories of the first classification data (tape part) and the second classification data (chain tooth part) are counted respectively. If the number of categories of any classification data is greater than 1, the subsequent category ratio calculation and defect judgment steps are performed. When the number of categories of the first classification data (or the second classification data) is greater than 1, for each category, the ratio of the number of sub-reference tape images (or sub-reference chain tooth images) to the total number of sub-reference tape images (or sub-reference chain tooth images) is calculated, that is, the category reference tape ratio (or category reference chain tooth ratio). Two ratio thresholds are set: the first ratio and the second ratio, where the first ratio is greater than the second ratio. If the category reference tape ratio of a certain category is greater than the first ratio, it is judged as a normal tape category (or normal tape category); conversely, if the ratio is less than the second ratio, it is judged as a defective tape category (or defective tape category). Categories between these two thresholds require further manual review or use of other discrimination rules. All sub-tape images judged as defective tapes and all sub-chain tooth images judged as defective chain teeth are integrated to form the second defect data. This data set contains defective images of zipper tapes and chain teeth confirmed by double inspection, providing a basis for subsequent defect location, report generation and production adjustment.

[0088] In this embodiment, by setting two preset ratio thresholds (the first ratio and the second ratio), the defect judgment standard can be flexibly adjusted according to the actual application scenario, which can not only ensure the sensitive capture of obvious abnormalities, but also avoid the misjudgment of normal samples caused by excessive sensitivity. The setting of the threshold reflects the consideration of defect tolerance, so that the detection results are more in line with the actual production needs.

[0089] Preferably, before integrating the sub-tape images in the defective tape category and the sub-chain element images in the defective chain element category, the method further includes:

[0090] It is determined whether the category reference tape ratio and the category reference chain tooth ratio are greater than the second ratio and less than the first ratio. If any one of them is satisfied, the currently tested zipper is retested and the number of retests is recorded.

[0091] In this embodiment, it is determined whether the ratio of the reference tape of each category and the ratio of the reference chain teeth of each category determined initially fall within the intermediate threshold range between the second ratio and the first ratio. If the ratio of any category meets this condition (greater than the second ratio and less than the first ratio), it is considered that the zipper part corresponding to the category may have potential defects that are difficult to clearly classify. For the zipper that triggers re-detection, a new round of image acquisition and analysis process is automatically executed. Improved detection algorithms, increased detection angles, and improved image resolution are used to obtain more accurate detection results. At the same time, the re-detection operation is recorded and the number of re-detections of the zipper is accumulated.

[0092] In this embodiment, an intermediate threshold range judgment and re-detection mechanism is introduced to perform secondary or even multiple inspections on the zipper parts where the initial detection results are questionable, which helps to improve the accuracy of defect identification and reduce misjudgments or missed judgments due to uncertainty in the initial detection. During the re-detection process, the detection parameters or algorithms can be adjusted according to the actual situation, such as increasing the sampling angle, optimizing image processing, etc., to cope with complex or marginalized defect situations, thereby improving the adaptability and detection accuracy of the system.

[0093] Preferably, after retesting the currently detected zipper and recording the number of retests, the method further includes:

[0094] When the number of re-detection times exceeds the preset warning threshold, the detection process is stopped.

[0095] In this embodiment, by setting a warning threshold and stopping the detection process accordingly, it effectively prevents the detection dead loop caused by the zipper that cannot be clearly judged for many consecutive times, avoids resource waste, and ensures the stable operation of the detection system. When the number of re-detection reaches the warning threshold, the system immediately issues a warning, prompting relevant personnel to pay attention and intervene in time, which helps to discover possible equipment failures, process problems or algorithm limitations as early as possible and shorten the problem solving cycle.

[0096] Preferably, the method further comprises:

[0097] Based on the size of the sub-image after the internal equidistant segmentation process, the sub-tape image and the sub-chain element image in the second defect data are marked as defects and presented on the display module.

[0098] In this embodiment, for the sub-images with defects after the internal equidistant segmentation process, the spatial adjacency between them is first identified. When multiple continuous defective sub-images meet the preset adjacency conditions (such as the distance is less than the preset threshold, the direction is consistent, etc.), these sub-images are regarded as an overall defective area. Based on this association logic, the system merges the adjacent defective sub-images to form a large defect mark. The merged defect mark not only reflects the defect situation of a single sub-image, but also reflects the spatial extension and morphological characteristics of the entire defective area. The mark form can be adaptively designed according to the actual defect shape, such as using filled color blocks, contour lines, gradient color bands, etc., to ensure that the defect boundary can be clearly identified and the continuity and integrity of the defective area can be intuitively displayed. Finally, the connected large defect mark and the unmerged single defective sub-image mark are presented on the display module according to the established rules. The large defect mark is displayed in a striking and different way from the single defective sub-image mark, which is convenient for users to quickly identify large-area, continuous defects. In addition, the system can provide statistical information such as total defect area, average length, and maximum continuous length, allowing users to evaluate the severity of defects and make quality control decisions.

[0099] In this embodiment, by connecting adjacent defect sub-images into a large defect mark, the continuous distribution of defects on the fabric tape or chain tooth can be truly and completely displayed, avoiding the underestimation of the defect scale that may result from focusing only on a single defect point, which is conducive to a comprehensive understanding of product quality issues.

[0100] Preferably, after generating the second defect data according to the first classification data and the second classification data, the method further includes:

[0101] The first defect data and the second defect data are integrated to obtain a zipper defect data report.

[0102] In this embodiment, the zipper defect data report adopts a structured organization with clear hierarchy and rich information. The report is divided into multiple parts, such as overview, detailed analysis, and trend observation, which comprehensively summarize and deeply analyze the zipper defects from macro and micro perspectives. The overview part provides overview information such as the total number of defects, the proportion of various defects, and the distribution of severity levels; the detailed analysis part is classified by sub-tapes and sub-chain teeth, and lists the specific location, quantity, area and other data of various defects in detail; the trend observation part is based on historical data to show the time series changes of key indicators such as defect type, quantity, and severity. Furthermore, the report uses a variety of visualization methods such as charts, maps, and heat maps to convert complex defect data into easy-to-understand graphics. For example, a bar chart is used to show the distribution of various defects, a line chart is used to depict the trend of the number of defects over time, and a defect distribution map is used to intuitively show the density of defects in various parts of the zipper. These visualization elements greatly enhance the readability and information transmission efficiency of the report.

[0103] Embodiment 2 provides a zipper quality online detection system based on machine vision, referring to Figure 3 , the system includes:

[0104] An image acquisition unit 100 is used to acquire a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference;

[0105] The first image segmentation unit 200 is used to perform component segmentation processing on the first zipper image and the second zipper image respectively, to obtain a tape image, a slider image, a chain tooth image and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image and a reference limit code image of the second zipper image;

[0106] The slider limit code detection unit 300 is used to perform gray threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, and generate first defect data according to the detection results;

[0107] The second image segmentation unit 400 is used to perform internal equidistant segmentation processing on the tape image, the reference tape image, and the tooth image and the reference tooth image to generate a plurality of sub-images corresponding to each of them;

[0108] The tape detection unit 500 is used to mix the sub-images of the plurality of tape images with the sub-images of the plurality of reference tape images, and perform a first clustering process on the mixed data set to obtain first classification data;

[0109] A fastener tooth detection unit 600, configured to mix the sub-images of the plurality of fastener tooth images with the sub-images of the plurality of reference fastener tooth images, and perform a second clustering process on the mixed data set to obtain second classification data;

[0110] The tape and fastener element detection unit 700 is used to generate second defect data according to the first classification data and the second classification data.

[0111] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A zipper quality online detection method based on machine vision, characterized in that: The method comprises: Acquire a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference; Performing component segmentation processing on the first zipper image and the second zipper image respectively to obtain a tape image, a slider image, a chain tooth image, and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image, and a reference limit code image of the second zipper image; Performing grayscale threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, respectively, and generating first defect data according to the detection results; The tape image, the reference tape image, the tooth image and the reference tooth image are subjected to internal equidistant segmentation processing to generate a plurality of sub-images corresponding to each other, including: Acquire the tooth size information, and perform internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image, and the reference tooth image along the slider travel direction based on the tooth size information to obtain a plurality of sub-tape images, a plurality of sub-reference tape images, a plurality of sub-tooth images, and a plurality of sub-reference tooth images; Mixing a plurality of sub-images of the tape image and a plurality of sub-images of the reference tape image, and performing a first clustering process on the mixed data set to obtain first classification data; Mixing a plurality of sub-images of the fastener tooth images and a plurality of sub-images of the reference fastener tooth images, and performing a second clustering process on the mixed data set to obtain second classification data; Generating second defect data according to the first classification data and the second classification data includes: detecting the number of categories of the first classified data and the second classified data; If the number of categories of the first classification data is greater than 1, calculating the category reference tape ratio of the number of the sub-reference tape images in each category to the total number of the sub-reference tape images, determining the category whose category reference tape ratio is greater than a preset first ratio as a normal tape category, determining the category whose calculation result is less than a preset second ratio as a defective tape category, and the first ratio is greater than the second ratio; If the number of categories of the second classification data is greater than 1, calculating the category reference tooth ratio of the number of the sub-reference tooth images in each category to the total number of the sub-reference tooth images, determining the category whose category reference tooth ratio is greater than the first ratio as a normal tooth category, and determining the category whose calculation result is less than the second ratio as a defective tooth category; The sub-tape image in the defective tape category and the sub-linker element image in the defective linker element category are integrated to obtain the second defect data.

2. The method for online zipper quality detection based on machine vision according to claim 1, characterized in that: The step of mixing the plurality of sub-images of the tape image and the plurality of sub-images of the reference tape image, and performing a first clustering process on the mixed data set to obtain first classification data includes: Mixing the plurality of sub-tape images and the plurality of sub-reference tape images to obtain a tape image dataset; Feature extraction is performed on the images in the tape image data set, and the extracted features are input into a preset first DBSCAN algorithm to obtain the first classification data.

3. The method for online zipper quality detection based on machine vision according to claim 1, characterized in that: The step of mixing the plurality of sub-images of the fastener tooth images with the plurality of sub-images of the reference fastener tooth images and performing a second clustering process on the mixed data set to obtain second classification data includes: Mixing the plurality of sub-chain element images and the plurality of sub-reference chain element images to obtain a chain element image dataset; Feature extraction is performed on the images in the chain tooth image data set, and the extracted features are input into a preset second DBSCAN algorithm to obtain the second classification data.

4. The method for online zipper quality detection based on machine vision according to claim 1, characterized in that: Before integrating the sub-tape images in the defective tape category and the sub-linker element images in the defective linker element category, the method further includes: It is determined whether the category reference tape ratio and the category reference chain element ratio are greater than the second ratio and less than the first ratio. If any one of them is satisfied, the currently detected zipper is re-detected and the number of re-detections is recorded.

5. The method for online zipper quality detection based on machine vision according to claim 4, characterized in that: After retesting the currently tested zipper and recording the number of retests, the method further includes: When the number of re-detection times exceeds the preset warning threshold, the detection process is stopped.

6. The method for online zipper quality detection based on machine vision according to claim 1, characterized in that: The method further comprises: Based on the size of the sub-image after the internal equidistant segmentation process, the sub-tape image and the sub-element image in the second defect data are marked as defects and presented on a display module.

7. The method for online zipper quality detection based on machine vision according to claim 1, characterized in that: After generating the second defect data according to the first classification data and the second classification data, the method further includes: The first defect data and the second defect data are integrated to obtain a zipper defect data report.

8. A zipper quality online detection system based on machine vision, characterized in that: The system comprises: An image acquisition unit, used to acquire a first zipper image of the zipper to be inspected in a closed state and a second zipper image as a normal reference; A first image segmentation unit is used to perform component segmentation processing on the first zipper image and the second zipper image respectively to obtain a tape image, a slider image, a chain tooth image and a limit code image of the first zipper image and a reference tape image, a reference slider image, a reference chain tooth image and a reference limit code image of the second zipper image; a slider limit code detection unit, used to perform grayscale threshold detection on the slider image and the reference slider image, and the limit code image and the reference limit code image, respectively, and generate first defect data according to the detection results; The second image segmentation unit is used to perform internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image and the reference tooth image to generate a plurality of sub-images corresponding to each other, including: Acquire the tooth size information, and perform internal equidistant segmentation processing on the tape image, the reference tape image, the tooth image, and the reference tooth image along the slider travel direction based on the tooth size information to obtain a plurality of sub-tape images, a plurality of sub-reference tape images, a plurality of sub-tooth images, and a plurality of sub-reference tooth images; a tape detection unit, configured to mix a plurality of sub-images of the tape image and a plurality of sub-images of the reference tape image, and perform a first clustering process on the mixed data set to obtain first classification data; A tooth detection unit, used for mixing the plurality of sub-images of the tooth image and the plurality of sub-images of the reference tooth image, and performing a second clustering process on the mixed data set to obtain second classification data; The fabric belt chain element detection unit is used to generate second defect data according to the first classification data and the second classification data, including: detecting the number of categories of the first classified data and the second classified data; If the number of categories of the first classification data is greater than 1, calculating the category reference tape ratio of the number of the sub-reference tape images in each category to the total number of the sub-reference tape images, determining the category whose category reference tape ratio is greater than a preset first ratio as a normal tape category, determining the category whose calculation result is less than a preset second ratio as a defective tape category, and the first ratio is greater than the second ratio; If the number of categories of the second classification data is greater than 1, calculating the category reference tooth ratio of the number of the sub-reference tooth images in each category to the total number of the sub-reference tooth images, determining the category whose category reference tooth ratio is greater than the first ratio as a normal tooth category, and determining the category whose calculation result is less than the second ratio as a defective tooth category; The sub-tape image in the defective tape category and the sub-linker element image in the defective linker element category are integrated to obtain the second defect data.