Industrial vision-based detection method for warp deviation in open-width woven fabric
By constructing a rectangular test area and screening suspected grayscale offset curves, the final warp offset and direction are calculated. This method solves the problem of poor detection effect caused by changes in fabric state in existing technologies and achieves high accuracy and stability in detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHI HONG CHANG XING YE ZHANG JIA GANG ZHI RAN YOU XIAN GONG SI
- Filing Date
- 2025-12-15
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, fixed standard warp detection cannot match fabrics in different states, resulting in low warp offset recognition and detection performance on fabrics with slight wrinkles, irregular edges, or fluctuating warp density.
The industrial vision-based method for detecting warp offset in open-width fabrics involves acquiring fabric images, constructing a rectangular test area, filtering out suspected grayscale offset curves, and calculating the final warp offset and direction based on the distribution characteristics of grayscale peak points to achieve accurate detection.
It improves the accuracy of fabric warp offset detection, reduces interference from irrelevant areas, ensures the stability and accuracy of detection, avoids the large amount of data involved in complex calculations, and provides timely feedback to the control system for adjustment.
Smart Images

Figure CN121329974B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fabric image detection technology, and specifically to a method for detecting warp offset in open-face fabrics based on industrial vision. Background Technology
[0002] If warp offset occurs during the operation of the tenter frame, it will cause irreversible defects such as "diagonal stripes and warp cloudiness" in the appearance, destroy the uniformity of the fabric structure, reduce strength and cause problems such as breakage and pilling. In severe cases, the entire roll must be scrapped. In addition, offset will lead to uneven dyeing in subsequent dyeing and finishing processes, misalignment of cutting patterns, and reduced fabric utilization. It may also cause the tenter frame to jam and stop, increasing maintenance costs. Therefore, warp offset detection of fabric is necessary.
[0003] In existing technologies, fixed standard warp threads are used to detect warp offset in fabrics. However, standard warp threads ignore the distribution and shape of the fabric and cannot match fabrics in different states. For fabrics with slight wrinkles, irregular edges, or fluctuations in warp density, the warp offset identification and detection effect is low. Summary of the Invention
[0004] To address the technical problem that fixed standard warp detection fails to consider fabric distribution and morphology, resulting in poor warp offset recognition and detection performance due to the inability to match fabrics in different states, the present invention aims to provide a warp offset detection method for open-width fabrics based on industrial vision. The specific technical solution adopted is as follows:
[0005] This invention proposes a method for detecting warp offset in open-width fabrics based on industrial vision, the method comprising:
[0006] Acquire fabric images;
[0007] Based on the grayscale features and positional distribution of pixels in the fabric image, a rectangular test area is obtained on the fabric image; multiple pre-set equidistant standard warp lines are constructed perpendicular to the weft direction of the rectangular test area; based on the grayscale distribution of pixels under each weft coordinate of different standard warp lines, a grayscale curve is constructed under each weft coordinate, and multiple grayscale peak points of the grayscale curve are obtained.
[0008] Based on the distribution characteristics of grayscale peak points on the corresponding grayscale curves under different latitude coordinates, suspected grayscale shift curves are screened out; based on the positional distribution of grayscale peak points between each suspected grayscale shift curve and other grayscale curves, the final meridian shift amount and meridian shift direction of each suspected grayscale shift curve are obtained.
[0009] The offset detection of the warp threads of the fabric is achieved by using the final offset amount and direction of the warp offset of different suspected grayscale offset curves.
[0010] Furthermore, the method for obtaining the rectangular region to be tested includes:
[0011] Based on the grayscale features and positional distribution of pixels in the fabric image, multiple feature-stable coordinates are obtained;
[0012] The maximum and minimum values of the meridians corresponding to the continuous feature stable coordinates are used as the upper and lower boundaries of the rectangular area to be measured; the maximum and minimum values of the parallels corresponding to the continuous feature stable coordinates are used as the left and right boundaries of the rectangular area to be measured.
[0013] Furthermore, the method for obtaining the stable feature coordinates includes:
[0014] The left and right boundaries of the fabric image are obtained based on the Canny edge detection algorithm; starting from the bottom of the image, the left and right boundaries of the image are divided sequentially along the warp direction at preset intervals to obtain multiple feature coordinates on the corresponding boundaries.
[0015] After each division, the latitude coordinates corresponding to the left and right boundaries of the image are used to construct a latitude coordinate vector. The mean of the latitude coordinate vectors after the previous division is obtained as the average latitude coordinate vector. The magnitude of the difference between the latitude coordinate vector after each division and the average latitude coordinate vector is obtained as the edge direction difference after each division.
[0016] If the difference in the edge direction after division is less than the preset difference threshold, the feature coordinates on the corresponding left and right boundaries after division will be used as the stable feature coordinates.
[0017] Furthermore, the method for obtaining the grayscale peak points includes:
[0018] Based on the grayscale distribution of pixels at each latitude coordinate under different standard meridians, construct the grayscale curve at each latitude coordinate to obtain multiple related standard meridians for each standard meridian;
[0019] If the number of related standard meridians for each standard meridian is greater than a preset threshold, and the average gray value is greater than the average gray value of all gray values in the gray curve, the center point of the range formed by each standard meridian and all related standard meridians in the gray curve will be obtained as the gray peak point.
[0020] Furthermore, the method for obtaining the relevant standard meridian includes:
[0021] Obtain grayscale curves composed of the grayscale values of pixels at each parallel of latitude for different standard meridians;
[0022] The grayscale curve is obtained by measuring the difference in grayscale values between adjacent standard meridians. If the difference in grayscale values is less than the preset difference in grayscale values, the corresponding standard meridian is taken as the relevant standard meridian, and multiple relevant standard meridians are obtained for each standard meridian.
[0023] Furthermore, the method for obtaining the suspected grayscale shift curve includes:
[0024] Based on the distribution characteristics of grayscale peak points on the grayscale curve, the meridian difference offset between different adjacent grayscale peak points on the grayscale curve is obtained;
[0025] If there is a meridian difference offset between adjacent grayscale peak points in the grayscale curve that is greater than a preset multiple of the meridian difference fluctuation, the corresponding grayscale curve will be regarded as a suspected grayscale offset curve.
[0026] Furthermore, the method for obtaining the meridian difference offset includes:
[0027] Obtain the difference in meridian coordinates between the standard meridians corresponding to adjacent grayscale peak points on the grayscale curve; obtain the mean of all meridian coordinate differences on the grayscale curve as the average level of meridian differences; obtain the fluctuation characteristics of all meridian coordinate differences on the grayscale curve as the degree of fluctuation of meridian differences.
[0028] The difference between the corresponding meridian coordinates and the average level of the meridian difference between adjacent gray-level peak points is obtained and used as the meridian difference offset between adjacent gray-level peak points.
[0029] Furthermore, the method for obtaining the final offset of the meridian includes:
[0030] For any suspected grayscale offset curve, obtain the meridian difference of the meridian coordinates corresponding to the grayscale peak points in the same order between the suspected grayscale offset curve and other grayscale curves.
[0031] If there are consecutive meridian differences whose absolute values are all greater than the preset first threshold and whose meridian differences have the same sign, the number of the corresponding sequence will be used as the number of differences with the same direction.
[0032] Based on the absolute value of the mean of all meridian differences, the number of differences with the same direction, and the total number of meridian differences, the final meridian offset of the suspected grayscale offset curve is obtained. The absolute value of the mean of meridian differences and the number of differences with the same direction are positively correlated with the final meridian offset, while the total number of meridian differences is negatively correlated with the final meridian offset.
[0033] Furthermore, the method for obtaining the final offset of the meridian includes:
[0034] Obtain the absolute value of the mean of all meridian differences, and use it as the initial meridian offset between the corresponding curves;
[0035] Obtain the ratio of the number of differences in the same direction to the total number of meridian differences, calculate the product of the ratio and the meridian offset, and use it as the final meridian offset of the suspected grayscale offset curve.
[0036] Furthermore, the method for obtaining the meridian offset direction includes:
[0037] If the mean of all meridian differences is negative, the meridian shifts to the left; conversely, the meridian shifts to the right.
[0038] The present invention has the following beneficial effects:
[0039] This invention obtains a rectangular test area on a fabric image based on the grayscale features and positional distribution of pixels. By defining a well-defined test area, the stability and accuracy of subsequent analysis are ensured, and interference from irrelevant areas is avoided. Considering that under normal circumstances, the grayscale value increases significantly when passing through alternating warp positions, exhibiting maximum grayscale performance in the grayscale curve, multiple grayscale peak points of the grayscale curve at each latitude coordinate are obtained based on the grayscale distribution of pixels at different preset equidistant standard warp lines within the rectangular test area. Based on the distribution characteristics of the grayscale peak points on the corresponding grayscale curves at different latitude coordinates, suspected grayscale shift curves are screened out, reducing the amount of data requiring complex calculations. Based on the positional distribution of grayscale peak points between each suspected grayscale shift curve and other grayscale curves, the final warp offset and warp offset direction of each suspected grayscale shift curve are obtained, thus enabling warp offset detection of the fabric. This invention improves the accuracy of warp offset detection by accurately obtaining the final warp offset and warp offset direction. Attached Figure Description
[0040] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating a method for detecting warp offset of open-width fabric based on industrial vision, as provided in an embodiment of the present invention;
[0042] Figure 2 A flowchart illustrating a method for obtaining stable feature coordinates according to an embodiment of the present invention;
[0043] Figure 3 This is a flowchart illustrating a method for obtaining the final offset of a meridian according to an embodiment of the present invention. Detailed Implementation
[0044] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for detecting warp offset in open-width woven fabrics based on industrial vision, according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0046] The following description, in conjunction with the accompanying drawings, details a specific scheme for a method for detecting warp offset in open-width woven fabrics based on industrial vision, provided by the present invention.
[0047] Please see Figure 1 The diagram illustrates a flowchart of a method for detecting warp offset in open-width fabrics based on industrial vision, according to an embodiment of the present invention. The specific method includes:
[0048] Step S1: Obtain a fabric image.
[0049] In an embodiment of the present invention, a horizontal slide rail is installed above the stable conveyor section between the fabric opening machine outlet and the fabric feeding section of the fabric feeding machine. An industrial camera and an LED light source are connected via a boom slide rail to achieve stepless adjustment in both horizontal and vertical directions, so as to meet the inspection needs of fabrics with different widths, thicknesses and production speeds. Fabric images are acquired synchronously by a dual-camera array. The sampling frequency is set according to the conveyor belt speed during acquisition to ensure that image acquisition and fabric movement are synchronized, and to avoid image distortion caused by speed fluctuations.
[0050] It should be noted that the camera parameters are set as follows: camera resolution is 3600×2700 pixels, frame rate is 80fps, equipped with a global shutter, and the sampling frequency can be dynamically adjusted according to the actual fabric conveying speed to ensure that motion blur is controlled within 5 pixels. The sampling areas of the two cameras overlap by 30%±5% in the horizontal direction, and the overall coverage size is 0.6m in the vertical direction × 2.0m in the horizontal direction. The imaging surface is perpendicular to the fabric surface, realizing seamless full coverage acquisition of wide fabrics.
[0051] It should be noted that, to ensure the quality of subsequent image processing, the image is preprocessed. The acquisition methods include: firstly, Gaussian filtering is used to remove high-frequency noise such as lint and dust from the fabric surface; then, an adaptive histogram equalization algorithm is used for grayscale correction to eliminate grayscale fluctuations caused by uneven illumination and improve the overall image contrast. The preprocessed image is used for subsequent feature extraction and analysis; the specific methods are well-known to those skilled in the art and will not be elaborated here.
[0052] Step S2: Based on the grayscale features and positional distribution of pixels in the fabric image, obtain a rectangular test area on the fabric image; construct multiple pre-set equidistant standard warp lines perpendicular to the weft direction of the rectangular test area; construct a grayscale curve for each latitude coordinate based on the grayscale distribution of pixels at each weft coordinate of different standard warp lines, and obtain multiple grayscale peak points of the grayscale curve.
[0053] To achieve stable analysis of warp offset in fabric, a well-defined test area needs to be defined for analysis. Gray-scale features reflect the brightness distribution of pixels. The more consistent the gray-scale, the less likely the fabric will experience warp offset. Based on the gray-scale features and positional distribution of pixels in the fabric image, a rectangular test area is obtained on the fabric image.
[0054] Preferably, in one embodiment of the present invention, the method for obtaining the rectangular region to be measured includes:
[0055] Based on the grayscale features and positional distribution of pixels in the fabric image, multiple feature-stable coordinates are obtained;
[0056] Preferably, in one embodiment of the present invention, the method for obtaining the characteristic stable coordinates is described in [reference needed]. Figure 2 It illustrates a flowchart of a method for obtaining stable feature coordinates, including:
[0057] Step S201: Obtain the left and right boundaries of the fabric image based on the Canny edge detection algorithm; starting from the bottom of the image, divide the left and right boundaries of the image sequentially along the warp direction at preset intervals to obtain multiple feature coordinates on the corresponding boundaries.
[0058] It should be noted that the Canny edge detection algorithm is a well-known technique in the field, and will not be elaborated upon here.
[0059] It should be noted that, in one embodiment of the present invention, the left and right boundaries of the image are sequentially divided along the meridian direction at intervals of 10 pixels to obtain the corresponding feature coordinates. That is, the feature coordinates on the image boundary after each division are ( )and( ), This represents the latitude coordinates of the left boundary of the image. This represents the latitude coordinates of the right boundary of the image. This indicates the meridian coordinates at each division; in other embodiments of the present invention, the preset interval can be set according to specific circumstances, and will not be limited or elaborated here.
[0060] Step S202: Construct a parallel coordinate vector by taking the parallel coordinates corresponding to the feature coordinates on the left and right boundaries of the image after each division, and obtain the mean of the parallel coordinate vectors after other divisions, as the average parallel coordinate vector; obtain the magnitude of the difference between the parallel coordinate vector and the average parallel coordinate vector after each division, as the edge direction difference after each division.
[0061] To facilitate subsequent stability analysis, it is necessary to analyze the feature coordinates with consistent edge directions. Therefore, by averaging the feature coordinate distribution level of other divisions before each division, the latitude coordinate vector is averaged. After each division, the latitude coordinate vector deviates more from the average latitude coordinate vector of other divisions, the larger the magnitude of the difference, and the greater the difference in edge direction.
[0062] Step S203: If the difference in edge direction after segmentation is less than the preset difference threshold, the feature coordinates on the left and right boundaries of the corresponding segmented image are used as feature stable coordinates.
[0063] It should be noted that in one embodiment of the present invention, the preset difference threshold is set to 5. In other embodiments of the present invention, the preset difference threshold can be set according to specific circumstances, and will not be limited or elaborated here.
[0064] The maximum and minimum values of the meridians corresponding to the continuous feature stable coordinates are used as the upper and lower boundaries of the rectangular area to be measured; the maximum and minimum values of the parallels corresponding to the continuous feature stable coordinates are used as the left and right boundaries of the rectangular area to be measured.
[0065] Within the rectangular area to be measured, in order to ensure that the direction of the standard meridians is as consistent as possible with the direction of the meridians, multiple preset equidistant standard meridians are constructed perpendicular to the latitude direction of the rectangular area to be measured. It should be noted that, in the embodiments of the present invention, the ratio of the boundary length of the rectangular area to be measured to the number of preset standard meridians is calculated and rounded down to obtain the spacing between the standard meridians, wherein the number of preset standard meridians is 11; in other embodiments of the present invention, the number of preset standard meridians can be set according to specific circumstances, and is not limited or described in detail here.
[0066] Under normal circumstances, the grayscale of a pixel at each latitude coordinate will increase significantly when it passes through alternating meridian positions, exhibiting the maximum grayscale performance in the curve, and having multiple consecutive pixels. Therefore, based on the grayscale distribution of pixels at each latitude coordinate under different standard meridians, a grayscale curve is constructed for each latitude coordinate, obtaining multiple grayscale peak points of the grayscale curve.
[0067] Preferably, in one embodiment of the present invention, the method for obtaining grayscale peak points includes:
[0068] Based on the grayscale distribution of pixels at each latitude coordinate under different standard meridians, construct the grayscale curve at each latitude coordinate to obtain multiple related standard meridians for each standard meridian;
[0069] In one embodiment of the present invention, the method for obtaining the relevant standard meridian includes:
[0070] The grayscale curve is obtained by taking the grayscale values of the pixels at each parallel of latitude for different standard meridians. The grayscale curve can reflect the periodic brightness changes formed by the alternating arrangement of meridians and gaps at a fixed parallel of latitude.
[0071] The grayscale curve is obtained by measuring the difference in grayscale values between adjacent standard meridians. If the difference in grayscale values is less than the preset difference in grayscale values, the corresponding standard meridian is taken as the relevant standard meridian, and multiple relevant standard meridians are obtained for each standard meridian.
[0072] If the number of related standard meridians for each standard meridian is greater than a preset threshold, and the average gray value is greater than the average gray value of all gray values in the gray curve, the center point of the range formed by each standard meridian and all related standard meridians in the gray curve will be obtained as the gray peak point.
[0073] It should be noted that the difference represents the absolute value of the calculated difference. In one embodiment of the present invention, the preset grayscale difference is set to 3 and the preset quantity threshold is 5. In other embodiments of the present invention, the preset grayscale difference and the preset quantity threshold can be set according to specific circumstances, and are not limited or elaborated here.
[0074] Step S3: Based on the distribution characteristics of grayscale peak points on the corresponding grayscale curves under different latitude coordinates, filter out suspected grayscale offset curves; based on the positional distribution of grayscale peak points between each suspected grayscale offset curve and other grayscale curves, obtain the final meridian offset amount and meridian offset direction of each suspected grayscale offset curve.
[0075] In normal fabric areas, the warp spacing is highly periodic, and the spacing between grayscale peak points is stable. However, when warp offset occurs, local warp threads cluster or disperse, causing the peak spacing to deviate significantly from the statistical mean, which may indicate a change in warp density. Therefore, based on the distribution characteristics of grayscale peak points on the corresponding grayscale curves under different latitude coordinates, suspected grayscale offset curves are screened out.
[0076] Preferably, in one embodiment of the present invention, the method for obtaining the suspected grayscale offset curve includes:
[0077] Based on the distribution characteristics of grayscale peak points on the grayscale curve, the meridian difference offset between different adjacent grayscale peak points on the grayscale curve is obtained;
[0078] Preferably, in one embodiment of the present invention, the method for obtaining the meridian difference offset includes:
[0079] Obtain the difference in meridian coordinates between the standard meridians corresponding to adjacent grayscale peak points on the grayscale curve; obtain the mean of all meridian coordinate differences on the grayscale curve as the average level of meridian differences; obtain the fluctuation characteristics of all meridian coordinate differences on the grayscale curve as the degree of fluctuation of meridian differences.
[0080] It should be noted that, in one embodiment of the present invention, the fluctuation characteristics are reflected by calculating the standard deviation. The larger the standard deviation, the greater the fluctuation characteristics, and the smaller the standard deviation, the smaller the fluctuation characteristics. In other embodiments of the present invention, the fluctuation characteristics can also be reflected by calculating the variance or range. The specific means are well known to those skilled in the art and will not be described in detail here.
[0081] The difference between the corresponding meridian coordinates and the average level of the meridian difference between adjacent gray-scale peak points is obtained as the meridian difference offset between adjacent gray-scale peak points.
[0082] If there is a meridian difference offset between adjacent grayscale peak points in the grayscale curve that is greater than a preset multiple of the meridian difference fluctuation, the corresponding grayscale curve will be regarded as a suspected grayscale offset curve.
[0083] It should be noted that, considering that the warp spacing in the normal fabric area is highly periodic and the data follows a normal distribution, in order to identify sensitive outliers and avoid missing valid data, the preset multiple is set to 2 in the embodiments of the present invention.
[0084] When multiple adjacent meridians shift simultaneously and in the same direction, the coordinates of multiple grayscale peak points on the curve show consistent shift directions, indicating a higher probability of shift. Based on the positional distribution of grayscale peak points between each suspected grayscale shift curve and other grayscale curves, the meridian shift amount and direction of each suspected grayscale shift curve are obtained.
[0085] Preferably, in one embodiment of the present invention, the method for obtaining the final offset of the meridian is described in [reference needed]. Figure 3 It shows a flowchart of a method for obtaining the final offset of a meridian, including:
[0086] Step S301: For any suspected grayscale offset curve, obtain the meridian difference of the meridian coordinates corresponding to the grayscale peak points in the same order between the suspected grayscale offset curve and other grayscale curves.
[0087] The point with the highest grayscale performance is more likely to be at the intersection of meridians. The grayscale peak point corresponds to the grayscale value of the pixel point of the grayscale curve under any meridian coordinate. By analyzing the meridian difference between the meridian coordinates of the grayscale peak points of the suspected grayscale offset curve and other grayscale curves in the same order, the meridian deviation between the suspected grayscale offset curve and the unfiltered suspected offset curve is reflected.
[0088] Step S302: If there are consecutive meridian differences whose absolute values are greater than a preset first threshold and whose meridian differences have the same sign, the corresponding number of these differences will be used as the number of differences whose directions are consistent.
[0089] It should be noted that, in one embodiment of the present invention, the preset first threshold is set to 3; in other embodiments of the present invention, the size of the preset first threshold can be set according to specific circumstances, and will not be limited or elaborated here.
[0090] Step S303: Based on the absolute value of the mean of all meridian differences, the number of differences with the same direction, and the total number of all meridian differences, obtain the final meridian offset of the suspected grayscale offset curve. The absolute value of the mean of meridian differences and the number of differences with the same direction are positively correlated with the final meridian offset, while the total number of all meridian differences is negatively correlated with the final meridian offset.
[0091] The mean difference of meridians reflects the overall shift of grayscale peak points in the same order between the suspected grayscale shift curve and other grayscale curves. The larger the absolute value of the mean difference, the greater the overall shift. The greater the number of differences in the same direction relative to the number of meridian differences, the greater the final meridian shift.
[0092] For any curve, if multiple meridian differences are larger, have the same sign, and are clustered together, then meridian deviation is more likely to occur. In one embodiment of the present invention, the method for obtaining the final meridian offset includes:
[0093] Obtain the absolute value of the mean of all meridian differences, and use it as the initial meridian offset between the corresponding curves;
[0094] Obtain the ratio of the number of differences in the same direction to the total number of meridian differences, calculate the product of the ratio and the meridian offset, and use it as the final meridian offset of the suspected grayscale offset curve.
[0095] Preferably, in one embodiment of the present invention, the method for obtaining the meridian offset direction includes:
[0096] If the mean of all meridian differences is negative, the meridian shifts to the left; conversely, the meridian shifts to the right.
[0097] Step S4: Based on the final warp offset and warp offset direction of different suspected grayscale offset curves, the offset of the fabric warp is detected.
[0098] Therefore, the greater the final offset of the meridian, the greater the meridian shift. It is necessary to integrate and output the position, direction and magnitude of the latitude and longitude of the suspected grayscale offset curve, and feed it back to the control system in a timely manner for adjustment and correction, so as to avoid losses caused by larger offset errors.
[0099] In summary, this invention obtains a rectangular test area on a fabric image based on the grayscale features and positional distribution of pixels. Based on the grayscale distribution of pixels along different preset equidistant standard warp lines within the rectangular test area at each weft coordinate, multiple grayscale peak points of the grayscale curve at each weft coordinate are obtained. Based on the distribution characteristics of the grayscale peak points on the corresponding grayscale curves at different weft coordinates, suspected grayscale shift curves are selected. Based on the positional distribution of grayscale peak points between each suspected grayscale shift curve and other grayscale curves, the final warp offset and warp offset direction of each suspected grayscale shift curve are obtained. This enables warp offset detection of the fabric. This invention improves the accuracy of warp offset detection by accurately obtaining the final warp offset and warp offset direction.
[0100] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0101] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A method for detecting warp offset in open-width woven fabrics based on industrial vision, characterized in that, The method includes: Acquire fabric images; Based on the grayscale features and positional distribution of pixels in the fabric image, a rectangular test area is obtained on the fabric image; multiple pre-set equidistant standard warp lines are constructed perpendicular to the weft direction of the rectangular test area; based on the grayscale distribution of pixels under each weft coordinate of different standard warp lines, a grayscale curve is constructed under each weft coordinate, and multiple grayscale peak points of the grayscale curve are obtained. Based on the distribution characteristics of grayscale peak points on the corresponding grayscale curves under different latitude coordinates, suspected grayscale shift curves are screened out; based on the positional distribution of grayscale peak points between each suspected grayscale shift curve and other grayscale curves, the final meridian shift amount and meridian shift direction of each suspected grayscale shift curve are obtained. The offset detection of the warp threads of the fabric is achieved by using the final offset amount and direction of the warp offset of different suspected grayscale offset curves.
2. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 1, characterized in that, The method for obtaining the rectangular region to be tested includes: Based on the grayscale features and positional distribution of pixels in the fabric image, multiple feature-stable coordinates are obtained; The maximum and minimum values of the meridians corresponding to the continuous feature stable coordinates are used as the upper and lower boundaries of the rectangular area to be measured; the maximum and minimum values of the parallels corresponding to the continuous feature stable coordinates are used as the left and right boundaries of the rectangular area to be measured.
3. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 2, characterized in that, The method for obtaining the stable feature coordinates includes: The left and right boundaries of the fabric image are obtained based on the Canny edge detection algorithm; starting from the bottom of the image, the left and right boundaries of the image are divided sequentially along the warp direction at preset intervals to obtain multiple feature coordinates on the corresponding boundaries. After each division, the latitude coordinates corresponding to the left and right boundaries of the image are used to construct a latitude coordinate vector. The mean of the latitude coordinate vectors after the previous division is obtained as the average latitude coordinate vector. The magnitude of the difference between the latitude coordinate vector after each division and the average latitude coordinate vector is obtained as the edge direction difference after each division. If the difference in the edge direction after division is less than the preset difference threshold, the feature coordinates on the corresponding left and right boundaries after division will be used as the stable feature coordinates.
4. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 1, characterized in that, The method for obtaining grayscale peak points includes: Based on the grayscale distribution of pixels at each latitude coordinate under different standard meridians, construct the grayscale curve at each latitude coordinate to obtain multiple related standard meridians for each standard meridian; If the number of related standard meridians for each standard meridian is greater than a preset threshold, and the average gray value is greater than the average gray value of all gray values in the gray curve, the center point of the range formed by each standard meridian and all related standard meridians in the gray curve will be obtained as the gray peak point.
5. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 4, characterized in that, The method for obtaining the relevant standard meridian includes: Obtain grayscale curves composed of the grayscale values of pixels at each parallel of latitude for different standard meridians; The grayscale curve is obtained by measuring the difference in grayscale values between adjacent standard meridians. If the difference in grayscale values is less than the preset difference in grayscale values, the corresponding standard meridian is taken as the relevant standard meridian, and multiple relevant standard meridians are obtained for each standard meridian.
6. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 1, characterized in that, The method for obtaining the suspected grayscale offset curve includes: Based on the distribution characteristics of grayscale peak points on the grayscale curve, the meridian difference offset between different adjacent grayscale peak points on the grayscale curve is obtained; If there is a meridian difference offset between adjacent grayscale peak points in the grayscale curve that is greater than a preset multiple of the meridian difference fluctuation, the corresponding grayscale curve will be regarded as a suspected grayscale offset curve.
7. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 6, characterized in that, The method for obtaining the meridian difference offset includes: Obtain the difference in meridian coordinates between the standard meridians corresponding to adjacent grayscale peak points on the grayscale curve; obtain the mean of all meridian coordinate differences on the grayscale curve as the average level of meridian differences; obtain the fluctuation characteristics of all meridian coordinate differences on the grayscale curve as the degree of fluctuation of meridian differences. The difference between the corresponding meridian coordinates and the average level of the meridian difference between adjacent gray-level peak points is obtained and used as the meridian difference offset between adjacent gray-level peak points.
8. The method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 1, characterized in that, The method for obtaining the final offset of the meridian includes: For any suspected grayscale offset curve, obtain the meridian difference of the meridian coordinates corresponding to the grayscale peak points in the same order between the suspected grayscale offset curve and other grayscale curves. If there are consecutive meridian differences whose absolute values are all greater than the preset first threshold and whose meridian differences have the same sign, the number of the corresponding sequence will be used as the number of differences with the same direction. Based on the absolute value of the mean of all meridian differences, the number of differences with the same direction, and the total number of meridian differences, the final meridian offset of the suspected grayscale offset curve is obtained. The absolute value of the mean of meridian differences and the number of differences with the same direction are positively correlated with the final meridian offset, while the total number of meridian differences is negatively correlated with the final meridian offset.
9. A method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 8, characterized in that, The method for obtaining the final offset of the meridian includes: Obtain the absolute value of the mean of all meridian differences, and use it as the initial meridian offset between the corresponding curves; Obtain the ratio of the number of differences in the same direction to the total number of meridian differences, calculate the product of the ratio and the meridian offset, and use it as the final meridian offset of the suspected grayscale offset curve.
10. A method for detecting warp offset of open-width woven fabric based on industrial vision according to claim 9, characterized in that, The method for obtaining the meridian offset direction includes: If the mean of all meridian differences is negative, the meridian shifts to the left; conversely, the meridian shifts to the right.