Method for accurate measurement of fiber width
By capturing fiber images with an electron microscope and combining binarization, brightness correction and filtering, morphological processing and filter filtering, along with the K-Means method, the problem of blurred fiber boundaries under the microscope was solved, and the fiber width was accurately measured.
Patent Information
- Application Number
- CN202010627199.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-07
- Filing Date
- 2020-07-01
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2040-07-01
AI Technical Summary
In traditional microscopic observation methods, fiber boundaries are blurred and difficult to define, resulting in inaccurate fiber width measurements.
Fiber images were captured using an electron microscope. The fiber boundaries and widths were accurately determined by binarization, brightness correction, morphological processing, and low-pass filtering, combined with the K-Means method.
Even when the fiber image is out of focus during microscope acquisition, the fiber width can be accurately measured, improving the accuracy of the measurement.
Smart Images

Figure CN112184614B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of textile component detection, in particular to a fiber width accurate measurement method. BACKGROUND
[0002] At present, the microscope observation method in the traditional textile component detection is mainly implemented by manual. The microscope observation method mainly obtains the morphology in the sampling slide through the microscope, and the fiber width is measured by manual according to the specified standard. In the microscope observation method, due to the shallow depth of field of the microscope, the boundary of part of the fiber is blurred and difficult to define. In the traditional method, manual refocusing is performed to obtain the clear fiber boundary. In summary, it is urgent to study the fiber width measurement method which can accurately measure the blurred boundary. SUMMARY
[0003] The present application aims to solve the problems in the prior art.
[0004] The technical scheme adopted to achieve the object of the present application is that the fiber width accurate measurement method mainly comprises the following steps:
[0005] 1) obtaining the original fiber picture shot by the electron microscope.
[0006] 2) performing binaryzation processing on the original fiber picture to preliminarily determine the fiber contour, and the main steps are as follows:
[0007] 2.1) performing convolution processing on the original fiber picture to obtain the relationship between the center pixel and the adjacent pixel of the original fiber picture, and drawing a feature map.
[0008] 2.2) calculating the difference of the same position in different feature maps to obtain the gradient change of the center pixel, and drawing a fiber gradient map,
[0009] 2.3) performing brightness correction on the feature map.
[0010] Further, the method for performing brightness correction on the feature map is a Gamma picture brightness correction method.
[0011] After brightness correction, the pixel point brightness O(r,c) is as follows:
[0012]
[0013] In the formula, I max is the maximum gradient in the feature map. I(r,c) is the gradient corresponding to the current pixel point. γ is the set correction value.
[0014] 2.4) performing binaryzation processing according to the pixel gradient after brightness correction to obtain a fiber binary picture.
[0015] 2.5) Morphological dilation and erosion are performed on the fiber binary image to eliminate the spots on the fiber contour edge, and a fiber contour image is obtained.
[0016] 3) The fiber original image is vertically sampled, and the sampled original pixel data is input into a low-pass filter to retain the low-frequency original pixel data and obtain a feature signal of the low-frequency original pixel data.
[0017] 4) The fiber boundary is determined based on the feature signal of the vertically sampled data, and the main steps are as follows:
[0018] 4.1) The first derivative of the feature signal of the low-frequency original pixel data is calculated to obtain a feature signal gradient.
[0019] 4.2) The maximum and minimum values in the feature signal gradient are determined. The y-axis position corresponding to the minimum value of the sampling position with the minimum coordinate is the upper boundary of the fiber, and the y-axis position corresponding to the minimum value of the sampling position with the maximum coordinate is the lower boundary of the fiber. The pixels of the sampling position with the minimum coordinate and the sampling position with the maximum coordinate are less than a threshold value ε.
[0020] 4.3) The effective sampling points and the invalid sampling points are distinguished based on the fiber boundary, and the main steps are as follows:
[0021] 4.3.1) The sampling positions before and after the sampling position are sampled to measure the fiber width.
[0022] 4.3.2) If the upper and lower boundaries of the fiber analyzed by the sampling position x, the sampling position x+1 and the sampling position x-1 are located in the range interval [y min , y max ], then the sampling position x is an effective sampling point, otherwise, the sampling position x is an invalid sampling point.
[0023] 4.3.3) It is judged whether the sampling position x is inside the fiber, if yes, the sampling position x is an effective sampling point, if not, the sampling position x is an invalid sampling point.
[0024] 4.4) If the minimum sampling position and / or the maximum sampling position is an invalid sampling point, the feature signal of the low-frequency original pixel data corresponding to the invalid sampling point is deleted, and step 4.1 is returned, otherwise, the boundary determination is ended.
[0025] 5) The fiber width of the sampling point, i.e. the distance between the upper and lower boundaries of the fiber, is calculated.
[0026] 6) The fiber width of the sampling point is evaluated using the K-Means method to obtain the effective sampling width of the fiber, and the main steps are as follows:
[0027] 6.1)Sort the fiber width of all sampling points in ascending order and establish the width set W=[W1, W2, …, Wn]. n] n is the total number of fiber width.
[0028] 6.2) Calculate the distance H i of the fiber width W j from all effective sampling width, and count the number of fiber width W i and the distance H j of the rest of the effective sampling width, so as to obtain the k-neighborhood number corresponding to the fiber width W i i=1, 2, …, n. j=1, 2, …, n-1.
[0029] 6.3) Determine the sampling width W k-max with the largest k-neighborhood number.
[0030] 6.4) Find all effective sampling widths adjacent to the sampling point corresponding to the sampling width W k-max , and calculate the average value to obtain the final width of the fiber.
[0031] It is worth noting that first, the picture is binarized by the 3x3 matrix edge detection method, and the fiber outline is determined by combining the morphological processing method. At the same time, the fiber original picture is longitudinally sampled, and the sampling data signal is passed through the set low-pass filter to obtain the transverse sampling characteristic signal. The position relationship between the minimum value in the characteristic signal and the minimum value of the adjacent sampling characteristic signal is analyzed to determine the fiber boundary and calculate the fiber width at the sampling position. Moreover, the effectiveness of the fiber boundary obtained is judged according to the fiber outline. Finally, K-Means is used to analyze all effective sampling widths of the fiber picture to obtain the accurate fiber width.
[0032] The technical effect of the present application is self-evident. The present application can accurately measure the fiber width in the case of defocusing of the fiber picture obtained by the microscope. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 is a fiber gradient map;
[0034] Figure 2 is a brightness correction feature map;
[0035] Figure 3 is a fiber outline map;
[0036] Figure 4 is a 3x3x28 convolution kernel example;
[0037] Figure 5 is a K-Means width analysis flowchart;
[0038] Figure 6 for the fiber original picture;
[0039] Figure 7 for the edge detection picture;
[0040] Figure 8 for the Gamma picture correction
[0041] Figure 9 for the fiber contour extraction;
[0042] Figure 10 for the original pixel data of x = 20;
[0043] Figure 11 for the feature signal after the original data filtering;
[0044] Figure 12 for the derivation of the feature signal;
[0045] Figure 13 for the fiber contour data of x = 20 position. DETAILED DESCRIPTION
[0046] The application will be further described below in conjunction with the embodiments, but should not be understood as limiting the above-mentioned subject matter of the application to the following embodiments. According to the ordinary technical knowledge and common means in the art, various substitutions and changes can be made without departing from the above-mentioned technical idea of the application, and all should be included in the protection scope of the application.
[0047] Example 1:
[0048] Referring to Figures 1 to 5 , the fiber width accurate measurement method mainly includes the following steps:
[0049] 1) Obtain the original fiber picture taken by an electron microscope.
[0050] 2) Perform binaryzation processing on the original fiber picture, thereby preliminarily determining the fiber contour, and the main steps are as follows:
[0051] 2.1) Perform convolution processing on the original fiber picture, obtain the relationship between the center pixel and the adjacent pixel of the original fiber picture, and draw a feature map.
[0052] Further, the application adopts a 3X3 self-defined convolution kernel, and the convolution operator dimension is 3x3x28.
[0053] By calculating the difference of the same position in different feature maps, the gradient change of the center pixel is obtained, that is, the fiber gradient map is obtained, such as Figure 1 Because the pixel gradient change range is relatively subtle, the method performs brightness correction on the feature map, such as Figure 2Finally, the gradient after brightness correction is binarized to obtain the binary image of the fiber contour, as shown in Figure 3 .
[0054] The convolution kernel in the method is a 3X3 convolution kernel with a center position of 0.3. The edge of the object in the picture is composed of various directions of the center position, so 2 positions are randomly selected from the remaining 9 positions, and the size of the corresponding position in the convolution kernel is set to be the same as the center position, i.e. 0.3, as shown in Figure 4 .
[0055] 2.2) Calculate the difference of the same position in different feature maps to obtain the gradient change of the center pixel and draw the fiber gradient map,
[0056] 2.3) Perform brightness correction on the feature map.
[0057] Further, the method for brightness correction of the feature map is a Gamma picture brightness correction method.
[0058] After brightness correction, the pixel brightness O(r,c) is as follows:
[0059]
[0060] In the formula, I max is the maximum gradient in the feature map. I(r,c) is the gradient corresponding to the current pixel. γ is the set correction value.
[0061] 2.4) Binarize the pixel gradient after brightness correction to obtain the fiber binary image.
[0062] 2.5) Perform morphological dilation and erosion on the fiber binary image to eliminate the spots on the edge of the fiber contour to obtain the contour image of the fiber.
[0063] 3) Perform longitudinal sampling on the fiber original image, and input the sampled original pixel data into a low-pass filter to retain the low-frequency original pixel data and obtain the feature signal of the low-frequency original pixel data.
[0064] 4) Based on the feature signal of the longitudinal sampling data, determine the fiber boundary, and the main steps are as follows:
[0065] 4.1) Calculate the first derivative of the feature signal of the low-frequency original pixel data to obtain the gradient of the feature signal.
[0066] 4.2) Determine the maximum and minimum of the feature signal gradient, the minimum of the sampling position with the minimum coordinate corresponds to the upper boundary of the fiber, the minimum of the sampling position with the maximum coordinate corresponds to the lower boundary of the fiber. The pixel of the sampling position with the minimum coordinate and the sampling position with the maximum coordinate is less than the threshold value ε.
[0067] Because there are many minimums and maximums in the feature signal gradient of each sampling. The minimum here refers to the minimum of the minimums corresponding to the pixel values that meet the constraints. For example, there are minimums corresponding to the coordinates [22, 24, 35, 56, 67, 140, 170], and the corresponding pixel values are [56, 23, 76, 58, 79, 37, 25]. The given constraint is that the pixel value corresponding to the minimum is less than 30, so the positions that meet the constraint are 24 and 170. Therefore, the minimum position is taken here, i.e., 24 is the upper boundary of the fiber.
[0068] 4.3) Based on the fiber boundary, distinguish the valid sampling points and invalid sampling points, the main steps are as follows:
[0069] 4.3.1) Sample before and after the sampling position to measure the fiber width.
[0070] 4.3.2) If the upper boundary and lower boundary of the fiber analyzed by the sampling position x, the sampling position x+1 and the sampling position x-1 are located in the range interval [y min , y max ], then the sampling position x is a valid sampling point, otherwise, the sampling position x is an invalid sampling point.
[0071] 4.3.3) Determine whether the sampling position x is inside the fiber, if yes, then the sampling position x is a valid sampling point, if not, then the sampling position x is an invalid sampling point.
[0072] 4.4) If the minimum sampling position and / or the maximum sampling position is an invalid sampling point, delete the feature signal of the low-frequency original pixel data corresponding to the invalid sampling point, and return to step 4.1, otherwise, end the boundary determination.
[0073] 5) Calculate the fiber width of the sampling points, i.e., the distance between the upper boundary and the lower boundary of the fiber.
[0074] 6) Use the K-Means method to evaluate the fiber width of the sampling points to obtain the effective sampling width of the fiber, the main steps are as follows:
[0075] 6.1) Sort all the fiber widths corresponding to the sampling points in ascending order, and establish a width set W=[W1, W2, …, W n] n is the total number of fiber widths.
[0076] 6.2) Calculate the fiber width W i Distance H from all effective sampling widths j And count the number of fiber width W i Distance H from the rest of the effective sampling widths j ∈[-k,+k], that is, count the number of width W j ∈[W j -k,W j +k], so as to obtain the corresponding k-neighbor number of fiber width W i i=1,2,…,n. j=1,2,…,n-1. k represents the set k value of the K-Means method.
[0077] 6.3) Determine the sampling width W k-max with the maximum k-neighbor number.
[0078] 6.4) Find all effective sampling widths adjacent to the corresponding sampling points of the sampling width W k-max , and calculate the average value, which is the final width of the fiber.
[0079] Example 2:
[0080] The fiber width accurate measurement method mainly includes the following steps:
[0081] 1) Obtain the original fiber picture taken by an electron microscope.
[0082] 2) Perform binaryzation processing on the original fiber picture to preliminarily determine the fiber contour.
[0083] 3) Perform longitudinal sampling on the fiber original picture, and input the original pixel data obtained by sampling into a low-pass filter, retain the low-frequency original pixel data, and obtain the characteristic signal of the low-frequency original pixel data.
[0084] 4) Determine the fiber boundary based on the characteristic signal of the longitudinal sampling data.
[0085] 5) Calculate the fiber width of the sampling points, that is, the distance between the upper boundary and the lower boundary of the fiber.
[0086] 6) Use the K-Means method to evaluate the fiber width of the sampling points to obtain the effective sampling width of the fiber.
[0087] Example 3:
[0088] The fiber width accurate measurement method mainly includes the steps in Example 2, wherein the main steps of preliminarily determining the fiber contour are as follows:
[0089] 1) Perform convolution processing on the original fiber picture to obtain the relationship between the center pixel and the adjacent pixel of the original fiber picture, and draw a feature map.
[0090] 2) Calculate the difference of the same position in different feature maps, get the gradient change of the center pixel, and draw the fiber gradient map,
[0091] 3) Brightness correction is performed on the feature map.
[0092] Further, the method for brightness correction of the feature map is a Gamma picture brightness correction method.
[0093] After brightness correction, the pixel point brightness O(r,c) is as follows:
[0094]
[0095] In the formula, I max is the maximum gradient in the feature map. I(r,c) is the gradient corresponding to the current pixel point. γ is the set correction value.
[0096] 4) According to the pixel gradient after brightness correction, binaryzation processing is performed to obtain a fiber binary picture.
[0097] 5) Morphological dilation and corrosion are performed on the fiber binary picture to eliminate the spots on the fiber contour edge, and a fiber contour picture is obtained.
[0098] Example 4:
[0099] The main steps of the fiber width accurate measurement method are shown in Example 2, wherein the main steps of determining the fiber boundary are as follows:
[0100] 1) Calculate the first derivative of the feature signal of the low-frequency original pixel data to obtain the feature signal gradient.
[0101] 2) Determine the maximum value and the minimum value in the feature signal gradient, and take the y-axis position corresponding to the minimum value of the minimum sampling position as the upper boundary of the fiber, and take the y-axis position corresponding to the minimum value of the maximum sampling position as the lower boundary of the fiber.
[0102] 3) Based on the fiber boundary, distinguish the effective sampling points and the invalid sampling points, and the main steps are as follows:
[0103] 3.1) Sample before and after the sampling position to measure the fiber width.
[0104] 3.2) If the upper boundary and the lower boundary of the fiber analyzed by the sampling position x, the sampling position x+1 and the sampling position x-1 are located in the range interval [y min , y max ], then the sampling position x is an effective sampling point, otherwise, the sampling position x is an invalid sampling point.
[0105] 3.3) judge whether the sampling position x is inside the fiber, if yes, the sampling position x is a valid sampling point, if not, the sampling position x is an invalid sampling point.
[0106] 4) if the minimum sampling position and / or the maximum sampling position is an invalid sampling point, delete the feature signal of the low frequency original pixel data corresponding to the invalid sampling point, and return to step 1, otherwise, end the boundary determination.
[0107] Example 5:
[0108] The main steps of the fiber width accurate measurement method are shown in example 2, wherein the effective sampling width of the fiber is obtained, and the main steps are as follows:
[0109] 1) sort the fiber widths corresponding to all sampling points in ascending order, and establish a width set W = [W1, W2, …, Wn]. n] n is the total number of fiber widths.
[0110] 2) calculate the distance H i between the fiber width W j and all effective sampling widths, and count the number of distances H i between the fiber width W j and the remaining effective sampling widths, so as to obtain the k-neighbor number corresponding to the fiber width W i i = 1, 2, …, n. j = 1, 2, …, n-1.
[0111] 3) determine the sampling width W k-max with the maximum k-neighbor number.
[0112] 4) find all effective sampling widths adjacent to the sampling point corresponding to the sampling width W k-max , and calculate the average value to obtain the final width of the fiber.
[0113] Example 6:
[0114] Referring to Figures 6 to 13 , the experiment for verifying the fiber width accurate measurement method mainly includes the following steps:
[0115] 1) extract the fiber region.
[0116] 2) fiber boundary analysis:
[0117] In this embodiment, by sampling and analyzing the position of x=20, the output is as follows. At the position of x=20, the upper boundary of the fiber is 12 and the lower boundary of the fiber is 46. At the same time, at the position of x=19, the upper boundary of the fiber is 12 and the lower boundary of the fiber is 39. At the position of x=21, the upper boundary of the fiber is 12 and the lower boundary of the fiber is 39. Therefore, when the tolerance range of the set width is greater than 7, the sampling width of x=20 is valid sampling. If the tolerance range is less than 7, the sampling of this position is invalid sampling. Finally, analyze whether the sampling point is inside the fiber. If it is inside the fiber, the sampling point is valid sampling. If it is outside the fiber contour, the sampling point is invalid sampling. In this sampling, the interval [9, 49] is within the fiber contour interval [8, 52], and all x=20 samplings are valid samplings.
[0118] 3) K-Mean width analysis
[0119] By sampling 30 points of the fiber image, the following width ascending data is obtained. From Table 1, when the valid width is 40, the maximum number of k-neighbors is obtained, so the average value of the valid width of all k=3 neighbors of the width 40 is calculated to obtain the final width of the fiber as 40.03704.
[0120] Table 1: When k=3, the number of k-neighbors corresponding to all valid widths
[0121] Effective width 36 37 37 37 38 38 38 38 39 39 39 40 40 40 40 K number of neighbors 11 20 20 20 21 21 21 21 22 22 22 27 27 27 27 Effective width 40 40 40 40 40 41 42 43 43 43 43 43 43 44 44 K number of neighbors 27 27 27 27 27 26 22 19 19 19 19 19 19 10 10
Claims
1. A method for accurate measurement of fiber width, characterized by, The method comprises the following steps: 1) obtaining an original fiber picture taken by an electron microscope; 2) performing binaryzation on the original fiber picture to preliminarily determine a fiber contour; 3) performing longitudinal sampling on the original fiber picture, and inputting original pixel data obtained by sampling into a low-pass filter to retain low-frequency original pixel data, which is recorded as a characteristic signal of the low-frequency original pixel data; 4) determining a fiber boundary based on the characteristic signal of the low-frequency original pixel data; 5) calculating a fiber width of a sampling point, i.e. a distance between an upper boundary and a lower boundary of the fiber; 6) evaluating the fiber width of the sampling point by using a K-Means method to obtain an effective sampling width of the fiber. The step of evaluating the effective sampling width of the fiber is as follows: 6.1) Sort the fiber width of all sampling points in ascending order and establish the width set W = [W1, W2, …, Wn] where n is the total number of fiber widths. n] ; n is the total number of fiber widths. 6.2) Calculate fiber width W i Distance H from all valid sampling widths j And count the fiber width W i The distance H between the remaining effective sampling widths j The number of elements ∈ [-k,+k] is obtained, thus yielding the fiber width W. i The corresponding number of k-nearest neighbors; i = 1, 2, ..., n; j = 1, 2, ..., n-1; 6.3) Determine the sampling width W with the largest number of k-nearest neighbors k-max ; 6.4) Find the sampling width W k-max All the effective sampling widths corresponding to the sampling points adjacent to the fiber are found and the average value is calculated to get the final width of the fiber.
2. The fiber width precision measurement method according to claim 1, characterized by: The step of preliminarily determining the fiber contour is as follows: 1) performing convolution on the original fiber picture to obtain a relationship between a center pixel and adjacent pixels of the original fiber picture, and drawing a feature map; 2) calculating a difference of a same position in different feature maps to obtain a gradient change of the center pixel, and drawing a fiber gradient map, 3) performing brightness correction on the feature map; 4) performing binaryzation on a pixel gradient after the brightness correction to obtain a fiber binary picture; 5) performing morphological dilation and corrosion on the fiber binary picture to eliminate spots on a fiber contour edge to obtain a contour picture of the fiber.
3. The fiber width precision measurement method according to claim 2, characterized by: The method for performing brightness correction on the feature map is a Gamma picture brightness correction method; After the brightness correction, a pixel point brightness O(r,c) is as follows: In the formula, I max is the maximum gradient in the feature map; I(r, c) is the gradient corresponding to the current pixel point; and γ is a set correction value.
4. The fiber width precision measurement method according to claim 1, wherein, The step of determining the fiber boundary is as follows: 1) calculating a first derivative of the characteristic signal of the low-frequency original pixel data to obtain a gradient of the characteristic signal; 2) determining a maximum value and a minimum value in the gradient of the characteristic signal, and a y-axis position corresponding to the minimum value of a sampling position with a minimum coordinate is an upper boundary of the fiber, and a y-axis position corresponding to the minimum value of a sampling position with a maximum coordinate is a lower boundary of the fiber; 3) distinguishing effective sampling points and ineffective sampling points based on the fiber boundary, and the steps are as follows: 3.1) sampling before and after the sampling position to measure a fiber width; 3.2) If the fiber upper boundary and lower boundary analyzed from the sampling position x, the sampling position x+1 and the sampling position x-1 are located in the range interval [y min , y max ], then the sampling position x is a valid sampling point, otherwise, the sampling position x is an invalid sampling point; 3.3) judging whether the sampling position x is inside the fiber, if yes, the sampling position x is an effective sampling point, if not, the sampling position x is an ineffective sampling point; 4) if the minimum sampling position and / or the maximum sampling position is an ineffective sampling point, deleting the characteristic signal of the low-frequency original pixel data corresponding to the ineffective sampling point, and returning to step 1, otherwise, ending the boundary determination.
5. The fiber width precision measurement method according to claim 4, wherein, The pixel of the sampling position with the minimum coordinate and the sampling position with the maximum coordinate is less than a threshold value ε.
Citation Information
Patent Citations
Computer automatic recognition apparatus and method for profile fiber
CN101424680A
Microscopic image-based fiber fineness measurement method
CN101806583A