CN115330795A - Cloth burr defect detection method - Google Patents

Cloth burr defect detection method Download PDF

Info

Publication number
CN115330795A
CN115330795A CN202211254987.0A CN202211254987A CN115330795A CN 115330795 A CN115330795 A CN 115330795A CN 202211254987 A CN202211254987 A CN 202211254987A CN 115330795 A CN115330795 A CN 115330795A
Authority
CN
China
Prior art keywords
pixel
point
gray
points
noise
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.)
Granted
Application number
CN202211254987.0A
Other languages
Chinese (zh)
Other versions
CN115330795B (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

Images

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 a judgment degree; dividing the pixel points into single-pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale image into a plurality of different sub-regions, wherein the background gray scale value of each sub-region is different; obtaining a background gray characteristic value of each subregion; obtaining a judgment range based on the background gray characteristic value, and judging whether the suspected noise point is a multi-pixel noise point or a useful information point based on the number of pixel points of the sixteen neighborhoods of the suspected noise point, wherein the gray values of the pixel points are in the judgment range; respectively acquiring optimized structural elements corresponding to the single-pixel noise point, the multi-pixel noise point and the useful information point; processing the gray level image by using different optimized structural elements to obtain a gray level image without noise points; and obtaining the burr defects of the cloth based on the gray level image for removing the noise points. The invention can accurately and rapidly detect the burr defect 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 modern times, with the arrival of the mechanization times, the development of textiles is qualitatively improved, the textiles are square in our lives, namely, the textiles are small in size, namely, socks, clothes, large in size, namely, bed sheets, sofas and the like, and are indispensable, and with the gradual improvement of the living standard of people, the quality requirements of people on the textiles are gradually improved, particularly, articles for daily use such as clothes, bed sheets and the like are better competitive products, so that the quality of cloth directly influences the quality of finished products. In the production of cloth, the most common is the surface burr defect, which affects not only the aesthetic appearance of the finished product, but also the comfort of the user to some extent.
Image processing is a main method for detecting cloth burrs, but a lot of noise points exist in a cloth image, which greatly affects the detection of the burrs, and when the image processing is used for denoising, part of fine burrs can be removed by mistake, so that the accuracy of a detection result is affected.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method for detecting the burr defect of cloth, which adopts the following technical scheme:
one 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 obtain a light color area of the cloth;
obtaining judgment degree based on the variance of the gray value of the pixel point in the neighborhood of each pixel in the light color area and the difference value of the gray value of each pixel point and the average value of the gray values of the pixel points in the neighborhood; dividing the pixel points into single-pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale image into a plurality of different sub-regions, wherein the background gray scale value of each sub-region is different; obtaining a background gray characteristic value of each subregion; obtaining a judgment range based on the background gray characteristic value, and judging whether the suspected noise point is a multi-pixel noise point or a useful information point based on the number of pixel points of which the gray value in sixteen adjacent domains of the suspected noise point is in the judgment range;
respectively acquiring optimized structural elements corresponding to the single-pixel noise point, the multi-pixel noise point and the useful information point; processing the gray level image by using different optimized structural elements to obtain a gray level image without noise points; and obtaining the burr defects of the cloth based on the gray level image for removing the noise points.
Preferably, the obtaining of the light color area of the cloth by processing the gray scale image by semantic segmentation comprises: constructing a semantic segmentation network; training a data set of the semantic segmentation network to be a data set of all different background gray areas in the gray image; the labels are n types and represent n different background color areas; manually marking all pixel points of the gray-scale image; marking pixel point values of different background color areas as different values; the loss function of the semantic segmentation is a cross entropy loss function.
Preferably, the degree of judgment is:
Figure 62365DEST_PATH_IMAGE001
wherein Sd is the degree of judgment of the pixel point,
Figure 755514DEST_PATH_IMAGE002
the gray value of the ith pixel point in the eight neighborhoods of one pixel point is h, and the gray value of the pixel point is expressed;
Figure 551432DEST_PATH_IMAGE003
and expressing the variance of the gray values of the pixels in the eight neighborhoods of the pixel.
Preferably, the dividing the pixel points into the single-pixel noise points and the suspected noise points based on the judgment degree comprises: setting a judgment threshold, and when the judgment degree is smaller than the judgment threshold, setting the pixel point as a single-pixel noise point; and when the judgment degree is greater than or equal to the judgment threshold value, the pixel point is suspected noise point.
Preferably, obtaining a judgment range based on the background gray characteristic value, and judging whether the suspected noise point is a multi-pixel noise point or a useful information point based on the number of pixel points of which the gray value in sixteen neighborhoods of the suspected noise point is in the judgment range includes: obtaining a gray level histogram of each sub-region, wherein the gray level corresponding to the maximum frequency in the gray level histogram is the background gray level characteristic value of the sub-region; background gray characteristic value of ith sub-area
Figure 553892DEST_PATH_IMAGE004
Then the ithThe judgment range of the sub-region is
Figure 435260DEST_PATH_IMAGE005
(ii) a For the ith sub-region, obtaining the number of pixel points with the gray value in the judgment range in sixteen adjacent regions of a suspected noise point, if so, obtaining the number of the pixel points with the gray value in the judgment range in the sixteen adjacent regions of the suspected noise point
Figure 666521DEST_PATH_IMAGE006
If the noise is equal to 0,1 or 3, the suspected noise is multi-pixel noise; if it is
Figure 316945DEST_PATH_IMAGE006
2, and two pixel points are not on a straight line, then the suspected noise point is a multi-pixel noise point, two more pixel points are on a straight line, and statistics is carried out on the gray value of the pixel points which are not on the straight line in eight neighborhoods of the suspected noise point is not equal to the background gray characteristic value
Figure 490307DEST_PATH_IMAGE004
Number of pixels of
Figure 62234DEST_PATH_IMAGE007
If, if
Figure 97186DEST_PATH_IMAGE007
If the noise is less than or equal to 1, the suspected noise point is a linear information point, otherwise, the suspected noise point is a multi-pixel noise point; if it is
Figure 851384DEST_PATH_IMAGE008
If the number of the multi-pixel noise points is more than or equal to 4, the multi-pixel noise points are block information points; wherein the useful information points comprise linear information points and block information points.
Preferably, the obtaining of the optimized structure 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 the eight neighborhoods of each single-pixel noise point; the gray value of the central point of the structural element corresponding to each multi-pixel noise point is the gray value of the pixel point of which the gray value in the eight neighborhoods of each single-pixel noise point is closest to the background gray value; 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 maximum difference between the gray value in eight neighborhoods of the linear information points and the background gray value; the gray value of the central point of the structural element corresponding to the block information point is the average value of the gray values in eight neighborhoods of the linear information point.
Preferably, the obtaining of the cloth burr defect based on the grayscale map for removing the noise point comprises: and carrying out edge detection on the gray level image without the noise point to obtain the burr defect of the cloth.
The embodiment of the invention at least has the following beneficial effects: the method uses the gray-scale morphological operation, optimizes the value-taking rule of the structural elements in the gray-scale morphology through the analysis of the difference between the gray-scale distribution characteristics of the noise points and the gray-scale distribution characteristics of the points in the cloth, and uses the optimized structural elements to perform gray-scale morphological operation on the gray-scale image of the cloth, thereby removing noise, avoiding losing burr information and improving the accuracy of burr detection.
The invention has the advantages that the existing technology detects burrs, the influence factor of noise points in cloth images is large, so that the analysis and extraction process is complex, while the common denoising method can simultaneously remove some fine burrs, lose useful information and reduce the accuracy of detection results.
The method reduces the complexity of detecting the cloth burrs, enables the burrs to be more complete and clear in the image, removes the influence of noise points, brings convenience to research and detection personnel, and enables the burr defects to be more perfect and accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for detecting a cloth burr defect according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention for achieving the predetermined objects, the following detailed description of the method for detecting a cloth burr defect according to the present invention with reference to the accompanying drawings and preferred embodiments shows the following detailed descriptions of the specific implementation, structure, features and effects thereof. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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 specific scheme of the cloth burr defect detection method provided by the invention is specifically described below with reference to the accompanying drawings.
Example (b):
the main application scenarios of the invention are as follows: the detection of the burr defects is required because the produced cloth has burr defects due to the production process or other reasons.
The method mainly aims to optimize the value rule of the gray morphological structure element by analyzing the gray distribution characteristics of the inner points of the cloth in combination with the gray morphology, further remove noise points during the gray morphological open operation without losing burr information, and improve the accuracy of detecting the burr defects.
Referring to fig. 1, a flowchart of a method for identifying and extracting blood vessel features of a fundus based on image processing according to an embodiment of the present invention is shown, where the method includes the following steps:
s1, acquiring a gray-scale image of the surface of the cloth, and processing the gray-scale image by utilizing semantic segmentation to obtain a light color area of the cloth.
The method comprises the steps of obtaining a cloth surface picture through shooting of an industrial camera, carrying out graying on the image through a weighted average value method to obtain a gray level image of the cloth surface in order to facilitate gray level morphological operation, calculating a gray level distribution histogram of the image, selecting a rightmost peak, defining values of troughs on two sides of the peak as a maximum value and a minimum value of a light color gray level range, and further extracting a light color area of the cloth image through semantic segmentation, wherein noise point expression of the light color area is clear and definite, and gray level distribution characteristics are easy to extract, so that only the light color area is extracted for analysis.
The specific contents of the semantically segmented DNN network are as follows:
the data set used is the data set of all the different background gray areas in the gray map; the labels are of n types (n represents n areas with different background colors), and n areas with different background colors. The method is pixel-level classification, and all pixel points of the image are manually marked. The pixel point values of the different background color regions are labeled as different values (0,1,2 … n). The network's task is classification, so the loss function used by the network is a cross entropy loss function. Light color areas with background gray values within the light color gray value range are extracted.
S2, obtaining judgment degree based on the variance of the gray value of the pixel point in the neighborhood of each pixel in the light color area and the difference value of the gray value of each pixel point and the gray value average value of the pixel points in the neighborhood; dividing the pixel points into single-pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale image into a plurality of different sub-regions, wherein the background gray scale value of each sub-region is different; obtaining a background gray characteristic value of each subregion; obtaining a judgment range based on the background gray characteristic value, and judging whether the suspected noise point is a multi-pixel noise point or a useful information point based on the number of pixel points of which the gray value in the neighborhood of the suspected noise point 16 is in the judgment range;
in the light color area, the noise point has a more prominent representing effect, the gray level characteristics of the noise point are easy to extract and analyze, the gray level distribution characteristics of different points in the cloth range have different differences from the extracted gray level distribution of the noise point, the pixel point in the burr existing area has a larger difference from the gray level characteristics of the noise point, the pixel point is considered to be a useful information point, the pixel point is required to be retained, the pixel point which has the same difference from the gray level distribution characteristics of the noise point in the cloth area is defined as the noise point and is required to be removed, and the value rule of the gray level morphological structure element can be changed according to the difference, so that different value rules are used for different differences when the opening operation is carried out, the noise point is removed, and simultaneously the burr information can be retained, thereby bringing beneficial effects for detecting burr defects.
The noise points can be divided into single-pixel noise points and multi-pixel noise points according to the size degree, if the gray values of the pixel points in the eight neighborhoods are consistent and the difference between the gray values of the central pixel point and the pixel points in the eight neighborhoods is overlarge, the noise points are defined as the single-pixel noise points; if the difference between the gray value of the pixel point in the eight domains and the gray value of the central point is different, and the pixel points which are different from the background gray value outside the eight neighborhoods in the 5 multiplied by 5 neighborhood are fewer, defining the points as multi-pixel noise points or useful information points, and because further analysis is needed to determine whether the points are the multi-pixel noise points or the useful information points, the points are called suspected noise points; the single pixel noise point is represented as a center point gray value which has a larger difference with an eight-neighborhood gray value, the gray value difference of each pixel point of the eight neighborhoods is smaller and is basically a background pixel gray value, the multi-pixel noise point or a useful information point is represented as a difference between the gray value of the center point and the gray value of the periphery in the eight neighborhoods, the pixel points which are different from the background gray value and exist outside the eight neighborhoods in the 5 multiplied by 5 neighborhood are less distributed, the characteristic can be mapped in other regions through the obtained gray value distribution characteristic of the noise point in the light color region, and whether the pixel points in the whole region are noise points or not is judged.
And (3) calculating: 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, wherein if the difference value is larger and the variance is almost zero, the pixel is regarded as a single-pixel noise point, and if the difference value is not larger and the variance is larger, the pixel is regarded as a multi-pixel noise point or a useful information point, namely a suspected noise point. Calculating the judgment degree of the pixel points:
Figure 211958DEST_PATH_IMAGE001
wherein Sd is the degree of judgment of the pixel point,
Figure 67919DEST_PATH_IMAGE002
the gray value of the ith pixel point in the eight neighborhoods of one pixel point is h, and the gray value of the pixel point is expressed;
Figure 640982DEST_PATH_IMAGE003
and expressing the variance of the gray values of the pixels in the eight neighborhoods of the pixel. When in use
Figure DEST_PATH_IMAGE010AAAA
When the pixel point is smaller than the judgment threshold value, the pixel point is a single-pixel noise point; when in use
Figure 577583DEST_PATH_IMAGE011
And when the pixel point is larger than or equal to the judgment threshold, the pixel point is suspected noise point. Preferably, the value of the judgment threshold is 0.001.
Figure 843480DEST_PATH_IMAGE012
Representing the difference between the central point gray value and the mean of the eight neighborhood non-pixel gray values, a larger value indicates a higher probability of being a noise point,
Figure 182143DEST_PATH_IMAGE013
the variance of the eight-neighborhood gray-scale values is larger, which indicates that the probability of being a multi-pixel noise point or a useful information point is higher, i.e. the smaller the judgment degree Sd is, the higher the probability of being 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 partial points in the cloth are similar to those of the noise points, if the difference degree is small, the point is considered as the noise point and needs to be removed, and if the gray distribution characteristics of the partial points are different from those of the noise points, the point is considered as a useful information point and needs to be reserved, so that the difference degree between the point and the noise points can be calculated according to the gray distribution characteristics.
And calculating the judgment degrees of all pixel points in the gray-scale image of the cloth, if the judgment degree range of the pixel points is in the judgment degree range of the single-pixel noise point, the pixel points can be regarded as the single-pixel noise point, if the judgment degree range of the pixel points is the single-pixel noise point, the difference degree of the pixel points is not needed, and only the difference degree between the multi-pixel noise point and the useful information point is needed to be analyzed, namely the difference degree between the suspected noise points.
Calculating the judgment degrees of all the pixel points, and recording the pixel points with the judgment degrees belonging to the single-pixel noise point range as
Figure 824477DEST_PATH_IMAGE014
And if the point is not in the range, the point is judged to be a suspected noise point, the gray value distribution characteristics of eight neighborhoods of the suspected noise point are not greatly different and are formed by combining a plurality of pixel points, whether the pixel point is a multi-pixel noise point or a useful information point can not be judged through the judgment degree, and the difference degree between the point and the pixel point can only be obtained by analyzing the gray value distribution characteristics in a sixteen-neighborhood circle (outside the eight neighborhoods in the 5 multiplied by 5 neighborhood) and further calculating.
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 small, the distribution regularity is not strong, the distribution characteristics regularity of the pixel points of the useful information points is strong, the pixel points in 5 multiplied by 5 neighborhoods are more in distribution, and the distribution range is large, so the gray value of the multi-pixel noise points is basically distributed in eight neighborhoods, the pixel points which are distributed in sixteen neighborhoods and are different from the gray value of the background are few, one or two pixel points are basically absent, the number of the pixel points which are different from the background in sixteen neighborhoods is counted, whether the pixel points are on the same straight line or not, the suspected noise points can be judged to be the multi-pixel noise points or the useful information points, and the noise points are judged to be the multi-pixel noise points and marked as the suspected noise points
Figure DEST_PATH_IMAGE016AA
The useful information points are judged to be marked as Um, and the useful information points are divided into block information points and linear information points, the difference degree of the block information points and the linear information points with noise points is different, and the block information points can be identified through the distribution situation of the pixel points which are different from the background gray value in the sixteen-neighborhood circle
Figure 897475DEST_PATH_IMAGE017
Or linear information points
Figure 583541DEST_PATH_IMAGE018
And then the difference degree with the multi-pixel noise point is obtained.
Dividing a gray scale image of the cloth into n areas with different background gray scale values by using semantic segmentation, respectively calculating gray scale distribution histograms of the areas with the different background gray scale values, counting the gray scale value with the maximum frequency number in the gray scale histograms of the n areas with the different background gray scale values one by one, namely, the highest peak value in the gray scale histograms, representing the background gray scale value characteristics of the areas with the different background gray scale values, and recording the characteristics as the background gray scale value characteristics
Figure 148514DEST_PATH_IMAGE019
(ii) a Counting the number of pixel points with gray values in sixteen adjacent domains in a certain range of the background gray values of the domains
Figure 63380DEST_PATH_IMAGE006
The range may be determined by the practitioner as appropriate, and reference values are given here
Figure 662989DEST_PATH_IMAGE020
And the judgment range is recorded, because of the particularity of cloth weaving, the longitude and latitude lines, the patterns and the like in general cloth have certain linear characteristics, whether the information points are useful information points can be judged according to the linear relation between the pixel points in the 5 multiplied by 5 neighborhood, and therefore, when the information points are used, the judgment of the information points is realized
Figure 519956DEST_PATH_IMAGE006
If the linear relation does not exist when the values are equal to 0,1 and 3, the point is considered as a multi-pixel noise point and is recorded as
Figure 572225DEST_PATH_IMAGE021
If at all
Figure 276056DEST_PATH_IMAGE006
When the number is equal to 2, there is a possibility that a linear relationship exists, and thus it is calculated whether the two pixels are on the same straight line (straight line)Eight-directional straight line passing through the origin), and not on a straight line, as multi-pixel noise
Figure 54656DEST_PATH_IMAGE021
When the image is on a straight line, counting the number of pixel points which are different from the background gray value outside the straight line in eight fields
Figure 843489DEST_PATH_IMAGE007
When the value is less than or equal to 1, the point is considered as a linear information point and is recorded as
Figure 365738DEST_PATH_IMAGE018
If the value is greater than 1, otherwise, it is considered as a multi-pixel noise, and it is recorded as
Figure 408780DEST_PATH_IMAGE021
(ii) a When in use
Figure 358281DEST_PATH_IMAGE006
If the number of the points is more than or equal to 4, the point is considered as a blocky information point and is recorded as a blocky information point
Figure 634411DEST_PATH_IMAGE017
And then different differences between the multi-pixel noise point and the useful information point are obtained.
Figure 960350DEST_PATH_IMAGE006
The number of the pixel points different from the background gray value in the sixteen adjacent domain circles,
Figure 123478DEST_PATH_IMAGE022
the number of the pixel points which are different from the background gray value outside the straight line connecting two pixel points in sixteen adjacent areas in eight areas,
Figure 696411DEST_PATH_IMAGE021
representing a multi-pixel noise point,
Figure 210569DEST_PATH_IMAGE023
the linear information points are represented by a linear information point,
Figure 74620DEST_PATH_IMAGE017
representing blocky information points.
Counting the number of pixels different from the background gray value in a sixteen-neighborhood circle of suspected noise points
Figure 92254DEST_PATH_IMAGE006
And 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 analyzing the gray difference degree of the multi-pixel noise point and the useful information point.
S3, respectively acquiring optimized structural elements corresponding to the single-pixel noise point, the multi-pixel noise point and the useful information point; processing the gray level image by using different optimized structural elements to obtain a gray level image without noise points; and obtaining the burr defects of the cloth based on the gray level image for removing the noise points.
The method comprises the steps of removing single-pixel noise points and multi-pixel noise points, leaving useful information points, selecting different value rules for structural elements of gray morphology according to different characteristics of the noise points and characteristics of the information points, so that the information points can be kept without missing while denoising, and further a good denoising effect is achieved.
The 3 x 3 gray morphological structural elements are selected, different weights are given to the value rules of the central points 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 points in the eight neighborhoods of each single-pixel noise point; the gray value of the structural element central point corresponding to each multi-pixel noise point is the gray value of the pixel point of which the gray value in the eight-neighborhood of each single-pixel noise point is closest to the background gray value; 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 maximum difference between the gray value in the eight neighborhoods of the linear information points and the background gray value; the gray value of the central point of the structural element corresponding to the block information point is the average value of the gray values in the eight neighborhoods of the linear information point.
If is
Figure 898405DEST_PATH_IMAGE014
Taking the central point as the average value of the gray values of eight neighborhoods, the gray value of the central point is consistent with the gray value of the periphery, and further removing the noise point of the single pixel, if the gray value is the average value of the gray values of eight neighborhoods
Figure 634280DEST_PATH_IMAGE021
If the central point is the value with the gray value in the eight fields closest to the background gray value, the gray values of the pixel points where the multi-pixel noise points are located can be changed into the background gray value, and then the multi-pixel noise points are removed, if the multi-pixel noise points are the background gray value
Figure 302022DEST_PATH_IMAGE018
The central point is set as the gray value with the maximum difference from the background gray value in eight adjacent areas, so that the gray value is increased
Figure 174163DEST_PATH_IMAGE018
And the information is retained to the maximum extent if
Figure 151215DEST_PATH_IMAGE017
And the central point is taken as an eight-neighborhood average value, 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 different optimized structural elements are used for pixel points with different characteristics, so that the useful information points can be reserved while noise points can be removed. After the interference of the noise point is removed, the edge detection is carried out on the gray scale image with the noise point removed, so that the burr defect can be clearly obtained, the quality evaluation can be carried out on the burr defect, further, the mechanical equipment of a factory is pertinently improved, and the quality of cloth is improved.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. 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 may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. A 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 obtain a light color area of the cloth;
obtaining judgment degree based on the variance of the gray value of the pixel point in the neighborhood of each pixel in the light color area and the difference value of the gray value of each pixel point and the average value of the gray values of the pixel points in the neighborhood; dividing the pixel points into single-pixel noise points and suspected noise points based on the judgment degree; dividing the gray scale image into a plurality of different sub-regions, wherein the background gray scale value of each sub-region is different; obtaining a background gray characteristic value of each subregion; obtaining a judgment range based on the background gray characteristic value, and judging whether the suspected noise point is a multi-pixel noise point or a useful information point based on the number of pixel points of the sixteen neighborhoods of the suspected noise point, wherein the gray values of the pixel points are in the judgment range;
respectively acquiring optimized structural elements corresponding to the single-pixel noise point, the multi-pixel noise point and the useful information point; processing the gray level image by using different optimized structural elements to obtain a gray level image without noise points; and obtaining the burr defects of the cloth based on the gray level image for removing the noise points.
2. The cloth burr defect detection method of claim 1, wherein the obtaining of the light color area of the cloth by processing the gray scale map through semantic segmentation comprises: constructing a semantic segmentation network; training a data set of the semantic segmentation network to be a data set of all different background gray areas in the gray image; the labels are n types and represent n different background color areas; manually labeling all pixel points of the gray-scale image; marking pixel point values of different background color areas as different values; the loss function of the semantic segmentation is a cross entropy loss function.
3. The method as claimed in claim 1, wherein the degree of judgment is:
Figure 988587DEST_PATH_IMAGE002
wherein Sd is the judgment degree of the pixel point,
Figure DEST_PATH_IMAGE003
the gray value of the ith pixel point in the eight neighborhoods of one pixel point is h, and the gray value of the pixel point is expressed;
Figure 350167DEST_PATH_IMAGE004
and expressing the variance of the gray values of the pixels in the eight neighborhoods of the pixel.
4. The method of claim 1, wherein the classifying pixel points into single-pixel noise points and suspected noise points based on the degree of certainty comprises: setting a judgment threshold, and when the judgment degree is smaller than the judgment threshold, setting the pixel point as a single-pixel noise point; and when the judgment degree is greater than or equal to the judgment threshold value, the pixel point is suspected noise point.
5. The method as claimed in claim 1, wherein the determination range is obtained based on the background gray feature value, and the suspected noise is determined based on the number of pixels in the determination range having gray values in sixteen neighborhoods of the suspected noiseThe point is a multi-pixel noise point or a useful information point, and comprises the following steps: obtaining a gray level histogram of each sub-region, wherein the gray level corresponding to the maximum frequency in the gray level histogram is the background gray level characteristic value of the sub-region; background gray characteristic value of ith subregion
Figure DEST_PATH_IMAGE005
If the judgment range of the ith sub-region is
Figure 888596DEST_PATH_IMAGE006
(ii) a For the ith sub-region, the number of pixel points of which the gray value is in the judgment range in sixteen adjacent regions of a suspected noise point is obtained
Figure DEST_PATH_IMAGE007
If, if
Figure 804468DEST_PATH_IMAGE007
If the noise is equal to 0,1 or 3, the suspected noise is multi-pixel noise; if it is
Figure 617704DEST_PATH_IMAGE007
2, and two pixel points are not on a straight line, then the suspected noise point is a multi-pixel noise point, two more pixel points are on a straight line, and statistics is carried out on the gray value of the pixel points which are not on the straight line in eight neighborhoods of the suspected noise point is not equal to the background gray characteristic value
Figure 584523DEST_PATH_IMAGE005
Number of pixels of
Figure 559432DEST_PATH_IMAGE008
If at all
Figure 228180DEST_PATH_IMAGE008
If the noise is less than or equal to 1, the suspected noise point is a linear information point, otherwise, the suspected noise point is a multi-pixel noise point; if it is
Figure 579526DEST_PATH_IMAGE007
If the noise value is more than or equal to 4, the multi-pixel noise point is a block information point; wherein the useful information points comprise linear information points and block information points.
6. The method according to claim 1, wherein the obtaining optimized structural elements corresponding to the single-pixel noise point, the multi-pixel noise point and the useful information point respectively comprises:
the gray value of the structural element center point corresponding to each single-pixel noise point is the gray value of the pixel points in the eight neighborhoods of each single-pixel noise point; the gray value of the central point of the structural element corresponding to each multi-pixel noise point is the gray value of the pixel point of which the gray value in the eight neighborhoods of each single-pixel noise point is closest to the background gray value; 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 maximum difference between the gray value in the eight neighborhoods of the linear information points and the background gray value; the gray value of the central point of the structural element corresponding to the block information point is the average value of the gray values in eight neighborhoods of the linear information point.
7. The method for detecting the cloth burr defect of claim 1, wherein the obtaining the cloth burr defect based on the gray scale map for removing the noise point comprises: and carrying out edge detection on the gray level image without the noise point to obtain the burr defect of the cloth.
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 true CN115330795A (en) 2022-11-11
CN115330795B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984271A (en) * 2023-03-20 2023-04-18 山东鑫科来信息技术有限公司 Metal burr identification method based on angular point detection
CN116740057A (en) * 2023-08-11 2023-09-12 深圳市鹏基精密工业有限公司 Cylindrical workpiece burr online detection method and system
CN117173187A (en) * 2023-11-03 2023-12-05 南通银河水泵有限公司 Intelligent valve fault detection system
CN118014998A (en) * 2024-04-09 2024-05-10 深圳市富安娜艺术家居有限公司 Bed sheet cloth detection method and system based on machine vision
CN118014998B (en) * 2024-04-09 2024-06-11 深圳市富安娜艺术家居有限公司 Bed sheet cloth detection method and system based on machine vision

