CN117911417B - Textile cloth cover defect detection method based on photoelectric detector - Google Patents

Textile cloth cover defect detection method based on photoelectric detector Download PDF

Info

Publication number
CN117911417B
CN117911417B CN202410316502.9A CN202410316502A CN117911417B CN 117911417 B CN117911417 B CN 117911417B CN 202410316502 A CN202410316502 A CN 202410316502A CN 117911417 B CN117911417 B CN 117911417B
Authority
CN
China
Prior art keywords
frequency
frequency sub
segment
matrix
sub
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
CN202410316502.9A
Other languages
Chinese (zh)
Other versions
CN117911417A (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.)
Tianjin Kairui New Materials Technology Co ltd
Original Assignee
Tianjin Kairui New Materials Technology 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 Tianjin Kairui New Materials Technology Co ltd filed Critical Tianjin Kairui New Materials Technology Co ltd
Priority to CN202410316502.9A priority Critical patent/CN117911417B/en
Publication of CN117911417A publication Critical patent/CN117911417A/en
Application granted granted Critical
Publication of CN117911417B publication Critical patent/CN117911417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the technical field of defect detection based on optical technology, in particular to a textile cloth cover defect detection method based on a photoelectric detector. The method comprises the following steps: acquiring a cloth cover matrix, and dividing a high-frequency region of the cloth cover matrix to obtain a high-frequency sub-section; calculating the frequency characteristic noise degree of each high-frequency sub-segment; obtaining a first comprehensive noise index of each high-frequency sub-section according to the frequency characteristic noise degree of each high-frequency sub-section; obtaining a second comprehensive noise index of each high-frequency sub-segment according to the first comprehensive noise index of each high-frequency sub-segment; setting a passband gain value corresponding to each high frequency sub-segment according to a second comprehensive noise index of each high frequency sub-segment; and denoising and detecting the cloth cover matrix according to the passband gain value corresponding to each high-frequency sub-section and the low-frequency section of the cloth cover matrix to obtain a defect area. The invention avoids the interference of speckle noise and ensures the accuracy of cloth cover defect detection.

Description

