Wrapped yarn surface defect detection method and system
Through composite grating image technology and multi-scale gradient method, the problems of missing detection and slow speed in surface defect detection of coated yarns are solved, efficient and accurate defect detection is achieved, and production efficiency is improved.
Patent Information
- Application Number
- CN202411595404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing coated yarn surface defect detection technology has missed detection problems, especially the lack of identification ability for fine defects and the processing speed is not high, which cannot meet the needs of fast production lines, resulting in reduced production efficiency.
Using composite raster image technology, the phase of the light intensity function is calculated and the Gaussian filtering smoothing is performed, and the phase recovery is recovered by combining the optimized MSE algorithm and Fourier transform. The gradient is calculated using a nonlinear model and a multi-scale gradient method, and morphological gradient operation is combined with morphological gradient operations. Determine the location of the defect and achieve efficient defect detection.
It significantly improves the sensitivity and accuracy of detection, can effectively identify subtle defects, improves detection speed, meets the needs of fast production lines, and improves production efficiency.
Smart Images

Figure CN119151904A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of footwear products, and in particular to a method and system for detecting surface defects of coated yarns. Background Art
[0002] Covered yarn is a composite textile material consisting of an inner core yarn and an outer covering material, which has the characteristic of enhanced strength. Due to its special structure that can provide excellent performance and durability, covered yarn is widely used in fields including clothing, industrial fabrics, automotive interiors, sports equipment and medical equipment. In the production process of covered yarn, due to raw material problems, textile equipment failures, process parameter settings and pollutants, the covered yarn may have defects such as insufficient strength, reduced wear resistance and poor appearance, which will affect the overall product performance and reliability.
[0003] Traditional technologies for detecting surface defects of coated yarn mainly include manual visual inspection, optical microscope inspection and infrared imaging technology. Manual inspection relies on the experience of workers and is prone to missed inspections and misjudgments. Optical microscopes can improve observation accuracy, but the processing speed is slow and it is difficult to cover large areas. Infrared imaging technology can detect specific types of defects, but its adaptability to different materials and colors is limited, and the detection effect is often unstable.
[0004] Existing technologies for detecting surface defects of coated yarns include machine vision detection, image analysis based on deep learning, and ultrasonic detection. Machine vision systems use high-resolution cameras and image processing algorithms to achieve fast online detection and improve detection efficiency. Deep learning methods can identify multiple types of defects through training models, with high accuracy and strong adaptability. However, the current surface defect detection technology for coated yarns has the problem of missed detection, especially the lack of recognition ability for subtle defects. In addition, the processing speed of existing technologies is not high, which cannot meet the needs of fast production lines, resulting in reduced production efficiency.
[0005] Therefore, a method and system for detecting surface defects of coated yarn are proposed. Summary of the invention
[0006] The object of the present invention is to provide a method and system for detecting surface defects of coated yarns, which are used to improve the efficiency of detecting surface defects of coated yarns. First, a composite grating image is collected, and the composite grating pattern is projected onto the surface of the coated yarn. The composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; the phase of the light intensity function is calculated to obtain the wrapped phase, and Gaussian filtering is used for smoothing. Secondly, the optimized MSE algorithm is used to preliminarily unwrap the wrapped phase to obtain phase data; the phase data is subjected to phase recovery using Fourier transform processing; the phase difference is calculated for the phase data after phase recovery, the jump position is identified and the phase is adjusted to obtain the unwrapped phase; the corresponding phase distribution is obtained based on the unwrapped phase, and the error is calculated with the expected phase distribution, the phase value is adjusted, and the phase unwrapping data is obtained. Then, the absolute phase is obtained based on the phase unwrapping data using a nonlinear model; the gradient of the data in the absolute phase is calculated by combining the multi-scale gradient method and the morphological gradient operation method; the gradient amplitude is calculated according to the size and direction of the gradient, and threshold processing is applied to determine the position of the defect in the gradient image. Finally, the defect image is post-processed by morphology to extract the defects and realize the detection of surface defects of the coated yarn.
[0007] To achieve the above object, the present invention provides the following technical solutions: A method for detecting surface defects of a coated yarn, comprising: Collecting a composite grating image, projecting the composite grating pattern onto the surface of the coated yarn, wherein the composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; calculating the phase of the light intensity function to obtain a wrapping phase, and performing smoothing using a Gaussian filter; The wrapped phase is preliminarily unwrapped using an optimized MSE algorithm to obtain phase data; the phase data is subjected to phase recovery using Fourier transform processing; the phase difference is calculated for the phase data after phase recovery, the jump position is identified and the phase is adjusted to obtain the unwrapped phase; the corresponding phase distribution is obtained based on the unwrapped phase, the error is calculated with the expected phase distribution, the phase value is adjusted, and the phase unwrapped data is obtained; Obtaining an absolute phase based on the phase unwrapping data using a nonlinear model; calculating the gradient of the data in the absolute phase by combining a multi-scale gradient method and a morphological gradient operation method; calculating the amplitude of the gradient according to the size and direction of the gradient, applying threshold processing, and determining the location of the defect in the gradient image; The defect image is post-processed morphologically to extract defects and detect surface defects of coated yarn.
[0008] Furthermore, the steps of acquiring the composite grating image are: selecting multiple frequencies to generate multiple sinusoidal gratings, superimposing them to obtain a composite grating pattern; using the fast approximate anti-aliasing technology FXAA on the composite grating pattern to reduce the jagged effect of the edge, and then applying a Gaussian smoothing filter to smooth the grating edge of the composite grating pattern.
[0009] Furthermore, the composite grating pattern is projected onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate multiple light intensity functions; the phases of the multiple light intensity functions are calculated to obtain multiple phases; after normalizing each phase, the multiple phases are fused to obtain a wrapped phase; and the wrapped phase is smoothed using a Gaussian filter.
[0010] Furthermore, the specific steps for obtaining the phase unwrapping data are: using a machine learning algorithm to learn and establish a phase model from historical grating patterns, inputting an existing grating pattern into the phase model to obtain an expected phase distribution; performing an error calculation between the phase distribution and the expected phase distribution, performing a local adjustment of the phase value based on the error, and finally obtaining the phase unwrapping data.
[0011] Furthermore, the specific steps for calculating the data gradient in the absolute phase are: using a multi-scale gradient method to perform Gaussian blur on the absolute phase image to generate images of different scales, and calculating the gradient for the images of each scale; for the gradient results of each scale, applying morphological gradient operation to extract clear edge features; merging the morphological gradient results at different scales to obtain the gradient of the data in the absolute phase.
[0012] A system for detecting surface defects of a coated yarn, comprising: The wrapping phase acquisition unit collects the composite grating image, projects the composite grating pattern onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; calculates the phase of the light intensity function to obtain the wrapping phase, and uses Gaussian filtering for smoothing; A phase unwrapping unit, using an optimized MSE algorithm to preliminarily unwrap the wrapped phase to obtain phase data; using Fourier transform processing to perform phase recovery on the phase data; calculating the phase difference of the recovered phase data, identifying the jump position and performing phase adjustment to obtain the unwrapped phase; obtaining the corresponding phase distribution based on the unwrapped phase, performing error calculation with the expected phase distribution, adjusting the phase value, and obtaining the phase unwrapping data; A gradient calculation unit, using a nonlinear model to obtain an absolute phase based on the phase unwrapping data; combining a multi-scale gradient method and a morphological gradient operation method to calculate the gradient of the data in the absolute phase; calculating the amplitude of the gradient according to the size and direction of the gradient, applying threshold processing, and determining the position of the defect in the gradient image; The defect detection unit performs morphological post-processing on the defect image, extracts defects, and realizes the detection of surface defects of the coated yarn.
[0013] Furthermore, the steps of acquiring the composite grating image are: selecting multiple frequencies to generate multiple sinusoidal gratings, superimposing them to obtain a composite grating pattern; using the fast approximate anti-aliasing technology FXAA on the composite grating pattern to reduce the jagged effect of the edge, and then applying a Gaussian smoothing filter to smooth the grating edge of the composite grating pattern.
[0014] Furthermore, the composite grating pattern is projected onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate multiple light intensity functions; the phases of the multiple light intensity functions are calculated to obtain multiple phases; after normalizing each phase, the multiple phases are fused to obtain a wrapped phase; and the wrapped phase is smoothed using a Gaussian filter.
[0015] Furthermore, the specific steps for obtaining the phase unwrapping data are: using a machine learning algorithm to learn and establish a phase model from historical grating patterns, inputting an existing grating pattern into the phase model to obtain an expected phase distribution; performing an error calculation between the phase distribution and the expected phase distribution, performing a local adjustment of the phase value based on the error, and finally obtaining the phase unwrapping data.
[0016] Furthermore, the specific steps for calculating the data gradient in the absolute phase are: using a multi-scale gradient method to perform Gaussian blur on the absolute phase image to generate images of different scales, and calculating the gradient for the images of each scale; for the gradient results of each scale, applying morphological gradient operation to extract clear edge features; merging the morphological gradient results at different scales to obtain the gradient of the data in the absolute phase.
[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention can effectively improve the sensitivity and accuracy of detection by superimposing sinusoidal gratings generated by selecting multiple frequencies to form a composite grating pattern. This method uses the rich information brought by the superposition of gratings of different frequencies to make the light intensity distribution more detailed in response to the high modulation of the surface of the coated yarn. At the same time, the use of fast approximate anti-aliasing technology can significantly reduce the jagged effect at the edge of the image, ensuring that the edge of the grating pattern is smoother, thereby improving the accuracy of subsequent phase calculations. In addition, a Gaussian smoothing filter is used to further smooth the grating edge to make the image clearer. These steps together improve the quality of the composite grating image and provide a more reliable basis for subsequent phase calculations and defect detection.
[0018] 2. The present invention can significantly improve the accuracy and reliability of phase unwrapping data by using machine learning algorithms to learn and establish phase models from historical grating patterns. This method can effectively capture the complex relationship between grating patterns and phases, so that when processing new grating patterns, the model can quickly generate the expected phase distribution, thereby reducing manual intervention and experience dependence. By calculating the error between the phase distribution and the expected phase distribution, the phase value can be effectively corrected, the influence of the jump position can be reduced, and the adaptability of the detection system to different grating patterns can be enhanced, thereby achieving more efficient and accurate defect detection.
[0019] 3. The present invention generates images of different scales by performing Gaussian blur on the absolute phase image, so that the detection system can capture subtle edge information at multiple levels, and can effectively deal with defects of different sizes and shapes, and enhance the clarity of edge features. At the same time, combined with morphological gradient operations, the coherence and accuracy of the edges can be further improved, thereby reducing noise interference. The morphological gradient results at different scales are merged, and the absolute phase data gradient finally obtained is more comprehensive and accurate, which can improve the reliability of defect detection and provide a more accurate basis for subsequent defect location and classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A method flow chart of a method for detecting surface defects of a coated yarn according to the present invention; Figure 2 It is a system structure diagram of a covered yarn surface defect detection system of the present invention; Figure 3 It is a flow chart of the phase unwrapping unit of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] In order to improve the efficiency of detecting surface defects of coated yarns, the present invention provides a method and system for detecting surface defects of coated yarns. In order to illustrate the function of the present invention, the effectiveness of the present invention will be described from the following examples.
[0023] Embodiment 1 A chemical fiber raw material manufacturer A produces chemical fiber raw materials for socks, namely covered yarn. Since the covered yarn surface defect detection method used by the manufacturer A in the past was very time-consuming during detection, which seriously affected the factory production and subsequent processes, in order to improve the efficiency of covered yarn surface defect detection, a covered yarn surface defect detection method was used. Figure 1 As shown, a method flow chart of a method for detecting surface defects of covered yarn is shown.
[0024] Reference Figure 1 In step S01, a composite grating image is collected, and the composite grating pattern is projected onto the surface of the coated yarn. The composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; the wrapping phase is calculated according to the light intensity function, and a Gaussian filter is used for smoothing.
[0025] Specifically, the steps of obtaining the composite grating image are: selecting multiple frequencies Generate multiple sinusoidal gratings, each of which is expressed as: ; in, Indicates Sinusoidal grating patterns produced by frequencies; Indicates The amplitude of a sinusoidal grating; Indicates The frequency of the grating; Represents the phase shift of the grating.
[0026] Furthermore, the sinusoidal gratings of different frequencies are superimposed to obtain a composite grating pattern, which is expressed as follows: ; in, represents a composite grating pattern; Indicates the number of sinusoidal gratings.
[0027] Furthermore, the fast approximate anti-aliasing technology FXAA is used on the composite raster pattern to reduce the jagged effect of the edge. The specific steps are as follows: first, the brightness value of each pixel is calculated. ; Then, the edge is identified through the edge detection algorithm; finally, the color values of the surrounding pixels are adjusted according to the edge information to reduce the jagged effect.
[0028] Furthermore, a Gaussian smoothing filter is applied to smooth the grating edge of the composite grating pattern. The formula of the Gaussian smoothing filter is expressed as: ; in, represents the smoothed composite grating pattern; Represents the standard deviation of the Gaussian filter, which controls the degree of smoothing; represents a convolution operation. The convolution size can be , and Etc., as long as the smoothing effect can be achieved and important information can be retained.
[0029] By selecting sinusoidal gratings generated by multiple frequencies and superimposing them to form a composite grating pattern, the resolution and accuracy of detection can be effectively enhanced. The fast approximate anti-aliasing technology FXAA is used to reduce the edge jagged effect, ensure that the pattern edge is smoother, and improve image quality. Combining the Gaussian smoothing filter to further process the grating edge can better retain important features and reduce noise interference, thereby providing a more reliable data basis for subsequent phase calculation and defect detection, and improving the accuracy and efficiency of overall detection.
[0030] Furthermore, the composite grating pattern is projected onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate a plurality of light intensity functions, and the formula of the light intensity function is expressed as follows: ; in, Indicates at point The light intensity at The height modulation function of the coated yarn surface is represented. The height modulation function can be obtained by measuring different points on the coated yarn surface with a laser rangefinder to obtain height data, and an interpolation method is used to generate a continuous height modulation function.
[0031] Furthermore, the phase is calculated as a function of the intensity : ; Then, the phase calculation of multiple intensity functions can be expressed as: ; Normalize each phase to get the normalized phase : ; in, and Represent the minimum and maximum values of the phase respectively.
[0032] The multiple phases are fused to obtain a wrapped phase : ; in, Represents the number of light intensity functions. Further, the wrapped phase is smoothed using Gaussian filtering.
[0033] By projecting the composite grating pattern onto the surface of the coated yarn and calculating multiple light intensity functions, the phase changes in different regions can be effectively captured. Each phase is normalized and fused to enhance the overall consistency of the phase information and improve the accuracy of phase unwrapping. Using Gaussian filtering for smoothing helps eliminate noise and improve the accuracy of subsequent analysis. This method can more comprehensively reflect the surface state of the coated yarn, thereby improving the reliability and efficiency of defect detection.
[0034] Reference Figure 1 In step S02, the optimized MSE algorithm is used to preliminarily unwrap the wrapped phase to obtain phase data; the phase data is processed by Fourier transform to recover the phase; the phase difference is calculated for the phase data after phase recovery, the jump position is identified and the phase is adjusted to obtain the unwrapped phase; based on the unwrapped phase, the corresponding phase distribution is obtained, the error is calculated with the expected phase distribution, the phase value is adjusted, and the phase unwrapped data is obtained.
[0035] Specifically, set the initial estimated phase , usually set to 0. Calculate the mean square error between the current estimated phase and the wrapped phase: ; in, Indicates the number of points.
[0036] Through the gradient descent method, iterative adjustment After multiple iterations, a set of updated estimated phases is obtained, that is, the phase data obtained by preliminary unwrapping .
[0037] Furthermore, the phase data is Fourier transformed to recover the phase: ;in, represents the Fourier transform operation; and Represents the frequency domain coordinates.
[0038] Phase retrieval using inverse Fourier transform: . Calculate the phase difference between the phase data after phase recovery and the original phase data : , identify the jump position based on the phase difference : ; Adjust the phase according to the identified jump position: ; in, Indicates an integer multiple of the jump.
[0039] The adjusted phase data is the unwrapped phase, and the corresponding phase distribution is .
[0040] A machine learning algorithm is used to learn and establish a phase model from historical grating patterns, and the phase model is input into the existing grating pattern to obtain the expected phase distribution. ; The phase distribution is compared with the expected phase distribution Calculation: ; Perform local phase adjustment based on the calculated error value: ,in, represents phase unwrapped data; Represents the adjustment factor.
[0041] By using machine learning algorithms to build a phase model from historical grating patterns, the expected phase distribution of the current grating pattern can be more accurately predicted, improving the accuracy of the phase unwrapping data.
[0042] Reference Figure 1 In step S03, the absolute phase is obtained based on the phase unwrapping data using a nonlinear model; the gradient of the data in the absolute phase is calculated by combining the multi-scale gradient method and the morphological gradient operation method; the amplitude of the gradient is calculated according to the size and direction of the gradient, and the threshold processing is applied to determine the position of the defect in the gradient image.
[0043] Specifically, the absolute phase is obtained based on the phase unwrapped data using a nonlinear model : ;in, Represents a defined nonlinear model function, including but not limited to models such as polynomial fitting and neural networks.
[0044] Furthermore, in the multi-scale gradient method, Gaussian blurring produces images of different scales ,in, Represents the standard deviation of Gaussian filtering. The Sobel operator is used to calculate the gradient of each scale image. The gradient calculation formula is: ,in, and Respectively represent the Sobel operator in the horizontal and vertical directions; Represents the convolution operation. After gradient calculation, the gradient image of each scale is obtained .
[0045] Furthermore, the morphological gradient operation is used to extract clear edge features for the gradient image of each scale. The formula is defined as: ,in, Represents the edge features obtained using the morphological gradient method; and Represent the maximum and minimum operations of the image respectively.
[0046] Next, edge features of different scales are combined to obtain the gradient of the data in the absolute phase ,in, Indicates the number of gradient images. Calculate the gradient The amplitude ,in, and Represent the gradient components in the horizontal and vertical directions respectively. The position of the defect is determined according to the set threshold T, that is: ; Among them, the defect image Defects are marked in with a value of 1.
[0047] The multi-scale gradient method combined with morphological gradient operation can extract edge features from different scales and enhance the sensitivity and accuracy of defect detection. By merging gradient results of different scales, more subtle phase changes can be captured and defects can be effectively distinguished from normal areas. This method improves the reliability of defect positioning on the coated yarn surface, provides a clearer basis for subsequent morphological post-processing, and further improves the quality of the detection results.
[0048] Reference Figure 1 In step S04, the defect image is subjected to morphological post-processing to extract defects and detect surface defects of the coated yarn. The morphological post-processing steps include but are not limited to expansion, corrosion operations and edge smoothing.
[0049] The coated yarn surface defect detection method used in this embodiment is compared with other defect detection methods to verify the effectiveness of the method in this embodiment. The comparative experimental results are shown in Table 1.
[0050] Table 1 Comparative experimental results
[0051] As shown in Table 1, the method used in this embodiment has achieved remarkable performance in the defect detection task, reaching an accuracy rate of 0.987, indicating the effectiveness and reliability of the method in identifying defects. At the same time, the missed detection rate of the method reached the lowest value, only 0.004, which means that almost no potential defects were missed during the detection, greatly improving the comprehensiveness of the detection. In addition, in terms of detection time, the method reached 43 milliseconds per image, which enables the method to quickly feedback the detection results in practical applications, significantly improving the operating efficiency of the production line.
[0052] A chemical fiber raw material manufacturer A used the method of this embodiment to improve the defect detection efficiency of chemical fiber raw materials for socks, greatly improving the production efficiency of chemical fiber raw materials for socks. The method of this embodiment achieves high-precision defect recognition through efficient light intensity function analysis and phase recovery technology. The optimized MSE algorithm and multi-scale gradient processing are used to ensure the accuracy and sensitivity of detection. At the same time, morphological post-processing further enhances the extraction effect of defect features, making the detection process more reliable and faster.
[0053] Embodiment 2 A certain automobile interior manufacturer B focuses on producing high-quality automobile seats and interior materials, using the manufacturer's exclusive design of covered yarn. However, the covered yarn surface defect detection method used by the manufacturer in the past had the problem of slow detection speed, which caused delays in the production process and affected the efficiency of product delivery. In order to improve the efficiency and accuracy of covered yarn surface defect detection, manufacturer B introduced a covered yarn surface defect detection system to ensure product quality and optimize the production process.
[0054] like Figure 2 As shown, a system structure diagram of a covered yarn surface defect detection system is shown.
[0055] The system includes a wrapping phase acquisition unit, which collects a composite grating image and projects the composite grating pattern onto the surface of the coated yarn. The composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; the phase of the light intensity function is calculated to obtain the wrapping phase, and a Gaussian filter is used for smoothing.
[0056] Specifically, the steps of obtaining the composite grating image are: selecting multiple frequencies Generate multiple sinusoidal gratings, each of which is expressed as: ; in, Indicates Sinusoidal grating patterns produced by frequencies; Indicates The amplitude of a sinusoidal grating; Indicates The frequency of the grating; Represents the phase shift of the grating.
[0057] Furthermore, the sinusoidal gratings of different frequencies are superimposed to obtain a composite grating pattern, which is expressed as follows: ; in, represents a composite grating pattern; Indicates the number of sinusoidal gratings.
[0058] The fast approximate anti-aliasing technology FXAA is used on the composite grating pattern to reduce the aliasing effect of the edge, and then a Gaussian smoothing filter is applied to smooth the grating edge of the composite grating pattern.
[0059] Furthermore, the composite grating pattern is projected onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate a plurality of light intensity functions, and the formula of the light intensity function is expressed as follows: ; in, Indicates at point The light intensity at The height modulation function of the coated yarn surface is represented. The height modulation function can be obtained by measuring different points on the coated yarn surface with a laser rangefinder to obtain height data, and an interpolation method is used to generate a continuous height modulation function.
[0060] Furthermore, the phase is calculated as a function of the intensity : ; Then, the phase calculation of multiple intensity functions can be expressed as: ; Normalize each phase to get the normalized phase : ; in, and Represent the minimum and maximum values of the phase respectively.
[0061] The multiple phases are fused to obtain a wrapped phase : ; in, Indicates the number of light intensity functions. Further, the wrapped phase is smoothed using a Gaussian filter. The wrapped phase is smoothed using a Gaussian filter.
[0062] The phase unwrapping unit uses an optimized MSE algorithm to preliminarily unwrap the wrapped phase to obtain phase data; uses Fourier transform processing to perform phase recovery on the phase data; calculates the phase difference of the phase data after phase recovery, identifies the jump position and performs phase adjustment to obtain the unwrapped phase; obtains the corresponding phase distribution based on the unwrapped phase, calculates the error with the expected phase distribution, adjusts the phase value, and obtains the phase unwrapping data.
[0063] The flow chart of the phase unwrapping unit is as follows: Figure 3 Specifically, the initial estimated phase is set , usually set to 0. Calculate the mean square error between the current estimated phase and the wrapped phase: ; in, Indicates the number of points.
[0064] Through the gradient descent method, iterative adjustment After multiple iterations, a set of updated estimated phases is obtained, that is, the phase data obtained by preliminary unwrapping .
[0065] Furthermore, the phase data is Fourier transformed to recover the phase: ;in, represents the Fourier transform operation; and Represents the frequency domain coordinates.
[0066] Phase retrieval using inverse Fourier transform: . Calculate the phase difference between the phase data after phase recovery and the original phase data : , identify the jump position based on the phase difference : ; Adjust the phase according to the identified jump position: ; in, Indicates an integer multiple of the jump.
[0067] The adjusted phase data is the unwrapped phase, and the corresponding phase distribution is .
[0068] A machine learning algorithm is used to learn and establish a phase model from historical grating patterns, and the phase model is input into the existing grating pattern to obtain the expected phase distribution. ; The phase distribution is compared with the expected phase distribution Calculation: ; Perform local phase adjustment based on the calculated error value: ,in, represents phase unwrapped data; Represents the adjustment factor.
[0069] A gradient calculation unit uses a nonlinear model to obtain an absolute phase based on the phase unwrapping data; combines a multi-scale gradient method and a morphological gradient operation method to calculate the gradient of the data in the absolute phase; calculates the amplitude of the gradient according to the size and direction of the gradient, applies threshold processing, and determines the location of the defect in the gradient image.
[0070] Specifically, the specific steps of calculating the data gradient in the absolute phase are: using a nonlinear model to obtain the absolute phase based on the phase unwrapping data : ;in, Represents a defined nonlinear model function, including but not limited to models such as polynomial fitting and neural networks.
[0071] Furthermore, in the multi-scale gradient method, Gaussian blurring produces images of different scales ,in, Represents the standard deviation of Gaussian filtering. The Sobel operator is used to calculate the gradient of each scale image. The gradient calculation formula is: ,in, and Respectively represent the Sobel operator in the horizontal and vertical directions; Represents the convolution operation. After gradient calculation, the gradient image of each scale is obtained .
[0072] Furthermore, the morphological gradient operation is used to extract clear edge features for the gradient image of each scale. The formula is defined as: ,in, Represents the edge features obtained using the morphological gradient method; and Represent the maximum and minimum operations of the image respectively.
[0073] Next, edge features of different scales are combined to obtain the gradient of the data in the absolute phase ,in, Indicates the number of gradient images. Calculate the gradient The amplitude ,in, and Represent the gradient components in the horizontal and vertical directions respectively. The position of the defect is determined according to the set threshold T, that is: ; Among them, the defect image Defects are marked in with a value of 1.
[0074] The defect detection unit performs morphological post-processing on the defect image, extracts defects, and realizes the detection of surface defects of the coated yarn. The morphological post-processing steps include but are not limited to expansion, corrosion operations and edge smoothing.
[0075] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting surface defects of a coated yarn, characterized in that: include: Collecting a composite grating image, projecting the composite grating pattern onto the surface of the coated yarn, wherein the composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; calculating the phase of the light intensity function to obtain a wrapping phase, and performing smoothing using a Gaussian filter; The wrapped phase is preliminarily unwrapped using an optimized MSE algorithm to obtain phase data; the phase data is subjected to phase recovery using Fourier transform processing; the phase difference is calculated for the phase data after phase recovery, the jump position is identified and the phase is adjusted to obtain the unwrapped phase; the corresponding phase distribution is obtained based on the unwrapped phase, the error is calculated with the expected phase distribution, the phase value is adjusted, and the phase unwrapped data is obtained; Obtaining an absolute phase based on the phase unwrapping data using a nonlinear model; calculating the gradient of the data in the absolute phase by combining a multi-scale gradient method and a morphological gradient operation method; calculating the amplitude of the gradient according to the size and direction of the gradient, applying threshold processing, and determining the location of the defect in the gradient image; The defect image is post-processed morphologically to extract defects and detect surface defects of coated yarn.
2. A method for detecting surface defects of a coated yarn according to claim 1, characterized in that: The steps of acquiring the composite grating image are: selecting multiple frequencies to generate multiple sinusoidal gratings, and superimposing them to obtain a composite grating pattern; using the fast approximate anti-aliasing technology FXAA on the composite grating pattern to reduce the aliasing effect of the edge, and then applying a Gaussian smoothing filter to smooth the grating edge of the composite grating pattern.
3. A method for detecting surface defects of a coated yarn according to claim 2, characterized in that: Projecting the composite grating pattern onto the surface of the coated yarn, wherein the composite grating pattern is highly modulated by the surface of the coated yarn to generate a plurality of light intensity functions; calculating phases of the plurality of light intensity functions to obtain a plurality of phases; After normalizing each phase, the multiple phases are fused to obtain a wrapped phase; The wrapped phase is smoothed using a Gaussian filter.
4. A method for detecting surface defects of a coated yarn according to claim 1, characterized in that: The specific steps for obtaining the phase unwrapping data are: using a machine learning algorithm to learn and establish a phase model from historical grating patterns, inputting an existing grating pattern into the phase model to obtain an expected phase distribution; performing an error calculation between the phase distribution and the expected phase distribution, performing a local adjustment of the phase value based on the error, and finally obtaining the phase unwrapping data.
5. A method for detecting surface defects of a coated yarn according to claim 1, characterized in that: The specific steps of calculating the data gradient in the absolute phase are: using a multi-scale gradient method to perform Gaussian blur on the absolute phase image to generate images of different scales, and calculating the gradient for the images of each scale; for the gradient results of each scale, applying morphological gradient operation to extract clear edge features; merging the morphological gradient results at different scales to obtain the gradient of the data in the absolute phase.
6. A system for detecting surface defects of coated yarns, characterized in that: include: The wrapping phase acquisition unit collects the composite grating image, projects the composite grating pattern onto the surface of the coated yarn, and the composite grating pattern is highly modulated by the surface of the coated yarn to generate a light intensity function; calculates the phase of the light intensity function to obtain the wrapping phase, and uses Gaussian filtering for smoothing; A phase unwrapping unit, using an optimized MSE algorithm to preliminarily unwrap the wrapped phase to obtain phase data; using Fourier transform processing to perform phase recovery on the phase data; calculating the phase difference of the recovered phase data, identifying the jump position and performing phase adjustment to obtain the unwrapped phase; obtaining the corresponding phase distribution based on the unwrapped phase, performing error calculation with the expected phase distribution, adjusting the phase value, and obtaining the phase unwrapping data; A gradient calculation unit, using a nonlinear model to obtain an absolute phase based on the phase unwrapping data; combining a multi-scale gradient method and a morphological gradient operation method to calculate the gradient of the data in the absolute phase; calculating the amplitude of the gradient according to the size and direction of the gradient, applying threshold processing, and determining the position of the defect in the gradient image; The defect detection unit performs morphological post-processing on the defect image, extracts defects, and realizes the detection of surface defects of the coated yarn.
7. A covered yarn surface defect detection system according to claim 6, characterized in that: The steps of acquiring the composite grating image are: selecting multiple frequencies to generate multiple sinusoidal gratings, and superimposing them to obtain a composite grating pattern; using the fast approximate anti-aliasing technology FXAA on the composite grating pattern to reduce the aliasing effect of the edge, and then applying a Gaussian smoothing filter to smooth the grating edge of the composite grating pattern.
8. A covered yarn surface defect detection system according to claim 6, characterized in that: Projecting the composite grating pattern onto the surface of the coated yarn, wherein the composite grating pattern is highly modulated by the surface of the coated yarn to generate a plurality of light intensity functions; calculating phases of the plurality of light intensity functions to obtain a plurality of phases; After normalizing each phase, the multiple phases are fused to obtain a wrapped phase; The wrapped phase is smoothed using a Gaussian filter.
9. A covered yarn surface defect detection system according to claim 6, characterized in that: The specific steps for obtaining the phase unwrapping data are: using a machine learning algorithm to learn and establish a phase model from historical grating patterns, inputting an existing grating pattern into the phase model to obtain an expected phase distribution; performing an error calculation between the phase distribution and the expected phase distribution, performing a local adjustment of the phase value based on the error, and finally obtaining the phase unwrapping data.
10. A coated yarn surface defect detection system according to claim 6, characterized in that: The specific steps of calculating the data gradient in the absolute phase are: using a multi-scale gradient method to perform Gaussian blur on the absolute phase image to generate images of different scales, and calculating the gradient for the images of each scale; for the gradient results of each scale, applying morphological gradient operation to extract clear edge features; merging the morphological gradient results at different scales to obtain the gradient of the data in the absolute phase.
Citation Information
Patent Citations
RGBPSP (red green blue phase shift profilometry) three-dimensional color reconstruction method applied to online detection for fabric defects
CN102661724A
Improved window Fourier three-dimensional measuring method based on wavelet transform
CN103267496A
Method for detecting fabric defects by using computer
CN104713888A
Paper defect classification method based on multi-scale morphology combined with convolutional neural network
CN108427969A
Image edge detection method and detection device, and computer storage medium
CN108898609A
Cited By
Wrapped yarn production process detection method based on lightweight target
CN119359698A
Intelligent food detection method and system based on image recognition, terminal and medium
CN120431571A
Visual identification and profile feature measurement system and method for irregular cracks of medium-thickness plate
CN121007908A
Industrial surface defect detection and morphology measurement method, system and equipment, medium and product
CN122415590A