Citations (2)

* 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
CN114419025A (en) * 2022-01-27 2022-04-29 江苏泰和木业有限公司 Fiberboard quality evaluation method based on image processing

Patent Citations (2)

* 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
CN114419025A (en) * 2022-01-27 2022-04-29 江苏泰和木业有限公司 Fiberboard quality evaluation method based on image processing

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984271A (en) * 2023-03-20 2023-04-18 山东鑫科来信息技术有限公司 Metal burr identification method based on angular point detection
CN116740057A (en) * 2023-08-11 2023-09-12 深圳市鹏基精密工业有限公司 Cylindrical workpiece burr online detection method and system
CN116740057B (en) * 2023-08-11 2023-12-01 深圳市鹏基精密工业有限公司 Cylindrical workpiece burr online detection method and system
CN117173187A (en) * 2023-11-03 2023-12-05 南通银河水泵有限公司 Intelligent valve fault detection system
CN117173187B (en) * 2023-11-03 2024-03-05 南通银河水泵有限公司 Intelligent valve fault detection system
CN118014998A (en) * 2024-04-09 2024-05-10 深圳市富安娜艺术家居有限公司 Bed sheet cloth detection method and system based on machine vision
CN118014998B (en) * 2024-04-09 2024-06-11 深圳市富安娜艺术家居有限公司 Bed sheet cloth detection method and system based on machine vision

