CN115330795B - Cloth burr defect detection method - Google Patents

Cloth burr defect detection method Download PDF

Info

Publication number
CN115330795B
CN115330795B CN202211254987.0A CN202211254987A CN115330795B CN 115330795 B CN115330795 B CN 115330795B CN 202211254987 A CN202211254987 A CN 202211254987A CN 115330795 B CN115330795 B CN 115330795B
Authority
CN
China
Prior art keywords
pixel
noise
gray
point
points
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
CN202211254987.0A
Other languages
Chinese (zh)
Other versions
CN115330795A (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 Xunying Textile Co ltd
Original Assignee
Nantong Xunying 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 Xunying Textile Co ltd filed Critical Nantong Xunying Textile Co ltd
Priority to CN202211254987.0A priority Critical patent/CN115330795B/en
Publication of CN115330795A publication Critical patent/CN115330795A/en
Application granted granted Critical
Publication of CN115330795B publication Critical patent/CN115330795B/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/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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/30Noise filtering
    • 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/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (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)
  • Treatment Of Fiber Materials (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of cloth defect detection, in particular to a cloth burr defect detection method. The method comprises the following steps: obtaining judgment degree; dividing the pixel points into single pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale map into a plurality of different subregions, wherein the background gray scale value of each subregion is different; obtaining a background gray characteristic value of each sub-region; obtaining a judging range based on the background gray characteristic value, and judging the suspected noise point as a multi-pixel noise point or a useful information point based on the number of the pixel points with gray values in sixteen neighborhoods of the suspected noise point in the judging range; respectively obtaining optimized structural elements corresponding to single pixel noise points, multiple pixel noise points and useful information points; processing the gray level image by using different optimized structural elements to obtain a gray level image with noise removed; and obtaining the burr defect of the cloth based on the gray level image with noise removed. The invention can accurately and rapidly detect the burr defects in the cloth.

Description

Cloth burr defect detection method
Technical Field
The invention relates to the technical field of cloth defects, in particular to a cloth burr defect detection method.
Background
In the current generation, with the advent of the mechanized age, the development of textiles is improved, the textiles are indispensable in the aspects of life of people, such as socks, clothes, bedsheets, sofas and the like, and with the gradual improvement of the living standard of people, the quality requirements of people on the textiles are gradually improved, especially the living goods such as clothes, bedsheets and the like, and the quality of cloth is improved to be a top-quality product, so that the quality of the cloth is directly affected. In cloth production, the most part is surface burr defect, which not only affects the aesthetic degree of the finished product, but also affects the comfort of the user to a certain degree.
The image processing is a main method for detecting cloth burrs, but a plurality of noise points exist in the cloth image, so that the detection of the burrs is greatly influenced, and when the image processing is used for denoising, part of tiny burrs are mistakenly removed, so that the accuracy of a detection result is influenced.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a cloth burr defect detection method, which adopts the following technical scheme:
the embodiment of the invention provides a cloth burr defect detection method, which comprises the following steps: acquiring a gray level image of the surface of the cloth, and processing the gray level image by utilizing semantic segmentation to acquire a light color region of the cloth;
obtaining judgment degree based on the variance of the gray value of each pixel in the neighborhood of each pixel in the shallow color area and the difference value between the gray value of each pixel and the gray average value of the neighborhood pixel; dividing the pixel points into single pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale map into a plurality of different subregions, wherein the background gray scale value of each subregion is different; obtaining a background gray characteristic value of each sub-region; obtaining a judging range based on the background gray characteristic value, and judging the suspected noise point as a multi-pixel noise point or a useful information point based on the number of the pixel points with gray values in sixteen neighborhoods of the suspected noise point in the judging range;
respectively obtaining optimized structural elements corresponding to single pixel noise points, multiple pixel noise points and useful information points; processing the gray level image by using different optimized structural elements to obtain a gray level image with noise removed; and obtaining the burr defect of the cloth based on the gray level image with noise removed.
Preferably, the processing the gray map using semantic segmentation to obtain the light-colored region of the cloth includes: constructing a semantic segmentation network; training the data set of the semantic segmentation network as the data sets of all different background gray areas in the gray map; the labels are n types and represent n different background color areas; manually labeling all pixel points of the gray level image; the pixel point values of the different background color areas are marked as different values; the loss function of semantic segmentation is a cross entropy loss function.
Preferably, the judgment degree is:
wherein Sd is the judgment degree of the pixel point,for the gray value of the ith pixel point in the eight adjacent areas of one pixel point, h represents the gray of the pixel pointA value; />And representing the variance of the gray values of the pixels in the eight neighborhoods of the pixels.
Preferably, classifying the pixel points into single-pixel noise points and suspected noise points based on the judgment degree includes: setting a judgment threshold, and when the judgment degree is smaller than the judgment threshold, the pixel point is a single pixel noise point; and when the judgment degree is greater than or equal to the judgment threshold value, the pixel point is a suspected noise point.
Preferably, obtaining the judging range based on the background gray feature value, and judging that the suspected noise point is a multi-pixel noise point or a useful information point based on the number of the pixel points with gray values in sixteen neighborhoods of the suspected noise point within the judging range includes: obtaining a gray level histogram of each sub-region, wherein a gray level value corresponding to the maximum frequency in the gray level histogram is a background gray level characteristic value of the sub-region; background gray feature value of ith sub-regionThe determination range of the ith sub-area is +.>The method comprises the steps of carrying out a first treatment on the surface of the For the ith sub-area, obtaining the number of pixel points with gray values in sixteen neighborhoods of suspected noise points within a judging range>If->Equal to 0,1 or 3, the suspected noise is a multi-pixel noise; if->2, if the two pixels are not on the same straight line, the suspected noise is a multi-pixel noise, and if the two pixels are on the same straight line, the gray value in the pixels which are not on the straight line in eight adjacent areas of the suspected noise is counted to be not equal to the background gray characteristic value>Is a pixel of (1)Number of->If->If the noise is less than or equal to 1, the suspected noise is a linear information point, otherwise, the suspected noise is a multi-pixel noise; if->If the pixel noise is larger than or equal to 4, the multi-pixel noise is a block information point; wherein useful information points include linear information points and block information points.
Preferably, the obtaining the optimized structural elements corresponding to the single pixel noise point, the multi-pixel noise point and the useful information point respectively includes:
the gray value of the structural element center point corresponding to each single pixel noise point is the gray value of the pixel point in eight adjacent domains of each single pixel noise point; the gray value of the structural element center point corresponding to each multi-pixel noise point is the gray value of the pixel point, the gray value of which is nearest to the background gray value, in eight adjacent domains of each single-pixel noise point; the useful information points are divided into linear information points and block information points, wherein the gray value of the central point of the structural element corresponding to the linear information points is the gray value of the pixel point with the largest difference between the gray value in eight adjacent areas of the linear information points and the gray value of the background; the gray value of the structural element center point corresponding to the block information point is the average value of the gray values in eight neighborhoods of the linear information point.
Preferably, obtaining the burr defect of the cloth based on the gray map with the noise removed includes: and carrying out edge detection on the gray level image with noise removed to obtain the burr defect of the cloth.
The embodiment of the invention has at least the following beneficial effects: according to the invention, gray morphology operation is used, the value rule of structural elements in gray morphology is optimized through the difference degree analysis between the noise gray distribution characteristics and the gray distribution characteristics of points in the cloth, and gray morphology operation is performed on the cloth gray image by using the optimized structural elements, so that noise is removed, burr information is not lost, and the accuracy of burr detection is improved.
In the prior art, the noise influence factors in the cloth image are large, so that the analysis and extraction process is complex, and the common denoising method can remove some tiny burrs at the same time, lose useful information and reduce the accuracy of a detection result.
The invention reduces the complexity of cloth burr detection, ensures that burrs are more complete and clear in the image, removes the influence of noise points, brings convenience for research and detection personnel, and ensures that the burr defect detection is more perfect and accurate.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for detecting a cloth burr defect 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 is given below of a cloth burr defect detection method according to the invention, which is specific to the implementation, structure, characteristics and effects thereof, with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the cloth burr defect detection method provided by the invention with reference to the accompanying drawings.
Examples
The main application scene of the invention is as follows: the cloth produced is subject to burrs defects due to the production process or other reasons, and therefore the burrs defects need to be detected.
The method is mainly used for optimizing the value rule of the gray morphology structural element by analyzing the gray distribution characteristics of the points in the cloth in combination with gray morphology, so that noise points are removed and burr information is not lost when gray morphology open operation is carried out, and the accuracy of detecting burr defects is improved.
Referring to fig. 1, a method flowchart of an image processing-based fundus blood vessel feature recognition and extraction method according to an embodiment of the present invention is shown, and the method includes the following steps:
step S1, a gray level map of the surface of the cloth is obtained, and a light color area of the cloth is obtained by processing the gray level map through semantic segmentation.
The method comprises the steps of shooting a piece goods surface picture through an industrial camera, graying the picture through a weighted average method to obtain a gray level picture of the piece goods surface in order to facilitate gray level morphological operation, calculating a gray level distribution histogram of the picture, selecting a rightmost wave peak, defining values of wave troughs at two sides of the wave peak as a maximum value and a minimum value of a light gray level range, extracting a light area of the piece goods picture through semantic segmentation, enabling noise of the light area to be clear and clear, and easily extracting gray level distribution characteristics, and accordingly extracting only the light area for analysis.
The specific content of the DNN network for semantic segmentation is as follows:
the data set used is the data set of all different background gray areas in the gray map; the labels are of n classes (n represents n regions of different background colors), n regions of different background colors. The method is pixel-level classification, and all pixel points of the image are manually marked. The pixel values of the different background color regions are labeled as different values (0, 1,2 … n). The task of the network is classification, so the loss function used by the network is a cross entropy loss function. And extracting a light color zone with a background gray value within a light gray value range.
Step S2, obtaining judgment degree based on the variance of the gray value of each pixel point in the neighborhood of each pixel in the shallow color area and the difference value of the gray value of each pixel point and the gray average value of the neighborhood pixel point; dividing the pixel points into single pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale map into a plurality of different subregions, wherein the background gray scale value of each subregion is different; obtaining a background gray characteristic value of each sub-region; obtaining a judging range based on the background gray characteristic value, and judging the suspected noise point as a multi-pixel noise point or a useful information point based on the number of the pixel points with gray values in the neighborhood of the suspected noise point 16 within the judging range;
in the shallow color area, the expression effect of the noise points is more prominent, the gray level characteristics of the noise points are easy to extract and analyze, the gray level distribution characteristics of different points in the cloth range and the gray level distribution of the extracted noise points have different differences, the pixel points in the burr existence area have larger differences with the gray level characteristics of the noise points, the pixel points are regarded as useful information points, the pixel points need to be reserved, the pixel points with small differences with the gray level distribution characteristics of the noise points in the cloth area are defined as the noise points, the noise points need to be removed, and then according to the difference degree, the value rule of gray morphological structural elements can be changed, different value rules are used for different difference degrees when the operation is performed, the burr information can be reserved while the noise points are removed, and the beneficial effect is brought for detecting the burr defects.
The noise points can be divided into single-pixel noise points and multi-pixel noise points according to the size degree, and if the gray values of the pixel points in the eight neighborhood are consistent and the gray value of the central pixel point is excessively different from the gray value of the pixel points in the eight neighborhood, the points are defined as single-pixel noise points; if the gray values of the pixel points in the eight fields differ from the gray value of the center point, and the number of the pixel points outside the eight fields in the 5×5 neighborhood is smaller than the background gray value, defining the pixel points as multi-pixel noise points or useful information points, and further analyzing is needed to determine whether the pixel points are multi-pixel noise points or useful information points, so that the pixel points are called suspected noise points; the single pixel noise point is represented by a central point gray value which has larger difference with an eight-neighborhood gray value, the gray value difference of each pixel point of the eight-neighborhood is smaller, the single pixel noise point is basically a background pixel gray value, the sizes of the central point gray value and the surrounding gray values of the eight-neighborhood of the single pixel noise point are respectively different, the distribution of pixels which are different from the background gray value and exist outside the eight-neighborhood of the 5 multiplied by 5 neighborhood is smaller, and the feature can be mapped in other areas through the acquired gray value distribution feature of the noise points of the light-color area, so that whether the pixels in the whole area are noise points or not is judged.
The calculation process comprises the following steps: and calculating the difference value of the average values of the central point and the surrounding pixel points and the variance of the gray values of the eight neighborhood pixel points, if the difference value is large and the variance is almost zero, the pixel is considered to be a single pixel noise point, and if the difference value is not large and the variance is large, the pixel is considered to be a multi-pixel noise point or a useful information point, namely a suspected noise point. Calculating the judgment degree of the pixel points:
wherein Sd is the judgment degree of the pixel point,the gray value of the ith pixel point in the eight adjacent areas of one pixel point is represented by h; />And representing the variance of the gray values of the pixels in the eight neighborhoods of the pixels. When->When the pixel point is smaller than the judgment threshold value, the pixel point is a single pixel noise point; when->And when the pixel point is larger than or equal to the judging threshold value, the pixel point is a suspected noise point. The threshold value is preferably judged to be 0.001.
Representing the difference between the gray value of the center point and the mean value of the gray values of eight neighbor pixels, the larger the value is, the more likely the noise isGreater sex, ->The larger the variance is, the larger the probability that the variance is a multi-pixel noise point or a useful information point is, namely the smaller the judgment degree Sd is, the larger the probability that the variance is a single-pixel noise point is, and the value of the judgment threshold can be determined by an implementer according to specific situations.
The gray distribution characteristics of part of points in the cloth are similar to those of the noise points, if the difference degree is small, the points are considered as the noise points, the pixel points need to be removed, and if the difference between the gray distribution characteristics of part of points and the gray distribution characteristics of the noise points is large, the points are considered as useful information points, the points need to be reserved, so that the difference degree between the points and the noise points can be calculated according to the gray distribution characteristics.
Calculating the judgment degree of all the pixel points in the gray level graph of the cloth, if the judgment degree of the pixel points is within the judgment degree range of the single pixel noise points, the pixel points can be considered to be the single pixel noise points, if the pixel points are judged to be the single pixel noise points, the difference degree of the pixel points is not needed, and only the difference degree between the multi-pixel noise points and the useful information points, namely the difference degree between the suspected noise points, is needed to be analyzed.
Calculating the judgment degree of all the pixel points, and marking the pixel points with the judgment degree belonging to the single pixel noise point range asIf the points are not in the range, the points are judged to be suspected noise points, the eight neighborhood gray value distribution characteristics of the suspected noise points are not greatly different and are formed by combining a plurality of pixel points, the judgment degree cannot be used for judging whether the pixel points are multi-pixel noise points or useful information points, and the difference degree between the two can be obtained only by analyzing the gray value distribution characteristics in sixteen neighborhood circles (outside the eight domains in the 5 multiplied by 5 neighborhood).
The distribution characteristics of the multi-pixel noise points are formed by splicing a plurality of pixel points, the pixel points are not too many, the distribution range is smaller, the distribution regularity is not strong, and the distribution characteristics of the pixel points of the useful information points are strongThe number of pixels in the 5×5 neighborhood is more, and the distribution range is larger, so that the gray value of the multi-pixel noise is basically distributed in eight neighborhoods, the number of pixels which are distributed in sixteen neighborhood circles and are different from the gray value of the background is very few, basically none or one to two pixels, and the multi-pixel noise or useful information point can be judged by counting the number of the pixels which are different from the background in sixteen neighborhood circles and whether the pixels are on the same straight line, and the judgment of the multi-pixel noise or useful information point is madeThe useful information points are classified into block information points and linear information points, which are different from noise points in different degrees, and the useful information points are identified as block information points by the distribution of pixels different from background gray values in sixteen neighborhood circles>Or linear information point +.>And further obtaining the degree of difference with the multi-pixel noise point.
Dividing a gray level map of the cloth into n areas with different background gray level values by semantic segmentation, respectively calculating gray level distribution histograms of the areas with different background gray level values, counting gray level values with the largest frequency in the gray level histograms of the n areas with different background gray level values one by one, namely, the highest peak value in the gray level histogram, and marking the gray level value characteristics of the background gray level values of the areas with different background gray level values as followsThe method comprises the steps of carrying out a first treatment on the surface of the Counting the number of pixel points with gray values in sixteen neighborhood circles within a certain range of background gray values of the region>The range can be determined by the practitioner as appropriate, reference values are given here +.>The judgment range is marked, because the fabric is special, the warps, wefts, patterns and the like in the fabric generally show certain linear characteristics, so that whether the fabric is a useful information point can be judged according to the linear relation between pixel points in a 5 multiplied by 5 neighborhood, and the fabric is used when the fabric is woven>When the number is equal to 0,1 and 3, the linear relation does not exist, and the point is considered to be a multi-pixel noise point and is marked as +.>If->When 2 is equal, there is a possibility that a linear relationship exists, and thus it is calculated whether the two pixels are on the same straight line (the straight line is an eight-direction straight line passing through the origin), and it is not marked as a multi-pixel noise point on the straight line->When on a straight line, counting the number of pixels which are different from the background gray value outside the straight line in eight neighborhoods +.>When the value is 1 or less, the point is regarded as a linear information point and is marked as +.>If the value is greater than 1, otherwise, the pixel is considered as multi-pixel noise point, which is marked as +.>The method comprises the steps of carrying out a first treatment on the surface of the When->If the number is greater than or equal to 4, the point is considered as a blockiness information point and is marked as +.>And further, different differences between the multi-pixel noise points and the useful information points are obtained.
The number of pixels in sixteen neighborhood circles different from the background gray value is +.>The number of the pixels which are different from the background gray value outside the connecting straight line of two pixels in sixteen adjacent areas in eight fields is +.>Representing multi-pixel noise->Representing a linear information point +.>Representing blockiness information points.
Counting the number of pixels different from the background gray value in sixteen neighbor circles of the suspected noise pointAnd dividing the pixel points into noise points and information points of multiple pixels according to the number and the difference degree of the characteristics. And (5) completing gray level difference degree analysis of the multi-pixel noise points and the useful information points.
Step S3, respectively obtaining optimized structural elements corresponding to the single-pixel noise points, the multi-pixel noise points and the useful information points; processing the gray level image by using different optimized structural elements to obtain a gray level image with noise removed; and obtaining the burr defect of the cloth based on the gray level image with noise removed.
The single pixel noise point and the multi-pixel noise point are removed, useful information points are left, different value rules are selected for structural elements of gray morphology according to different characteristics of the noise points and the characteristics of the information points, and therefore the information points can be kept without loss while denoising, and further a better denoising effect is achieved.
Here, 3×3 gray morphological structural elements are selected, different weights are given to the value rule of the central point of the structural elements for different noise points and information points, all pixel points in the cloth are traversed, different optimized structural elements are used for positioning different points, and therefore the useful information points can be reserved while the noise points are removed.
The gray value of the structural element center point corresponding to each single pixel noise point is the gray value of the pixel point in the eight neighborhood of each single pixel noise point; the gray value of the structural element center point corresponding to each multi-pixel noise point is the gray value of the pixel point, the gray value of which is nearest to the background gray value, in eight adjacent domains of each single-pixel noise point; the useful information points are divided into linear information points and block information points, wherein the gray value of the central point of the structural element corresponding to the linear information points is the gray value of the pixel point with the largest difference between the gray value in eight adjacent areas of the linear information points and the gray value of the background; the gray value of the structural element center point corresponding to the block information point is the average value of the gray values in eight neighborhoods of the linear information point.
If it isThe central point is taken as the average value of eight neighborhood gray values, the gray values of the central point are consistent with the surrounding gray values, and single pixel noise points are removed, if the central point is +.>The center point is taken as the value of the gray value closest to the background gray value in the eight fields, the gray level of the pixel point where the multi-pixel noise point is located can be changed into the background gray level, so that the multi-pixel noise point is removed, if yes +.>The central point is taken as the gray value with the largest difference with the background gray value in the eight adjacent areas, thus improvingAnd to the maximum extent the information is retained, if +.>The central point value is the average value of eight neighborhood, so that the block information can be well reserved.
The optimized structural elements are used for carrying out gray morphological operation on the cloth, and the pixel points with different characteristics can be used for removing noise points and retaining useful information points at the same time. After the interference of the noise is removed, the gray level image with the noise removed is subjected to edge detection, so that the burr defect can be clearly obtained, the quality evaluation of the burr defect can be carried out, and further, the mechanized equipment of a factory is improved in a targeted manner, and the quality of cloth is improved.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and 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 (3)

1. The cloth burr defect detection method is characterized by comprising the following steps:
acquiring a gray level image of the surface of the cloth, and processing the gray level image by utilizing semantic segmentation to acquire a light color region of the cloth;
obtaining judgment degree based on the variance of the gray value of each pixel in the neighborhood of each pixel in the shallow color area and the difference value between the gray value of each pixel and the gray average value of the neighborhood pixel; dividing the pixel points into single pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale map into a plurality of different subregions, wherein the background gray scale value of each subregion is different; obtaining a background gray characteristic value of each sub-region; obtaining a judging range based on the background gray characteristic value, and judging the suspected noise point as a multi-pixel noise point or a useful information point based on the number of the pixel points with gray values in sixteen neighborhoods of the suspected noise point in the judging range;
respectively obtaining optimized structural elements corresponding to single pixel noise points, multiple pixel noise points and useful information points; processing the gray level image by using different optimized structural elements to obtain a gray level image with noise removed; obtaining burr defects of the cloth based on the gray level image with noise removed;
the obtaining the judging range based on the background gray characteristic value, and judging the suspected noise point as the multi-pixel noise point or the useful information point based on the number of the pixel points with the gray value in the sixteen neighborhood of the suspected noise point in the judging range comprises: obtaining a gray level histogram of each sub-region, wherein a gray level value corresponding to the maximum frequency in the gray level histogram is a background gray level characteristic value of the sub-region; background gray feature value of ith sub-regionThe determination range of the ith sub-area is +.>The method comprises the steps of carrying out a first treatment on the surface of the For the ith sub-area, obtaining the number of pixel points with gray values in sixteen neighborhoods of suspected noise points within a judging range>If->Equal to 0,1 or 3, the suspected noise is a multi-pixel noise; if->2, if the two pixels are not on the same straight line, the suspected noise is a multi-pixel noise, and if the two pixels are on the same straight line, the gray value in the pixels which are not on the straight line in eight adjacent areas of the suspected noise is counted to be not equal to the background gray characteristic value>The number of pixels +.>If->If the noise is less than or equal to 1, the suspected noise is a linear information point, otherwise, the suspected noise is a multi-pixel noise; if->If the pixel noise is larger than or equal to 4, the multi-pixel noise is a block information point; wherein the useful information points include linear information points and block information points;
the obtaining the optimized structural elements corresponding to the single pixel noise point, the multi-pixel noise point and the useful information point respectively comprises the following steps:
the gray value of the structural element center point corresponding to each single pixel noise point is the gray value of the pixel point in eight adjacent domains of each single pixel noise point; the gray value of the structural element center point corresponding to each multi-pixel noise point is the gray value of the pixel point, the gray value of which is nearest to the background gray value, in eight adjacent domains of each single-pixel noise point; the useful information points are divided into linear information points and block information points, wherein the gray value of the central point of the structural element corresponding to the linear information points is the gray value of the pixel point with the largest difference between the gray value in eight adjacent areas of the linear information points and the gray value of the background; the gray value of the structural element center point corresponding to the block information point is the average value of the gray values in the eight neighborhood of the linear information point;
the judgment degree is as follows:
wherein Sd is the judgment degree of the pixel point,the gray value of the ith pixel point in the eight adjacent areas of one pixel point is represented by h; />Representing the variance of gray values of pixel points in the eight neighborhood of the pixel point;
the burr defect obtaining method based on the grey level image of the noise removal point comprises the following steps: and carrying out edge detection on the gray level image with noise removed to obtain the burr defect of the cloth.
2. The cloth burr defect detection method according to claim 1, wherein the processing the gray map using semantic segmentation to obtain the light-colored region of the cloth comprises: constructing a semantic segmentation network; training the data set of the semantic segmentation network as the data sets of all different background gray areas in the gray map; the labels are n types and represent n different background color areas; manually labeling all pixel points of the gray level image; the pixel point values of the different background color areas are marked as different values; the loss function of semantic segmentation is a cross entropy loss function.
3. The cloth burr defect detection method according to claim 1, wherein the classifying the pixel points into single-pixel noise points and suspected noise points based on the judgment degree comprises: setting a judgment threshold, and when the judgment degree is smaller than the judgment threshold, the pixel point is a single pixel noise point; and when the judgment degree is greater than or equal to the judgment threshold value, the pixel point is a suspected noise point.
CN202211254987.0A 2022-10-13 2022-10-13 Cloth burr defect detection method Active CN115330795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211254987.0A CN115330795B (en) 2022-10-13 2022-10-13 Cloth burr defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211254987.0A CN115330795B (en) 2022-10-13 2022-10-13 Cloth burr defect detection method

Publications (2)

Publication Number Publication Date
CN115330795A CN115330795A (en) 2022-11-11
CN115330795B true CN115330795B (en) 2023-12-19

Family

ID=83914220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211254987.0A Active CN115330795B (en) 2022-10-13 2022-10-13 Cloth burr defect detection method

Country Status (1)

Country Link
CN (1) CN115330795B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984271B (en) * 2023-03-20 2023-06-30 山东鑫科来信息技术有限公司 Metal burr identification method based on corner detection
CN116740057B (en) * 2023-08-11 2023-12-01 深圳市鹏基精密工业有限公司 Cylindrical workpiece burr online detection method and system
CN117173187B (en) * 2023-11-03 2024-03-05 南通银河水泵有限公司 Intelligent valve fault detection system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489337A (en) * 2020-04-08 2020-08-04 广东工业大学 Method and system for removing false defects through automatic optical detection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114419025A (en) * 2022-01-27 2022-04-29 江苏泰和木业有限公司 Fiberboard quality evaluation method based on image processing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489337A (en) * 2020-04-08 2020-08-04 广东工业大学 Method and system for removing false defects through automatic optical detection

Also Published As

Publication number Publication date
CN115330795A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN115330795B (en) Cloth burr defect detection method
CN114972357B (en) Roller surface defect detection method and system based on image processing
CN109934802B (en) Cloth defect detection method based on Fourier transform and image morphology
CN110334706B (en) Image target identification method and device
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
Plissiti et al. Automated detection of cell nuclei in pap smear images using morphological reconstruction and clustering
CN108319973B (en) Detection method for citrus fruits on tree
Wählby et al. Algorithms for cytoplasm segmentation of fluorescence labelled cells
CN114820627B (en) Textile quality detection method based on optical means
CN108765402B (en) Non-woven fabric defect detection and classification method
CN114926436A (en) Defect detection method for periodic pattern fabric
CN108563979B (en) Method for judging rice blast disease conditions based on aerial farmland images
CN106127735B (en) A kind of facilities vegetable edge clear class blade face scab dividing method and device
CN109472788B (en) Method for detecting flaw on surface of airplane rivet
CN115131348B (en) Method and system for detecting textile surface defects
CN115311310B (en) Method for extracting printed patterns of textiles through graph cutting
CN114820631B (en) Fabric defect detection method capable of resisting texture interference
CN110310291A (en) A kind of rice blast hierarchy system and its method
CN115239718B (en) Plastic product defect detection method and system based on image processing
CN108921857A (en) A kind of video image focus area dividing method towards monitoring scene
CN116777941A (en) Profile contour detection method and system based on machine vision
CN110687122A (en) Method and system for detecting surface cracks of ceramic tile
McFeely et al. Shadow identification for digital imagery using colour and texture cues
CN112381084A (en) Automatic contour recognition method for tomographic image
CN109165650B (en) Automatic detection method for minimum repeated unit of printed fabric image

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