CN115131358B - Quilt cover suture defect identification method - Google Patents
Quilt cover suture defect identification method Download PDFInfo
- Publication number
- CN115131358B CN115131358B CN202211059871.1A CN202211059871A CN115131358B CN 115131358 B CN115131358 B CN 115131358B CN 202211059871 A CN202211059871 A CN 202211059871A CN 115131358 B CN115131358 B CN 115131358B
- Authority
- CN
- China
- Prior art keywords
- gray
- area
- suture
- curve
- quilt cover
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of machine vision, in particular to a quilt cover suture defect identification method, which comprises the following steps: acquiring an enhanced quilt cover connected domain image and a gray curve thereof; determining a suture line concentrated area and other areas in the quilt cover connected domain image by using the amplitude variance of the gray curve; determining a defect area and a normal area of the suture in the suture concentration area by utilizing a gray curve period corresponding to the suture concentration area; judging whether the defect area is a jumper area or a broken line area by utilizing the gray value average value in one period in the gray value curves corresponding to the defect area and the normal suture area; setting a sliding window, and traversing the sliding window of other areas to obtain the gray value mean value of each sliding window; and obtaining a heavy line connected domain in other regions by using the gray value average value of each sliding window, and determining the heavy line region in other regions by using the ordinate of the central point of the heavy line connected domain. The method is used for identifying the defect type of the sleeved suture line, and the accuracy of defect identification can be improved.
Description
Technical Field
The invention relates to the technical field of machine vision, in particular to a quilt cover suture defect identification method.
Background
The quilt cover is used as bedding articles, and is deeply loved by consumers because of the advantages of comfort, beauty, easy changing and washing and the like. The quilt cover is generally made of double-layer fabric. In order to realize the batch production of the quilt cover, the production process of the quilt cover needs to be divided into multiple processes, including the processes of automatic fabric conveying, opposite side sewing, transverse sewing and cutting, zipper sewing and the like. The opposite side sewing is to sew two side edges of the double-layer fabric along the length direction or the width direction. During the opposite sewing process, due to reasons such as improper operation, the defects of broken lines, jumpers, heavy lines and the like are easily caused, and the defects can influence the service life of the quilt cover. Therefore, defect recognition of the quilt cover suture is indispensable.
The traditional quilt cover suture defect identification method comprises the following steps: and extracting the sleeved suture region by using an edge detection algorithm, and then identifying the defect of the suture region.
However, due to the influence of the complex quilt cover fabric on the seam identification, the traditional method for identifying the defect of the quilt cover seam cannot accurately identify the defect of the complex quilt cover fabric, so that the accuracy of identifying the defect of the quilt cover seam is low. Therefore, a method for improving the accuracy of the identification of the defect of the covered suture is highly desirable.
Disclosure of Invention
The invention provides a quilt cover suture defect identification method, which aims to solve the problem of low accuracy of the existing quilt cover suture defect identification method.
The invention provides a quilt cover suture defect identification method, which comprises the following steps: acquiring an enhanced quilt cover connected domain image and a gray curve thereof; determining a suture line concentrated area and other areas in the quilt cover connected domain image by using the amplitude variance of the gray curve; determining a defect area and a normal area of the suture in the suture concentration area by utilizing a gray curve period corresponding to the suture concentration area; judging whether the defect area is a jumper area or a broken line area by utilizing the gray value average value in one period in the gray value curves corresponding to the defect area and the normal suture area; setting a sliding window, and traversing other areas by the sliding window to obtain a mean value of gray values of all the sliding windows; compared with the prior art, the method is characterized in that a suture line concentrated area and other areas are distinguished according to the gray scale change characteristics of pixel points in the sleeved surface image based on machine vision, then wire jumping and wire breaking areas are distinguished according to the gray scale change characteristics of the pixel points in the suture line concentrated area, and the heavy line area is distinguished according to the gray scale values of the pixel points in the other areas. The method can effectively improve the accuracy of defect identification of the quilt cover suture.
In order to achieve the purpose, the invention adopts the following technical scheme that the quilt cover suture defect identification method comprises the following steps:
acquiring an enhanced quilt cover connected domain image;
fitting gray values of longitudinal pixel points in the quilt cover connected domain image to obtain a gray curve of the quilt cover connected domain image;
calculating the amplitude variance of the gray curve of the quilt cover connected domain image, and determining a suture line concentrated region and other regions in the quilt cover connected domain image by using the amplitude variance of the gray curve;
acquiring a gray curve period corresponding to the suture concentrated area, and determining a defect area and a normal suture area in the suture concentrated area by using the gray curve period corresponding to the suture concentrated area;
judging whether the defect area is a jumper area or a broken line area by utilizing the gray value average value in one period in the gray value curves corresponding to the defect area and the normal suture area;
setting a sliding window which is the same as the minimum external rectangle of the suture communication domain, traversing the sliding windows of other regions, and calculating the gray value average value of each sliding window according to the gray values of pixel points in the sliding windows;
and obtaining the heavy line connected domain in other regions by using the mean value of the gray value of each sliding window, and determining the heavy line region in other regions by using the ordinate of the central point of each heavy line connected domain.
Further, according to the method for identifying defects of the quilt cover suture, the gray curve of the quilt cover connected domain image is obtained as follows:
establishing a rectangular coordinate system to enable the enhanced quilt cover connected domain image to be in a first quadrant;
traversing each column of longitudinal pixel points in the enhanced quilt cover connected domain image to obtain a fluctuation curve which takes the longitudinal position of the longitudinal pixel point as a horizontal coordinate and the gray value of the longitudinal pixel point as a vertical coordinate, wherein the fluctuation curve is the gray curve of the quilt cover connected domain image.
Further, in the method for identifying defects of covered stitches, the stitch concentration area and other areas in the covered connected domain image are determined as follows:
sequentially counting the gray values of the wave crests in the gray curve according to the positions of the wave crests in the gray curve to obtain a wave crest gray value set;
sequentially counting the gray values of wave troughs in the gray curve according to the positions of the wave troughs in the gray curve to obtain a wave trough gray value set;
performing subtraction on a wave crest gray value in the wave crest gray value set and a wave trough gray value adjacent to the wave crest in the wave trough gray value set to obtain a gray curve amplitude set;
calculating the variance of the amplitude in the amplitude set of the gray curve to obtain the variance of the amplitude of the gray curve;
calculating the amplitude variance of each gray curve of the quilt cover connected domain image according to the method;
calculating the amplitude variance of the gray curve of the standard suture;
setting a variance threshold according to the amplitude variance of the gray level curve of the standard suture line, and judging the amplitude variance of each gray level curve of the quilt cover connected domain image: when the amplitude variance of the gray curve is smaller than the variance threshold value, the longitudinal area of the gray curve mapped in the quilt cover connected domain image is a suture concentrated area; and when the amplitude variance of the gray curve is greater than or equal to the variance threshold value, the longitudinal area of the gray curve mapped in the quilt cover connected domain image is other areas.
Further, in the method for identifying defects of a sleeved suture, the defect area and the normal suture area in the suture concentration area are determined as follows:
counting the abscissa of the wave crest in the gray scale curve corresponding to the suture concentrated area, and obtaining a gray scale curve period set corresponding to the suture concentrated area by using the difference value of the abscissas of the adjacent wave crests in the gray scale curve;
acquiring a gray scale curve period set of a standard suture, and calculating a gray scale curve period mean value in the set to obtain a gray scale curve period mean value of the standard suture;
setting a period threshold according to the gray scale curve period mean value of the standard suture, and judging each period in a gray scale curve period set corresponding to the suture concentrated area: when the period is greater than the period threshold value, the longitudinal region mapped in the suture concentrating region by the period is a defect region; when the period is less than or equal to the period threshold value, the longitudinal area mapped in the suture concentration area by the period is a normal suture area.
Further, in the method for identifying a defect of a quilt cover suture, the process of judging whether the defect area is a jumper area or a broken line area is specifically as follows:
respectively calculating the mean value of gray values in one period in gray curves corresponding to the defect area and the normal area of the suture line;
taking the gray value mean value in one period in the gray curve corresponding to the normal suture area as a gray value threshold, and judging the gray value mean value in one period in the gray curve corresponding to the defect area: when the mean value of the gray values in one period in the gray curve corresponding to the defect area is greater than the threshold value of the gray values, the defect area is a jumper area; and when the mean value of the gray values in one period in the gray curve corresponding to the defect area is less than or equal to the threshold value of the gray values, the defect area is a broken line area.
Further, in the method for identifying defects of quilted seams, the area of the heavy lines in the other areas is determined as follows:
performing edge detection and morphological opening operation on the suture concentrated area to obtain all suture communication areas of the suture concentrated area;
calculating the mean value of the gray values of all the suture connected domains, and calculating to obtain the mean value of the mean values of the gray values of all the suture connected domains;
acquiring a minimum circumscribed rectangle of a suture communication domain, setting a sliding window identical to the minimum circumscribed rectangle, and traversing the sliding window of other areas;
calculating to obtain the mean value of the gray values of all the sliding windows according to the gray values of the pixel points in the sliding windows;
setting a sliding window gray value threshold interval by using the gray value mean value in one period in the gray value curve corresponding to the normal suture area and the mean value of the gray value mean values of all suture communication areas;
judging the mean value of the gray values of each sliding window: when the mean value of the gray value of the sliding window is in the threshold interval of the gray value of the sliding window, the longitudinal area of the sliding window mapped in other areas is a heavy line connected area; when the mean value of the gray value of the sliding window is not in the threshold interval of the gray value of the sliding window, the longitudinal area of the sliding window mapped in other areas is a normal connected area of the sleeved fabric;
counting the vertical coordinates of the central points of the multiple connected domains, and sorting the vertical coordinates of the central points of the multiple connected domains from small to large to obtain a vertical coordinate set;
setting a vertical coordinate difference threshold according to the gray scale curve period mean value of the standard suture line, and judging the difference value of two adjacent vertical coordinates in the vertical coordinate set;
when the difference value of two adjacent vertical coordinates in the vertical coordinate set is larger than the threshold value of the difference value of the vertical coordinates, taking the space between the two vertical coordinates as a dividing line, and taking all heavy line connected domains corresponding to the vertical coordinates in the area on the left side of the dividing line in the vertical coordinate set as a heavy line area; and (4) dividing the remaining vertical coordinates in the vertical coordinate set according to the mode until all the vertical coordinates are divided, and determining all heavy line areas in other areas.
Further, in the method for identifying defects of covered stitches, the enhanced images of the covered connected regions are acquired as follows:
collecting the surface image of the sewed quilt cover;
performing semantic segmentation on the surface image of the quilt cover to obtain a connected domain image of the quilt cover;
carrying out smooth denoising processing on the quilt cover connected domain image to obtain a denoised quilt cover connected domain image;
and carrying out histogram equalization on the denoised sleeved connected domain image to obtain an enhanced sleeved connected domain image.
The invention has the beneficial effects that: the method is based on machine vision, a suture line concentrated area and other areas are distinguished according to the gray level change characteristics of pixel points in the images of the surfaces of the quilt cover, then wire jumping and wire breaking areas are distinguished according to the gray level change characteristics of the pixel points in the suture line concentrated area, and a heavy line area is distinguished according to the gray level values of the pixel points in the other areas. The method can effectively improve the accuracy of defect identification of the quilt cover suture.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for identifying defects of a covered suture provided in embodiment 1 of the present invention;
fig. 2 is a schematic flow chart of a method for identifying defects of a covered suture provided in embodiment 2 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Example 1
The embodiment of the invention provides a quilt cover suture defect identification method, as shown in figure 1, comprising the following steps:
and S101, acquiring the enhanced connected domain image of the quilt cover.
And performing semantic segmentation on the surface image of the quilt cover to obtain a connected domain image of the quilt cover.
S102, fitting the gray values of the longitudinal pixel points in the quilt cover connected domain image to obtain a gray curve of the quilt cover connected domain image.
And judging the defect of the sewing thread according to the gray scale curve, wherein if the sewn sewing thread is a standard sewing thread, the longitudinally traversed gray scale curve is a curve with similar period and similar amplitude.
S103, calculating the amplitude variance of the gray curve of the quilt cover connected domain image, and determining the suture line concentrated area and other areas in the quilt cover connected domain image by using the amplitude variance of the gray curve.
The smaller the variance, the smaller the difference in the amplitude of the gradation curve.
S104, obtaining a gray curve period corresponding to the suture concentrated area, and determining a defect area and a normal suture area in the suture concentrated area by using the gray curve period corresponding to the suture concentrated area.
Wherein, the gray scale curve period can represent the change of the stitch interval.
And S105, judging whether the defect area is a jumper area or a broken line area by utilizing the gray value average value in one period of the gray value curve corresponding to the defect area and the normal suture area.
The jumper is mainly caused by the fact that the distance, the gap and the height of the needle closing rotating shuttle tips do not meet the tolerance precision requirement; in addition, the jumping wire can be caused by the loosening and abrasion of parts or inaccurate positioning of positions.
S106, setting a sliding window which is the same as the minimum circumscribed rectangle of the suture communication domain, traversing the sliding windows of other regions, and calculating the gray value average value of each sliding window according to the gray values of the pixel points in the sliding windows.
Wherein the sliding window is used to determine the heavy line region.
S107, obtaining the heavy line connected domain in other areas by using the gray value average value of each sliding window, and determining the heavy line area in other areas by using the ordinate of the central point of each heavy line connected domain.
Wherein, the heavy thread is caused by the fact that the feeding is not matched with the action of the felting needle, so that the bottom thread and the upper thread are blocked in the interweaving process.
The beneficial effect of this embodiment is: this embodiment is based on machine vision, distinguishes suture concentrated area and other regions according to the grey scale change characteristic of pixel in the quilt cover surface image, then distinguishes wire jumper and broken string region according to the grey scale change characteristic of pixel in the suture concentrated area, distinguishes heavy line region according to the grey scale value of pixel in other regions. The embodiment can effectively improve the accuracy of the defect identification of the quilt cover suture.
Example 2
The main purposes of this embodiment are: and processing the sewed surface image of the quilt cover by using a machine vision technology, and identifying various defects of the suture line according to the gray change of the surface image of the quilt cover. And detecting and debugging the sewing machine according to the defect type of the sewing line.
In the complex quilt cover fabric, the gray values of some textures are similar to the gray values of the stitches, and the traditional method for identifying the defects of the stitches of the complex quilt cover fabric cannot accurately identify the defects of the stitches of the complex quilt cover fabric.
The embodiment of the invention provides a quilt cover suture defect identification method, as shown in figure 2, which comprises the following steps:
s201, acquiring a quilt cover connected domain image.
In the embodiment, the sewed quilt cover surface image needs to be clear, and various defects of the sewing thread are identified according to the gray level change of the quilt cover surface image. Therefore, the images of the surface of the quilt cover on the production line need to be collected, and the characteristic information in the images of the surface of the quilt cover needs to be identified.
The present embodiment employs a DNN semantic segmentation approach to identify objects in the segmented surface image.
The relevant content of the DNN network is as follows:
1. the data set used is the data set of the images of the surface of the sleeve on the production line acquired in a overlook mode.
2. The pixels to be segmented are divided into 2 types, namely the labeling process of the training set corresponding to the labels is as follows: in the semantic label of the single channel, the label of the pixel at the corresponding position belonging to the background class is 0, and the label of the pixel belonging to the surface of the quilt cover is 1.
3. The task of the network is classification, so the loss function used is a cross entropy loss function.
Therefore, the surface image of the quilt cover on the production line is processed through DNN, and a connected domain image of the quilt cover is obtained.
Because the gray value of part of textures is similar to that of the suture in the quilt cover connected domain image with the complex texture, the suture region cannot be accurately identified and segmented by using an edge detection method. Therefore, in the embodiment, the sleeved connected domain image is subjected to gray processing, the suture region on the sleeved connected domain image is identified and segmented according to the gray change characteristics of the suture, and various defects of the suture are identified according to the characteristics of the suture region.
The sewing of the opposite sides of the quilt cover is that sewing treatment is carried out on the two side edges of the double-layer fabric along the length direction or the width direction, so that the sewing lines in the shot surface image of the quilt cover are longitudinally distributed. Suture defects are typically broken, jumped, and rewound. The thread breakage means that the thread is too weak in strength due to the use of a thin thread when thick materials are sewn, and the upper thread is napped through the thread hole part and is blocked when the thread moves. At this point, a yarn breakage defect is formed. The jumper wire refers to the phenomenon that the upper thread and the bottom thread are not twisted after the suture. The jumping is mainly caused by that the space, gap and height of the needle closing rotating shuttle point do not accord with the tolerance precision requirement; in addition, the jumping wire can be caused by the loosening and abrasion of parts or inaccurate positioning of positions. The heavy thread is caused by the fact that feeding and the action of the felting needles are not matched, so that bottom thread and upper thread are blocked in the interweaving process. The longitudinal distribution area of the broken thread and the jumper thread is still in the planned standard suture area, and the longitudinal distribution area of the heavy thread can jump out of the planned standard suture area.
S202, enhancement processing is carried out on the quilt cover connected domain image.
Firstly, graying the images of the connected domain of the quilt cover, and counting a gray histogram. Noise in the sleeved connected domain image can influence the accuracy of extracting the characteristics of the sleeved connected domain image, and further subsequent processing and analysis are hindered. The method comprises the steps of carrying out smooth denoising processing on a sleeved connected domain image by using median filtering, eliminating the influence of noise, improving the quality of the sleeved connected domain image, and then enhancing the sleeved connected domain image by using histogram equalization, namely enhancing the contrast of the sleeved connected domain image, so that the gray value change of the sleeved connected domain image is obvious.
S203, acquiring the amplitude of the gray curve.
Establishing a rectangular coordinate system to enable the quilt cover connected domain image to be in a first quadrant, and obtaining the area of the quilt cover connected domain imageWherein M is the number of pixels on the abscissa, and N is the number of pixels on the ordinate. And traversing the gray values of the longitudinal pixels from top to bottom by taking the original point O as a starting point, and fitting a fluctuation curve which takes the longitudinal position of the pixel as a horizontal coordinate and the gray value of the pixel as a vertical coordinate according to the change of the gray values to obtain M gray curves.
During sewing by using a machine, sewing is carried out on the quilt cover fabric at equal intervals by one sewing line in the longitudinal direction. And judging the seam defects according to the gray level curve, wherein if the sewn seam is a standard seam, the longitudinally traversed gray level curve is a curve with similar period and similar amplitude. If the sewing thread is defective, the period of the gray curve part changes, but the amplitude of the gray curve is not changed because the gray value difference between the quilt cover fabric and the sewing thread is not changed.
Sequentially counting the gray values of the wave crests of one gray curve to obtain a setAnd n is the number of peaks. Then, the gray values of the wave troughs of the gray curve are counted in sequence to obtain a setWherein m is the number of the wave troughs.
Then assemble the setSequentially subtracting the sets from the data in (1)Obtaining a gray scale curve amplitude setComprises the following steps:
when n is larger than m, the value of y is m; when n is less than m, the value of y is n; when n is equal to m, the value of y is n or m.
And S204, acquiring a suture concentrated area.
Computing a set of gray scale curve amplitudesThe variance of the data in (c). Variance is known to measure the fluctuation size of a batch of data, so the smaller the variance value, the smaller the difference in amplitude of the gray scale curve.
Then calculating the amplitude variance of the M gray curves to obtain a gray curve amplitude variance set. Calculating the gray curve of several groups of standard suture lines according to the above mode, calculating the amplitude variance of the gray curve of the standard suture lines to obtain a set, and taking the maximum value of the setIs a threshold value. The standard suture is a known standard suture without any defects.
The amplitude variance of the gray curve is integratedThe data in (1) andwhen the variance of the amplitude of the gray scale curve is less thanJudging that the longitudinal area of the gray curve mapped in the quilt cover connected domain image is a suture line concentrated area; when the amplitude variance of the gray scale curve is greater than or equal toAnd judging that the longitudinal area of the gray curve mapped in the sleeved connected domain image is other area, wherein the longitudinal area may not have a suture line or may have a double-line area.
Because the quilt cover fabric is sewn by adopting double-chain type opposite side sewing, a sewing line concentrated area on the quilt cover fabric can be obtained.
And S205, acquiring a jumper wire area and a broken wire area.
The standard stitches on the quilt cover fabric advance at equal intervals, and the jumping and breaking positions can advance at intervals. The larger the span distance, the larger the defect level.
Selecting any suture line concentration area, and counting the abscissa of the jth peak in the gray scale curve corresponding to the suture line concentration areaCalculating the corresponding gray curve period set of the suture line concentrated regionComprises the following steps:
Calculating the gray curve of a group of standard sutures, calculating the period of the gray curve of the standard sutures to obtain a set, and taking the mean value of the set. Because the standard suture is the suture which travels on the quilt cover fabric at equal intervals, the cycle mean value of the gray scale curve of the standard suture can be usedShowing the spacing of the stitches on the face of the quilt cover. The appearance of the jumping and breaking of the quilt cover fabric is the advancing of the span distance, so a hyper-parameter k can be set toAs a threshold value, the corresponding gray curve period of the suture line concentrated region is collectedThe data in (1) andwhen the data is greater thanThen, the defect area is determined. When the data is less than or equal toWhen the area is normal, the area is judged to be a normal area of the suture.
Calculating the mean value of the gray values in one period of the normal suture region in the gray curve corresponding to the concentrated suture regionThis is used as a threshold. The known stitches are white threads, the grey value of which is greater than that of the quilt cover material. So as to calculate the mean value of the gray values in the period of the defect regionWhen is coming into contact withIs greater thanWhen the area is a jumper area, the area is judged asIs less than or equal toIf so, the area is determined to be a broken line area.
Thereby obtaining the set of the periods of each suture jumper area in the images of the quilt cover connected domainAnd a set of periods of each thread break region. WhereinIndicating the number of suture jump areas,indicating the number of broken sections of the suture.
And S206, acquiring a heavy line area.
The regions of the stitches with a double line are in other regions and in the vicinity of the concentrated region of the stitches, the further the region of the double line is from the concentrated region of the stitches, the greater the deviation of the needles of the sewing machine from the standard stitch trajectory and the greater the degree of defects of the double line.
Firstly, the mean value of the gray value in one period of the normal region of the suture is calculated. Then Canny edge detection is carried out on the suture concentrated area, then morphological opening operation is carried out, all suture connected domains of the suture concentrated area are obtained, and the average value of the mean value of the gray values of all suture connected domains is calculatedAnd then acquiring the minimum circumscribed rectangle of the suture connected domain.
Setting a rectangle which is the same as the minimum circumscribed rectangle of the suture connected domain as a sliding window, traversing other regions, and calculating the mean value of the gray values in each sliding windowIn the interval [ 2 ],]Is a threshold value. When in useIs in the section,]When the number of the connected domains is within the range, the connected domain is judged as the heavy line connected domain.
The vertical coordinates of the central points of the connected domains of the multiple lines are counted and arranged from small to large to obtain a set. Sequentially calculating the difference value of two adjacent data in the set, and when the difference value is more than 5And taking the space between the two data as a dividing line, and extracting all data of the region on the left side of the dividing line in the set and marking the data as a double-line region. And then, continuously traversing the residual data of the set until the segmentation is completed to obtain a multiple line areas.
And S207, calculating the defect degree.
And carrying out Canny edge detection and morphological opening operation on the heavy line area to obtain a heavy line connected domain. Performing morphological thinning operation on the double-line connected domain to enable the double-line connected domain to become a line formed by single pixel points, calculating the length of the line, namely the length of the double line, and obtaining a set. S represents the number of heavy-line connected domains.
The known period represents the interval length of the jumper wire or the broken wire, and the longer the period of the jumper wire or the broken wire is than the period of the normal area of the suture, the more serious the suture defect is. Assembling suture jumper zone cyclesAll divided by the mean of the cycles of the standard suture gray scale curveObtaining a jumper span interval degree set. Then, the jumper wire span distance degree is integratedCarrying out normalization processing to obtain a normalized data setPeriodic set of jumper regions with the same as the sutureThe obtained defect degree Z of the quilt cover fabric suture line jumpers is as follows:
wherein the content of the first and second substances,indicating the period of the jumping area at the i-th position,representing the weight of the jumper region at the i-th position. And the thread breakage defect degree U of the quilt cover fabric can be obtained in the same way.
Then calculating the minimum distance from the central point of each heavy line communication domain to the suture line concentrated region to obtain a distance set. The further the distance, the greater the deviation of the needles of the sewing machine from the standard stitch trajectory, i.e. the greater the degree of defect of the heavy thread. For distance setCarrying out normalization processing to obtain a normalized data setAnd taking the weight of the obtained weight as the length set of the heavy thread, and obtaining the defect degree J of the sewing line of the quilt cover fabric as follows:
wherein the content of the first and second substances,indicates the length of the heavy line region at t,the weight of the heavy line region at t is represented.
And S208, detecting and debugging the sewing machine.
And distinguishing the quilt cover fabric with the defective sewing lines according to the steps, and sorting the quilt cover fabric. And detecting and debugging the sewing machine according to the defect degree of various defects.
The beneficial effect of this embodiment is: the embodiment is based on machine vision, and the suture concentrated area and other areas are distinguished according to the gray scale change characteristics of the pixel points in the images on the surface of the quilt cover, then the wire jumping and breaking areas are distinguished according to the gray scale change characteristics of the pixel points in the suture concentrated area, and the heavy line areas are distinguished according to the gray scale values of the pixel points in other areas. The embodiment can effectively improve the accuracy of the defect identification of the quilt cover suture.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (5)
1. A quilt cover suture defect identification method is characterized by comprising the following steps:
acquiring an enhanced quilt cover connected domain image;
fitting gray values of longitudinal pixel points in the quilt cover connected domain image to obtain a gray curve of the quilt cover connected domain image;
calculating the amplitude variance of the gray curve of the quilt cover connected domain image, and determining a suture line concentrated region and other regions in the quilt cover connected domain image by using the amplitude variance of the gray curve; the suture line concentrated area and other areas in the quilt cover connected domain image are determined as follows:
sequentially counting the gray values of the wave crests in the gray curve according to the positions of the wave crests in the gray curve to obtain a wave crest gray value set;
sequentially counting the gray values of wave troughs in the gray curve according to the positions of the wave troughs in the gray curve to obtain a wave trough gray value set;
performing difference on a peak gray value in the peak gray value set and a trough gray value adjacent to the peak in the trough gray value set to obtain a gray curve amplitude set;
calculating the variance of the amplitude in the amplitude set of the gray curve to obtain the variance of the amplitude of the gray curve;
calculating the amplitude variance of each gray curve of the quilt cover connected domain image according to the method;
calculating the amplitude variance of the gray curve of the standard suture;
setting a variance threshold according to the amplitude variance of the gray level curve of the standard suture line, and judging the amplitude variance of each gray level curve of the quilt cover connected domain image: when the amplitude variance of the gray curve is smaller than the variance threshold value, the longitudinal area of the gray curve mapped in the quilt cover connected domain image is a suture line concentrated area; when the amplitude variance of the gray curve is greater than or equal to the variance threshold, the longitudinal area of the gray curve mapped in the quilt cover connected domain image is other areas;
acquiring a gray scale curve period corresponding to the suture concentrated area, counting the abscissa of a peak in the gray scale curve corresponding to the suture concentrated area, and acquiring a gray scale curve period set corresponding to the suture concentrated area by using the difference value of the abscissas of adjacent peaks in the gray scale curve;
acquiring a gray scale curve period set of a standard suture, and calculating a gray scale curve period mean value in the set to obtain a gray scale curve period mean value of the standard suture;
setting a period threshold according to the gray scale curve period mean value of the standard suture, and judging each period in a gray scale curve period set corresponding to the suture concentrated area: when the period is larger than the period threshold value, the longitudinal area mapped in the suture concentration area by the period is a defect area; when the period is less than or equal to the period threshold value, the longitudinal area mapped in the suture concentration area by the period is a normal suture area;
judging whether the defect area is a jumper area or a broken line area by utilizing the gray value average value in one period in the gray value curves corresponding to the defect area and the normal suture area;
setting a sliding window which is the same as the minimum circumscribed rectangle of the suture line communication domain, performing sliding window traversal on other regions, and calculating the gray value mean value of each sliding window according to the gray values of pixel points in the sliding window;
and obtaining the heavy line connected domain in other regions by using the mean value of the gray value of each sliding window, and determining the heavy line region in other regions by using the ordinate of the central point of each heavy line connected domain.
2. The quilt cover suture defect identification method as claimed in claim 1, wherein the gray curve of the quilt cover connected domain image is obtained as follows:
establishing a rectangular coordinate system to enable the enhanced quilt cover connected domain image to be in a first quadrant;
traversing each column of longitudinal pixel points in the enhanced quilt cover connected domain image to obtain a fluctuation curve which takes the longitudinal position of the longitudinal pixel point as a horizontal coordinate and the gray value of the longitudinal pixel point as a vertical coordinate, wherein the fluctuation curve is the gray curve of the quilt cover connected domain image.
3. The method for identifying the defect of the quilt cover suture according to claim 1, wherein the process of judging whether the defect area is a jumper area or a broken line area is specifically as follows:
respectively calculating the mean value of gray values in one period in gray curves corresponding to the defect area and the normal area of the suture line;
taking the mean value of the gray values in one period in the gray curve corresponding to the normal suture area as a threshold value of the gray values, and judging the mean value of the gray values in one period in the gray curve corresponding to the defective area: when the mean value of the gray values in one period in the gray curve corresponding to the defect area is greater than the threshold value of the gray values, the defect area is a jumper area; and when the mean value of the gray values in one period in the gray curve corresponding to the defect area is less than or equal to the threshold value of the gray values, the defect area is a broken line area.
4. The method for identifying defects of quilted seams as claimed in claim 1, wherein the areas of heavy lines in the other areas are determined as follows:
performing edge detection and morphological opening operation on the suture concentrated area to obtain all suture communication areas of the suture concentrated area;
calculating the mean value of the gray values of all the suture connected domains, and calculating to obtain the mean value of the mean values of the gray values of all the suture connected domains;
acquiring a minimum circumscribed rectangle of a suture communication domain, setting a sliding window identical to the minimum circumscribed rectangle, and traversing the sliding window of other areas;
calculating to obtain the mean value of the gray value of each sliding window according to the gray value of the pixel points in the sliding window;
setting a sliding window gray value threshold interval by using the gray value mean value in one period in the gray value curve corresponding to the normal suture area and the mean value of the gray value mean values of all suture communication areas;
judging the mean value of the gray values of each sliding window: when the mean gray value of the sliding window is in the threshold interval of the gray value of the sliding window, the longitudinal area of the sliding window mapped in other areas is a heavy line connected area; when the mean value of the gray value of the sliding window is not in the threshold interval of the gray value of the sliding window, the longitudinal area of the sliding window mapped in other areas is a normal connected area of the sleeved fabric;
counting the vertical coordinates of the central points of the multiple connected domains, and sorting the vertical coordinates of the central points of the multiple connected domains from small to large to obtain a vertical coordinate set;
setting a vertical coordinate difference threshold according to the gray scale curve period mean value of the standard suture line, and judging the difference value of two adjacent vertical coordinates in the vertical coordinate set;
when the difference value of two adjacent vertical coordinates in the vertical coordinate set is larger than the threshold value of the difference value of the vertical coordinates, taking the space between the two vertical coordinates as a dividing line, and taking all heavy line connected domains corresponding to the vertical coordinates in the area on the left side of the dividing line in the vertical coordinate set as a heavy line area; and (4) dividing the remaining vertical coordinates in the vertical coordinate set according to the mode until all the vertical coordinates are divided, and determining all heavy line areas in other areas.
5. The method for identifying defects of quilt cover stitches as claimed in claim 1, wherein the enhanced quilt cover connected domain image is obtained as follows:
collecting the surface image of the sewed quilt cover;
performing semantic segmentation on the surface image of the quilt cover to obtain a connected domain image of the quilt cover;
carrying out smooth denoising processing on the quilt cover connected domain image to obtain a denoised quilt cover connected domain image;
and carrying out histogram equalization on the denoised quilt cover connected domain image to obtain an enhanced quilt cover connected domain image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211059871.1A CN115131358B (en) | 2022-09-01 | 2022-09-01 | Quilt cover suture defect identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211059871.1A CN115131358B (en) | 2022-09-01 | 2022-09-01 | Quilt cover suture defect identification method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115131358A CN115131358A (en) | 2022-09-30 |
CN115131358B true CN115131358B (en) | 2022-11-25 |
Family
ID=83388049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211059871.1A Active CN115131358B (en) | 2022-09-01 | 2022-09-01 | Quilt cover suture defect identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115131358B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115471504B (en) * | 2022-11-14 | 2023-02-10 | 深圳市富安娜家居用品股份有限公司 | Automatic thread end identification method based on textile fabric |
CN117274293B (en) * | 2023-11-17 | 2024-03-15 | 广东省农业科学院动物科学研究所 | Accurate bacterial colony dividing method based on image features |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114757949B (en) * | 2022-06-15 | 2022-09-27 | 济宁市海富电子科技有限公司 | Wire and cable defect detection method and system based on computer vision |
CN114782416B (en) * | 2022-06-16 | 2023-09-05 | 济宁爱丝制衣股份有限公司 | Textile quality detection method and system based on image recognition |
-
2022
- 2022-09-01 CN CN202211059871.1A patent/CN115131358B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN115131358A (en) | 2022-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115131358B (en) | Quilt cover suture defect identification method | |
CN107256406B (en) | Method and device for segmenting overlapped fiber image, storage medium and computer equipment | |
CN114842007B (en) | Textile wear defect detection method based on image processing | |
CN108364291A (en) | Grey cloth rapid detection method based on computer vision technique | |
CN115131348B (en) | Method and system for detecting textile surface defects | |
CN116630309B (en) | Cloth weft-break flaw detection method | |
CN110827235B (en) | Steel plate surface defect detection method | |
CN105261003A (en) | Defect point detection method on basis of self structure of fabric | |
CN113592867B (en) | Detection method based on residual binding yarns on carbon fiber cloth cover | |
CN114998321B (en) | Textile material surface hairiness degree identification method based on optical means | |
CN116051502A (en) | Large-tow carbon fiber defect detection method and system based on combination of image processing and deep learning | |
CN108315852B (en) | Spinning machine threading method and device | |
CN112767384A (en) | Compensation method and device of elastic cloth gram weight online detection system | |
CN115082465A (en) | Wool and cashmere classification method based on scanning electron microscope image processing | |
CN115861261A (en) | Defect identification method for medical non-woven fabric | |
CN113936001A (en) | Textile surface flaw detection method based on image processing technology | |
Wu et al. | Fast processing of foreign fiber images by image blocking | |
CN109583306A (en) | A kind of spool residual yarn detection method based on machine vision | |
CN114693686B (en) | Method for detecting stains on bed sheet cloth | |
CN114913180B (en) | Intelligent detection method for defect of cotton cloth reed mark | |
CN111402225A (en) | Cloth folding false detection defect discrimination method | |
CN115311264A (en) | Fabric flaw line defect identification method for textile production | |
CN114782426A (en) | Knitted fabric broken yarn defect detection method based on artificial intelligence system | |
Shanthi et al. | Robust fabric defects inspection system using deep learning architecture | |
Sengupta et al. | Edge detection in dermascopic images by linear structuring element |
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 |