Method for extracting the size of diffraction fringes based on image processing
By using an image processing-based diffraction fringe extraction method, the accuracy and environmental dependence issues of chemical fiber filament diameter detection were resolved, enabling rapid and accurate online measurement of chemical fiber filament diameter.
Patent Information
- Application Number
- CN202210838135.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-17
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-07-17
AI Technical Summary
Existing methods for detecting the appearance diameter of chemical fiber filaments cannot accurately reflect their uniformity and are easily affected by the environment, making rapid online detection impossible.
A diffraction fringe extraction method based on image processing is adopted. The diffraction fringe with alternating bright and dark colors is generated by irradiating the chemical fiber filament with a laser. The diffraction fringe image is acquired by an image acquisition device and divided into multiple sub-regions. The centroid coordinates of the bright fringe are calculated to obtain the diameter of the chemical fiber filament.
It improves the accuracy and speed of chemical fiber filament diameter detection, enabling accurate measurement of chemical fiber filament diameter under dynamic or static conditions, reducing environmental interference, and achieving rapid online detection.
Smart Images

Figure CN115330853B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chemical fiber filament quality inspection methods, and specifically to a method for extracting the size of diffraction fringes based on image processing. Background Technology
[0002] Yarn evenness is a crucial performance indicator for most yarns (general wool, cotton, and linen yarns, raw silk, and chemical fiber filaments). When weaving with uneven filaments, various defects and raw material defects will appear on the fabric, affecting appearance quality and increasing the rate of finished product downgrading. Simultaneously, changes in the evenness of chemical fiber filaments can expose and indicate imperfections in spinning equipment and processes, their causes, and provide important information on areas requiring attention in subsequent processing techniques and fabric design. The external diameter of chemical fiber filaments is a direct indicator of evenness, and accurately and quickly determining the external diameter is an engineering-significant task in textile production. Currently, the commonly used method is the gravimetric method to test the evenness of chemical fiber filaments. This method measures the weight unevenness and coefficient of variation of the filament at a fixed length, and cannot directly reflect the appearance uniformity of the chemical fiber filament. Furthermore, this test method is offline and highly susceptible to environmental temperature and humidity, making it impossible to accurately measure the filament diameter. Summary of the Invention
[0003] The purpose of this invention is to solve the problems existing in the prior art and provide a method for extracting the size of diffraction fringes based on image processing.
[0004] To achieve the above objectives, the technical solution of the present invention is as follows:
[0005] A method for extracting dimensions from diffraction fringes based on image processing involves illuminating the object under test with a laser to generate alternating bright and dark diffraction fringes on a receiving screen. After acquiring the diffraction fringes image using an image acquisition device, the image is divided into multiple sub-regions. The centroid coordinates of the bright fringes within each sub-region are obtained, and thus the dimension d of the object under test is calculated. s ;
[0006] The object being measured is a chemical fiber filament in a stationary state or a chemical fiber filament in a moving state; the dimension d of the object being measured. s The diameter of the synthetic fiber filament is used. This invention is applicable to synthetic fiber filaments (single or multiple filaments). The method of this invention can test the diameter of both dynamic and static filaments. When measuring a static filament, a point on the filament is measured, resulting in a diffraction fringe image, which is not dynamic. When measuring a dynamic filament, it is equivalent to continuously measuring different points on the filament, obtaining a series of diffraction fringe images that are dynamically changing. Furthermore, the object being measured in this invention can also be anything other than synthetic fiber filaments, and the size of the object being measured can be a tiny pitch.
[0007] In a diffraction fringe image, each bright fringe is located in a different sub-region, and the boundary between any two adjacent sub-regions is the location of the dark fringe in the diffraction fringe image.
[0008] The size d of the object being measured s The calculation formula is as follows:
[0009]
[0010]
[0011] In the formula, λ is the wavelength of the laser, in nm; z is the distance between the object being measured and the receiving screen, in mm; d r is the actual bright fringe distance, in mm; e is the ratio of the diffraction fringe image pixels to the actual size, in mm / pixel. The average bright fringe spacing, in mm, is calculated by taking the average of the distances between all adjacent bright fringes after removing the maximum and second-largest values, using the centroid coordinates of the bright fringes.
[0012] Because the zero-order diffraction spot in the diffraction fringe image produced by the filament under laser irradiation concentrates most of the diffraction energy, it is very easy to cause overexposure of the zero-order diffraction spot, resulting in the central zero-order fringe overlapping with the left and right first-order bright fringes, thus obscuring the actual distribution of light energy. If the diffraction fringe image is not divided into multiple sub-regions and the bright fringe distribution is extracted directly by binarization, it will lead to: ① It will be difficult to distinguish which order of fringe the obtained centroid coordinates belong to, and it is very easy to be mistaken for a positive or negative first-order bright fringe, resulting in low accuracy of diameter data; ② Because the diffraction bright fringe distribution is bright in the middle and gradually darkens to both sides, the obtained centroid coordinate information is less, which also leads to low accuracy.
[0013] This invention divides the diffraction fringe image into multiple sub-regions, ensuring that each bright fringe in the diffraction fringe image is located within a different sub-region, and the boundary between any two adjacent sub-regions is the location of the dark fringe in the diffraction fringe image. Therefore, this invention can effectively visualize and extract the centroid coordinates of all bright fringes from a diffraction fringe image with the characteristic of being bright in the middle and gradually darkening towards the edges, thereby improving the accuracy of the diameter data. At the same time, this invention eliminates the maximum and second-largest distances between all adjacent bright fringes when calculating the size of the measured object, avoiding overexposure of the zero-order diffraction spot, further improving the accuracy of the diameter data.
[0014] As a preferred technical solution:
[0015] As described above, the method for extracting the size of diffraction fringes based on image processing has a diffraction fringe image size of W×H, where W represents the pixel width of the diffraction fringe image and ranges from 500 to 1280, and H represents the pixel height of the diffraction fringe image and ranges from 100 to 500. The ranges of W and H are defined based on the elongated characteristics of the diffraction fringes and can be adjusted at any time. The most suitable size setting is obtained by adjusting the elongated characteristics of the diffraction fringes obtained in the experimental setting.
[0016] The method for extracting the size of diffraction fringes based on image processing, as described above, divides the diffraction fringes image into multiple sub-regions and obtains the centroid coordinates of the bright fringes within each sub-region in the following specific steps:
[0017] ① Convert the diffraction fringe image into a grayscale matrix A W×H The matrix has W rows and H columns, and the element a in the i-th row and j-th column is... ij The value represents the gray value corresponding to each pixel in the diffraction fringe image, and the value range is 0 to 255. The larger the gray value, the brighter the pixel. The gray value of the dark area is close to 0. i = 1, 2, ..., W, j = 1, 2, ..., H;
[0018] ② For the grayscale matrix A W×H Transpose to get A T H×W Multiplying this by the H-dimensional vector α, we obtain the summation matrix C of each column of the grayscale matrix. H×1 The formula is as follows:
[0019]
[0020] ③ Find the set [c1 c2 … c] using the least squares method. H The k local minima within the range [s1 s2 … s] k The diffraction fringe image is divided into k+1 sub-regions, each sub-region having intervals of [0,s1], [s1,s2], [s2,s3], [s3,s4], ..., [s...]. k-1 ,s k ];
[0021] Step ③ is to perform operations on the result C of this matrix. H×1 That is, a series of discrete data, which can be obtained by the least squares method [c1 c2 … c H The number of local minimum points k;
[0022] From the perspective of diffraction fringe images, the characteristic of diffraction fringes is that they are alternating bright and dark fringes. The dark fringes correspond to the locations of the minimum points. Therefore, the regions are divided based on this characteristic. Step ③ uses mathematical methods to express and locate how to divide the regions.
[0023] ④ Create a rectangular mask of size W1×H1 on the diffraction fringe image as a sliding window, where H1 represents the pixel height of the mask and has the same value as H, and W1 represents the pixel width of the mask and has a variable value.
[0024] ⑤ Slide the mask on the diffraction fringe image. When the mask slides from the 1st sub-region to the (k+1)th sub-region, the values of W1 are s1, |s1-s2|, |s2-s3|, |s3-s4|, ..., |s k-1 -s k |、|Ws k The mask is binarized for each sub-region it slides to, extracting the connected components of the bright stripes, and then the centroid coordinates (x, y) of the bright stripes are calculated using the gray-scale centroid method. t y t ), where t=1,2,…,k+1, x t Let y be the x-coordinate of the centroid of the bright fringe in the t-th sub-region. t Let be the ordinate of the centroid of the bright fringe in the t-th sub-region.
[0025] In the image processing-based method for extracting the size of diffraction fringes as described above, the laser is generated by a laser with a power of less than 10 milliwatts. The type of laser is not limited and can be a He-Ne laser, a gas laser, a solid-state laser, or a semiconductor laser.
[0026] In the image processing-based method for extracting the size of diffraction fringes described above, the receiving screen is a white, opaque board, such as a white KT board.
[0027] In the image processing-based method for extracting the size of diffraction fringes as described above, the image acquisition device is an industrial camera, which includes an industrial area scan camera or an industrial line scan camera.
[0028] As described above, the method for extracting the size of diffraction fringes based on image processing involves defining a long, narrow region of interest (ROI) of size W×H on an industrial camera before acquiring the diffraction fringes. This ensures that the diffraction fringes are imaged within the defined ROI region, and only the image information within the ROI region is read out. Setting the ROI region can reduce the amount of image information transmitted by the camera and processed by the computer, increase the frame rate of ROI region image acquisition, and greatly save time and difficulty in subsequent image processing.
[0029] Beneficial effects
[0030] (1) The method for extracting the size of diffraction stripes based on image processing of the present invention defines a slender ROI region based on the slender characteristics of diffraction stripes before acquiring each frame of images, which rapidly increases the frame rate of image acquisition and greatly speeds up image processing. At the same time, the defined slender ROI region also effectively shields the invalid noise region in each frame of image, saving subsequent image processing time.
[0031] (2) The method for extracting the size of diffraction stripes based on image processing of the present invention designs a rectangular mask as a sliding window and divides each frame of diffraction stripe image into different sub-regions, which can accurately extract the centroid coordinates of all bright stripes in each frame of image, making up for the shortcoming of large spacing estimation error in the prior art.
[0032] (3) The method for extracting the size of diffraction fringes based on image processing of the present invention has excellent visualization effect when extracting centroid coordinates and high accuracy of the obtained diameter data. Attached Figure Description
[0033] Figure 1 This is a flowchart of the method for extracting the size of diffraction fringes based on image processing according to the present invention;
[0034] Figure 2 This is a frame of the diffraction fringe image of the measured filament;
[0035] Figure 3 A frame of a diffraction fringe image of a measured filament divided into multiple sub-regions;
[0036] Figure 4 This is the distribution map of bright stripes extracted after processing using a conventional binarization method;
[0037] Figure 5 This is a distribution map of bright stripes extracted using the method of the present invention;
[0038] Figure 6 This is a graph showing the change in the diameter of the tested chemical fiber filament. Detailed Implementation
[0039] The present invention will be further described below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0040] Methods for extracting the size of diffraction fringes based on image processing, such as Figure 1 As shown, the specific steps are as follows:
[0041] (1) Based on the elongated characteristics of the diffraction fringes, define a long and narrow ROI region of size W×H on the industrial camera.
[0042] (2) The test object is irradiated with a laser generated by a laser with a power of less than 10 milliwatts, causing it to produce alternating bright and dark diffraction fringes on a white opaque plate; wherein the test object is a chemical fiber filament in a stationary state or a chemical fiber filament in a moving state; the size d of the test object s The diameter of the synthetic fiber filament;
[0043] (3) Use an industrial camera to collect diffraction fringes, and when collecting diffraction fringes, make the diffraction fringes image within a custom ROI area, and only read out the image information within the ROI area to obtain the diffraction fringes image.
[0044] The resulting diffraction fringe image has a size of W×H, where W represents the pixel width of the diffraction fringe image and its value ranges from 500 to 1280, and H represents the pixel height of the diffraction fringe image and its value ranges from 100 to 500.
[0045] (4) Divide the diffraction fringe image into multiple sub-regions and obtain the centroid coordinates of the bright fringes in each sub-region. The specific steps are as follows:
[0046] ① The diffraction fringe image (e.g.) Figure 2 The original image of a frame of the diffraction fringe sequence of the tested filament (shown) is converted into a grayscale matrix A. W×H The matrix has W rows and H columns, and the element a in the i-th row and j-th column is... ij The value represents the gray value corresponding to each pixel in the diffraction fringe image, and the value range is 0 to 255. The larger the gray value, the brighter the pixel. The gray value of the dark area is close to 0. i = 1, 2, ..., W, j = 1, 2, ..., H;
[0047] ② For the grayscale matrix A W×H Transpose to get A T H×W Multiplying this by the H-dimensional vector α, we obtain the summation matrix C of each column of the grayscale matrix. H×1 The formula is as follows:
[0048]
[0049] ③ Find the set [c1 c2 … c] using the least squares method. H The k local minima within the range [s1 s2 … s] k The diffraction fringe image is divided into k+1 sub-regions, each sub-region having intervals of [0,s1], [s1,s2], [s2,s3], [s3,s4], ..., [s...].k-1 ,s k ],For example Figure 3 As shown, it can be Figure 2 The original image shown is divided into 16 regions;
[0050] ④ Create a rectangular mask of size W1×H1 on the diffraction fringe image as a sliding window, where H1 represents the pixel height of the mask and has the same value as H, and W1 represents the pixel width of the mask and has a variable value.
[0051] ⑤ Slide the mask on the diffraction fringe image. When the mask slides from the 1st sub-region to the (k+1)th sub-region, the values of W1 are s1, |s1-s2|, |s2-s3|, |s3-s4|, ..., |s k-1 -s k |、|Ws k The mask is binarized for each sub-region it slides to, extracting the connected components of the bright stripes, and then the centroid coordinates (x, y) of the bright stripes are calculated using the gray-scale centroid method. t y t ), where t=1,2,…,k+1, x t Let y be the x-coordinate of the centroid of the bright fringe in the t-th sub-region. t Let be the ordinate of the centroid of the bright fringe in the t-th sub-region;
[0052] In the sequence of diffraction fringes produced by a moving filament under laser illumination, the zero-order diffraction spot concentrates the vast majority of the diffraction energy, easily causing overexposure of the zero-order diffraction spot. This results in the central zero-order fringe overlapping with the left and right first-order bright fringes, obscuring the actual distribution of light energy. Direct binarization in this case would yield images like... Figure 4 The problem with the single frame sequence shown is:
[0053] ① It is difficult to distinguish which order of positive or negative fringe the obtained centroid coordinates belong to, which can easily lead to misidentification as positive or negative first-order bright fringe, resulting in poor accuracy of diameter data;
[0054] ②Because the diffraction bright fringes are distributed with the center being bright and gradually darkening towards the edges, this method obtains less information about the centroid coordinates, which also leads to low accuracy.
[0055] To avoid the above problems, the present invention as follows Figure 5 As shown, the first rectangular mask created has a height H1 equal to the height of the original image (H, a value of 133 pixels); the width values change sequentially to s1, |s1-s2|, |s2-s3|, |s3-s4|, ..., |s k-1 -s k |、|Ws kSecondly, the pre-defined sub-regions s1, |s1-s2|, |s2-s3|, |s3-s4|, ..., |s are sequentially slid through the mask. k-1 -s k |、|Ws k |, Each time the mask slides to a sub-region, it performs binarization on that sub-region to extract the connected components of the bright stripes and obtains the centroid coordinates of the bright stripes, until the entire image is traversed.
[0056] Compared with conventional binarization methods, the results obtained are... Figure 4 Compared to the images shown, it is obvious that... Figure 5 The system visualizes the centroid coordinates of more bright stripe connected regions, providing more data for subsequent calculation of filament diameter and exhibiting high accuracy.
[0057] (5) Calculate the dimension d of the object being measured. s ;
[0058] The size d of the object being measured s The calculation formula is as follows:
[0059]
[0060]
[0061] In the formula, λ is the wavelength of the laser, in nm; z is the distance between the object being measured and the receiving screen, in mm; d r is the actual bright fringe distance, in mm; e is the ratio of the diffraction fringe image pixels to the actual size, in mm / pixel. The average bright fringe spacing, in mm, is calculated by taking the average of the distances between all adjacent bright fringes after removing the maximum and second-largest values, using the centroid coordinates of the bright fringes.
[0062] The present invention will now be described in detail with reference to specific examples:
[0063] Taking 83dtex / 48fFDY chemical fiber filament as an example, the average value obtained by taking multiple measurements with existing micrometers is 183.15μm, and this value is taken as the true value of the fiber.
[0064] The method for extracting the size of diffraction fringes based on image processing of the present invention is used to detect fibers of the same specification; wherein, W is set to 783, H is set to 133, the power of the laser is 2 milliwatts, and the object being tested is a chemical fiber filament in motion.
[0065] Depend on Figure 6It can be seen that the measured diameter of the chemical fiber filament in motion fluctuates around 183.15 μm, with the maximum measured diameter value being 184.17 μm, the minimum measured diameter value being 181.35 μm, and the average value being 182.79 μm. The error fluctuation range is within 0.98%, indicating high detection accuracy.
Claims
1. A method for extracting the size of diffraction fringes based on image processing, characterized in that, The object under test is illuminated with a laser to produce alternating bright and dark diffraction fringes on a receiving screen. An image acquisition device is used to capture the diffraction fringes, obtaining an image. This image is then divided into multiple sub-regions, and the centroid coordinates of the bright fringes within each sub-region are obtained. This allows the determination of the object's dimension d. s ; The object being measured is a chemical fiber filament in a stationary state or a chemical fiber filament in a moving state; the dimension d of the object being measured. s The diameter of the synthetic fiber filament; In a diffraction fringe image, each bright fringe is located in a different sub-region, and the boundary between any two adjacent sub-regions is the location of the dark fringe in the diffraction fringe image. The specific steps for dividing the diffraction fringe image into multiple sub-regions and obtaining the centroid coordinates of the bright fringes in each sub-region are as follows: ① Convert the diffraction fringe image into a grayscale matrix A W×H The matrix has W rows and H columns, and the element a in the i-th row and j-th column is... ij The value represents the gray value corresponding to each pixel in the diffraction fringe image, and the value range is 0~255, i=1,2,…,W, j=1,2,…,H; ② For the grayscale matrix A W×H Transpose to get A T H×W Multiplying this by the H-dimensional vector α, we obtain the summation matrix C of each column of the grayscale matrix. H×1 The formula is as follows: ; ③ Find the set using the least squares method k local minima The diffraction fringe image is divided into k+1 sub-regions, each sub-region having intervals of [0, s1], [s1, s2], [s2, s3], [s3, s4], ..., [s...]. k-1 , s k ]; ④ Create a rectangular mask of size W1×H1 on the diffraction fringe image as a sliding window, where H1 represents the pixel height of the mask and has the same value as H, and W1 represents the pixel width of the mask and has a variable value. ⑤ Slide the mask on the diffraction fringe image. When the mask slides from the 1st sub-region to the (k+1)th sub-region, the values of W1 are s1, |s1-s2|, |s2-s3|, |s3-s4|, ..., |s k-1 -s k |、|Ws k The mask is binarized for each sub-region it slides to, extracting the connected components of the bright stripes. The centroid coordinates (x, y) of the bright stripes are then determined using the gray-scale centroid method. t y t ), where t=1,2,…,k+1,x t Let y be the x-coordinate of the centroid of the bright fringe in the t-th sub-region. t Let be the ordinate of the centroid of the bright fringe in the t-th sub-region; The size d of the object being measured s The calculation formula is as follows: ; ; In the formula, λ is the wavelength of the laser, in nm; z is the distance between the object being measured and the receiving screen, in mm; d r is the actual bright fringe distance, in mm; e is the ratio of the diffraction fringe image pixels to the actual size, in mm / pixel. The average bright fringe spacing, in mm, is calculated by taking the average of the distances between all adjacent bright fringes after removing the maximum and second-largest values, using the centroid coordinates of the bright fringes.
2. The method for extracting the size of diffraction fringes based on image processing according to claim 1, characterized in that, The size of the diffraction fringe image is W×H, where W represents the pixel width of the diffraction fringe image and its value ranges from 500 to 1280, and H represents the pixel height of the diffraction fringe image and its value ranges from 100 to 500.
3. The method for extracting the size of diffraction fringes based on image processing according to claim 1, characterized in that, The laser is generated by a laser with a power of less than 10 milliwatts.
4. The method for extracting the size of diffraction fringes based on image processing according to claim 1, characterized in that, The receiving screen is a white, opaque panel.
5. The method for extracting the size of diffraction fringes based on image processing according to claim 1, characterized in that, The image acquisition device is an industrial camera.
6. The method for extracting the size of diffraction fringes based on image processing according to claim 5, characterized in that, Before acquiring the diffraction fringes, a long and narrow ROI region of size W×H is defined on the industrial camera so that the diffraction fringes are imaged within the defined ROI region, and only the image information within the ROI region is read out.