CN117392132B - Visual detection method for sewing defects of garment fabric - Google Patents

Visual detection method for sewing defects of garment fabric Download PDF

Info

Publication number
CN117392132B
CN117392132B CN202311696596.9A CN202311696596A CN117392132B CN 117392132 B CN117392132 B CN 117392132B CN 202311696596 A CN202311696596 A CN 202311696596A CN 117392132 B CN117392132 B CN 117392132B
Authority
CN
China
Prior art keywords
stitch
length
sewing
image
stitch length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311696596.9A
Other languages
Chinese (zh)
Other versions
CN117392132A (en
Inventor
程伟
杨丽丹
杨顺作
杨丽香
杨金燕
杨丽霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weiqi Garment Co ltd
Original Assignee
Shenzhen Weiqi Garment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weiqi Garment Co ltd filed Critical Shenzhen Weiqi Garment Co ltd
Priority to CN202311696596.9A priority Critical patent/CN117392132B/en
Publication of CN117392132A publication Critical patent/CN117392132A/en
Application granted granted Critical
Publication of CN117392132B publication Critical patent/CN117392132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Geometry (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Treatment Of Fiber Materials (AREA)

Abstract

The invention relates to the field of image processing, in particular to a visual detection method for sewing defects of clothing fabric, which acquires clothing images; obtaining the integrity of each stitch length according to the length of each stitch length of the sewing thread image; obtaining the defect index of each stitch length according to the integrity, length and stitch length in the window; obtaining the comprehensive quality index of each stitch length according to the defect index of each stitch length and the nearest distance from the edge; obtaining the comprehensive quality fluctuation coefficient of the clothing image according to the quality grade of each stitch length; and improving the neighborhood radius of the DBSCAN cluster by using the comprehensive quality fluctuation coefficient of the clothing image to obtain clusters with different qualities, and completing the judgment of the sewing defects of the clothing fabric. The stitch length lines without defects and the stitch length lines with defects can be effectively gathered into different types, so that the stitch length lines with defects can be detected, and the visual detection result of the defects is more accurate.

Description

Visual detection method for sewing defects of garment fabric
Technical Field
The application relates to the field of image processing, in particular to a visual detection method for sewing defects of clothing fabric.
Background
The sewing of the garment fabric is by sewing the fabric with a needle and thread. The quality of clothing is determined by the quality of clothing. The sewing defects of the garment fabric are caused by various factors, and mainly comprise the defects of garment parts, the wrong sewing of parts and various errors of sewing threads, such as too short stitch length, needle skipping, too long stitch length, broken threads and the like. Even if the sewing thread deviates from the normal position due to various factors such as technical problems and distraction of the sewing personnel during sewing.
The traditional DBSCAN clustering algorithm generally clusters by the length of the stitch length, can solve the defects caused by the change of stitch length change among different clothes, but does not consider the phenomenon of deviation of the stitch length. After the traditional DBSCAN clustering is used, the clustering result is obtained, stitch length lines with the deviation phenomenon of the sewing thread in the sewing of the garment fabric are gathered into normal stitch length lines, and the defect of the deviation phenomenon is not detected.
In summary, the invention provides a visual detection method for sewing defects of clothing fabric, which can generate certain difference according to different clothing and even clothing parts due to the sewing needle distance, so that the change of the clothing needle distance line is complex and changeable, and the DBSCAN algorithm is improved by combining the change characteristics of the needle distance line generated by the clothing fabric sewing to detect the sewing defects of the clothing fabric.
Disclosure of Invention
In order to solve the technical problems, the invention provides a visual detection method for sewing defects of clothing fabric, which aims to solve the existing problems.
The visual detection method for the sewing defects of the garment fabric adopts the following technical scheme:
an embodiment of the invention provides a visual detection method for sewing defects of clothing fabric, which comprises the following steps:
acquiring a clothing image;
dividing the clothing image to obtain each sewing thread image; detecting the stitch length of each sewing thread image by adopting a Hough straight line algorithm; obtaining the integrity of each stitch length according to the length of each stitch length of the sewing thread image; defining a window for each stitch length; obtaining the defect index of each stitch length according to the integrity, length and stitch length in the window;
obtaining the comprehensive quality index of each stitch length according to the defect index of each stitch length and the nearest distance from the edge; obtaining the quality grade of each stitch length according to the comprehensive quality index of each stitch length; obtaining the comprehensive quality fluctuation coefficient of the clothing image according to the quality grade of each stitch length;
improving the neighborhood radius of the DBSCAN cluster by using the comprehensive quality fluctuation coefficient of the clothing image to obtain clusters with different qualities; and judging the sewing defects of the garment fabric according to the number of the stitch length lines of each cluster.
Preferably, the obtaining the integrity of each stitch length according to the length of each stitch length of the sewing thread image includes:
acquiring a stitch length variance of a sewing thread image;
for each stitch of the stitch image, calculating the absolute value of the difference between the length of the stitch and the variance, and calculating the average value of the absolute values of the differences of all the stitches of the stitch image;
the ratio of the length of the gauge wire to the mean value is taken as the gauge wire integrity.
Preferably, the window defining each stitch length includes:
for each stitch, calculating the distance between the center of gravity of the stitch and the center of gravity of each other stitch, and taking N stitch with the nearest distance as a window of the stitch, wherein N is the number of preset stitch lines.
Preferably, the obtaining the defect index of each stitch according to the integrity, the length and the stitch in the window of each stitch includes:
for each gauge wire, calculating the absolute value of the difference between the length of the gauge wire and the length of each gauge wire in the window, and calculating the sum of all the absolute values of the differences in the gauge wire window;
taking the product of the sum and the integrity of the gauge wire as the defect index of the gauge wire.
Preferably, the obtaining the integrated quality index of each stitch according to the defect index of each stitch and the nearest distance from the edge includes:
for each stitch, obtaining a deviation coefficient of the stitch according to the nearest distance between the stitch and the edge;
taking the negative number of the product of the deviation coefficient of the gauge wire and the defect index as an index of an exponential function based on a natural constant; and obtaining the calculation result of the exponential function, and taking the calculation result of the exponential function as the comprehensive quality index of the gauge wire.
Preferably, the deviation coefficient of the stitch length is obtained according to the nearest distance between the stitch length and the edge, and the expression is:
in the method, in the process of the invention,indicate->First->Deviation coefficient of individual gauge wire, +.>Indicate->First->The closest Euclidean distance from the centre point of the individual gauge wire to the edge of the garment, < >>Indicate->Average value of nearest Euclidean distance from all stitch lines to garment edge of sewing line image, ++>Indicate->Maximum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->Minimum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->First->The individual gauge wire is spaced from the euclidean distance between nearest gauge wires.
Preferably, the obtaining the quality grade of each stitch according to the comprehensive quality index of each stitch includes:
and uniformly quantizing the comprehensive quality indexes of all the stitch lines of each sewing line image of the clothing image to obtain a plurality of quantization levels, wherein the quantization levels are used as the quality levels of the stitch lines.
Preferably, the obtaining the comprehensive quality fluctuation coefficient of the clothing image according to the quality grade of each stitch length includes:
for each quality level, calculating adjacent quality level entropy;
calculating the absolute value of the difference value of the occurrence frequency of the gauge wire of the quality grade and the adjacent next quality grade; calculating the product of the quality grade entropy and the absolute value of the difference value;
taking the average value of the products of all quality grades of the clothing image as the comprehensive quality fluctuation coefficient of the clothing image.
Preferably, the calculating the adjacent quality level entropy includes:
calculating the frequency sum of the gauge wire of the quality grade and the adjacent next quality grade, taking the frequency sum as the logarithm of a logarithmic function taking a natural constant as a base, and obtaining the calculation result of the logarithmic function;
and taking the inverse number of the product of the calculated result and the frequency sum as the adjacent quality grade entropy.
Preferably, the determining the sewing defect of the garment fabric according to the number of stitch length lines of each cluster includes:
and judging that the sewing of the garment fabric is defective when the number of the stitch lines in the cluster is larger than 1 and the number of the stitch lines in the cluster is smaller than a preset threshold value.
The invention has at least the following beneficial effects:
the invention provides a visual detection method for sewing defects of clothing fabric. When the sewing machine is used for sewing, a stitch length line is generated between the needles, the length of the stitch length line in the image is calculated for each stitch length line to obtain the integrity of the stitch length line, and the integrity can show whether the stitch length line is broken or not; secondly, obtaining a defect index of the stitch length line according to the integrity of the stitch length line and the difference between the stitch length line and the periphery, wherein the defect index can reflect whether the stitch jump, the stitch length is overlarge or not during sewing or not;
obtaining the comprehensive quality index of the gauge wire through the defect index of the gauge wire and the deviation coefficient of the gauge wire, wherein the comprehensive quality index can reflect whether the gauge wire has a position meeting the standard or not and whether the gauge wire has a defect or not; the comprehensive quality indexes of the gauge wires are uniformly transformed to all quality grades to construct a histogram, the comprehensive quality fluctuation coefficient of the clothing image is obtained, the neighborhood radius of the DBSCAN clustering algorithm is improved by using the comprehensive quality fluctuation coefficient, the gauge wires without defects and the gauge wires with defects can be effectively gathered into different types, and therefore the gauge wires with defects can be detected, and the visual detection result of the defects is more accurate.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a visual detection method for sewing defects of a garment material;
fig. 2 is five gauge wires within a gauge wire window.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the method for detecting the sewing defects of the garment fabric according to the invention in combination with the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the visual detection method for the sewing defects of the garment fabric provided by the invention with reference to the accompanying drawings.
The embodiment of the invention provides a visual detection method for sewing defects of clothing fabric.
Specifically, the following visual detection method for sewing defects of clothing fabric is provided, referring to fig. 1, the method comprises the following steps:
and S001, acquiring a clothing image by adopting a linear array camera, and preprocessing the clothing image.
According to the embodiment, the sewing defects of the garment fabric are detected visually mainly through an image processing technology, the detected garment is placed on a conveyor belt in a non-overlapping and stretching mode, and the conventional camera is used for shooting the garment image because the garment is moving, so that the phenomenon of blurring caused by movement occurs in the shot image.
The image shot by the linear array camera is a single-channel gray image. The image shot by the environment and other factors can generate some noise, so as to prevent the noise from analyzing the subsequent sewing condition. And denoising the gray level image by adopting median filtering. And the Laplacian operator is used for sharpening the gray image, so that the edge of the clothing image and the sewn stitch length are more clearly visible.
The median filtering technique and the Laplacian operator are known techniques, and the description of this embodiment is omitted.
Thus, the method can obtain the clothing image as basic information for detecting the sewing defects of the clothing fabric.
Step S002, the comprehensive quality fluctuation coefficient of the clothing image is constructed by analyzing the sewing characteristics of the clothing image.
The pre-processed clothing image is subjected to semantic segmentation by using a U-net network, and sewing threads in the clothing image and the sewing thread image which is closest to the edge are segmented by using the semantics of the clothing sewing threads and the closest edge, so that a plurality of sewing thread images can be obtained due to different sewing positions. The U-net network is a known technology, and this embodiment is not described in detail.
Next, the j-th sewing thread image is analyzed, and the other sewing thread images are analyzed in the same manner.
The number of straight lines in the sewing line image is a plurality of straight lines, hough straight line detection is adopted for the jth sewing line image, the stitch length lines of the sewing line image are obtained, and the number of the stitch length lines obtained by the detection of the jth sewing line image is recorded as
By imaging the j-th sewing threadThe length of each stitch length is marked as +.>、/>、…、/>
Because of the requirement of the stitch length of the sewing, the length of the stitch length is fixed in a standard state, and the variance of the length of the obtained stitch length is close to 0. If there is a defect in the stitch length line in the sewing line image, such as: thread ends, broken suture, missed stitch, overlarge stitch length and the like, the defects can be reflected on the length characteristics of the stitch length, namely if the defects occur, the lengths of the stitch length lines are different, and the lengths of the stitch length lines are different, namely the variance is larger. By calculating the difference between the stitch lines in the j-th sewing line image and analyzing the stitch lines on the integrity level, the integrity of the stitch lines can be calculated:
in the method, in the process of the invention,indicate->First->Integrity of individual gauge wire, +.>Indicate->The number of stitch lines in the stitch line image, < >>Indicate->First->Length of individual gauge wire, +.>Indicate->Variance of stitch length of the stitch line image.
When the thread breakage, the needle jump and the like occur during the sewing, the first step is causedVariance of stitch length of a stitch line image +.>But as the variance increases, it indicates that there is no regular length between the gauge wires and more prominent gauge wires appear, the absolute value of the difference between the gauge wires and the variance +.>The gap of (2) also becomes larger so that +.>Becoming smaller; meanwhile, the molecule is->The length of the individual gauge wire is calculated at this distance +.>On the basis of the difference of the individual gauge wires, for +.>The extent of influence of the individual stitch length changes +.>The smaller the numerator and the larger the denominator, the more influenced the shorter length of the gauge wire under the influence of the difference of the denominator, so that the integrity of the gauge wire is +.>The smaller, i.e. the less complete each stitch is at the overall level.
As known from the existing technology for the open thread of clothing, the sewing threads are basically double-needle threads, and the double-needle threads can more easily represent the length relation between the stitch length around each stitch length in the sewing thread image and the length relation between the stitch length around each stitch length. If larger difference appears around the stitch length, the defect of the stitch length can be reflected, and the quality of each stitch length can be reflected.
Therefore, by comparing the centers of gravity of the stitch lines for each stitch line of the sewing line image, five stitch lines closest to the center of gravity of each stitch line are set as windows for the stitch lines. As shown in fig. 2.
Selecting 5 gauge wires near the ith gauge wire, and calculating the defect index of the ith gauge wire:
in the method, in the process of the invention,indicate->First->Defect index of individual gauge wire, +.>Indicating the number of gauge wires within the window, this embodiment is set to 5,/for example>Is the +.>Length of the individual gauge wire.
When the sewing garment is broken, jumped, or excessively large in stitch length, the stitch length is different from the stitch length around the garment. When the difference is larger, i.eThe greater the value of (2) is, at the same time, the integrity of the gauge wire on an overall basis +.>The larger the value of (2) is, the locally obtained defect index of the gauge wire is made +.>The larger.
In general, the open thread is sewn substantially at the edge portion of the garment and at a distance from the edge of the garment. In good quality garments, the gauge wire produced by the same wire should be the same from the edge of the garment. The nearest Euclidean distance from the center point of each needle to the edge of the garment in the sewing thread image is recorded asThrough each stitch in the imageCan obtain whether the sewing thread is outThe existing sewing skew condition causes disqualification of the quality of clothing products.
According to the nearest Euclidean distance from each stitch to the edge of the garment, the integrity of the stitch, the inconsistency with the stitch around and the like of the sewing thread image, the comprehensive quality index of the ith stitch is obtained by analyzing the nearest distance from the stitch to the edge of the garment and the defect index of the stitch:
in the method, in the process of the invention,indicate->First->Comprehensive quality index of individual gauge wire, +.>Indicate->First->Defect index of individual gauge wire, +.>Indicate->First->Deviation coefficient of individual gauge wire, +.>Indicate->First->The closest Euclidean distance from the centre point of the individual gauge wire to the edge of the garment, < >>Indicate->Average value of nearest Euclidean distance from all stitch lines to garment edge of sewing line image, ++>Indicate->Maximum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->Minimum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->First->The individual gauge wire is spaced from the euclidean distance between nearest gauge wires.
When the sewing thread image is deviated, the Euclidean distance from the stitch to the edge of the clothing is not causedConsistent, causeAnd->The value of (2) is increased so that the deviation coefficient of the gauge wire +.>Increasing. The larger the deviation coefficient of the gauge wire, the smaller the integrated quality index of the gauge wire, i.e., the worse the quality of the gauge wire.
And counting the comprehensive quality indexes of each stitch length in all the sewing thread images of the clothing image, uniformly converting the comprehensive quality indexes of all the stitch length of the clothing image into 1-10 quality grades, and obtaining a quality grade histogram of the clothing image based on the quality grades of the stitch length.
The abscissa of the quality level histogram represents the quality level of the gauge wire in the clothing image, the ordinate represents the frequency of occurrence of the gauge wire of different quality levels, and the quality level number in the clothing image is recorded asI.e. +.>. Constructing a comprehensive quality fluctuation coefficient of the clothing image by utilizing the quality grade of each stitch length:
in the method, in the process of the invention,for the overall quality fluctuation coefficient of the clothing image, +.>For the number of quality classes in the clothing image +.>Representing quality grade->Frequency of stitch length of +.>Representing quality grade->Frequency of stitch length of +.>Representing quality grade->Grade of quality->Quality level entropy between->Representing quality grade->And->Frequency sum of (a) is provided.
It should be noted that, when the difference between each two adjacent quality levels is larger than the entropy of the carried part of the two levels as a whole, the overall quality fluctuation coefficient of the obtained clothing image is larger.
Aiming at the comprehensive quality fluctuation coefficient of the clothing image, the traditional DBSCAN can not meet the requirement of accurate clustering, so that an improved DBSCAN clustering algorithm is adopted for the stitch length analysis of the clothing image to perform clustering. The comprehensive quality fluctuation coefficient EV of the clothing image is used as a neighborhood radius esp of the DBSCAN cluster, the DBSCAN algorithm is improved, and the operation process of the improved algorithm is as follows:
taking the comprehensive quality index of each stitch as a data point, taking the difference value between the comprehensive quality indexes of each stitch as the distance between each stitch, taking 5 as the minimum number, taking EV as the neighborhood radius esp of DBSCAN cluster, and clustering all the stitch lines of the clothing image. The number of clusters obtained through clustering is K. The improved DBSCAN clustering algorithm can effectively cluster the stitch lines with different qualities into one cluster.
And S003, analyzing the DBSCAN clustering result to detect whether the garment fabric has defects.
Analyzing the number of the needle pitch lines of the obtained cluster:
when the number of clusters k=1, it indicates that the garment must not have defects, and the following conditions are not analyzed any more;
when the number of clusters K>1, analyzing each cluster respectively to judge whether the number of gauge wires in each cluster is smaller thanWherein the present embodiment will ∈ ->Taking the experience value of 1/10, the implementer can set by himself.
If the number of gauge wires in the cluster is less thanThe defect of the sewing of the garment fabric is illustrated; if the number of gauge wires in the cluster is not present is less than +.>It is proved that the sewing of the garment fabric is not defective.
In summary, the embodiment of the invention provides a visual detection method for sewing defects of clothing fabric, which can generate a certain difference according to different clothing and even clothing parts due to the sewing needle distance, so that the change of the clothing needle distance line is complex and changeable, and the DBSCAN algorithm is improved by combining the change characteristics of the needle distance line generated by the clothing fabric sewing to detect the sewing defects of the clothing fabric.
The embodiment of the invention provides a visual detection method for sewing defects of clothing fabric, which is used for analyzing the sewing threads of the clothing fabric after sewing to obtain the sewing defect condition of the clothing fabric. When the sewing machine is used for sewing, a stitch length line is generated between the needles, the length of the stitch length line in the image is calculated for each stitch length line to obtain the integrity of the stitch length line, and the integrity can show whether the stitch length line is broken or not; secondly, obtaining a defect index of the stitch length line according to the integrity of the stitch length line and the difference between the stitch length line and the periphery, wherein the defect index can reflect whether the stitch jump, the stitch length is overlarge or not during sewing or not;
obtaining the comprehensive quality index of the gauge wire through the defect index of the gauge wire and the deviation coefficient of the gauge wire, wherein the comprehensive quality index can reflect whether the gauge wire has a position meeting the standard or not and whether the gauge wire has a defect or not; the comprehensive quality indexes of the gauge wires are uniformly transformed to all quality grades to construct a histogram, the comprehensive quality fluctuation coefficient of the clothing image is obtained, the neighborhood radius of the DBSCAN clustering algorithm is improved by using the comprehensive quality fluctuation coefficient, the gauge wires without defects and the gauge wires with defects can be effectively gathered into different types, and therefore the gauge wires with defects can be detected, and the visual detection result of the defects is more accurate.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment mainly describes differences from other embodiments.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; the technical solutions described in the foregoing embodiments are modified or some of the technical features are replaced equivalently, so that the essence of the corresponding technical solutions does not deviate from the scope of the technical solutions of the embodiments of the present application, and all the technical solutions are included in the protection scope of the present application.

Claims (5)

1. The visual detection method for the sewing defects of the garment fabric is characterized by comprising the following steps of:
acquiring a clothing image;
dividing the clothing image to obtain each sewing thread image; detecting the stitch length of each sewing thread image by adopting a Hough straight line algorithm; obtaining the integrity of each stitch length according to the length of each stitch length of the sewing thread image; defining a window for each stitch length; obtaining the defect index of each stitch length according to the integrity, length and stitch length in the window;
obtaining the comprehensive quality index of each stitch length according to the defect index of each stitch length and the nearest distance from the edge; obtaining the quality grade of each stitch length according to the comprehensive quality index of each stitch length; obtaining the comprehensive quality fluctuation coefficient of the clothing image according to the quality grade of each stitch length;
improving the neighborhood radius of the DBSCAN cluster by using the comprehensive quality fluctuation coefficient of the clothing image to obtain clusters with different qualities; judging the sewing defects of the garment fabric according to the number of the stitch length lines of each cluster;
the obtaining the integrity of each stitch length according to the length of each stitch length of the sewing thread image comprises the following steps:
acquiring a stitch length variance of a sewing thread image;
for each stitch of the stitch image, calculating the absolute value of the difference between the length of the stitch and the variance, and calculating the average value of the absolute values of the differences of all the stitches of the stitch image;
taking the ratio of the length of the gauge wire to the average value as the completeness of the gauge wire;
obtaining the defect index of each stitch according to the integrity, the length and the stitch in the window of each stitch, comprising:
for each gauge wire, calculating the absolute value of the difference between the length of the gauge wire and the length of each gauge wire in the window, and calculating the sum of all the absolute values of the differences in the gauge wire window;
taking the product of the sum and the integrity of the gauge wire as a defect index of the gauge wire;
the method for obtaining the comprehensive quality index of each stitch length according to the defect index of each stitch length and the nearest distance from the edge comprises the following steps:
for each stitch, obtaining a deviation coefficient of the stitch according to the nearest distance between the stitch and the edge;
taking the negative number of the product of the deviation coefficient of the gauge wire and the defect index as an index of an exponential function based on a natural constant; obtaining the calculation result of the exponential function, and taking the calculation result of the exponential function as the comprehensive quality index of the gauge wire;
and obtaining the deviation coefficient of the stitch length according to the nearest distance between the stitch length and the edge, wherein the expression is as follows:
in the method, in the process of the invention,indicate->First->Deviation coefficient of individual gauge wire, +.>Indicate->First->The closest Euclidean distance from the centre point of the individual gauge wire to the edge of the garment, < >>Indicate->Average value of nearest Euclidean distance from all stitch lines to garment edge of sewing line image, ++>Indicate->Maximum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->Minimum value of Euclidean distance of closest needle distance from center of thread to edge of garment in image of sewing thread,/>Indicate->First->The individual gauge wire is separated from the euclidean distance between nearest gauge wires;
the step of obtaining the comprehensive quality fluctuation coefficient of the clothing image according to the quality grade of each stitch length comprises the following steps:
for each quality level, calculating adjacent quality level entropy;
calculating the absolute value of the difference value of the occurrence frequency of the gauge wire of the quality grade and the adjacent next quality grade; calculating the product of the quality grade entropy and the absolute value of the difference value;
taking the average value of the products of all quality grades of the clothing image as the comprehensive quality fluctuation coefficient of the clothing image.
2. A method for visually inspecting a sewing defect of a garment material as claimed in claim 1, wherein said defining the window of each stitch length comprises:
for each stitch, calculating the distance between the center of gravity of the stitch and the center of gravity of each other stitch, and taking N stitch with the nearest distance as a window of the stitch, wherein N is the number of preset stitch lines.
3. The visual inspection method of sewing defects of clothing fabric according to claim 1, wherein the step of obtaining the quality grade of each stitch according to the comprehensive quality index of each stitch comprises:
and uniformly quantizing the comprehensive quality indexes of all the stitch lines of each sewing line image of the clothing image to obtain a plurality of quantization levels, wherein the quantization levels are used as the quality levels of the stitch lines.
4. The method for visual inspection of sewing defects of clothing according to claim 1, wherein said calculating adjacent quality level entropy comprises:
calculating the frequency sum of the gauge wire of the quality grade and the adjacent next quality grade, taking the frequency sum as the logarithm of a logarithmic function taking a natural constant as a base, and obtaining the calculation result of the logarithmic function;
and taking the inverse number of the product of the calculated result and the frequency sum as the adjacent quality grade entropy.
5. The visual inspection method of sewing defects of clothing according to claim 1, wherein the step of distinguishing the sewing defects of the clothing according to the number of stitch length lines of each cluster comprises the steps of:
and judging that the sewing of the garment fabric is defective when the number of the stitch lines in the cluster is larger than 1 and the number of the stitch lines in the cluster is smaller than a preset threshold value.
CN202311696596.9A 2023-12-12 2023-12-12 Visual detection method for sewing defects of garment fabric Active CN117392132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311696596.9A CN117392132B (en) 2023-12-12 2023-12-12 Visual detection method for sewing defects of garment fabric

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311696596.9A CN117392132B (en) 2023-12-12 2023-12-12 Visual detection method for sewing defects of garment fabric

Publications (2)

Publication Number Publication Date
CN117392132A CN117392132A (en) 2024-01-12
CN117392132B true CN117392132B (en) 2024-03-22

Family

ID=89468789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311696596.9A Active CN117392132B (en) 2023-12-12 2023-12-12 Visual detection method for sewing defects of garment fabric

Country Status (1)

Country Link
CN (1) CN117392132B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030034A (en) * 2023-02-21 2023-04-28 青岛精锐机械制造有限公司 Visual identification method for valve surface defects
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE545381C2 (en) * 2019-09-05 2023-07-25 Beescanning Global Ab Method for calculating the deviation relation of a population registered on image for calculating pest infestation on a bee population

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030034A (en) * 2023-02-21 2023-04-28 青岛精锐机械制造有限公司 Visual identification method for valve surface defects
CN116721106A (en) * 2023-08-11 2023-09-08 山东明达圣昌铝业集团有限公司 Profile flaw visual detection method based on image processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Choosing DBSCAN parameters automatically using differential evolution;Karami A et al;《International Journal of Computer Applications》;20141231;第91卷(第7期);第1-11页 *
停留点空间聚类在景区热点分析中的应用;张文元 等;《计算机工程与应用》;20170210(第4期);第268-275页 *

Also Published As

Publication number Publication date
CN117392132A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN114549522B (en) Textile quality detection method based on target detection
CN107256406B (en) Method and device for segmenting overlapped fiber image, storage medium and computer equipment
CN107515220B (en) Yarn blackboard hairiness amount detection and evaluation method based on image processing
CN114723704B (en) Textile quality evaluation method based on image processing
CN114842007B (en) Textile wear defect detection method based on image processing
CN114998321B (en) Textile material surface hairiness degree identification method based on optical means
CN115131358B (en) Quilt cover suture defect identification method
CN109584241A (en) A kind of detection method and device of reed
CN115063424B (en) Textile bobbin yarn detection method based on computer vision
CN112330598A (en) Method and device for detecting stiff silk defects on chemical fiber surface and storage medium
CN111160451A (en) Flexible material detection method and storage medium thereof
CN115018826B (en) Fabric flaw detection method and system based on image recognition
CN110458809B (en) Yarn evenness detection method based on sub-pixel edge detection
CN117392132B (en) Visual detection method for sewing defects of garment fabric
CN117237747B (en) Hardware defect classification and identification method based on artificial intelligence
CN116894840B (en) Spinning proofing machine product quality detection method and system
KR101929669B1 (en) The method and apparatus for analyzing an image using an entropy
TWI417437B (en) Yarn detecting method
CN114022442B (en) Unsupervised learning-based fabric defect detection algorithm
Fabijańska Yarn image segmentation using the region growing algorithm
CN108596249B (en) Image feature extraction and classification method and device
CN115311278A (en) Yarn cutting method for yarn detection
Li et al. A direct measurement method of yarn evenness based on machine vision
Li et al. Automatic recognition method for the three-elementary woven structures and defects of carbon fabric prepregs
CN115082453A (en) Intelligent control method of edge covering machine for bedding production based on neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant