Nothing Special   »   [go: up one dir, main page]

CN117152148B - Method for detecting defect of wool spots of textile - Google Patents

Method for detecting defect of wool spots of textile Download PDF

Info

Publication number
CN117152148B
CN117152148B CN202311421785.5A CN202311421785A CN117152148B CN 117152148 B CN117152148 B CN 117152148B CN 202311421785 A CN202311421785 A CN 202311421785A CN 117152148 B CN117152148 B CN 117152148B
Authority
CN
China
Prior art keywords
defect
area
cluster
dispersion
region
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
CN202311421785.5A
Other languages
Chinese (zh)
Other versions
CN117152148A (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.)
Nantong Jieyuan Textile Co ltd
Original Assignee
Nantong Jieyuan Textile 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 Nantong Jieyuan Textile Co ltd filed Critical Nantong Jieyuan Textile Co ltd
Priority to CN202311421785.5A priority Critical patent/CN117152148B/en
Publication of CN117152148A publication Critical patent/CN117152148A/en
Application granted granted Critical
Publication of CN117152148B publication Critical patent/CN117152148B/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
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/34Smoothing or thinning of the pattern; Morphological operations; Skeletonisation
    • 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
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • 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
    • G06T2207/30124Fabrics; Textile; Paper
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Geometry (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a method for detecting a defect of a wool spot of a textile. The method is a method for identifying by using electronic equipment, and utilizes an artificial intelligence system in the production field to finish detection of the defect of the knitting wool spots of the textile. Firstly, acquiring a textile surface image by using a camera, and carrying out data processing on the textile surface image to obtain the dispersion of a defect area in an area cluster; performing data processing on the defect areas in the area clusters to calculate the mottle property; calculating a confidence level based on the plaque nature; judging whether the defective area in the area cluster is a plaque defective area according to the credibility. In order to avoid the influence of oil stains during detection of the defect of the hair spots of the textile, the invention calculates the dispersion of the defect area, performs corrosion operation for a plurality of times, obtains the hair spot property by combining the value and the change of the dispersion, calculates the credibility of the defect as the hair spot, and judges the hair spot defect based on the credibility.

Description

Method for detecting defect of wool spots of textile
Technical Field
The invention relates to the technical field of data processing, in particular to a method for detecting a defect of a wool spot of a textile.
Background
Textile industry is one of the largest traditional industries in China, and faults or manual operation errors of textile machines can cause defects in textile industry production. Textile defect detection is an important link for guaranteeing quality, and along with the development of machine vision technology, detection of defects through digital image processing is becoming a trend. In the prior art, various textile flaw image features are extracted by using a convolutional neural network, so that end-to-end flaw identification and classification are realized. The determination of the type of flaw is helpful in making the following actions: firstly, due to the defect generation reason, timely adjustment is made to a production machine and manual operation, so that production loss is reduced; and secondly, processing the defective products according to the defect types. However, some defects are misclassified due to feature similarity, and due to the influence of illumination and resolution, the entire defect of the hair spot appears as a region with smaller gray value, and the detection is completed by the conventional method through threshold segmentation. However, the oil stain defect is also a region having a lower gray value than the surrounding region, and the two are easily confused. The difference is that the oil stain is presented as a smooth whole, the hair spot is presented as a petal shape, and more breaks and gaps exist in the middle.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method for detecting the defect of the wool spots of textiles, which adopts the following technical scheme:
acquiring a textile fabric surface image, and preprocessing the textile fabric surface image to obtain a target image;
a threshold value is used for dividing a defect area in the target image; classifying the defect areas based on the distance between the defect areas to obtain at least two area clusters; taking the number of defective areas in each area cluster as a first characteristic value; calculating a second characteristic value according to the distance between the centroids of the defect areas in each area cluster; acquiring a minimum circumscribed rectangle corresponding to the region cluster, and calculating a third characteristic value according to the area ratio of the defect region in the minimum circumscribed rectangle; the product of the first characteristic value, the second characteristic value and the third characteristic value is the dispersion of the defect area in each area cluster;
performing corrosion operation on the defect areas in the area clusters, and calculating the mottle property by combining the value of the dispersion and the change condition in the corrosion operation process; calculating a confidence level based on the plaque nature; judging whether the defective area in the area cluster is a plaque defect area according to the credibility.
Preferably, the calculation formula of the second eigenvalue is:
wherein,is the second characteristic value; />The number of defective areas in the area cluster; />The abscissa of the centroid of the defect area of the first defect area in the area cluster; />A ordinate of a defect region centroid of a first defect region in the region cluster;the abscissa of the centroid of the defect area of the ith defect area in the area cluster; />Is the ordinate of the centroid of the defect region of the ith defect region in the region cluster.
Preferably, the calculation formula of the third eigenvalue is:
wherein,is a third characteristic value; />The area of the ith defective area in the area cluster; />The number of defective areas in the area cluster; />The area of the smallest circumscribed rectangle corresponding to the region cluster.
Preferably, the performing corrosion operation on the defective area in the area cluster, and calculating the mottle property in combination with the value and the change condition of the dispersion in the corrosion operation process includes:
performing at least two corrosion operations on the defect areas in the area cluster, and calculating the dispersion of the defect areas in the area cluster after each corrosion operation; forming a dispersion sequence by using the dispersion corresponding to at least two corrosion operations;
the calculation formula of the mottle property is as follows:
wherein,is said plaque nature; />Is a dispersion sequence; />Is the number of divergences within the sequence of divergences.
Preferably, said calculating the confidence level based on the hairiness includes:
an exponential function with a natural constant as a base and the inverse of the negative plaque property as an index is used as the degree of confidence.
Preferably, the determining whether the defective area in the area cluster is a plaque defect area according to the confidence level includes:
when the credibility is larger than a preset first threshold value, the defect area in the area cluster is a hair spot defect area; and when the credibility is smaller than or equal to a preset first threshold value, the defective area in the area cluster is an oil stain defective area.
Preferably, the preprocessing the textile surface image to obtain a target image includes:
carrying out semantic segmentation on the textile fabric surface image to obtain an interested image containing an interested region; graying the image of interest to obtain a target image.
The embodiment of the invention has at least the following beneficial effects:
the invention relates to the technical field of data processing, which comprises the steps of firstly, collecting a textile fabric surface image, and preprocessing the textile fabric surface image to obtain a target image; the threshold value segments out a defective area in the target image. The defect area is the approximate location of the acquired defect.
Classifying the defect areas according to the distance based on the defect areas to obtain at least two area clusters; taking the number of defective areas in each area cluster as a first characteristic value; calculating a second characteristic value according to the distance between the centroids of the defect areas in each area cluster; acquiring a minimum circumscribed rectangle corresponding to the region cluster, and calculating a third characteristic value according to the area ratio of the defect region in the minimum circumscribed rectangle; the product of the first characteristic value, the second characteristic value and the third characteristic value is the dispersion of the defect area in each area cluster; and calculating the dispersion degree of the connected domain by taking the theoretical morphological difference of oil stains and hair spots into consideration.
Performing corrosion operation on the defect areas in the area clusters, and calculating the mottle property by combining the value of the dispersion and the change condition in the corrosion operation process; calculating a confidence level based on the plaque nature; judging whether the defective area in the area cluster is a plaque defect area according to the credibility. The variation of the dispersion is calculated by the erosion operation, which continuously expands the highlight region. And obtaining the hairiness by integrating the dispersion and the change of the dispersion in the morphological operation process, and then calculating the defect as the credibility of the hairiness.
In order to avoid the influence of oil stains during detection of the defect of the hair spots of the textile, the invention calculates the dispersion of the defect area, performs corrosion operation for a plurality of times, obtains the hair spot property by combining the value and the change of the dispersion, calculates the credibility of the defect as the hair spot, and judges the hair spot defect based on the credibility.
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 method for detecting defects of spots on a textile fabric according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a target image corresponding to a surface image of a textile having defects according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of a method for detecting the defects of the spots of the textile according to the invention, which are provided by the invention, with reference to the accompanying drawings and the preferred embodiments. 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 embodiment of the invention provides a specific implementation method of a method for detecting the defects of the hair spots of textiles, which is suitable for a scene for detecting the defects of the hair spots of textiles. In order to solve the problem that the entire plaque defect is represented as a region with a smaller gray value due to the influence of illumination and resolution, the conventional method completes detection through threshold segmentation. However, the oil stain defect is a problem that a single region having a lower gradation value than the surrounding region is easily confused with the other region. According to the method, the influence of oil stains during detection of the defect of the wool spots of the textile is avoided, the dispersion of the defect areas in the area clusters is calculated, the corrosion operation is carried out for a plurality of times, the wool spots are obtained by combining the value and the change of the dispersion, the credibility degree of the defect which is the wool spots is calculated, and the defect of the wool spots is judged based on the credibility degree.
The following specifically describes a specific scheme of the method for detecting the defect of the wool spots of the textile, which is provided by the invention, with reference to the accompanying drawings.
Referring to fig. 1, a method flowchart of a method for detecting a defect of a hair spot of a textile fabric according to an embodiment of the invention is shown, and the method includes the following steps:
step S100, acquiring a textile surface image, and preprocessing the textile surface image to obtain a target image.
The textile after production is horizontally placed on a conveying line to wait for quality inspection, so that a camera is placed above the conveying line, and the textile surface image of the textile is collected downwards. The acquired textile surface image may contain background of no interest in the production line or the like. So the textile surface image is pretreated to obtain a target image, in particular: carrying out semantic segmentation on the textile fabric surface image to obtain an interested image containing an interested region; graying the image of interest to obtain a target image. Carrying out semantic segmentation on the textile surface image, setting the pixel value of a background area which is not in interest as 0, and obtaining a corresponding image which is in interest, wherein the pixel value of the textile area which is in interest is unchanged; and graying the interested image to obtain a target image. Referring to fig. 2, fig. 2 is a schematic diagram of a target image corresponding to a surface image of a textile fabric with defects, and it can be observed that a defect is located at the lower left of fig. 2, but the defect is not directly and accurately determined to be a spot defect or an oil stain due to low gray value of the whole area, uneven illumination and insufficient definition, so that a quantization index is further needed to be obtained according to the characteristics of the defect represented in the image to assist in detecting the defect.
Thus, the process of collecting the surface image of the textile and preprocessing is completed.
Step S200, threshold segmentation is carried out on a defect area in the target image; classifying the defect areas based on the distance between the defect areas to obtain at least two area clusters; taking the number of defective areas in each area cluster as a first characteristic value; calculating a second characteristic value according to the distance between the centroids of the defect areas in each area cluster; acquiring a minimum circumscribed rectangle corresponding to the region cluster, and calculating a third characteristic value according to the area ratio of the defect region in the minimum circumscribed rectangle; the product of the first characteristic value, the second characteristic value and the third characteristic value is the dispersion of the defect area in each area cluster.
The threshold segmentation can be used for initially positioning the region where the defect is located, the defect type is judged by virtue of extracting the image characteristics of the region, the oil stain defect is represented as a compact region in consideration of the strong permeability of oil, and gaps exist in the hair spot defect, so that the dispersion is calculated according to the relation of connected domains in the defect region. Further, corrosion can increase bright areas through multiple morphological operations: the dispersion degree of the hair spots is larger and larger, and the variation is also large; the dispersion of the oil stain is always at a low level and the change is not great. Therefore, the defect can be obtained by combining the dispersion and the change of the dispersion, and the defect is calculated as the credibility of the defect.
Since the defective area is composed of pixels with lower gray values, threshold segmentation separates the defective foreground from the background. And extracting the connected domain characteristics in the defect area, and establishing a dispersion index. Firstly, performing threshold segmentation on a target image to obtain a defect region and calculating the dispersion of the defect region, and specifically:
and performing threshold segmentation on the target image, wherein the threshold segmentation is used for obtaining a defect region in the target image, the obtained defect region is black, and the non-defect region is white. Classifying the defect areas based on the distance between the defect areas to obtain at least two area clusters, respectively calculating the maximum values of the horizontal coordinate and the vertical coordinate of the black pixels in the horizontal direction and the vertical direction to obtain the minimum circumscribed rectangle R corresponding to the defect areas in each area cluster, namely the minimum circumscribed rectangle contains the defect areas in the defect clusters, and the area of the minimum circumscribed rectangle is recorded as. For convenience of the following discussion, the binary image obtained by threshold segmentation is inverted to change the black defect area into a highlight part and the white non-defect area into a black background part. When the defect is a rough spot, a plurality of highlight areas exist in the defect area, and in order to more finely discuss the defect area, the invention selects the four-adjacent relation to form a connected domain, namely selects the four-adjacent relation to form the defect area. The four-neighbor relation is that, for the pixel point a, the pixel points in the four directions of up, down, left and right of the pixel point a are the pixel points in the four-neighbor relation with the pixel point a. The defective area is a set of pixels consisting of adjacent pixels having the same pixel value, so that by these two conditions a defective area is found in the image, for each defective area foundDomain->Unique identification is assigned to complete the distinction.
For the smallest circumscribed rectangleIs->Obtaining the mass center of the defect area of each defect areaAnd defective area->Various influencing factors of the defect area scattering condition in a minimum circumscribed rectangular area are comprehensively considered. First, since the number of defective areas of the hairline spots is large and the number of defective areas of the oil stain is small, the total number of defective areas is +.>As a first feature, i.e. the number of defective areas is a first feature value.
Further, a second characteristic value is calculated according to the distance between centroids of the defect areas, namely the distance between the centroids of the defect areas is calculatedAs a second feature.
The calculation formula of the second characteristic value is as follows:
wherein,is the second characteristic value; />Is in regional clusterThe number of defective areas; />The abscissa of the centroid of the defect area of the first defect area in the area cluster; />A ordinate of a defect region centroid of a first defect region in the region cluster;the abscissa of the centroid of the defect area of the ith defect area in the area cluster; />Is the ordinate of the centroid of the defect region of the ith defect region in the region cluster.
In the minimum bounding rectangle R, for each defective area centroidIt is necessary to calculate it and +.>Barycenter->Sum of the inter-distance. Integrating all defect area centroids to obtainA distance. However, for each pair of centroids for which a distance needs to be calculated, the distance between the two is calculated twice, and the distance between the centroids needs to be multiplied by 1/2. The larger the second eigenvalue, the more discrete the centroid distribution representing these defect areas.
At least circumscribe rectangleIn (a), by inversion, there are a defective pixel of white and a non-defective pixel of black. If the defect is a hair spot, the more discrete the connected domains are distributed, more black gaps and white defects appear in the middleThe duty ratio of the trap pixels is smaller, and the duty ratio of the black non-defective pixels is larger; the oil stain defects are often densely distributed and approximate to a circle, so that the area ratio of the black area in the circumscribed rectangle is smaller than that of the oil stain defects. Therefore, the third feature is the area ratio of non-defective pixels in the defective rectangle +.>. Specific: and acquiring a minimum circumscribed rectangle corresponding to the defect area in the area cluster, and calculating a third characteristic value according to the area occupation ratio of the defect area in the minimum circumscribed rectangle.
The calculation formula of the third characteristic value is as follows:
wherein,is a third characteristic value; />The area of the ith defective area in the area cluster; />The number of defective areas in the area cluster; />The area of the smallest circumscribed rectangle corresponding to the region cluster.
At an area ofIs +.>Wherein, the pixel points in the defect area are taken as defect pixel points, and the area of each white defect area after inversion is obtained>Calculating defective pixel pointsThe duty cycle, the duty cycle of the normal pixel can be obtained. />The larger the non-defective area in the bounding rectangle, the more. That is, the area ratio of the region other than the defective region in the minimum bounding rectangle is taken as the third characteristic value.
Further, the first characteristic value, the second characteristic value and the third characteristic value are combined to calculate the dispersion of the region cluster, and the fact that the three characteristic values cannot be directly summed due to large difference of the value range is considered, so that the dispersion of the region cluster is obtained by combining the three characteristics in the form of product. That is, the product of the first, second and third eigenvalues is the dispersion of the defect area.
The dispersion calculation formula:
wherein,a dispersion for the region cluster; />Is a first characteristic value; />Is a second characteristic value; />Is the third characteristic value.
When the minimum circumscribed rectangleMeanwhile, when three conditions of large number of defective areas, large mass center distance and large non-defective pixel ratio are satisfied, the discreteness of defective areas in the area cluster is stronger. Considering the influence of the distance between centroids on the value of the dispersion, when there is only one defectIn the case of a zone->The value is 1. Dispersion->The larger the representative defect region distribution is, the more dispersed.
Step S300, performing corrosion operation on the defect areas in the area clusters, and calculating the mottle property by combining the value of the dispersion and the change condition in the corrosion operation process; calculating a confidence level based on the plaque nature; judging whether the defective area in the area cluster is a plaque defect area according to the credibility.
And performing corrosion operation on the defect area obtained by threshold segmentation for a plurality of times, and calculating the mottle property by using the dispersion and the dispersion change in the operation process. And performing at least secondary corrosion operation on the defect region in the region cluster, namely performing at least secondary corrosion operation on the binary image obtained by threshold segmentation, wherein the number of iterations is increased. At least circumscribe rectangleIf the defect is a rough spot, a narrow channel between the connected domains is broken, the number of the defect areas is increased, the distance between the centroids is increased, and the area ratio of the non-defect areas is increased; if the defect is oil stain, the number of defective areas and the centroid distance remain stable, but the area ratio of the defective areas becomes large. Whether the defect is a hairstain or an oil stain, the dispersion index tends to become large. It is therefore not sufficient to only discuss whether the dispersion increases in judging the defect type. The difference between the two is mainly represented by the amplitude of the variation of the dispersion, the dispersion sequence of the whole process needs to be obtained, and the credibility of the hair spots is calculated by combining the value and the variation condition of each time. Performing corrosion operation on the defect area, and calculating the mottle property by combining the value and the change condition of the dispersion in the corrosion operation process, wherein the method comprises the following steps of:
setting upIs obtained by dividing threshold valuesThe image is corroded for many times, so that the highlighted defect areas in the image can shrink inwards, channels among the defect areas can be broken, and the number of the defect areas is increased. Until the number of defective areas in the image starts to decrease, it is considered that the information lost due to corrosion is excessive at this time, the iteration is stopped, and the cut-off number is +.>. Except for the last time, p->The image after the corrosion operation is the minimum external rectangle obtained at firstIn the method, parameters of the defect area are updated, wherein the parameters comprise the number, mass center coordinates and area of the defect area in the area cluster, and a corresponding first characteristic value sequence +.>Second characteristic value sequence->And a third characteristic value sequence->Wherein the index with subscript 0 is the initial first, second and third eigenvalues in the non-corroding image, further calculating the dispersion sequence +.>. In the embodiment of the invention +.>The value of (2) is 3, and the small-size core can be corroded more slowly, so that the iteration cut-off number is +.>Larger, more complete data is provided for the sequence, and in other embodiments the practitioner may adjust the value as the case may be. I.e. opposite regionPerforming at least two corrosion operations on the defect area in the domain cluster, and calculating the dispersion of the defect area in the domain cluster after each corrosion operation; and forming a dispersion sequence by using the dispersion corresponding to at least two corrosion operations.
The morphology of the defects varies, and the number of times the corrosion is required varies using cores of the same size. The mean and variance of the dispersion describe the mean and fluctuation of the index, respectively, for a minimum bounding rectangle throughout the corrosion process. If the defect is oil stain, the initial discreteness is small, the oil stain is integrally and inwards reduced along with the increase of the corrosion iteration times, the area occupation ratio of the non-defect area is only increased, and the discreteness is increased slightly. If the defect is a rough spot, the initial dispersion is large, and the number of corrosion iterations increases: firstly, the reversed defect area is gradually corroded, and the number of defect areas is increased due to the fact that narrow channels in the large defect area are disconnected; secondly, the centroid quantity becomes larger, and the centroid distance of each defect area becomes larger; third, the black gaps between the defective areas become large, and the area ratio of the non-defective areas is increased; the values of the three characteristic values are increased, and the discreteness is greatly increased, so that the value and the change condition of the discrete degree can be comprehensively taken to obtain the mottled property.
The calculation formula of the mottle property is as follows:
wherein,is said plaque nature; />Is a dispersion sequence; />Is the number of divergences within the sequence of divergences.
For a dispersion sequenceCalculation formula of hairinessThe first factor in (a) is +.in the dispersion sequence>The mean of the individual dispersions, the second factor is the variance of the dispersions. The hairiness is required to meet the requirements of large dispersion and large increase amplitude of the dispersion along with the increase of corrosion times, and the hairiness is obtained by summing two factors. Sex of hair spots->The larger the minimum circumscribed rectangular area, the more intense the plaque feature.
So far, the corrosion operation is carried out on the segmented and inverted results for a plurality of times, and the process of obtaining the mottled property by the dispersion and the change of the dispersion is completed.
Further, the degree of confidence is calculated based on the mottled nature. After the mean value and the variance of the comprehensive dispersion are used for obtaining the characteristic strength of the hairspot, the characteristic strength of the hairspot reflected by the defect is measured. The stronger the mottle, the greater the probability that the defect is a mottle; the weaker the mottle, the less probable the defect is a mottle. Conversion of the value of the mottle property to [0,1 ]]The credibility degree of the defect of the burr is obtained more intuitively. Specific: an exponential function with a natural constant as a base and the inverse of the negative plaque property as an index is used as the degree of confidence.
The calculation formula of the credibility is as follows:
wherein,is the degree of confidence; />Is a natural constant; />Is hair spotting.
The defect has the property of hairiness, the larger the hairiness is, the smaller the reciprocal is, and the credibility is +.>The closer to 1, the more likely the defect to be detected is a hairstain; the smaller the hairiness, the larger the reciprocal, the confidence level ++after the function transformation>The closer to 0, the less likely the defect to be detected is a hairline spot.
The process of obtaining the reliability degree of the hair spots from the hair spot property is completed.
And marking the defect area, and determining whether the defect area is a hairspot or an oil stain according to the credibility. And judging whether the defect area is a plaque defect area according to the credibility. Specific: when the credibility is larger than a preset first threshold value, the defect area in the area cluster is a hair spot defect area; and when the credibility is smaller than or equal to a preset first threshold value, the defective area in the area cluster is an oil stain defective area. It should be noted that the preset value of the first threshold is set by the practitioner according to the actual situation.
And determining a defect circumscribed rectangle based on threshold segmentation, and judging whether the defect is a hair spot defect and an oil stain defect according to the credibility of the hair spot. Different treatments are subsequently performed for different defect types.
In summary, the present invention relates to the technical field of data processing, and the method acquires a textile surface image, and pretreats the textile surface image to obtain a target image; a threshold value is used for dividing a defect area in the target image; classifying the defect areas based on the distance between the defect areas to obtain at least two area clusters; taking the number of defective areas in each area cluster as a first characteristic value; calculating a second characteristic value according to the distance between the centroids of the defect areas in each area cluster; acquiring a minimum circumscribed rectangle corresponding to the region cluster, and calculating a third characteristic value according to the area ratio of the defect region in the minimum circumscribed rectangle; the product of the first characteristic value, the second characteristic value and the third characteristic value is the dispersion of the defect area in each area cluster; performing corrosion operation on the defect areas in the area clusters, and calculating the mottle property by combining the value of the dispersion and the change condition in the corrosion operation process; calculating a confidence level based on the plaque nature; judging whether the defective area in the area cluster is a plaque defect area according to the credibility. In order to avoid the influence of oil stains during detection of the defect of the hair spots of the textile, the invention calculates the dispersion of the defect area, performs corrosion operation for a plurality of times, obtains the hair spot property by combining the value and the change of the dispersion, calculates the credibility of the defect as the hair spot, and judges the hair spot defect based on the credibility.
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. The processes depicted in the accompanying drawings 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 identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (5)

1. A method for detecting defects of spots on textiles, the method comprising the steps of:
acquiring a textile fabric surface image, and preprocessing the textile fabric surface image to obtain a target image;
a threshold value is used for dividing a defect area in the target image; classifying the defect areas based on the distance between the defect areas to obtain at least two area clusters; taking the number of defective areas in each area cluster as a first characteristic value; calculating a second characteristic value according to the distance between the centroids of the defect areas in each area cluster; acquiring a minimum circumscribed rectangle corresponding to the region cluster, and calculating a third characteristic value according to the area ratio of the defect region in the minimum circumscribed rectangle; the product of the first characteristic value, the second characteristic value and the third characteristic value is the dispersion of the defect area in each area cluster;
performing corrosion operation on the defect areas in the area clusters, and calculating the mottle property by combining the value of the dispersion and the change condition in the corrosion operation process; calculating a confidence level based on the plaque nature; judging whether the defect area in the area cluster is a plaque defect area according to the credibility;
the method for calculating the mottle property by carrying out corrosion operation on the defect region in the region cluster and combining the value and the change condition of the dispersion in the corrosion operation process comprises the following steps:
performing at least two corrosion operations on the defect areas in the area cluster, and calculating the dispersion of the defect areas in the area cluster after each corrosion operation; forming a dispersion sequence by using the dispersion corresponding to at least two corrosion operations;
the calculation formula of the mottle property is as follows:
wherein,is said plaque nature; />Is a dispersion sequence; />Is the number of divergences within the sequence of divergences;
wherein calculating the degree of confidence based on the plaque nature comprises:
an exponential function with a natural constant as a base and the inverse of the negative plaque property as an index is used as the degree of confidence.
2. The method for detecting a defect of a hair spot on a textile according to claim 1, wherein the second characteristic value is calculated by a formula:
wherein,is the second characteristic value; />The number of defective areas in the area cluster; />The abscissa of the centroid of the defect area of the first defect area in the area cluster; />A ordinate of a defect region centroid of a first defect region in the region cluster; />The abscissa of the centroid of the defect area of the ith defect area in the area cluster; />Is the ordinate of the centroid of the defect region of the ith defect region in the region cluster.
3. The method for detecting a defect of a hair spot on a textile according to claim 1, wherein the third characteristic value is calculated by the formula:
wherein,is a third characteristic value; />The area of the ith defective area in the area cluster; />The number of defective areas in the area cluster; />The area of the smallest circumscribed rectangle corresponding to the region cluster.
4. The method for detecting a defect of a hair patch on a textile according to claim 1, wherein the determining whether the defective area in the area cluster is a hair patch defective area according to the confidence level comprises:
when the credibility is larger than a preset first threshold value, the defect area in the area cluster is a hair spot defect area; and when the credibility is smaller than or equal to a preset first threshold value, the defective area in the area cluster is an oil stain defective area.
5. The method for detecting a defect of a hair spot on a textile according to claim 1, wherein the preprocessing the surface image of the textile to obtain a target image comprises:
carrying out semantic segmentation on the textile fabric surface image to obtain an interested image containing an interested region; graying the image of interest to obtain a target image.
CN202311421785.5A 2023-10-31 2023-10-31 Method for detecting defect of wool spots of textile Active CN117152148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311421785.5A CN117152148B (en) 2023-10-31 2023-10-31 Method for detecting defect of wool spots of textile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311421785.5A CN117152148B (en) 2023-10-31 2023-10-31 Method for detecting defect of wool spots of textile

Publications (2)

Publication Number Publication Date
CN117152148A CN117152148A (en) 2023-12-01
CN117152148B true CN117152148B (en) 2023-12-29

Family

ID=88912408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311421785.5A Active CN117152148B (en) 2023-10-31 2023-10-31 Method for detecting defect of wool spots of textile

Country Status (1)

Country Link
CN (1) CN117152148B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019104767A1 (en) * 2017-11-28 2019-06-06 河海大学常州校区 Fabric defect detection method based on deep convolutional neural network and visual saliency
CN114757900A (en) * 2022-03-31 2022-07-15 启东新朋莱纺织科技有限公司 Artificial intelligence-based textile defect type identification method
CN115082466A (en) * 2022-08-22 2022-09-20 江苏庆慈机械制造有限公司 PCB surface welding spot defect detection method and system
CN116452873A (en) * 2023-04-13 2023-07-18 华中科技大学 Air hole and low-density inclusion classification method based on multidimensional feature analysis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019104767A1 (en) * 2017-11-28 2019-06-06 河海大学常州校区 Fabric defect detection method based on deep convolutional neural network and visual saliency
CN114757900A (en) * 2022-03-31 2022-07-15 启东新朋莱纺织科技有限公司 Artificial intelligence-based textile defect type identification method
CN115082466A (en) * 2022-08-22 2022-09-20 江苏庆慈机械制造有限公司 PCB surface welding spot defect detection method and system
CN116452873A (en) * 2023-04-13 2023-07-18 华中科技大学 Air hole and low-density inclusion classification method based on multidimensional feature analysis