Textile cloth cover defect detection method based on photoelectric detector
Technical Field
The invention relates to the technical field of defect detection based on optical technology, in particular to a textile cloth cover defect detection method based on a photoelectric detector.
Background
The high-performance textile is widely applied to various fields of national economy, and the polyphenylene sulfide diaphragm for the hydrogen production system by alkaline water electrolysis is one of the high-performance textile. The membrane is used for processing polyphenylene sulfide fibers into cloth shapes by using a textile technology and is used between the cathode and the anode of an electrolytic cell to separate hydrogen and oxygen generated by the cathode and the anode, so the membrane must have certain density to ensure the purity of the hydrogen and the oxygen. In the spinning process, cloth surface defects such as broken warps, yarn skipping, heavy wefts and the like are easily caused due to the problems of yarn quality, weaving process and the like, so that the density of the diaphragm is affected, and the performance of the diaphragm is further reduced. Therefore, it is important to detect the defects of the diaphragm cloth surface with high efficiency.
The cloth cover defect is often detected by using a photoelectric detector, and when the defect on the cloth cover is detected by using the photoelectric detector, the light projected on the cloth cover can generate speckle noise due to interference and diffraction effect of light, so that larger interference is formed on defect identification, the speckle noise cannot be removed by common Gaussian filtering or average filtering and other methods, and the existing cloth cover defect detection method cannot accurately detect the cloth cover defect; the existing cloth cover defect detection methods include an edge detection method, a threshold segmentation method, a convolutional neural network method and the like, and accurate defect results cannot be obtained due to the fact that speckle noise cannot be removed.
Disclosure of Invention
In order to solve the technical problems, the invention provides a textile cloth cover defect detection method based on a photoelectric detector, which adopts the following technical scheme:
acquiring a cloth cover matrix by utilizing a photoelectric detector;
Obtaining a high-frequency interval and a low-frequency interval according to the cloth cover matrix, and dividing the high-frequency interval to obtain a high-frequency sub-section; according to the amplitude value corresponding to each frequency in each high-frequency sub-section, the frequency in each high-frequency sub-section, and the difference between the amplitude value corresponding to the frequency in each high-frequency sub-section and the amplitude value corresponding to the frequency in other high-frequency sub-sections, obtaining the frequency characteristic noise degree of each high-frequency sub-section;
Obtaining an object region of each high-frequency sub-section according to the corresponding information of each high-frequency sub-section in the cloth cover matrix, and obtaining a first comprehensive noise index of each high-frequency sub-section according to the frequency characteristic noise degree of each high-frequency sub-section and the gradient value of matrix elements in the object region of each high-frequency sub-section; obtaining a second comprehensive noise index of each high-frequency sub-segment according to the first comprehensive noise index of each high-frequency sub-segment and the gradient direction of matrix elements of the object area of each high-frequency sub-segment;
Setting a passband gain value corresponding to each high frequency sub-segment according to a second comprehensive noise index of each high frequency sub-segment; and denoising the cloth cover matrix and performing defect detection processing according to the passband gain value and the low frequency interval corresponding to each high frequency sub-section to obtain a defect region.
Preferably, the method for obtaining the high-frequency section and the low-frequency section according to the cloth cover matrix, and dividing the high-frequency section to obtain the high-frequency sub-section comprises the following specific steps:
Carrying out Fourier transformation on the distribution matrix to obtain a frequency spectrum matrix, obtaining the amplitude of each frequency in the frequency spectrum matrix, obtaining the minimum frequency and the maximum frequency in all frequencies with the amplitude not equal to 0, marking the minimum frequency and the maximum frequency as an upper limit frequency and a lower limit frequency, forming a frequency interval by the upper limit frequency and the lower limit frequency, marking an interval formed by the largest L x B frequency values in the frequency interval as a high frequency interval, and marking intervals except the high frequency interval in the frequency interval as a low frequency interval, wherein L represents the length of the frequency interval, and B represents a preset proportionality coefficient; the amplitude values of all the frequencies form an amplitude value sequence, the amplitude value sequence is fitted with a curve to obtain an amplitude value curve, and the frequency corresponding to the minimum value point on the amplitude value curve is recorded as a segmentation frequency;
the high frequency section is divided into a plurality of sub-sections by the dividing frequency, and is recorded as a high frequency sub-section.
Preferably, the step of obtaining the frequency characteristic noise level of each high-frequency sub-segment according to the difference between the amplitude corresponding to each frequency in each high-frequency sub-segment and the amplitude corresponding to the frequency in other high-frequency sub-segments, includes the specific steps of:
the average value of all frequencies in each high-frequency sub-section is taken as the comprehensive frequency of each high-frequency sub-section; the average value of the corresponding amplitude values of all frequencies of each high-frequency sub-section is recorded as the comprehensive amplitude value of each high-frequency sub-section; obtaining M high-frequency subsections with minimum absolute value of difference value between the obtained M high-frequency subsections and the comprehensive amplitude value of each high-frequency subsection, and recording the M high-frequency subsections as reference subsections of each high-frequency subsection, wherein M represents preset quantity;
the calculation formula of the frequency characteristic noise degree of each high-frequency sub-section is as follows:
wherein, Representing the integrated frequency of the ith high frequency sub-band,/>Representing the combined amplitude of the ith high frequency sub-band,/>Representing the integrated amplitude of the jth reference subsection of the ith high frequency subsection, M representing a preset number,/>Representing an exponential function based on a natural constant,/>Indicating the degree of frequency characteristic noise of the ith high frequency sub-band.
Preferably, the obtaining the object area of each high-frequency sub-segment according to the corresponding information of each high-frequency sub-segment in the cloth matrix includes the specific steps of:
Marking any high-frequency sub-segment as a target sub-segment, only reserving the amplitude values of all frequencies in the target sub-segment in a frequency spectrum matrix, setting the amplitude values of other frequencies to 0 to obtain a zero-setting frequency spectrum matrix of the target sub-segment, and carrying out Fourier transform on the zero-setting frequency spectrum matrix of the target sub-segment to obtain a zero-setting cloth matrix of the target sub-segment; carrying out connected domain analysis on matrix elements with gray values not being 0 in the zero-setting cloth matrix of the target sub-segment to obtain a plurality of connected domains of the target sub-segment;
and acquiring the area at the position of each connected area of each high-frequency sub-segment in the cloth cover matrix, and recording the area as each object area of each high-frequency sub-segment.
Preferably, the step of obtaining the first comprehensive noise indicator of each high-frequency sub-segment according to the gradient value of the matrix element in the object area of each high-frequency sub-segment according to the frequency characteristic noise degree of each high-frequency sub-segment includes the following specific steps:
acquiring a reference area of each object area of each high-frequency sub-section according to the edge matrix element in each object area;
the calculation formula of the first comprehensive noise index of each high-frequency sub-segment is as follows:
wherein, Representing the degree of frequency characteristic noise of the ith high frequency sub-band,/>Summation of gradient values representing all edge matrix elements in the r-th object region of the i-th high frequency sub-segment,/>Summation of gradient values of all edge matrix elements in g reference region representing the r object region of the i-th high frequency sub-segment,/>Representing the preset number,/>Representing the number of object regions of the i-th high frequency sub-segment,/>Representing an exponential function based on a natural constant,/>A first composite noise indicator representing the ith high frequency sub-band.
Preferably, the acquiring the reference area of each object area of each high-frequency sub-segment according to the edge matrix element in each object area includes the following specific steps:
Performing edge detection on the cloth matrix by using a Canny algorithm to obtain edge matrix elements in the cloth matrix, performing analysis processing on the edge matrix elements in the cloth matrix by using a Hough transformation algorithm to obtain all circles in the cloth matrix, and marking the area surrounded by each circle in the cloth matrix as a suspected defect area;
Obtaining V suspected defect areas nearest to each object area of the target sub-section, and marking the V suspected defect areas as reference areas of each object area of the target sub-section; and acquiring a reference area of each object area of each high-frequency sub-section, wherein V represents a preset number.
Preferably, the step of obtaining the second integrated noise indicator of each high-frequency sub-segment according to the gradient direction of the matrix element of the object area of each high-frequency sub-segment includes the specific steps of:
Acquiring peripheral matrix elements and peripheral matrix element combinations of each object region of each high-frequency sub-segment;
the calculation formula of the second comprehensive noise index of each high-frequency sub-segment is as follows:
wherein, Gradient direction included angle of two peripheral matrix elements in the t-th peripheral matrix element combination of the r object region of the i-th high-frequency sub-segment,/>Number of peripheral matrix element combinations representing the r-th object region of the i-th high frequency sub-segment,/>Representing the number of matrix elements having slope values smaller than 180 degrees in peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of matrix elements having a slope value greater than 180 degrees in the peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of object regions of the i-th high frequency sub-segment,/>Representing an exponential function based on a natural constant,/>First composite noise indicator representing the ith high frequency sub-band,/>A second composite noise indicator representing the ith high frequency sub-band.
Preferably, the step of obtaining the peripheral matrix element and the peripheral matrix element combination of each object region of each high-frequency sub-segment includes the following specific steps:
And acquiring an outermost circle of matrix element of each object region of each high-frequency sub-segment, recording the outermost circle of matrix element as a peripheral matrix element of each object region of each high-frequency sub-segment, and combining every two peripheral matrix elements of each object region of each high-frequency sub-segment to obtain a plurality of peripheral matrix element combinations of each object region of each high-frequency sub-segment.
Preferably, the setting the passband gain value corresponding to each high frequency sub-segment according to the second integrated noise indicator of each high frequency sub-segment includes the specific steps of:
wherein, A second integrated noise indicator representing the ith high frequency sub-band,/>Representing an exponential function based on a natural constant,/>Representing a preset initial passband gain value,/>Representing the passband gain value corresponding to the i-th high frequency sub-segment.
Preferably, the denoising process and the defect detection process are performed on the cloth cover matrix according to the passband gain value and the low frequency range corresponding to each high frequency sub-section to obtain a defect area, which comprises the following specific steps:
Taking the passband gain value of each frequency in the high-frequency sub-section as the passband gain value of the high-frequency sub-section, taking the passband gain value of each frequency in the low-frequency section as the preset gain value, filtering the spectrum matrix by using a band elimination filter according to the passband gain value of each frequency to obtain a denoised spectrum matrix, and carrying out Fourier transform on the denoised spectrum matrix to obtain a denoised cloth matrix;
Acquiring a history acquired cloth cover matrix, marking the history cloth cover matrix as a history cloth cover matrix, denoising the history cloth cover matrix to obtain a denoised history cloth cover matrix, labeling defective pixels in the denoised history cloth cover matrix by using a manual operation to obtain a labeled history cloth cover matrix, constructing a defect detection network, training the defect detection network by using all the labeled history cloth cover matrixes to obtain a trained defect detection network, and performing defect detection on the denoised cloth cover matrix by using the trained defect detection network to obtain a defect region.
The invention has the following beneficial effects:
Obtaining a cloth cover matrix, obtaining a plurality of high-frequency subsections according to the cloth cover matrix, calculating the frequency characteristic noise degree of each high-frequency subsection, reflecting the condition that the frequency information of each high-frequency subsection accords with speckle noise through the frequency characteristic noise degree, obtaining a second comprehensive noise index of each high-frequency subsection according to the frequency characteristic noise degree of each high-frequency subsection, reflecting the condition that the frequency information of each high-frequency subsection accords with speckle noise, simultaneously reflecting the condition that the matrix information corresponding to each high-frequency subsection accords with speckle noise, obtaining the passband gain value of each high-frequency subsection according to the second comprehensive noise degree, and carrying out filtering denoising treatment on the cloth cover matrix according to the passband gain value of each high-frequency subsection.
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 defects of a textile fabric surface based on a photodetector according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of a specific implementation, structure, characteristics and effects of a method for detecting defects of a textile fabric surface based on a photo detector according to the invention, which is provided by the invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
An embodiment of a method for detecting defects of a textile fabric surface based on a photoelectric detector comprises the following steps:
The following specifically describes a specific scheme of the textile fabric defect detection method based on the photoelectric detector.
Referring to fig. 1, a flowchart of a method for detecting defects of a textile fabric surface based on a photodetector according to an embodiment of the invention is shown, where the method includes:
S1: and obtaining a cloth cover matrix.
Specifically, the photoelectric detector is used for collecting optical signals reflected by the textile fabric surface, the photoelectric detector converts the optical signals into electric signals, and the signal amplifier is used for amplifying the electric signals to obtain analog signals. The analog signal is converted into a data signal by an analog-to-digital converter. Converting the digital signal into a two-dimensional matrix and normalizing each data in the two-dimensional matrix toAnd (3) after the interval, rounding upwards to obtain a processed two-dimensional matrix, and marking the processed two-dimensional matrix as a cloth cover matrix.
It should be noted that, because interference and diffraction effects of light may cause some speckle noise in the optical signal collected by the photodetector, these speckle noises present some circular-like spots with light-shade variation on the cloth-cover matrix.
S2: and obtaining a plurality of high-frequency subsections according to the cloth cover matrix, and calculating the frequency characteristic noise degree of each high-frequency subsection.
S201, obtaining a plurality of high-frequency subsections according to the cloth cover matrix.
Since speckle noise caused by interference and diffraction effects of light mainly contains high-frequency information, only the high-frequency information can be analyzed in order to reduce the amount of calculation. Thus, the high frequency range needs to be acquired first. In order to remove speckle noise, a frequency band corresponding to the speckle noise needs to be acquired. In order to acquire the frequency band corresponding to the speckle noise, the high-frequency interval is firstly divided into a plurality of subsections, and then the condition that the information in each subsection accords with the speckle noise is analyzed to obtain the subsection corresponding to the speckle noise.
As an example, the method for acquiring the high-frequency subsections includes: and carrying out Fourier transform on the distribution matrix to obtain a frequency spectrum matrix, and obtaining the amplitude value of each frequency in the frequency spectrum matrix, wherein the amplitude values of all the frequencies form an amplitude sequence. And (3) fitting a curve to the amplitude sequence to obtain an amplitude curve, and marking the frequency corresponding to the minimum value point on the amplitude curve as the segmentation frequency. The minimum frequency and the maximum frequency are obtained from all frequencies with amplitude values not equal to 0, and are marked as an upper limit frequency and a lower limit frequency, the upper limit frequency and the lower limit frequency form a frequency interval, an interval formed by the largest L times B frequency values in the frequency interval is marked as a high frequency interval, and an interval except the high frequency interval in the frequency interval is marked as a low frequency interval. Wherein L represents the length of the frequency interval, B represents a preset scaling factor, and the embodiment is described by taking 85% of B as an example, other embodiments may take other values, and the embodiment is not particularly limited. The high frequency interval is divided into a plurality of sub-intervals by the dividing frequency and is marked as a high frequency sub-segment.
S202, calculating the frequency characteristic noise degree of each high-frequency sub-segment.
It should be noted that, since the surface matrix has a large amount of speckle noise due to interference and diffraction effects of light, there is a gradual change in the boundary of the speckle noise, and there is no gradual change in the boundary of the defect. The frequency distribution of defects is thus relatively concentrated, i.e. the frequency of defects may be concentrated in one high frequency sub-section, whereas the frequency of speckle noise may be present in a plurality of high frequency sub-sections. Since the plurality of high-frequency sub-segments corresponding to the speckle noise are all reflected speckle noise information, the amplitude similarity between each high-frequency sub-segment corresponding to the speckle noise is high. Meanwhile, the edge of the speckle noise has a gradual change phenomenon and the boundary of the defect does not have a gradual change phenomenon, so that the frequency of the speckle noise is small compared with that of the defect. Thus, the case where each high-frequency sub-segment is speckle noise information can be analyzed based on the above-described frequency characteristics, and the present embodiment reflects the case where the high-frequency sub-segment is speckle noise information with the degree of frequency characteristic noise.
First, a reference sub-segment of each high-frequency sub-segment and a comprehensive amplitude and a comprehensive frequency of each high-frequency sub-segment are obtained.
As one example, the reference sub-segment of each high frequency sub-segment and the method for obtaining the integrated amplitude and the integrated frequency of each high frequency sub-segment include:
And taking the average value of all frequencies in each high-frequency sub-segment as the comprehensive frequency of each high-frequency sub-segment. And (3) recording the average value of the corresponding amplitude values of all the frequencies of each high-frequency sub-segment as the comprehensive amplitude value of each high-frequency sub-segment. And obtaining M high-frequency subsections with minimum absolute value of difference value between the obtained high-frequency subsections and the integrated amplitude value of each high-frequency subsection, and recording the obtained M high-frequency subsections as reference subsections of each high-frequency subsections. M represents a preset number. In this embodiment, M is taken as 5, and other values may be taken in other embodiments, which is not particularly limited.
And then obtaining the frequency characteristic noise degree of each high-frequency sub-segment according to the reference sub-segment of each high-frequency sub-segment and the comprehensive amplitude and the comprehensive frequency of each high-frequency sub-segment.
As an example, the calculation formula of the frequency characteristic noise level of each high frequency sub-section is:
wherein, Representing the integrated frequency of the ith high-frequency sub-section, the noise level of the high-frequency sub-section is greater when the integrated frequency of the high-frequency sub-section is smaller, namely the frequency characteristic noise level of the high-frequency sub-section is greater, because the edge gradient of speckle noise is greaterRepresenting the comprehensive amplitude of the ith high-frequency sub-section, wherein the quantity of speckle noise is large, and the comprehensive amplitude reflects the information quantity reflected by each high-frequency sub-section, so that when the comprehensive amplitude of the high-frequency sub-section is large, the noise degree of the high-frequency sub-section is large, and the noise degree of the high-frequency sub-section is highRepresenting the integrated amplitude of the jth reference subsection of the ith high frequency subsection. M represents a preset number and also represents the number of reference subsections of each high frequency subsection. Because the amplitudes of a plurality of high-frequency subsections corresponding to speckle noise are high in similarity, the method comprises the following steps ofThe smaller the noise level of the i-th high-frequency sub-section, the greater the noise level of the frequency characteristic of the i-th high-frequency sub-section. /(I)An exponential function based on a natural constant is represented. /(I)Indicating the degree of frequency characteristic noise of the ith high frequency sub-band.
S3: and obtaining a first comprehensive noise index according to the frequency characteristic noise degree of each high-frequency sub-segment, and obtaining a second comprehensive noise index of each high-frequency sub-segment according to the first comprehensive noise index of each high-frequency sub-segment.
S301: and obtaining a first comprehensive noise index according to the frequency characteristic noise degree of each high-frequency sub-segment.
Since the amount of speckle noise caused by interference and diffraction effects of light is large, there is a high possibility that other speckle noise is present around the speckle noise, and the amount of defects is small, so that there is a low possibility that other defects are present around the defects. Meanwhile, the similarity between speckle noise is larger than that between speckle noise and defects. Meanwhile, the boundary of the speckle noise has gradient property, so that the gradient amplitude of the edge matrix element of the speckle noise is smaller.
First, an object region of each high-frequency sub-segment, a reference region of the object region of each high-frequency sub-segment, and edge matrix elements in the object region and reference connected domain of each high-frequency sub-segment are acquired.
As one example, the method of acquiring the object region of each high-frequency sub-segment, the reference region of the object region of each high-frequency sub-segment, and the edge matrix elements in the object region and the reference region of each high-frequency sub-segment, includes: and marking any high-frequency sub-segment as a target sub-segment, only reserving the amplitude values of all frequencies in the target sub-segment in a frequency spectrum matrix, setting the amplitude values of other frequencies to 0 to obtain a zero-setting frequency spectrum matrix of the target sub-segment, and carrying out Fourier transform on the zero-setting frequency spectrum matrix of the target sub-segment to obtain a zero-setting cloth cover matrix of the target sub-segment. And carrying out connected domain analysis on matrix elements with gray values not being 0 in the zero-setting cloth matrix of the target sub-segment to obtain a plurality of connected domains of the target sub-segment.
And acquiring the area at the position of each connected area of each high-frequency sub-segment in the cloth cover matrix, and recording the area as each object area of each high-frequency sub-segment. And carrying out edge detection on the cloth matrix by using a Canny algorithm to obtain edge matrix elements in the cloth matrix, analyzing and processing the edge matrix elements in the cloth matrix by using a Hough transformation algorithm to obtain all circles in the cloth matrix, and marking the area surrounded by each circle in the cloth matrix as a suspected defect area.
And acquiring V suspected defect areas nearest to each object area of the target sub-segment, and marking the V suspected defect areas as reference areas of each object area of the target sub-segment. And similarly, obtaining a reference area of each object area of each high-frequency sub-section. V represents a preset number, in this embodiment, V is taken as an example and is described as 5, and other values may be taken in other embodiments, and this embodiment is not particularly limited.
And then obtaining a first comprehensive noise index of each high-frequency sub-segment according to the frequency characteristic noise degree of each high-frequency sub-segment, the object region of each high-frequency sub-segment, the reference region of the object region of each high-frequency sub-segment and the edge matrix elements in the object region and the reference region of each high-frequency sub-segment.
As an example, the calculation formula of the first integrated noise indicator for each high frequency sub-segment is:
wherein, Representing the degree of frequency characteristic noise of the ith high frequency sub-band,/>The sum of the gradient values of all edge matrix elements in the r-th object region representing the i-th high-frequency sub-segment is smaller in magnitude due to the gradient of the edge matrix elements of the speckle noise at the boundary of the speckle noise, thus/>The smaller the information describing the speckle noise in the ith high frequency sub-segment is, the greater the likelihood that the information describes the information of the speckle noise, and thus the greater the first composite noise indicator of the ith high frequency sub-segment,/>Summation of gradient values of all edge matrix elements in g reference region representing the r object region of the i-th high frequency sub-segment,/>Representing the preset number and also representing the number of reference areas of each object area of each high frequency sub-section,/>Representing the number of object regions of the i-th high frequency sub-section. /(I)An exponential function based on a natural constant is represented. Since the amount of speckle noise is large, there is a high possibility that other speckle noise will exist around the speckle noise, and the amount of defects is small, and there is a low possibility that other defects will exist around the defects. Meanwhile, the similarity between the speckle noise is larger than the similarity between the speckle noise and the defect, so that when the information in the ith high-frequency sub-section is the speckle noise information, the greater the similarity between each object region of the ith high-frequency sub-section and the surrounding suspected defect region, namely the greater the similarity between each object region of the ith high-frequency sub-section and the reference region. Thus/>The larger the information in the i-th high-frequency sub-section is, the less likely it is that the information is speckle noise information, and thus the smaller the first integrated noise indicator of the i-th high-frequency sub-section is. /(I)A first composite noise indicator representing the ith high frequency sub-band.
S302, obtaining a second comprehensive noise index of each high-frequency sub-segment according to the first comprehensive noise index of each high-frequency sub-segment.
It should be noted that, since the defect generally has a burr line, the edge of the defect is irregular. Whereas the edges of speckle noise caused by interference and diffraction effects of light are generally more regular. The matrix information corresponding to each high frequency sub-segment can be analyzed based on the feature to further determine the noise condition of each high frequency sub-segment.
Firstly, acquiring an outermost circle of matrix elements of each object area of each high-frequency sub-section, recording the outermost circle of matrix elements as peripheral matrix elements of each object area of each high-frequency sub-section, and combining every two peripheral matrix elements of each object area of each high-frequency sub-section to obtain a plurality of peripheral matrix element combinations of each object area of each high-frequency sub-section.
And then, according to the combination of a plurality of peripheral matrix elements of each object area of each high-frequency sub-section, obtaining a second comprehensive noise index of each high-frequency sub-section.
As an example, the calculation formula of the second integrated noise indicator for each high frequency sub-segment is:
wherein, Gradient direction included angle of two peripheral matrix elements in the t-th peripheral matrix element combination of the r object region of the i-th high-frequency sub-segment,/>Number of peripheral matrix element combinations representing the r-th object region of the i-th high frequency sub-segment,/>Representing the number of matrix elements having slope values smaller than 180 degrees in peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of matrix elements having a slope value greater than 180 degrees in the peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of object regions of the i-th high frequency sub-section. Since the edges of the speckle noise are regular, the number of matrix elements with slopes smaller than 180 degrees and larger than 180 degrees on the edges of the speckle noise is approximately the same, and when the r-th object region of the i-th high-frequency sub-segment is the speckle noise,/>Will approach 1, thus/>The smaller the information in the ith high-frequency sub-section is, the greater the possibility that the information in the ith high-frequency sub-section is speckle noise information, and therefore the greater the second comprehensive noise index of the ith high-frequency sub-section is; since the edges of the speckle noise are regular, the gradient direction between every two adjacent matrix elements on the edges of the speckle noise changes slowly, thus/>The smaller the information in the i-th high-frequency sub-section, the more likely it is that the information is speckle noise, and thus the larger the second integrated noise indicator of the i-th high-frequency sub-section. /(I)Representing an exponential function based on a natural constant,/>First composite noise indicator representing the ith high frequency sub-band,/>A second composite noise indicator representing the ith high frequency sub-band.
S4: and obtaining a passband gain value corresponding to each high-frequency sub-segment according to the second comprehensive noise index of each high-frequency sub-segment, and carrying out denoising and defect detection processing according to the passband gain value corresponding to each high-frequency sub-segment to obtain a defect region.
S401, obtaining a passband gain value corresponding to each high-frequency sub-segment according to the second comprehensive noise index of each high-frequency sub-segment.
When denoising is performed by using the band reject filter, the band information is retained as the passband gain value of a certain band is set to be larger, and the band information is filtered as the passband gain value of a certain band is set to be smaller. In order to remove speckle noise caused by interference and diffraction effects of light, the passband gain value corresponding to the speckle noise needs to be adjusted to be small.
As an example, the calculation formula of the passband gain value corresponding to each high frequency sub-segment is:
wherein, A second integrated noise indicator representing the ith high frequency sub-band,/>Representing an exponential function based on a natural constant,/>Representing a preset initial passband gain value. /(I)Representing the passband gain value corresponding to the i-th high frequency sub-segment.
In this embodiment, Y is taken as an example of 5, and other embodiments take other values, and the embodiment is not particularly limited.
S402, denoising according to the passband gain value corresponding to each high-frequency sub-segment to obtain a denoised cloth cover matrix.
The passband gain value of each frequency in the high-frequency sub-section is taken as the passband gain value of the high-frequency sub-section, and the passband gain value of each frequency in the low-frequency section is taken as the preset gain value Z. And filtering the spectrum matrix by using a band-stop filter according to the passband gain value of each frequency to obtain a denoised spectrum matrix. And carrying out Fourier transform on the denoised spectrum matrix to obtain a denoised cloth cover matrix. In this embodiment, Z is taken as 2, and other values may be taken in other embodiments, and the present embodiment is not particularly limited.
S403, performing defect detection on the denoised cloth cover matrix to obtain a defect area
The embodiment of the invention provides an implementation method for detecting jumper defects and broken line defects in a denoised cloth cover matrix, which comprises the following steps: and carrying out edge detection on the denoised cloth cover matrix by using a Canny algorithm to obtain edge matrix elements in the denoised cloth cover matrix, wherein the edge matrix elements are in intermittent distribution due to yarn breakage, and the yarn jumper can cause edge intersection, so that an area with edge breakage and intersection is taken as a defect area.
The embodiment of the invention provides an implementation method for detecting damage defects in a denoised cloth cover matrix, which comprises the following steps: and processing the denoised cloth cover matrix by using an Ojin threshold algorithm to obtain a segmentation threshold, and taking a connected domain formed by matrix elements with gray values smaller than or equal to the segmentation threshold in the denoised cloth cover matrix as a defect region.
The embodiment of the invention provides an implementation method for detecting all types of defects in a denoised cloth cover matrix, which comprises the following steps: acquiring a historical collected cloth cover matrix, marking the historical cloth cover matrix as a historical cloth cover matrix, denoising the historical cloth cover matrix according to the method in S1-S4 to obtain a denoised historical cloth cover matrix, labeling defective pixels in the denoised historical cloth cover matrix by using manpower to obtain a labeled historical cloth cover matrix, and constructing a defect detection network.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (4)

1. A method for detecting defects of a textile fabric surface based on a photoelectric detector, which is characterized by comprising the following steps:
acquiring a cloth cover matrix by utilizing a photoelectric detector;
Obtaining a high-frequency interval and a low-frequency interval according to the cloth cover matrix, and dividing the high-frequency interval to obtain a high-frequency sub-section; according to the amplitude value corresponding to each frequency in each high-frequency sub-section, the frequency in each high-frequency sub-section, and the difference between the amplitude value corresponding to the frequency in each high-frequency sub-section and the amplitude value corresponding to the frequency in other high-frequency sub-sections, obtaining the frequency characteristic noise degree of each high-frequency sub-section;
Obtaining an object region of each high-frequency sub-section according to the corresponding information of each high-frequency sub-section in the cloth cover matrix, and obtaining a first comprehensive noise index of each high-frequency sub-section according to the frequency characteristic noise degree of each high-frequency sub-section and the gradient value of matrix elements in the object region of each high-frequency sub-section; obtaining a second comprehensive noise index of each high-frequency sub-segment according to the first comprehensive noise index of each high-frequency sub-segment and the gradient direction of matrix elements of the object area of each high-frequency sub-segment;
Setting a passband gain value corresponding to each high frequency sub-segment according to a second comprehensive noise index of each high frequency sub-segment; denoising the cloth cover matrix and performing defect detection processing according to the passband gain value and the low frequency interval corresponding to each high frequency sub-section to obtain a defect region;
The method comprises the specific steps of:
the average value of all frequencies in each high-frequency sub-section is taken as the comprehensive frequency of each high-frequency sub-section; the average value of the corresponding amplitude values of all frequencies of each high-frequency sub-section is recorded as the comprehensive amplitude value of each high-frequency sub-section; obtaining M high-frequency subsections with minimum absolute value of difference value between the obtained M high-frequency subsections and the comprehensive amplitude value of each high-frequency subsection, and recording the M high-frequency subsections as reference subsections of each high-frequency subsection, wherein M represents preset quantity;
the calculation formula of the frequency characteristic noise degree of each high-frequency sub-section is as follows:
wherein, Representing the integrated frequency of the ith high frequency sub-band,/>Representing the combined amplitude of the ith high frequency sub-band,/>Representing the integrated amplitude of the jth reference subsection of the ith high frequency subsection, M representing a preset number,/>Representing an exponential function based on a natural constant,/>Representing the frequency characteristic noise degree of the ith high-frequency sub-section;
According to the frequency characteristic noise degree of each high-frequency sub-segment, gradient values of matrix elements in an object area of each high-frequency sub-segment obtain a first comprehensive noise index of each high-frequency sub-segment, and the method comprises the following specific steps:
acquiring a reference area of each object area of each high-frequency sub-section according to the edge matrix element in each object area;
the calculation formula of the first comprehensive noise index of each high-frequency sub-segment is as follows:
wherein, Representing the degree of frequency characteristic noise of the ith high frequency sub-band,/>Summation of gradient values representing all edge matrix elements in the r-th object region of the i-th high frequency sub-segment,/>Summation of gradient values of all edge matrix elements in g reference region representing the r object region of the i-th high frequency sub-segment,/>Representing the preset number,/>Representing the number of object regions of the i-th high frequency sub-segment,/>Representing an exponential function based on a natural constant,/>A first composite noise indicator representing an ith high frequency sub-segment;
the method for acquiring the reference area of each object area of each high-frequency sub-section according to the edge matrix element in each object area comprises the following specific steps:
Performing edge detection on the cloth matrix by using a Canny algorithm to obtain edge matrix elements in the cloth matrix, performing analysis processing on the edge matrix elements in the cloth matrix by using a Hough transformation algorithm to obtain all circles in the cloth matrix, and marking the area surrounded by each circle in the cloth matrix as a suspected defect area;
Obtaining V suspected defect areas nearest to each object area of the target sub-section, and marking the V suspected defect areas as reference areas of each object area of the target sub-section; acquiring a reference area of each object area of each high-frequency sub-section, wherein V represents a preset number;
the method for obtaining the second comprehensive noise index of each high-frequency sub-section according to the gradient direction of the matrix element of the object area of each high-frequency sub-section comprises the following specific steps:
acquiring peripheral matrix elements and peripheral matrix element combinations of each object area of each high-frequency sub-section;
the calculation formula of the second comprehensive noise index of each high-frequency sub-segment is as follows:
wherein, Gradient direction included angle of two peripheral matrix elements in the t-th peripheral matrix element combination of the r object region of the i-th high-frequency sub-segment,/>Number of peripheral matrix element combinations representing the r-th object region of the i-th high frequency sub-segment,/>Representing the number of matrix elements having slope values smaller than 180 degrees in peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of matrix elements having a slope value greater than 180 degrees in the peripheral matrix elements of the r-th object region of the i-th high-frequency sub-segment,/>Representing the number of object regions of the i-th high frequency sub-segment,/>Representing an exponential function based on a natural constant,/>First composite noise indicator representing the ith high frequency sub-band,/>A second composite noise indicator representing an ith high frequency sub-segment;
The method for acquiring the peripheral matrix element and the peripheral matrix element combination of each object area of each high-frequency sub-section comprises the following specific steps:
Acquiring an outermost circle of matrix elements of each object region of each high-frequency sub-segment, recording the outermost circle of matrix elements as peripheral matrix elements of each object region of each high-frequency sub-segment, and combining every two peripheral matrix elements of each object region of each high-frequency sub-segment to obtain a plurality of peripheral matrix element combinations of each object region of each high-frequency sub-segment;
the setting of the passband gain value corresponding to each high frequency sub-segment according to the second comprehensive noise index of each high frequency sub-segment comprises the following specific steps:
wherein, A second integrated noise indicator representing the ith high frequency sub-band,/>Representing an exponential function based on a natural constant,/>Representing a preset initial passband gain value,/>Representing the passband gain value corresponding to the i-th high frequency sub-segment.
2. The method for detecting defects of textile cloth cover based on a photoelectric detector as claimed in claim 1, wherein the steps of obtaining a high-frequency section and a low-frequency section according to a cloth cover matrix, and dividing the high-frequency section to obtain high-frequency subsections, comprises the following specific steps:
Carrying out Fourier transformation on the distribution matrix to obtain a frequency spectrum matrix, obtaining the amplitude of each frequency in the frequency spectrum matrix, obtaining the minimum frequency and the maximum frequency in all frequencies with the amplitude not equal to 0, marking the minimum frequency and the maximum frequency as an upper limit frequency and a lower limit frequency, forming a frequency interval by the upper limit frequency and the lower limit frequency, marking an interval formed by the largest L x B frequency values in the frequency interval as a high frequency interval, and marking intervals except the high frequency interval in the frequency interval as a low frequency interval, wherein L represents the length of the frequency interval, and B represents a preset proportionality coefficient; the amplitude values of all the frequencies form an amplitude value sequence, the amplitude value sequence is fitted with a curve to obtain an amplitude value curve, and the frequency corresponding to the minimum value point on the amplitude value curve is recorded as a segmentation frequency;
the high frequency section is divided into a plurality of sub-sections by the dividing frequency, and is recorded as a high frequency sub-section.
3. The method for detecting textile fabric defects based on a photodetector according to claim 1, wherein the obtaining the object area of each high-frequency sub-segment according to the corresponding information of each high-frequency sub-segment in the fabric matrix comprises the following specific steps:
Marking any high-frequency sub-segment as a target sub-segment, only reserving the amplitude values of all frequencies in the target sub-segment in a frequency spectrum matrix, setting the amplitude values of other frequencies to 0 to obtain a zero-setting frequency spectrum matrix of the target sub-segment, and carrying out Fourier transform on the zero-setting frequency spectrum matrix of the target sub-segment to obtain a zero-setting cloth matrix of the target sub-segment; carrying out connected domain analysis on matrix elements with gray values not being 0 in the zero-setting cloth matrix of the target sub-segment to obtain a plurality of connected domains of the target sub-segment;
and acquiring the area at the position of each connected area of each high-frequency sub-segment in the cloth cover matrix, and recording the area as each object area of each high-frequency sub-segment.
4. The method for detecting defects of textile fabric based on a photoelectric detector as claimed in claim 1, wherein the steps of denoising the fabric matrix and detecting defects according to the passband gain value and the low frequency range corresponding to each high frequency sub-segment to obtain a defect area comprise the following specific steps:
Taking the passband gain value of each frequency in the high-frequency sub-section as the passband gain value of the high-frequency sub-section, taking the passband gain value of each frequency in the low-frequency section as the preset gain value, filtering the spectrum matrix by using a band elimination filter according to the passband gain value of each frequency to obtain a denoised spectrum matrix, and carrying out Fourier transform on the denoised spectrum matrix to obtain a denoised cloth matrix;
Acquiring a historical collected cloth cover matrix, marking the collected cloth cover matrix as a historical cloth cover matrix, denoising the historical cloth cover matrix to obtain a denoised historical cloth cover matrix, and performing defect detection on the denoised cloth cover matrix by using a defect detection network to obtain a defect region.
CN202410316502.9A 2024-03-20 2024-03-20 Textile cloth cover defect detection method based on photoelectric detector Active CN117911417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410316502.9A CN117911417B (en) 2024-03-20 2024-03-20 Textile cloth cover defect detection method based on photoelectric detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410316502.9A CN117911417B (en) 2024-03-20 2024-03-20 Textile cloth cover defect detection method based on photoelectric detector

Publications (2)

Publication Number Publication Date
CN117911417A CN117911417A (en) 2024-04-19
CN117911417B true CN117911417B (en) 2024-05-31

Family

ID=90686226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410316502.9A Active CN117911417B (en) 2024-03-20 2024-03-20 Textile cloth cover defect detection method based on photoelectric detector

Country Status (1)

Country Link
CN (1) CN117911417B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804381B2 (en) * 2000-04-18 2004-10-12 The University Of Hong Kong Method of and device for inspecting images to detect defects
CN105203547A (en) * 2015-08-26 2015-12-30 李云栋 Cloth flaw detection method and device based on intelligent visual sensor
CN107870172A (en) * 2017-07-06 2018-04-03 黎明职业大学 A kind of Fabric Defects Inspection detection method based on image procossing
CN112070765A (en) * 2020-09-29 2020-12-11 南通理工学院 Improved OTSU cloth detection method based on bilateral filtering combination
CN113538405A (en) * 2021-07-30 2021-10-22 吉林大学 Nondestructive testing method and system for glass fiber composite material based on image fusion
CN114881952A (en) * 2022-04-24 2022-08-09 江苏宝诺铸造有限公司 Casting defect area detection and edge accurate segmentation method
CN115984131A (en) * 2022-12-20 2023-04-18 无锡声亚医疗科技有限公司 Two-dimensional image edge enhancement method and application
CN116993718A (en) * 2023-09-25 2023-11-03 深圳市东陆科技有限公司 TFT array substrate defect detection method based on machine vision

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804381B2 (en) * 2000-04-18 2004-10-12 The University Of Hong Kong Method of and device for inspecting images to detect defects
CN105203547A (en) * 2015-08-26 2015-12-30 李云栋 Cloth flaw detection method and device based on intelligent visual sensor
CN107870172A (en) * 2017-07-06 2018-04-03 黎明职业大学 A kind of Fabric Defects Inspection detection method based on image procossing
CN112070765A (en) * 2020-09-29 2020-12-11 南通理工学院 Improved OTSU cloth detection method based on bilateral filtering combination
CN113538405A (en) * 2021-07-30 2021-10-22 吉林大学 Nondestructive testing method and system for glass fiber composite material based on image fusion
CN114881952A (en) * 2022-04-24 2022-08-09 江苏宝诺铸造有限公司 Casting defect area detection and edge accurate segmentation method
CN115984131A (en) * 2022-12-20 2023-04-18 无锡声亚医疗科技有限公司 Two-dimensional image edge enhancement method and application
CN116993718A (en) * 2023-09-25 2023-11-03 深圳市东陆科技有限公司 TFT array substrate defect detection method based on machine vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Research on textile-vamp punching based on punching point gradient phase and edge significance;Zhuo Meng et.al;《Textile Research Journal》;20231223;843-858 *
应用对抗网络和霍夫变换的 织物点状缺陷检测研究;刘纪 等;《毛纺科技》;20201231;第48卷(第12期);62-66 *

