A method for testing the tensile strength of fabrics
Through improved optical flow method and Gaussian filtering technology, the image feature points and optical flow information before and after the fabric tensile strength test are obtained, and the fabric stretch index is calculated, which solves the problem of inaccurate fabric tensile detection results in the prior art, and achieves more accurate tensile detection.
Patent Information
- Application Number
- CN202410886276.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-07-03
AI Technical Summary
The existing computer vision-based fabric tensile quality detection methods have accumulated errors, resulting in inaccurate detection results.
The improved optical flow method combined with Gaussian filtering is used to obtain the image feature points and optical flow information before and after the tensile strength test of the fabric to be detected, and the fabric stretch index is calculated, and the optical flow vector field is integrated with Gaussian filtering to obtain the tensile quality detection result of the fabric.
It improves the accuracy of fabric tensile resistance detection, can qualitatively and quantitatively analyze the tensile properties of fabrics, reduces the calculation amount and improves the pixel occlusion situation, and enhances the accuracy of motion estimation.
Smart Images

Figure CN118967552B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method for detecting the tensile strength of fabrics. Background Art
[0002] Fabric tensile strength is a key indicator of fabric quality and performance. Tensile strength refers to a fabric's ability to resist external tension. By testing the tensile strength of different fabrics, we can compare their performance differences under the same conditions. This helps optimize material selection and product design, ensuring the most appropriate fabric is selected to meet the needs of specific applications, such as clothing, sports equipment, car seats, and medical supplies.
[0003] Existing computer vision-based fabric tensile strength quality inspection methods generally use optical flow to analyze the motion and stretching trajectory of each point on the fabric being inspected, and then test the fabric tensile strength based on the analysis results. However, this method may not effectively capture the actual motion of some points, leading to deviations or incorrect motion estimations when analyzing the motion and stretching trajectory, resulting in accumulated errors and inaccurate fabric tensile strength quality inspection results. Summary of the Invention
[0004] In order to solve the above technical problems, the present application provides a method for detecting the tensile strength of fabrics to solve the existing problems.
[0005] A fabric tensile strength quality testing method of the present application adopts the following technical solution:
[0006] An embodiment of the present application provides a method for testing the tensile strength of a fabric, the method comprising the following steps:
[0007] Acquire images of the fabric to be tested before and after the tensile strength test;
[0008] Pixels are screened based on their positions in the image before the test and the distribution of grayscale values in the local range to obtain feature points of the image before the test, and feature points and corresponding optical flow information of the image after the test are obtained by the optical flow method;
[0009] The optical flow information between different feature points in the local range of each pixel in the tested image is used to calculate the optical flow information of each pixel except the feature points, and the optical flow vector field is obtained by combining Gaussian filtering;
[0010] Based on the fabric tensile strength test time, the optical flow vector field is integrated to obtain the fabric stretch index;
[0011] The tensile strength of the fabric to be tested is tested in combination with the fabric tensile index.
[0012] The feature points of the image before the test are obtained:
[0013] For the image before the test, the fabric distance feature value of each pixel is obtained according to the position distribution of the pixels and the distance characteristics between the pixels;
[0014] According to the discrete degree and energy distribution of the grayscale value in the local range of each pixel, the local grayscale feature of each pixel is obtained;
[0015] The fabric distance eigenvalue and local grayscale eigenvalue of each pixel in the image before the test are fused to obtain the characteristic factor of each pixel, and the average value of the characteristic factors of all pixels in the image before the test is used as the characteristic threshold; all pixels whose characteristic factors are greater than the characteristic threshold are composed of a first set of candidate feature points; feature detection is performed on the image before the test to obtain a second set of candidate feature points, and the pixels in the intersection of the first set of candidate feature points and the second set of candidate feature points are used as the feature points of the image before the test.
[0016] The step of obtaining the fabric distance characteristic value of each pixel includes:
[0017] According to the positions of the clamps on both sides in the image before the test, the reference lines on both sides are determined; according to the reference lines on both sides, the first edge pixel and the second edge pixel are determined; the reference lines on both sides are cross-connected to confirm the center pixel; the distance between each pixel and the first edge pixel and the second edge pixel is recorded as the first distance and the second distance respectively; the distance between each pixel and the center pixel is obtained and recorded as the center distance; the minimum value of the first distance and the second distance of each pixel is obtained; the difference between the minimum value and the center distance is used as the fabric distance feature value of each pixel.
[0018] The obtaining of the local grayscale feature of each pixel includes:
[0019] According to the degree of discreteness of the grayscale values of all pixels in the neighborhood of each pixel, the local variance of each pixel is obtained; the grayscale co-occurrence matrix of the neighborhood of each pixel is obtained, and the diagonal elements of the grayscale co-occurrence matrix of each pixel are fused to obtain the local energy of each pixel; the inverse proportional mapping result of the local variance of each pixel and the local energy is used as the local grayscale feature of each pixel.
[0020] The calculation of the optical flow information of each pixel except the feature points includes:
[0021] According to the change of optical flow information between feature points in the local range of each feature point in the tested image, combined with the fabric distance feature value, the deformation influence domain of each feature point is obtained;
[0022] The feature point at the center of all deformation influence domains where any pixel is located is recorded as the reference feature point of the any pixel, and the distance between the any pixel and its reference feature point is fused with the corresponding optical flow information to obtain the optical flow information of the any pixel.
[0023] The step of obtaining the deformation influence domain of each feature point includes:
[0024] Obtaining a deformation difference coefficient of any two feature points according to a change difference in optical flow information between the two feature points in the image after the test;
[0025] In the tested image, the distance between the center pixel and any edge pixel is obtained and fused with the normalized result of the fabric distance eigenvalue of each feature point to obtain the fabric influence distance of each feature point; with any feature point as the center, within the corresponding fabric influence distance, the distance between the feature points with the smallest deformation difference coefficient from any feature point is used as the radius to obtain the deformation influence domain of any feature point.
[0026] The steps for obtaining the deformation difference coefficient of any two feature points are as follows:
[0027] The gradient of the optical flow information of each feature point in the tested image is obtained, and the difference in the gradient of the optical flow information of any two feature points is used as the deformation difference coefficient of the arbitrary two feature points.
[0028] The step of combining Gaussian filtering to obtain an optical flow vector field includes:
[0029] The standard deviation of the horizontal component of all optical flow information of each pixel and its eight neighboring pixels in the tested image is used as the sigma parameter of the Gaussian filter for each pixel, and a horizontal convolution is performed. Then, the standard deviation of the vertical component of all optical flow information of the corresponding pixel and its eight neighboring pixels is used as the sigma parameter of the Gaussian filter, and a vertical convolution is performed on the horizontal filtering result to obtain the optical flow vector field after Gaussian filtering.
[0030] Wherein, obtaining the fabric stretch index comprises:
[0031] The time interval between the image acquisition before and after the test is obtained and recorded as the fabric stretching time. The optical flow information of each pixel in the image after the test is integrated within the fabric stretching time and multiplied by the corresponding fabric distance feature value. The accumulated value of the multiplication results of all pixels is used as the fabric stretching index.
[0032] The method of testing the tensile strength of the fabric to be tested includes:
[0033] The fabric stretch index of the standard fabric is used as the detection threshold. If the fabric stretch index is greater than or equal to the detection threshold, the tensile resistance of the fabric to be tested is qualified; otherwise, the tensile resistance of the fabric to be tested is unqualified.
[0034] This application has at least the following beneficial effects:
[0035] The present invention first obtains images of the fabric to be tested before and after a tensile strength test, which facilitates subsequent analysis of the degree of deformation of the fabric to be tested before and after the test. Based on the degree of deformation of the fabric to be tested in the test area during the test and the texture characteristics of the fabric, pixels in the pre-test image are screened as feature points of the pre-test image. The feature points and corresponding optical flow information of the post-test image are obtained using the optical flow method. This method has the beneficial effect of reducing the computational complexity of the optical flow method, improving the situation where some pixels are occluded, and more accurately tracking pixel motion than traditional optical flow methods. The optical flow information between different feature points within the local range of each pixel in the post-test image is calculated, and the optical flow vector field is smoothed using Gaussian filtering. The optical flow vector field is then integrated based on the tensile strength test time of the fabric to obtain the fabric stretch index. The method has the beneficial effect of not only qualitatively judging the tensile quality of the fabric, but also quantitatively analyzing the tensile properties of the fabric, making the tensile quality test of the fabric more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0037] Figure 1 A flowchart of the steps of a fabric tensile strength quality testing method provided in this application;
[0038] Figure 2 A schematic diagram of obtaining the central pixel provided in this application;
[0039] Figure 3 A flowchart for obtaining feature points of an image before testing provided by this application;
[0040] Figure 4 This is a schematic diagram of the distribution of the deformation influence domain of the pixels provided in this application. DETAILED DESCRIPTION
[0041] To further illustrate the technical means and effectiveness of this application's implementation of the intended invention, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effectiveness of a fabric tensile strength quality testing method proposed in this application. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0042] Unless otherwise defined, terms such as "comprises," "comprising," or any other variants thereof are intended to encompass non-exclusive inclusion, such that a circuit structure, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such article or device. In the absence of further restrictions, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the article or device comprising the element. In addition, the term "and\or" as used herein includes any and all combinations of one or more related listed items. All technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains.
[0043] The following describes in detail a method for testing the tensile strength of fabrics provided by the present application with reference to the accompanying drawings.
[0044] An embodiment of the present application provides a method for testing the tensile strength of fabrics. For details, please refer to Figure 1 , the method comprises the following steps:
[0045] Step 1: Obtain images of the fabric to be tested before and after the tensile strength test.
[0046] Fabric samples were tensile tested using traditional mechanical testing methods. In this example, a 100 mm x 100 mm sample was prepared; the sample size can be customized by the user. The fabric sample was secured to the testing equipment on both sides with clamps. Tension was applied, gradually increasing until the sample broke. Sensors on the testing equipment monitored the tensile force in real time and converted the test results into the fabric's tensile strength.
[0047] Use a camera to record the entire fabric tensile test process, with the camera's coverage encompassing the entire fabric sample. The first frame of the video is selected as the pre-test image, and the previous frame of the unbroken fabric sample before it breaks is selected as the post-test image. It should be understood that because the camera records the entire fabric sample, the captured image includes the gripper used to stretch the fabric sample.
[0048] Furthermore, the obtained image is subjected to Gaussian filtering to remove noise, and then the image is converted into a grayscale image, and subsequent analysis is performed based on the grayscale image.
[0049] It should be noted that Gaussian filtering and image grayscale are well-known technologies, and the specific process will not be repeated here; implementers can choose appropriate image processing methods on their own, and this application does not impose any restrictions on this.
[0050] Step 2: Filter pixels based on their positions in the image before the test and the distribution of grayscale values in the local range to obtain feature points of the image before the test, and obtain feature points of the image after the test and the corresponding optical flow information through the optical flow method.
[0051] This application proposes a method for detecting the tensile strength of fabrics. The method uses an improved optical flow method to analyze the optical flow vector field formed by the characteristic points of the fabric after stretching, analyzes the stress on the fabric, and compares it with a standard fabric to obtain the tensile strength of the fabric.
[0052] After stretching the fabric, different areas with different fabric characteristics will produce different deformations. It is understandable that when the fabric is clamped on the test equipment for stretching, larger deformations will occur near the clamp and in the middle of the fabric. More feature points should be selected in these areas of the pre-test image to better represent the degree of deformation of the fabric. Selecting a small number of feature points in areas with smaller deformations can represent the deformation of these areas.
[0053] Based on this, for each image, the fabric distance feature value of each pixel is obtained according to the position distribution of the pixels and the distance characteristics between the pixels:
[0054] According to the positions of the clamps on both sides in the image before the test, the reference lines on both sides are determined; according to the reference lines on both sides, the first edge pixel and the second edge pixel are determined; the reference lines on both sides are cross-connected to confirm the center pixel; the distance between each pixel and the first edge pixel and the second edge pixel is recorded as the first distance and the second distance respectively; the distance between each pixel and the center pixel is obtained and recorded as the center distance; the minimum value of the first distance and the second distance of each pixel is obtained; the difference between the minimum value and the center distance is used as the fabric distance feature value of each pixel.
[0055] It should be noted that the distance between two pixels can be measured by Euclidean distance, Manhattan distance, etc.; the difference between two variables can be obtained by subtraction or division. The implementer can choose the appropriate method at his / her own, and this application does not impose any restrictions on this.
[0056] In this embodiment, the Euclidean distance is used to measure the distance between two pixels. Edge detection is performed on the image before the test. Since the positions of the clamps in the image before the test of this embodiment are on the left and right sides of the fabric sample, for the clamp on the left, the point where the fabric edge and the clamp coincide is connected as a first reference line. Correspondingly, a second reference line is obtained based on the clamp on the right. The pixel corresponding to the center of the reference line is used as the edge pixel to obtain a first edge pixel and a second edge pixel. The endpoints of the first reference line and the second reference line are cross-connected, and the intersection is used as the center pixel.
[0057] Among them, the schematic diagram of obtaining the center pixel is as follows: Figure 2 As shown in the figure, L represents the first reference line, R represents the second reference line, and M represents the center pixel.
[0058] Furthermore, pixels whose first distance is greater than or equal to the second distance are recorded as right pixels; otherwise, they are recorded as left pixels. If the pixel is a right pixel, the difference between the center distance and the corresponding second distance is recorded as the fabric distance feature value of the pixel. Correspondingly, if the pixel is a left pixel, the difference between its center distance and the corresponding first distance is calculated and recorded as the fabric distance feature value of the pixel.
[0059] It should be noted that the closer a pixel is to the center pixel or the edge pixel, the greater the deformation of the area where the pixel is located after the fabric is stretched, and the number of feature points that need to be selected near the pixel is greater than that of another pixel that is farther away from the center pixel or the edge pixel.
[0060] It can be understood that the larger the value of the fabric distance eigenvalue, the closer the pixel is to the center pixel or the edge pixel. When the fabric distance eigenvalue is 0, the pixel is located on the straight line between the center pixel and the edge pixel, and this position is the area with the smallest deformation.
[0061] Based on this, the local grayscale features of each pixel are obtained according to the discrete degree of the grayscale value and the energy distribution within the local range of each pixel:
[0062] According to the degree of discreteness of the grayscale values of all pixels in the neighborhood of each pixel, the local variance of each pixel is obtained; the grayscale co-occurrence matrix of the neighborhood of each pixel is obtained, and the diagonal elements of the grayscale co-occurrence matrix of each pixel are fused to obtain the local energy of each pixel; the inverse proportional mapping result of the local variance of each pixel and the local energy is used as the local grayscale feature of each pixel.
[0063] It should be noted that the degree of dispersion describes the dispersion of the data, that is, the distribution of data points relative to the center of the data set. Commonly used dispersion measures include variance, standard deviation, range, etc.; generally, two variables are fused by addition, multiplication, or a mixture of addition and multiplication; the two variables are inversely mapped, usually by subtraction or division; the implementer can choose a suitable method for calculation, and this application does not impose any restrictions on this.
[0064] In this embodiment, a 3×3 neighborhood window is taken with each pixel as the center, and the pixels at the edge are filled with the mean. Other appropriate neighborhood window sizes can also be selected to calculate the variance of the pixel grayscale values within the neighborhood window, which is recorded as the local variance of the pixel.
[0065] It can be understood that the larger the local variance of a pixel, the more dispersed the grayscale value distribution in the neighborhood window, which means that the greater the grayscale value difference in the neighborhood window, the more complex the texture in the neighborhood window.
[0066] Obtain the gray-level co-occurrence matrix of the pixels in the neighborhood window of each pixel point, and calculate the sum of the elements on the diagonal of the gray-level co-occurrence matrix. It should be noted that the elements on the diagonal of the gray-level co-occurrence matrix represent the number of times pixels with the same gray value appear in pairs. Therefore, their sum can be used to represent the local energy. Regions with higher local energy usually indicate more uniform textures, while regions with lower local energy may indicate more complex or more varied textures.
[0067] The ratio of the local variance and local energy of each pixel is recorded as the local grayscale feature of each pixel.
[0068] It should be noted that since the patterns and weaving methods on the fabrics are different, the textures formed are also different. Selecting pixels with more complex textures as feature points is beneficial to the subsequent calculation of optical flow.
[0069] It can be understood that the larger the value of the local grayscale feature is, the more complex the texture around the pixel is, and the greater the possibility of selecting the pixel as a feature point.
[0070] Pixels are screened based on the fabric distance feature value and local grayscale feature of the pixels in the image before the test to obtain feature points:
[0071] The fabric distance eigenvalue and local grayscale eigenvalue of each pixel in the image before the test are fused to obtain the characteristic factor of each pixel, and the average value of the characteristic factors of all pixels in the image before the test is used as the characteristic threshold; all pixels whose characteristic factors are greater than the characteristic threshold are composed of a first set of candidate feature points; feature detection is performed on the image before the test to obtain a second set of candidate feature points, and the pixels in the intersection of the first set of candidate feature points and the second set of candidate feature points are used as the feature points of the image before the test.
[0072] It should be noted that the feature detection algorithm is used to identify and track key feature points in the image. Commonly used feature detection algorithms include: Harris corner detection, scale-invariant feature transform (SIFT), speeded up robust features (SURF), ORB (Oriented FAST and Rotated BRIEF), etc. Implementers can choose appropriate algorithms to detect feature points in the image, and this application does not impose any restrictions on this.
[0073] In this embodiment, the product of the fabric distance characteristic value and the local grayscale characteristic value of each pixel is recorded as the characteristic factor of each pixel. The algorithm used for feature detection of the image is the SIFT algorithm.
[0074] It should be understood that by calculating the fabric distance eigenvalue and local grayscale feature of the pixel in the image before the test, the possibility of the pixel becoming a feature point is characterized from two aspects. That is, the closer a pixel is to the center pixel and the edge pixel, the greater the deformation it produces after the fabric is stretched, and the more likely it is to become a feature point. In addition, the more complex the texture of a pixel, the more information it contains, the more accurate the optical flow calculation, and the more likely it is to become a feature point, which enhances the interpretability of the feature point.
[0075] Among them, the flow chart of obtaining the feature points of the image before testing is as follows: Figure 3 shown.
[0076] Based on the image before the test and its feature points, the feature points of the image after the test and the corresponding optical flow information are obtained through the pyramid LK optical flow method. The pyramid LK optical flow method is a well-known technology and the specific process will not be repeated here.
[0077] It should be noted that the LK optical flow method was originally used to obtain dense optical flow. Since the algorithm can also be applied to a group of points in the input image, it has become an important method for obtaining sparse optical flow. Considering the movement speed of the object, the error can be reduced by reducing the size of the image. Therefore, a pyramid image of the original image is generated and solved layer by layer.
[0078] It's also worth noting that calculating dense optical flow requires processing every pixel in the image, which is computationally intensive. Furthermore, stretching the fabric can cause parts of the fabric to bulge, obscuring other pixels and making it impossible to calculate optical flow. Therefore, sparse optical flow is calculated for feature points. Analyzing only the optical flow information at feature points reduces computational complexity and improves the situation where some pixels are obscured.
[0079] Step 3: Calculate the optical flow information of each pixel except the feature points through the optical flow information between different feature points in the local range of each pixel in the tested image, and combine it with Gaussian filtering to obtain the optical flow vector field.
[0080] Since the optical flow information obtained through feature points is limited and cannot fully represent the deformation of the fabric after stretching, it is also necessary to interpolate and estimate the pixels where the optical flow information is not calculated to obtain the optical flow vector field of all pixels.
[0081] It can be understood that the optical flow information of the feature point can be expressed in the form of a vector (u, v), where u is the horizontal optical flow component, that is, the optical flow size in the horizontal direction; v is the vertical optical flow component, that is, the optical flow size in the vertical direction.
[0082] The deformation influence domain of the feature point is obtained by the fabric distance eigenvalue of the feature point and the difference between different feature points. According to the relationship between the deformation influence domains of different feature points, optical flow information is assigned to the pixels that are not feature points.
[0083] According to the change of optical flow information between feature points in the local range of each feature point in the tested image, combined with the fabric distance feature value, the deformation influence domain of each feature point is obtained:
[0084] The gradient of the optical flow information of each feature point in the tested image is obtained, and the difference in the gradient of the optical flow information of any two feature points is used as the deformation difference coefficient of the optical flow information of the any two feature points.
[0085] In the tested image, the distance between the center pixel and any edge pixel is obtained and fused with the normalized result of the fabric distance eigenvalue of each feature point to obtain the fabric influence distance of each feature point; with any feature point as the center, within the corresponding fabric influence distance, the distance between the feature points with the smallest deformation difference coefficient from any feature point is used as the radius to obtain the deformation influence domain of any feature point.
[0086] In this embodiment, the gradient of the optical flow of each feature point, that is, the rate of change of the optical flow vector in space, is calculated by taking the spatial derivatives of the horizontal optical flow component and the vertical optical flow component of the optical flow information; the result of subtracting the gradients of the optical flow information of any two feature points is recorded as the deformation difference coefficient of the said any two feature points.
[0087] Since the distances between the center pixel and the first edge pixel and the second edge pixel are equal, the distance between the center pixel and the first edge pixel is obtained and multiplied by the normalized result of the fabric distance eigenvalue of each feature point to obtain the fabric influence distance of each feature point; within the fabric influence distance centered on each feature point, the Euclidean distance between the feature point with the smallest deformation difference coefficient with the feature point is used as the radius, and the circular area of the radius is used as the deformation influence domain of the feature point.
[0088] It should be noted that the deformation influence domains of different feature points overlap with each other. The closer a pixel is to a feature point, the greater the influence of this feature point. The optical flow information of the pixel can be estimated based on the distance from the pixel to different feature points.
[0089] It can be understood that the feature points that have obtained optical flow information have more obvious texture features, or are closer to the center pixel or edge pixel and produce larger deformation displacement, so the optical flow information of the feature point can approximately represent the optical flow information of other pixels in its neighborhood.
[0090] The deformation difference coefficient can represent the difference between adjacent feature points. The larger its value is, the greater the difference between the two feature points is, and the less likely they are to be in the same area. On the contrary, the more similar they are, the more similar the impact they will have on the surrounding pixels.
[0091] The fabric distance eigenvalue of the feature point is then used to limit the size of the feature point's deformation influence domain. This prevents two feature points that are far apart from each other from becoming similar, thereby forming a larger deformation influence domain. For example, the deformation difference coefficient between the feature points near the first edge pixel and the second edge pixel may be relatively small. If not limited, the deformation influence domain will be larger than the entire fabric image.
[0092] Furthermore, the optical flow information of each pixel is obtained through the distribution of feature points in the deformation influence domain where each pixel is located:
[0093] The feature point at the center of all deformation influence domains where any pixel is located is recorded as the reference feature point of the any pixel, and the distance between the any pixel and its reference feature point is fused with the corresponding optical flow information to obtain the optical flow information of the any pixel.
[0094] In this embodiment, based on a pixel point, all deformation influence domains where the pixel point is located are obtained, the Euclidean distance between the pixel point and the central feature point of the deformation influence domain is calculated, and after normalization, it is multiplied with the optical flow information of the corresponding feature point, and the vector obtained by summing the pixel point and all the multiplication results is used as the optical flow information of the pixel.
[0095] Among them, the schematic diagram of the distribution of the deformation influence domain where the pixel is located is as follows: Figure 4 As shown; in the figure, A and B represent feature points A and B, Represents the optical flow information of feature point A and feature point B, Q A , Q B Represents the deformation influence domain of feature point A and feature point B, i represents pixel i. Assuming that pixel i is in the deformation influence domain of feature point A and feature point B at the same time, the optical flow information of pixel i can be obtained through Get, dis() represents the Euclidean distance function.
[0096] The optical flow information of all pixels in the tested image is combined into an optical flow vector field.
[0097] It should be understood that if the distance difference between the pixel and different feature points is too large, or the optical flow difference between two feature points is too large, or the optical flow information obtained by interpolation of the pixel is greatly different from that of the surrounding pixels. When the optical flow vector field appears discontinuous or abrupt in certain areas, this may be an error introduced by interpolation, especially in areas with drastic speed changes or sparse feature points. Therefore, it is necessary to smooth the obtained optical flow vector field to reduce errors and improve the continuity and natural transition of the obtained optical flow vector field.
[0098] In this embodiment, the optical flow vector field is smoothed by Gaussian filtering. Since the Gaussian kernel is separable, the standard deviation of the horizontal component of all optical flow information of each pixel in the tested image and its eight neighboring pixels is used as the sigma parameter of the Gaussian filter for each pixel, and horizontal convolution is performed. Then, the standard deviation of the vertical component of all optical flow information of the corresponding pixel and its eight neighboring pixels is used as the sigma parameter of the Gaussian filter, and the horizontal filtering result is convolved in the vertical direction to obtain the optical flow vector field after Gaussian filtering.
[0099] It can be understood that the width and smoothness of the filter kernel are determined based on the difference in local optical flow information. The larger the standard deviation, the greater the difference between the pixel and other pixels in its eight neighborhoods, and the greater the smoothness should be; conversely, a smaller smoothness is required.
[0100] Step 4: Based on the fabric tensile strength test time, integrate the optical flow vector field to obtain the fabric stretch index.
[0101] Integrate the optical flow information of each pixel to obtain the fabric stretch index:
[0102] The time interval between the images before and after the test is obtained and recorded as the fabric stretching time. The optical flow information of each pixel in the image after the test is integrated within the fabric stretching time and multiplied by the corresponding fabric distance feature value. The accumulated value of the multiplication results of all pixels is used as the fabric stretching index.
[0103] In this embodiment, the optical flow information of each pixel is integrated over a time interval based on the optical flow vector field to obtain the stretch displacement distance. The displacement can be approximated as the accumulation of velocity during the fabric stretching time. The specific calculation process is not repeated here. The fabric distance characteristic value of each pixel is used as a weight, and the stretch displacement distances of all pixels are weighted and summed to obtain the fabric stretch index. The formula is: Where L represents the fabric stretch index, n represents the total number of pixels, Δ krepresents the fabric distance feature value of the k-th pixel, X k Indicates the stretching displacement distance of pixels.
[0104] It is understandable that the closer the area is to the first edge pixel or the second edge pixel, the greater the degree of displacement after stretching, so assigning a larger weight can better represent the degree of stretch of the fabric. The larger the value of the fabric stretch index, the greater the degree of displacement of each pixel after the fabric is stretched.
[0105] Step 5: Test the tensile strength of the fabric to be tested in combination with the fabric tensile index.
[0106] In this embodiment, the fabric stretch index of the standard fabric is used as the detection threshold. If the fabric stretch index is greater than or equal to the detection threshold, the tensile strength of the fabric to be tested is qualified; otherwise, the tensile strength of the fabric to be tested is unqualified.
[0107] It is understood that references to "one embodiment" or "some embodiments" in the present specification mean that one or more embodiments of the present application include a particular feature, structure, or characteristic described in conjunction with that embodiment. Thus, if "in one embodiment," "in some embodiments," "in other embodiments," or "in other embodiments" appear in different places in this specification, they do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0108] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above description is of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-tasking and parallel processing are also possible or may be advantageous. At the same time, the size of the sequence number of each step in the embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments in this specification.
[0109] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for testing the tensile strength of fabrics, characterized in that: The method comprises the following steps: Acquire images of the fabric to be tested before and after the tensile strength test; Pixels are screened based on their positions in the image before the test and the distribution of grayscale values in the local range to obtain feature points of the image before the test, and feature points and corresponding optical flow information of the image after the test are obtained by the optical flow method; The optical flow information between different feature points in the local range of each pixel in the tested image is used to calculate the optical flow information of each pixel except the feature points. The standard deviation of the horizontal component of all optical flow information of each pixel and its eight neighboring pixels in the tested image is used as the sigma parameter of the Gaussian filter for each pixel, and a horizontal convolution is performed. Then, the standard deviation of the vertical component of all optical flow information of the corresponding pixel and its eight neighboring pixels is used as the sigma parameter of the Gaussian filter, and the horizontal filtering result is vertically convolved to obtain the optical flow vector field after Gaussian filtering. Based on the fabric tensile strength test time, the optical flow vector field is integrated to obtain the fabric stretch index; The tensile strength of the fabric to be tested is tested in combination with the fabric tensile index.
2. A fabric tensile strength quality testing method according to claim 1, characterized in that: The feature points of the image before the test are obtained: For the image before the test, the fabric distance feature value of each pixel is obtained according to the position distribution of the pixels and the distance characteristics between the pixels; According to the discrete degree and energy distribution of the grayscale value in the local range of each pixel, the local grayscale feature of each pixel is obtained; The fabric distance eigenvalue and local grayscale eigenvalue of each pixel in the image before the test are fused to obtain the characteristic factor of each pixel, and the average value of the characteristic factors of all pixels in the image before the test is used as the characteristic threshold; all pixels whose characteristic factors are greater than the characteristic threshold are composed of a first set of candidate feature points; feature detection is performed on the image before the test to obtain a second set of candidate feature points, and the pixels in the intersection of the first set of candidate feature points and the second set of candidate feature points are used as the feature points of the image before the test.
3. A fabric tensile strength quality testing method according to claim 2, characterized in that: The fabric distance characteristic value of each pixel is obtained, including: According to the positions of the clamps on both sides in the image before the test, the reference lines on both sides are determined; according to the reference lines on both sides, the first edge pixel and the second edge pixel are determined; the reference lines on both sides are cross-connected to confirm the center pixel; the distance between each pixel and the first edge pixel and the second edge pixel is recorded as the first distance and the second distance respectively; the distance between each pixel and the center pixel is obtained and recorded as the center distance; the minimum value of the first distance and the second distance of each pixel is obtained; the difference between the minimum value and the center distance is used as the fabric distance feature value of each pixel.
4. A fabric tensile strength quality testing method according to claim 2, characterized in that: Obtaining the local grayscale feature of each pixel includes: According to the degree of discreteness of the grayscale values of all pixels in the neighborhood of each pixel, the local variance of each pixel is obtained; the grayscale co-occurrence matrix of the neighborhood of each pixel is obtained, and the diagonal elements of the grayscale co-occurrence matrix of each pixel are fused to obtain the local energy of each pixel; the inverse proportional mapping result of the local variance of each pixel and the local energy is used as the local grayscale feature of each pixel.
5. A fabric tensile strength quality testing method as claimed in claim 3, characterized in that: The calculation of the optical flow information of each pixel except the feature points includes: According to the change of optical flow information between feature points in the local range of each feature point in the tested image, combined with the fabric distance feature value, the deformation influence domain of each feature point is obtained; The feature point at the center of all deformation influence domains where any pixel is located is recorded as the reference feature point of the any pixel, and the distance between the any pixel and its reference feature point is fused with the corresponding optical flow information to obtain the optical flow information of the any pixel.
6. A fabric tensile strength quality testing method according to claim 5, characterized in that: Obtaining the deformation influence domain of each feature point includes: Obtaining a deformation difference coefficient of any two feature points according to a change difference in optical flow information between the two feature points in the image after the test; In the tested image, the distance between the center pixel and any edge pixel is obtained and fused with the normalized result of the fabric distance eigenvalue of each feature point to obtain the fabric influence distance of each feature point; with any feature point as the center, within the corresponding fabric influence distance, the distance between the feature points with the smallest deformation difference coefficient from any feature point is used as the radius to obtain the deformation influence domain of any feature point.
7. A fabric tensile strength quality testing method according to claim 6, characterized in that: The steps for obtaining the deformation difference coefficient of any two feature points are as follows: The gradient of the optical flow information of each feature point in the tested image is obtained, and the difference in the gradient of the optical flow information of any two feature points is used as the deformation difference coefficient of the arbitrary two feature points.
8. A fabric tensile strength quality testing method according to claim 6, characterized in that: Desirably obtaining the fabric stretch index comprises: The time interval between the image acquisition before and after the test is obtained and recorded as the fabric stretching time. The optical flow information of each pixel in the image after the test is integrated within the fabric stretching time and multiplied by the corresponding fabric distance feature value. The accumulated value of the multiplication results of all pixels is used as the fabric stretching index.
9. A fabric tensile strength quality testing method according to claim 1, characterized in that: The tensile strength test of the fabric to be tested includes: The fabric stretch index of the standard fabric is used as the detection threshold. If the fabric stretch index is greater than or equal to the detection threshold, the tensile resistance of the fabric to be tested is qualified; otherwise, the tensile resistance of the fabric to be tested is unqualified.
Citation Information
Patent Citations
Automatic monitoring method for abnormal tension of textile fabric
CN114663435A
Environment-friendly and energy-saving aluminum silicate plate quality detection method
CN116168039A