Also Published As

Publication number Publication date
CN117152148A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN114549522B (en) Textile quality detection method based on target detection
CN113781402B (en) Method and device for detecting scratch defects on chip surface and computer equipment
US10297021B2 (en) Defect quantification method, defect quantification device, and defect evaluation value display device
CN114419025A (en) Fiberboard quality evaluation method based on image processing
CN114842027A (en) Fabric defect segmentation method and system based on gray level co-occurrence matrix
CN115294116B (en) Method, device and system for evaluating dyeing quality of textile material based on artificial intelligence
CN118196068B (en) Textile printing and dyeing quality monitoring system based on artificial intelligence
CN114723705A (en) Cloth flaw detection method based on image processing
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN114332086B (en) Textile defect detection method and system based on style migration and artificial intelligence
CN115861320A (en) Intelligent detection method for automobile part machining information
CN115100214A (en) Textile quality detection method based on image processing
CN115294159A (en) Method for dividing corroded area of metal fastener
CN115311286A (en) Dyeing defect identification method for dyed textiles
CN117152148B (en) Method for detecting defect of wool spots of textile
CN118097305B (en) Method and system for detecting quality of semiconductor light-emitting element
CN118212179A (en) Angle detection method for complex background
CN117237354A (en) Visual detection method for defects of textile clothes
CN117788874A (en) Contour recognition model training method and porosity calculation method
CN114820611A (en) Mechanical part quality evaluation method and system based on artificial intelligence
CN115082449A (en) Electronic component defect detection method
CN117058130B (en) Visual inspection method for coating quality of optical fiber drawing surface
CN110838101A (en) Image segmentation quality evaluation method based on edge characteristics
CN118505689B (en) Method and system for rapidly detecting defects of textile products based on image features
CN118644490B (en) Cloth defect identification method

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