Also Published As

Publication number Publication date
CN115330795B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN114937055B (en) Image self-adaptive segmentation method and system based on artificial intelligence
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN109934802B (en) Cloth defect detection method based on Fourier transform and image morphology
CN115330795A (en) Cloth burr defect detection method
CN114820627B (en) Textile quality detection method based on optical means
US8437054B2 (en) Methods and systems for identifying regions of substantially uniform color in a digital image
CN116188462B (en) Noble metal quality detection method and system based on visual identification
CN101599125A (en) The binarization method that the complex background hypograph is handled
JP2007174654A (en) Method for processing scanned data indicating document image
CN114494259A (en) Cloth defect detection method based on artificial intelligence
CN115082451B (en) Stainless steel soup ladle defect detection method based on image processing
CN115496760B (en) Donkey-hide gelatin quality identification method
CN114926436A (en) Defect detection method for periodic pattern fabric
JP2024050880A (en) Character segmentation method, device, and computer-readable storage medium
CN115131348B (en) Method and system for detecting textile surface defects
CN110648330B (en) Defect detection method for camera glass
CN114820625B (en) Automobile top block defect detection method
CN110335233B (en) Highway guardrail plate defect detection system and method based on image processing technology
CN115239718B (en) Plastic product defect detection method and system based on image processing
CN115775250A (en) Golden finger circuit board defect rapid detection system based on digital image analysis
CN115100191A (en) Metal casting defect identification method based on industrial detection
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN115266732B (en) Carbon fiber tow defect detection method based on machine vision
CN115620075A (en) Method, system and equipment for generating data set for leukocyte classification model
KR101929669B1 (en) The method and apparatus for analyzing an image using an entropy

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