Also Published As

Publication number Publication date
CN117911417A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN103034838B (en) A kind of special vehicle instrument type identification based on characteristics of image and scaling method
CN116416252B (en) Method for detecting sedimentation image of wastewater in boehmite production process
CN116977329B (en) Photovoltaic grid line detection method based on machine vision
CN116977358B (en) Visual auxiliary detection method for corrugated paper production quality
CN115830022A (en) Filter screen defect detection method based on machine vision
CN114881960A (en) Feature enhancement-based cloth linear defect detection method and system
CN110838117A (en) Rock face porosity identification method based on hole wall image
CN117094916B (en) Visual inspection method for municipal bridge support
CN116718218B (en) Test data processing method for photoelectric integrated sensing chip
CN116452589A (en) Intelligent detection method for surface defects of artificial board based on image processing
CN116805312A (en) Knitted fabric quality detection method based on image processing
CN117911417B (en) Textile cloth cover defect detection method based on photoelectric detector
CN115311507A (en) Building board classification method based on data processing
CN116129102A (en) Water meter identification method and related device based on improved image processing algorithm
CN117541582B (en) IGBT insulation quality detection method for high-frequency converter
CN117689655A (en) Metal button surface defect detection method based on computer vision
CN116385446B (en) Crystal impurity detection method for boehmite production
CN117541654B (en) Detail enhancement method for high-resolution remote sensing image
CN117291843B (en) Efficient management method for image database
CN116777917B (en) Defect detection method and system for optical cable production
CN111681181A (en) Method for evaluating fabric surface pilling degree
CN115311278B (en) Yarn segmentation method for yarn detection
WO2018103345A1 (en) Single molecule recognizing and counting method and device
CN115331193A (en) Parking space identification method, parking space identification system, electronic equipment and storage medium
CN111368793B (en) Automatic neuron cell body recognition system based on fluorescence video

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