Real-time detection method for yarn width during production of carbon fiber prepreg yarn

By setting up a binocular vision camera array and a structured light projection unit on the carbon fiber prepreg yarn production line, combined with multi-scale decomposition and three-dimensional reconstruction technology, real-time and accurate detection of the prepreg yarn width is achieved, solving the problems of measurement instability and light sensitivity in the existing technology, and improving production efficiency and product quality.

CN120707545AInactive Publication Date: 2025-09-26CHONGQING KALAI COMPOSITE MATERIALS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510868488.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies cannot achieve real-time and accurate three-dimensional information acquisition in carbon fiber prepreg yarn width detection, are sensitive to changes in ambient light, lack tension-width correlation analysis, and are difficult to ensure measurement stability and accuracy.

Method used

A binocular vision camera array and a structured light projection unit are used to extract edge features through multi-scale decomposition of the structured light image sequence. The fiber bundle contour is calculated using an adaptive region growing algorithm, and a three-dimensional point cloud model is reconstructed. The cross-sectional contour is fitted using the iterative nearest point algorithm and the RANSAC algorithm. Adaptive control limit optimization is performed based on the multi-dimensional feature vector to achieve real-time width detection.

Benefits of technology

It improves the detection accuracy, solves the problem of distortion caused by tension changes, achieves stability and reliability of prepreg width, and can provide early warning of width abnormalities, reducing raw material waste and reduced production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707545A_ABST
    Figure CN120707545A_ABST
Patent Text Reader

Abstract

The invention provides a real-time yarn width detection method for carbon fiber prepreg yarn production, and relates to the technical field of carbon fiber manufacturing, and the method comprises the steps: arranging a binocular camera and a structured light projection unit on a production line, collecting an image sequence, extracting edge features, calculating a fiber bundle contour, and combining depth information to establish a three-dimensional point cloud model; the point cloud model and the calibration reference plate are projected to a standard plane fitting contour curve after being subjected to space registration; real-time width features and tension features are extracted, and an adaptive control limit value is constructed; and judging the defect type through trend analysis and deviation evaluation. According to the invention, high-precision real-time monitoring of the width of the prepreg yarn is realized, and the product quality stability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of carbon fiber manufacturing, and in particular to a real-time detection method for yarn width during the production of carbon fiber prepreg yarn. Background Art

[0002] Carbon fiber prepreg yarn, a key raw material for high-performance composite materials, is widely used in high-end equipment manufacturing, including aerospace, automotive, and wind turbine blades. During prepreg production, yarn width is a critical parameter influencing its performance and quality. The stability of yarn width directly determines the mechanical properties, fiber volume fraction, and structural consistency of the composite material. Traditional prepreg yarn width testing relies primarily on manual spot checks or offline measurements, making it difficult to monitor yarn width changes in real time during continuous production.

[0003] With the continuous expansion of the application fields of carbon fiber composite materials, the requirements for the quality stability of prepreg yarns are increasing. The existing technology has the following deficiencies in the detection of carbon fiber prepreg yarn width: First, the existing optical detection methods mostly use monocular vision systems, which cannot obtain the three-dimensional information of the prepreg yarn, resulting in large measurement errors when the prepreg yarn surface is uneven or there is local warping; second, traditional detection methods are sensitive to changes in ambient light and are easily disturbed in industrial production environments, making it difficult to ensure measurement stability and accuracy; third, the existing technology lacks the ability to analyze the correlation between prepreg yarn tension and width, and cannot comprehensively consider the law of prepreg yarn width changes under the influence of multiple factors, making it difficult to achieve effective early warning of potential defects in the production process.

[0004] Therefore, it is urgent to develop a new method that can overcome the above shortcomings and realize real-time and accurate detection of prepreg yarn width, so as to improve the production efficiency and product quality stability of carbon fiber prepreg yarn. Summary of the Invention

[0005] The embodiment of the present invention provides a real-time detection method for yarn width during the production of carbon fiber prepreg yarn, which can solve the problems in the prior art.

[0006] A first aspect of an embodiment of the present invention provides a real-time detection method for yarn width during the production of carbon fiber prepreg yarn, comprising: A binocular vision camera array and a structured light projection unit are set up in each process of the prepreg production line. The structured light projection unit projects a coded stripe pattern onto the surface of the prepreg, and the binocular vision camera array collects a sequence of structured light images of the prepreg. The structured light image sequence is subjected to multi-scale decomposition using a Gaussian filter kernel to extract edge features, and the edge features are calculated using an adaptive region growing algorithm to obtain a fiber bundle profile. The structured light fringe pattern is decoded to obtain depth information and a spatial mapping relationship is established in combination with the fiber bundle profile, and a three-dimensional point cloud model of the prepreg is reconstructed through binocular stereo matching. The three-dimensional point cloud model is spatially registered with a calibration reference plate, the coordinate transformation matrix is ​​calculated using an iterative closest point algorithm, and the prepreg yarn profile is projected onto a standard plane. The cross-sectional profile curve is fitted using a RANSAC algorithm. Local width values ​​are sampled and extracted along the yarn direction, and the weighted mean of continuous sampling points is calculated as a real-time width feature. The tension feature is calculated based on the spatial distribution of the profile curve. The real-time width feature and the tension feature are combined into a multidimensional feature vector, the skewness vector of the multidimensional feature vector is calculated through a sliding time window, and an adaptive control limit is constructed based on the Mahalanobis distance and entropy value optimization; The trend analysis of the continuously sampled real-time width characteristic values ​​is performed to obtain the width change trend, the deviation degree of the multi-dimensional characteristic vector and the adaptive control limit is compared, and the defect type is determined in combination with the width change trend.

[0007] The structured light image sequence is subjected to multi-scale decomposition by a Gaussian filter kernel to extract edge features, and the edge features are calculated using an adaptive region growing algorithm to obtain the fiber bundle contour, which includes: The Gaussian filter kernel is used to perform multi-scale decomposition on the structured light image sequence to generate a multi-layer image pyramid; Calculating the horizontal gradient of each layer of the image in the multi-layer image pyramid to obtain a gradient magnitude map, performing non-maximum suppression on the gradient magnitude map to obtain a local maximum gradient point, setting a high threshold as the sum of three times the mean and the standard deviation based on the mean and the standard deviation, setting a low threshold as half of the high threshold, and performing double threshold processing on the local maximum gradient point using the high and low thresholds to obtain an edge feature map; Extracting candidate points whose gradient amplitude is greater than a high threshold value from the edge feature map, calculating the gradient direction difference between the candidate point and its neighboring points, and selecting candidate points whose gradient direction difference is less than a continuity threshold value as seed points; Taking the seed point as the starting point, the grayscale difference, gradient direction difference and connectivity measure between the point to be grown and the seed point are calculated and multiplied with the corresponding weight coefficients and summed to obtain the region growing criterion. The points to be grown whose region growing criterion is less than the preset growth tolerance threshold are merged into the current region to obtain the fiber bundle outline of each layer of the image. The fiber bundle outline of each layer of the image is projected to the original image scale, and the fiber bundle outline at the original scale is obtained by weighted superposition based on the edge response intensity.

[0008] Decoding the structured light stripe pattern to obtain depth information and combining it with the fiber bundle profile to establish a spatial mapping relationship. Reconstructing the 3D point cloud model of the prepreg yarn through binocular stereo matching includes: The structured light projection unit sequentially projects a multi-bit Gray code fringe pattern and a multi-phase shifted fringe pattern onto the surface of the prepreg to obtain a Gray code pattern sequence and a phase shifted pattern sequence; the left camera and the right camera in the binocular vision camera array synchronously capture images of the prepreg surface to obtain a left and right view image sequence; Binarizing the Gray code pattern sequence to obtain a Gray code sequence for each pixel, converting the Gray code sequence into a binary code sequence, calculating a phase value of the phase shift pattern sequence using a least squares method, decoding the phase jump to obtain a continuous phase map according to the binary code sequence, and calculating a depth map of the prepreg based on the continuous phase map and calibration parameters of the structured light system; Projecting the fiber bundle contour features into three-dimensional space, calculating the grayscale value difference, gradient amplitude difference, gradient direction difference, and contour distance difference of the to-be-matched points in the left and right view image sequences, and obtaining the initial matching cost by weighted summation; Calculating an aggregated cost of the initial matching cost along an epipolar direction, performing scanline optimization on the aggregated cost in the horizontal and vertical directions to obtain multiple sets of candidate disparity values, and selecting a disparity value corresponding to a minimum cost among the candidate disparity values ​​as an optimal disparity to obtain a disparity map; A fused depth map is obtained by weightedly averaging the depth values ​​of the depth map and the disparity map at the fiber bundle contour features. The three-dimensional coordinates of the prepreg yarn are calculated by triangulation based on the fused depth map and camera parameters to obtain a three-dimensional point cloud model of the prepreg yarn.

[0009] The three-dimensional point cloud model is spatially registered with the calibration reference plate, the coordinate transformation matrix is ​​calculated using the iterative closest point algorithm, and the prepreg profile is projected onto the standard plane. The cross-sectional profile curve is fitted using the RANSAC algorithm, including: A Harris corner detection algorithm is used to extract corner features of a calibration reference plate, and the coordinates of the corner features at a sub-pixel scale are calculated to obtain a reference feature point set. The point cloud feature set is extracted from the three-dimensional point cloud model and an initial correspondence is established with the reference feature point set. False matching point pairs are eliminated from the established initial correspondence to obtain accurate matching feature point pairs. Calculating the covariance matrix of the precisely matched feature point pairs, obtaining an optimal rotation matrix and translation vector by singular value decomposition of the covariance matrix, and transforming the three-dimensional point cloud model into a standard coordinate system with the calibration reference plate as the X0Y plane using the optimal rotation matrix and the translation vector; Extracting a contour point cloud set from the three-dimensional point cloud in the standard coordinate system, projecting the contour point cloud set onto the X0Y plane to obtain a two-dimensional contour point set, removing outliers from the two-dimensional contour point set using statistical filtering, and filtering edge points from the two-dimensional contour point set according to a preset curvature threshold to obtain a valid contour point set; The effective contour point set is divided into multiple local point sets along the yarn direction, three points are randomly selected from each local point set to calculate the quadratic curve, and the vertical distances from the remaining points in the local point set to the quadratic curve are calculated. The random selection and vertical distance calculation are iteratively performed until a preset fitting error threshold is met, and a standard plane contour curve is obtained based on the fitting of the finally retained points.

[0010] The Harris corner detection algorithm is used to extract the corner features of the calibration reference plate, and the coordinates of the corner features at the sub-pixel scale are calculated to obtain the reference feature point set including: Acquire a calibration reference plate image, calculate the gradients of the calibration reference plate image in the x-direction and the y-direction, convolve the squared terms and product terms of the x-direction gradient and the y-direction gradient with a Gaussian window function to obtain a grayscale change matrix of the calibration reference plate image, and subtract the square of the trace of the grayscale change matrix from the determinant of the grayscale change matrix and multiply the resultant by a preset coefficient to obtain a corner point response value of the calibration reference plate image; Searching for a local maximum within a three-by-three neighborhood of the corner point response value, taking a point greater than a response threshold and greater than other response values ​​in the neighborhood as an initial corner point of the calibration reference plate image, constructing a five-by-five window with the initial corner point as the center, and taking the pixel coordinates within the five-by-five window and the corresponding calibration reference plate image grayscale values ​​as fitting sample points; Calculate the quadratic coefficient matrix and the linear coefficient matrix of the fitting sample points, calculate the sub-pixel corner point positions of the calibration reference plate image according to the product of the determinant of the quadratic coefficient matrix and the linear coefficient matrix, and form the sub-pixel corner point positions into a reference feature point set of the calibration reference plate image.

[0011] Calculating the skewness vector of the multidimensional feature vector through a sliding time window and optimizing and constructing an adaptive control limit based on Mahalanobis distance and entropy value include: Setting a sliding time window length to obtain a sample set, calculating the second-order central moment and the third-order central moment of the sample set, and dividing the third-order central moment by the cube of the second-order central moment to obtain a skewness vector; Calculating the Mahalanobis distance between the multidimensional feature vector and the sample mean to obtain a feature deviation, substituting the feature deviation into an exponential decay function to calculate a dynamic bandwidth parameter, and subtracting the current feature vector from each sample point in the sample set and dividing the result by the dynamic bandwidth parameter to obtain a distance matrix; Initializing a preset number of class centers, calculating the Euclidean distance from each sample point in the sample set to each class center, substituting the Euclidean distance into an exponential membership function to calculate a membership matrix, iteratively optimizing the membership matrix based on a maximum entropy criterion until convergence to obtain an updated membership matrix, calculating the weighted centers of each class according to the updated membership matrix, and selecting the maximum class center and the minimum class center based on the eigenvector amplitudes of the weighted centers; The weighted covariance of the maximum class center and the optimal membership is added to obtain the upper control limit value, and the weighted covariance of the minimum class center and the optimal membership degree is subtracted to obtain the lower control limit value. The control coefficients of the upper control limit value and the lower control limit value are dynamically adjusted according to the norm of the skewness vector to obtain an adaptive control limit value.

[0012] According to a second aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0013] According to a third aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0014] The real-time detection method for carbon fiber prepreg width provided by the present invention has the following beneficial effects: By setting up a binocular vision camera array and a structured light projection unit on the carbon fiber prepreg yarn production line, collecting the structured light image sequence of the prepreg yarn and performing multi-scale decomposition to extract edge features, accurate identification of the prepreg yarn contour is achieved. This can overcome the limitations of traditional optical detection methods in dealing with complex backgrounds and uneven lighting conditions, and significantly improve the detection accuracy.

[0015] The three-dimensional point cloud model is reconstructed by combining structured light depth information with binocular stereo matching technology. The iterative closest point algorithm and RANSAC algorithm are used to achieve accurate fitting of the prepreg yarn cross-sectional profile, solving the problem of distortion and deformation caused by tension changes in the prepreg yarn during the production process and ensuring the stability and reliability of width measurement.

[0016] An adaptive control limit construction method based on multi-dimensional feature vectors calculates the feature skewness through a sliding time window and combines Mahalanobis distance and entropy optimization to achieve early warning of prepreg yarn width abnormalities and accurate determination of defect types, effectively reducing the waste of raw materials and reduced production efficiency caused by unqualified width. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Schematic diagram of a flow chart of a method for real-time detection of yarn width during production of carbon fiber prepreg yarn according to an embodiment of the present invention; Figure 2 Schematic diagram of the performance comparison of different fiber bundle profile extraction methods under various working conditions; Figure 3 Schematic diagram of the accuracy comparison analysis of different contour fitting algorithms. DETAILED DESCRIPTION

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0019] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0020] Figure 1 FIG. 1 is a flow chart of a method for real-time detection of yarn width during production of carbon fiber prepreg yarn according to an embodiment of the present invention. Figure 1 As shown, the method includes: A binocular vision camera array and a structured light projection unit are set up in each process of the prepreg production line. The structured light projection unit projects a coded stripe pattern onto the surface of the prepreg, and the binocular vision camera array collects a sequence of structured light images of the prepreg. The structured light image sequence is subjected to multi-scale decomposition using a Gaussian filter kernel to extract edge features, and the edge features are calculated using an adaptive region growing algorithm to obtain a fiber bundle profile. The structured light fringe pattern is decoded to obtain depth information and a spatial mapping relationship is established in combination with the fiber bundle profile, and a three-dimensional point cloud model of the prepreg is reconstructed through binocular stereo matching. The three-dimensional point cloud model is spatially registered with a calibration reference plate, the coordinate transformation matrix is ​​calculated using an iterative closest point algorithm, and the prepreg yarn profile is projected onto a standard plane. The cross-sectional profile curve is fitted using a RANSAC algorithm. Local width values ​​are sampled and extracted along the yarn direction, and the weighted mean of continuous sampling points is calculated as a real-time width feature. The tension feature is calculated based on the spatial distribution of the profile curve. The real-time width feature and the tension feature are combined into a multidimensional feature vector, the skewness vector of the multidimensional feature vector is calculated through a sliding time window, and an adaptive control limit is constructed based on the Mahalanobis distance and entropy value optimization; The trend analysis of the continuously sampled real-time width characteristic values ​​is performed to obtain the width change trend, the deviation degree of the multi-dimensional characteristic vector and the adaptive control limit is compared, and the defect type is determined in combination with the width change trend.

[0021] In an optional embodiment, performing multi-scale decomposition of the structured light image sequence through a Gaussian filter kernel to extract edge features, and using an adaptive region growing algorithm to calculate the edge features to obtain the fiber bundle contour includes: The Gaussian filter kernel is used to perform multi-scale decomposition on the structured light image sequence to generate a multi-layer image pyramid; Calculating the horizontal gradient of each layer of the image in the multi-layer image pyramid to obtain a gradient magnitude map, performing non-maximum suppression on the gradient magnitude map to obtain a local maximum gradient point, setting a high threshold as the sum of three times the mean and the standard deviation based on the mean and the standard deviation, setting a low threshold as half of the high threshold, and performing double threshold processing on the local maximum gradient point using the high and low thresholds to obtain an edge feature map; Extracting candidate points whose gradient amplitude is greater than a high threshold value from the edge feature map, calculating the gradient direction difference between the candidate point and its neighboring points, and selecting candidate points whose gradient direction difference is less than a continuity threshold value as seed points; Taking the seed point as the starting point, the grayscale difference, gradient direction difference and connectivity measure between the point to be grown and the seed point are calculated and multiplied with the corresponding weight coefficients and summed to obtain the region growing criterion. The points to be grown whose region growing criterion is less than the preset growth tolerance threshold are merged into the current region to obtain the fiber bundle outline of each layer of the image. The fiber bundle outline of each layer of the image is projected to the original image scale, and the fiber bundle outline at the original scale is obtained by weighted superposition based on the edge response intensity.

[0022] In a fiber bundle contour extraction method, a sequence of structured light images of the preform to be inspected is first acquired. The sequence is subjected to multi-scale decomposition using a Gaussian filter kernel to extract edge features. The adaptive region growing algorithm is then used to calculate these edge features and determine the fiber bundle contour. The detailed steps are as follows.

[0023] A Gaussian filter kernel is used to perform multi-scale decomposition on the structured light image sequence, generating a multi-layer image pyramid. Specifically, for the input structured light image, a five-layer image pyramid can be constructed. Taking a 1024×768 pixel original image as an example, layer 0 is the original image; layer 1 is obtained by Gaussian filtering and downsampling the original image, with a size of 512×384 pixels; layer 2 is 256×192 pixels; layer 3 is 128×96 pixels; and layer 4 is 64×48 pixels. During the Gaussian filtering of each layer, a Gaussian filter kernel with a standard deviation of σ = 1.6 and a filter kernel size of 5×5 pixels can be used. The specific values ​​of the Gaussian filter kernel are 0.0924 at the center point, 0.0753 at each of the four adjacent points above, below, left, and right, and 0.0613 at each of the four adjacent diagonal points. Points in the outer circle take corresponding values ​​according to a Gaussian distribution, with the sum of all filter kernel elements being 1.

[0024] The horizontal gradient of each layer in a multi-layer image pyramid is calculated to obtain a gradient magnitude map. Taking the second layer image as an example, the horizontal gradient is obtained by calculating the horizontal difference for each pixel in the image. To improve computational accuracy, the Sobel operator can be used to calculate the horizontal gradient. This operator has a smoothing effect in the horizontal direction and can reduce the influence of noise. Specifically, for the pixel at position (i, j) in the image, its horizontal gradient is calculated by convolving the Sobel operator with the image. In actual calculations, for a 256×192 pixel second layer image, a gradient magnitude map of the same size is obtained.

[0025] Non-maximum suppression is performed on the gradient magnitude map to obtain the local maximum gradient points. The purpose of non-maximum suppression is to refine edges and retain the local maximum points along the gradient direction. Specifically, the gradient magnitude of each pixel is compared with its two adjacent points along the gradient direction. If the gradient magnitude of the point is less than that of either adjacent point, the gradient value of the point is set to 0; otherwise, the original gradient value is retained. In actual implementation, for example, in the gradient magnitude map of the second layer image, for a pixel at position (100, 80), if its gradient direction is primarily 0° (horizontally), it is compared with the gradient magnitudes of the pixels at positions (99, 80) and (101, 80).

[0026] Based on the mean and standard deviation of the gradient magnitude map, set the high threshold equal to three times the sum of the mean and standard deviation, and set the low threshold equal to half of the high threshold. For example, for the second layer image, if the calculated gradient magnitude map has a mean of 30 and a standard deviation of 5, then set the high threshold to 45 (i.e., 30 + 3 × 5) and the low threshold to 22.5 (i.e., 45 ÷ 2).

[0027] Double-threshold processing is performed on the local maximum gradient points using a high threshold and a low threshold to generate an edge feature map. The double-threshold processing rule is as follows: points with gradient magnitudes greater than the high threshold are marked as strong edge points; points with gradient magnitudes between the low and high thresholds are marked as weak edge points; and points with gradient magnitudes less than the low threshold are suppressed. Weak edge points are then checked for connectivity. If a weak edge point is connected to a strong edge point, it is retained as an edge point; otherwise, it is suppressed. After double-threshold processing, a binary edge feature map is obtained.

[0028] Candidate points with gradient magnitudes greater than a high threshold are extracted from the edge feature map. The gradient direction difference between the candidate point and its neighboring points is calculated. This gradient direction difference can be measured by the absolute value of the angular difference between the candidate point and its neighboring points. Candidate points with a gradient direction difference less than a continuity threshold are selected as seed points. The continuity threshold can be set to 45°, meaning that a candidate point is selected as a seed point if the gradient direction difference between the candidate point and its neighboring points is less than 45°.

[0029] Starting from a seed point, the grayscale difference, gradient direction difference, and connectivity metric between the target growth point and the seed point are calculated and multiplied by the corresponding weight coefficients. The sum of these factors yields the region growing criterion. Grayscale difference can be calculated as the absolute value of the grayscale difference between the target growth point and the seed point; gradient direction difference is calculated as the absolute value of the angle difference between the two gradient directions; and connectivity metric is determined by whether the target growth point is spatially connected to points in the current region. Weight coefficients can be set as follows: grayscale difference weight 0.5, gradient direction difference weight 0.3, and connectivity metric weight 0.2. The region growing criterion is a weighted sum of these three factors. If the grayscale difference between the target growth point and the seed point is 10, the gradient direction difference is 20°, and connectivity is good (quantized as 0), then the region growing criterion is calculated as 0.5×10+0.3×20+0.2×0=5+6+0=11.

[0030] The fiber bundle outline for each layer of the image is obtained by merging the points to be grown whose region growing criterion is less than the preset growth tolerance threshold into the current region. The preset growth tolerance threshold can be set to 15, that is, when the region growing criterion is less than 15, the points to be grown are merged into the current region. The region growing process is iterated until no new points can be merged.

[0031] The fiber bundle contours of each layer are projected to the original image scale, and the fiber bundle contours at the original scale are obtained by weighted superposition based on the edge response strength. During the projection process, for example, the coordinates of the contour points in the second layer image (256×192 pixels) are multiplied by the scaling factor of 4, and they are mapped to the corresponding positions in the original image (1024×768 pixels). During the weighted superposition process, different weights can be assigned to the contours of different scale layers, for example, the weight of layer 0 is 0.4, layer 1 is 0.3, layer 2 is 0.2, layer 3 is 0.1, and layer 4 is 0. The contours of each layer are weighted and superimposed to obtain the comprehensive fiber bundle contour at the original scale.

[0032] This multi-scale decomposition combined with the adaptive region growing method can achieve stable contour extraction even when the fiber bundle is moving at high speed (production speed 60m / min). Practice has shown that the above processing can effectively suppress the influence of image noise, extract continuous and stable contour features, and provide a reliable feature basis for subsequent width measurement. In particular, under high-speed motion conditions, by adjusting the weight coefficients of different scale layers, the accuracy and real-time requirements of contour extraction can be better balanced. For example, when the production speed is increased to 80m / min, the weights of the lower resolution layers (layers 2 to 4) can be appropriately increased to ensure the real-time performance of the algorithm; when the speed drops below 40m / min, the weights of the high-resolution layers (layers 0 and 1) can be increased to obtain more accurate contour features.

[0033] Figure 2 Schematic diagram of performance comparison of different fiber bundle profile extraction methods under various working conditions: This figure shows a comparison of the accuracy of three different fiber bundle contour extraction methods under different motion speed conditions. The chart uses a black, white and gray color scheme, with the horizontal axis representing three different working conditions and the vertical axis representing the accuracy percentage of contour extraction. Under standard speed conditions (such as 40m / min), the accuracy of the present invention reaches 93.0%, slightly higher than the 90.0% of the traditional region growing method and 88.0% of the Canny edge detection. As the fiber bundle movement speed increases, the performance difference between the three methods gradually widens. Under high-speed conditions (80m / min), the present invention can still maintain a high accuracy of 86.0%, while the traditional region growing and Canny edge detection methods drop to 72.0% and 68.0%, respectively. Under extreme conditions (90m / min), the gap widens further, with the accuracy of the present invention being 81.0%, the traditional region growing dropping to 64.0%, and the Canny edge detection being only 56.0%.

[0034] In an optional embodiment, decoding the structured light fringe pattern to obtain depth information and establishing a spatial mapping relationship based on the fiber bundle profile, and reconstructing a three-dimensional point cloud model of the prepreg yarn through binocular stereo matching includes: The structured light projection unit sequentially projects a multi-bit Gray code fringe pattern and a multi-phase shifted fringe pattern onto the surface of the prepreg to obtain a Gray code pattern sequence and a phase shifted pattern sequence; the left camera and the right camera in the binocular vision camera array synchronously capture images of the prepreg surface to obtain a left and right view image sequence; Binarizing the Gray code pattern sequence to obtain a Gray code sequence for each pixel, converting the Gray code sequence into a binary code sequence, calculating a phase value of the phase shift pattern sequence using a least squares method, decoding the phase jump to obtain a continuous phase map according to the binary code sequence, and calculating a depth map of the prepreg based on the continuous phase map and calibration parameters of the structured light system; Projecting the fiber bundle contour features into three-dimensional space, calculating the grayscale value difference, gradient amplitude difference, gradient direction difference, and contour distance difference of the to-be-matched points in the left and right view image sequences, and obtaining the initial matching cost by weighted summation; Calculating an aggregated cost of the initial matching cost along an epipolar direction, performing scanline optimization on the aggregated cost in the horizontal and vertical directions to obtain multiple sets of candidate disparity values, and selecting a disparity value corresponding to a minimum cost among the candidate disparity values ​​as an optimal disparity to obtain a disparity map; A fused depth map is obtained by weightedly averaging the depth values ​​of the depth map and the disparity map at the fiber bundle contour features. The three-dimensional coordinates of the prepreg yarn are calculated by triangulation based on the fused depth map and camera parameters to obtain a three-dimensional point cloud model of the prepreg yarn.

[0035] In this embodiment, the structured light projection unit uses a digital light processor (DLP) projector with a projection resolution of 1920×1080 pixels. The binocular vision camera array consists of two industrial cameras, each with a pixel resolution of 2048×1536, an 80% field of view overlap, and a lens focal length of 12mm. In the structured light system, the Gray code sequence consists of 10 vertical stripe patterns, with the stripe width halved in each pattern. The phase-shifted stripe pattern uses sinusoidal stripes, consisting of four images with a phase difference of π / 2.

[0036] The structured light projection unit first projects 10 vertical Gray code stripe patterns onto the prepreg surface, with the number of stripes increasing from 1 to 512. It then projects four phase-shifted sinusoidal stripes, with phases of 0, π / 2, π, and 3π / 2. Left and right cameras synchronously capture Gray code and phase-shifted image sequences of the prepreg surface, acquiring complete texture information.

[0037] The captured Gray code pattern sequence is processed with a threshold of 128 (grayscale range 0-255). Pixels above the threshold are marked as 1, and pixels below the threshold are marked as 0, resulting in a 10-bit Gray code sequence for each pixel. When converting the Gray code sequence to binary, the highest bit of the binary code equals the highest bit of the Gray code, and the remaining bits are obtained by XORing the adjacent two Gray code bits. For example, for the Gray code sequence [1, 1, 0, 1], the converted binary code is [1, 0, 0, 1].

[0038] For a phase-shifted pattern sequence, extract the grayscale value of each pixel in the four phase-shifted images. Assuming the grayscale values ​​of a pixel (u, v) in the four images are 110, 180, 90, and 50, respectively, the least squares method is used to calculate the wrapped phase value of that pixel as 0.64π. Because the phase values ​​exhibit a 2π periodicity, the phase image exhibits jumps, requiring the use of a binary code sequence to resolve these phase jumps. Assuming the binary code for a pixel is [1, 0, 1, 0, 0, 1, 1, 0, 1, 0], the corresponding fringe number is 682, and the wrapped phase is 0.64π. The continuous phase value for that pixel is (682π + 0.64π) × 2 = 1365.28π.

[0039] Depth information is calculated based on continuous phase images and structured light system calibration parameters. These parameters, including the camera intrinsic and extrinsic matrices and projector parameters, are acquired by collecting 20 sets of calibration images at different positions on a flat calibration plate. For pixels with a phase value of 1365.28π, the depth is calculated to be 356.8mm using triangulation principles.

[0040] The contour features of the fiber bundles in the prepreg yarn were extracted using the Canny operator. A dual-threshold method was used for edge extraction, with a low threshold of 50, a high threshold of 150, and a Gaussian filter kernel size of 3 × 3. The extracted contour points were projected into three-dimensional space to construct a spatial contour model of the fiber bundles.

[0041] In binocular stereo matching, four dissimilarity metrics are calculated for corresponding points in the left and right views: grayscale difference is measured using the absolute difference method; gradient magnitude and orientation differences are calculated using the Sobel operator and then differentiated; and contour distance difference represents the difference in distance from the pixel to the nearest contour point. For example, a pixel with coordinates (500, 400) in the left camera image has a grayscale value of 128, a gradient magnitude of 20, a gradient direction of 45°, and a distance to the nearest contour of 5 pixels. For a matching point on the right camera, assuming coordinates (480, 400) on the epipolar line, its grayscale value is 120, its gradient magnitude is 18, its gradient direction is 40°, and its distance to the nearest contour is 7 pixels. Calculate each difference and assign weights: grayscale difference × 0.3 + gradient amplitude difference × 0.2 + gradient direction difference × 0.2 + contour distance difference × 0.3 = |128-120| × 0.3 + |20-18| × 0.2 + |45-40| × 0.2 + |5-7| × 0.3 = 2.4 + 0.4 + 1.0 + 0.6 = 4.4, and the initial matching cost is 4.4.

[0042] The initial matching costs were aggregated along the epipolar lines using a 5×5 window, with the weighting coefficient decaying with increasing distance from the center point. The aggregated costs were optimized four times along the horizontal and vertical scan lines: left to right, right to left, top to bottom, and bottom to top. Dynamic programming was used for the optimization, with a smoothing coefficient of 0.1. For the pixel (500, 400), assuming a disparity search range of 0-64 pixels, the candidate disparity values ​​were 20, 21, 20, and 20 pixels, respectively. The disparity value of 20 pixels with the lowest cost was selected as the optimal disparity.

[0043] The depth values ​​of the structured light depth map and the stereo matching disparity map at the fiber bundle outline feature are fused. The fusion weight is determined by the depth confidence level: the structured light depth weight is 0.7, and the stereo matching depth weight is 0.3. For the outline pixel (500, 400), the structured light depth is 356.8mm, and the depth value obtained by stereo matching is 360.2mm. The fused depth value is 356.8×0.7+360.2×0.3=357.8mm.

[0044] Based on the fused depth map and camera parameters, triangulation is used to calculate the 3D coordinates of each pixel on the prepreg surface, resulting in a 3D point cloud model with a point cloud density of 2048 × 1536. By calculating the normal vector of each point and performing triangular facet reconstruction, a complete 3D mesh model of the prepreg is generated, achieving high-precision 3D reconstruction of the prepreg.

[0045] In an optional embodiment, the three-dimensional point cloud model is spatially registered with a calibration reference plate, a coordinate transformation matrix is ​​calculated using an iterative closest point algorithm, and the prepreg profile is projected onto a standard plane. The cross-sectional profile curve is fitted using a RANSAC algorithm, which includes: A Harris corner detection algorithm is used to extract corner features of a calibration reference plate, and the coordinates of the corner features at a sub-pixel scale are calculated to obtain a reference feature point set. The point cloud feature set is extracted from the three-dimensional point cloud model and an initial correspondence is established with the reference feature point set. False matching point pairs are eliminated from the established initial correspondence to obtain accurate matching feature point pairs. Calculating the covariance matrix of the precisely matched feature point pairs, obtaining an optimal rotation matrix and translation vector by singular value decomposition of the covariance matrix, and transforming the three-dimensional point cloud model into a standard coordinate system with the calibration reference plate as the X0Y plane using the optimal rotation matrix and the translation vector; Extracting a contour point cloud set from the three-dimensional point cloud in the standard coordinate system, projecting the contour point cloud set onto the X0Y plane to obtain a two-dimensional contour point set, removing outliers from the two-dimensional contour point set using statistical filtering, and filtering edge points from the two-dimensional contour point set according to a preset curvature threshold to obtain a valid contour point set; The effective contour point set is divided into multiple local point sets along the yarn direction, three points are randomly selected from each local point set to calculate the quadratic curve, and the vertical distances from the remaining points in the local point set to the quadratic curve are calculated. The random selection and vertical distance calculation are iteratively performed until a preset fitting error threshold is met, and a standard plane contour curve is obtained based on the fitting of the finally retained points.

[0046] A method for spatially registering a three-dimensional point cloud model with a calibration reference plate, calculating a coordinate transformation matrix based on an iterative closest point algorithm, and fitting a cross-sectional profile curve using a RANSAC algorithm after projecting the prepreg profile onto a standard plane includes the following technical steps.

[0047] In the initial stage, the Harris corner detection algorithm is used to extract the corner features of the calibration reference plate. Specifically, the image gradient is calculated for the calibration reference plate image, and a structure tensor matrix is ​​constructed based on the gradient of each pixel. This matrix represents the distribution of the gradient in the local area. By calculating the eigenvalues ​​of the structure tensor matrix and the response function value R = det(M) - k × trace(M) 2, where k is set between 0.04 and 0.06, to determine candidate corner regions. Preliminary corner points are screened by setting a response threshold (e.g., R > 1000) and performing local maximum suppression, retaining the points with the largest response values ​​within an 8×8 region. For these points, a sub-pixel refinement algorithm is used. This algorithm uses a quadratic surface to fit the local grayscale distribution of the points and determine the locations of the extreme points. The sub-pixel refinement algorithm constructs an equation based on the grayscale values ​​along the gradient direction and iteratively solves for the position offset with an accuracy of up to 0.1 pixel. Finally, a set of feature points with precise coordinates is obtained on the calibration reference plate.

[0048] A set of feature points is extracted from the 3D point cloud model based on point cloud density and curvature characteristics. The Fast Point Feature Histograms (FPFH) algorithm is used to calculate a feature descriptor for each point, with a dimension of 33, representing the geometric structure surrounding the point. A KD tree is used to accelerate the search, finding the best match for each benchmark feature point in the point cloud and establishing an initial correspondence. To eliminate false matches, the RANSAC algorithm is used to iteratively select at least three pairs of matching points. The transformation matrix is ​​then calculated and the consistency of all matching point pairs is evaluated. A distance threshold of 0.5 mm and an inlier rate threshold of 75% are set. After 100 iterations, matching pairs that meet the inlier criteria are retained, ultimately resulting in the exact matching feature point pairs {(P1, Q1), (P2, Q2), ..., (Pn, Qn)}, where P represents the benchmark feature point and Q represents the point cloud feature point.

[0049] Based on the exact matching of feature point pairs, the covariance matrix C is calculated. First, the centroids Pc and Qc of the two groups of points are calculated respectively, and then the centroids of each pair of points are subtracted to obtain the centered points P'i=Pi-Pc, Q'i=Qi-Qc. The covariance matrix C is given by C=∑(P'i·Q'i T ) / n is constructed. Perform singular value decomposition on the matrix C and obtain C=USV T . The optimal rotation matrix R=VU T , translation vector T = Qc - R·Pc. Check the determinant of matrix R. If negative, invert the last column of V and recalculate R, ensuring that R is orthogonal and its determinant is +1. Apply the transformation matrix [R|T] to transform the 3D point cloud from the original coordinate system to the standard coordinate system with the calibration reference plate as the X0Y plane. After the transformation, the average distance error between the point cloud and the reference plate is less than 0.2 mm, the maximum error does not exceed 0.5 mm, and the angular deviation is less than 0.5 degrees.

[0050] Contour points are extracted from a point cloud in a standard coordinate system. Using a projection method, the point cloud is projected along the Z axis onto the XY plane, resulting in a two-dimensional contour point set {(x1, y1), (x2, y2), ..., (xm, ym)}. In this case, the two-dimensional point set contains approximately 2000 points, covering an area of ​​180 mm × 120 mm. Statistical filtering is used to remove outliers. The average distance d from each point to its K nearest neighbors (K = 8) is calculated. The mean μ and standard deviation σ of all these average distances are calculated, and points with |d - μ| > α·σ are removed, where α = 2.5. After filtering, approximately 1850 points are retained. Edge points are filtered using a preset curvature threshold of 0.18. The curvature at each point is calculated as the inverse of the radius of the fitted circle between the point and its nearest neighbors. Points with curvature greater than the threshold are selected as the valid contour point set, totaling approximately 850 points.

[0051] The effective contour point set is divided into multiple local point sets at 10mm intervals along the yarn direction (X axis), each containing about 40-60 points. In each local point set, the RANSAC algorithm is used to fit a quadratic curve. Three points {(xi, yi), (xj, yj), (xk, yk)} are randomly selected and the quadratic curve parameters a, b, c, d, e are determined by solving the linear equation system so that the curve equation ax 2 +bxy+cy 2 +dx+ey+1=0 holds. Calculate the vertical distance from the remaining points in the local point set to the curve, and the vertical distance is calculated by the shortest distance from the point to the curve. Set the fitting error threshold to 0.05mm. For each point, if its distance to the curve is less than the threshold, it is considered an inlier. Repeat the random point selection and calculation process 200 times, and retain the curve model with the most inliers. If the proportion of inliers exceeds 90%, the fitting is considered successful. Based on the final retained inliers, the least squares method is used to refit to obtain an accurate local quadratic curve. The curve parameters of each local area are stored to form a complete standard plane contour curve description. The fitting results show that the average deviation of the curve from the original point set is 0.032mm, and the maximum deviation is 0.083mm, which meets the accuracy requirements of industrial applications.

[0052] Figure 3 Schematic diagram of the accuracy comparison analysis of different contour fitting algorithms: This figure presents a comparative analysis of the accuracy of three different contour fitting algorithms under varying point cloud densities. The figure is presented as a line graph, with the horizontal axis representing point cloud density (points / cm²) and the vertical axis representing average fitting error (mm). The three technical solutions are distinguished by the different data point marker shapes: circular markers represent the Harris corner detection combined with the RANSAC algorithm employed by our invention, square markers represent the traditional ICP registration algorithm, and triangular markers represent the Canny-based contour extraction method. The visual design of the graph features a clear grid background and standardized coordinate axis annotations. The three broken lines are distinguished by solid, dashed, and dotted lines, respectively, ensuring data readability and comparison. The point cloud density tested covers the typical application range of 100 to 600 points / cm², with error measurement accuracy reaching 0.01mm. Analysis of the three curves reveals that the error curve of our invention consistently maintains the lowest level, demonstrating superior algorithm stability and accuracy. The performance of our invention improves most significantly with increasing point cloud density, with a steady and sustained error reduction trend. The performance of the traditional ICP registration algorithm was mid-range, with significant improvement under high-density conditions. The Canny-based contour extraction method had a relatively high overall error level and relatively limited performance improvement, validating the significant technical advantage of the proposed method in contour fitting accuracy.

[0053] In an optional embodiment, using the Harris corner detection algorithm to extract corner features of the calibration reference plate, and calculating the coordinates of the corner features at a sub-pixel scale to obtain a reference feature point set includes: Acquire a calibration reference plate image, calculate the gradients of the calibration reference plate image in the x-direction and the y-direction, convolve the squared terms and product terms of the x-direction gradient and the y-direction gradient with a Gaussian window function to obtain a grayscale change matrix of the calibration reference plate image, and subtract the square of the trace of the grayscale change matrix from the determinant of the grayscale change matrix and multiply the resultant by a preset coefficient to obtain a corner point response value of the calibration reference plate image; Searching for a local maximum within a three-by-three neighborhood of the corner point response value, taking a point greater than a response threshold and greater than other response values ​​in the neighborhood as an initial corner point of the calibration reference plate image, constructing a five-by-five window with the initial corner point as the center, and taking the pixel coordinates within the five-by-five window and the corresponding calibration reference plate image grayscale values ​​as fitting sample points; Calculate the quadratic coefficient matrix and the linear coefficient matrix of the fitting sample points, calculate the sub-pixel corner point positions of the calibration reference plate image according to the product of the determinant of the quadratic coefficient matrix and the linear coefficient matrix, and form the sub-pixel corner point positions into a reference feature point set of the calibration reference plate image.

[0054] The embodiments of the present disclosure provide a method for extracting corner features of a calibration reference plate using a Harris corner detection algorithm, and calculating the coordinates of the corner features at a sub-pixel scale to obtain a reference feature point set.

[0055] When processing the image of a calibration reference plate, you first need to acquire an image of the calibration reference plate. The calibration reference plate typically has a black and white checkerboard pattern, with each grid having a known side length, such as 20 mm. After acquiring the image, you need to calculate the image's gradients in the x and y directions. To calculate the image gradient, you can use the Sobel operator. The Sobel operator is a discrete differential operator used to calculate the approximate gradient of the image's grayscale function. For example, for a pixel point (i, j), its x-direction gradient Gx(i, j) can be calculated by convolving the grayscale values ​​of the image within a 3×3 region surrounding that point with a Sobel operator template. Similarly, the y-direction gradient Gy(i, j) can be calculated in a similar manner.

[0056] After calculating the x-direction gradient Gx and the y-direction gradient Gy, three squared and multiplied terms need to be calculated: Gx², Gy², and Gx×Gy. These terms are convolved with a Gaussian window function to smooth the image gradient information. The Gaussian window function typically uses a 7×7 Gaussian kernel with a standard deviation of 1.5 to effectively reduce the impact of noise on subsequent corner detection. After the convolution operation is complete, three smoothed image matrices are obtained: Sx, Sy, and Sxy. These correspond to the convolution of the squared x-direction gradient, the squared y-direction gradient, and the product of the two directional gradients with the Gaussian window function.

[0057] Based on the above three smoothing matrices, the grayscale change matrix M of the calibration reference plate image can be constructed, which contains the grayscale change information of the image. The determinant of the grayscale change matrix M can be calculated as Sx×Sy-Sxy×Sxy, and the trace of the matrix can be calculated as Sx+Sy. According to the principle of Harris corner detection, the corner response value R can be obtained by subtracting the square of the matrix trace from the determinant of the grayscale change matrix M and then multiplying it by the preset coefficient k, that is, R = Det(M) - k×(Trace(M))², where the preset coefficient k is usually set to a value between 0.04 and 0.06, and 0.05 is selected in this embodiment. In this way, the corner response value of each pixel in the image can be calculated. The larger the corner response value, the more it represents a corner point.

[0058] To accurately locate corner points, it's necessary to search for local maxima in the corner response image. During this search, for each pixel (i, j) in the image, the corner response values ​​of the other eight pixels within its 3×3 neighborhood are checked. If the corner response value of a point is greater than a preset response threshold (e.g., 0.01) and greater than the response values ​​of any other points in its neighborhood, the point is considered an initial corner. This ensures that the selected points possess significant corner characteristics within the local area.

[0059] To improve the accuracy of corner location, we need to further determine the precise location of each initial corner point at a sub-pixel scale. A 5×5 window is constructed with the initial corner point as the center. The coordinates of the 25 pixels within the window and their corresponding image grayscale values ​​are used as fitting sample points. For example, for the initial corner point at position (x0, y0), the constructed 5×5 window covers all pixels in the region from (x0-2, y0-2) to (x0+2, y0+2), a total of 25 points. Each point has coordinates (x, y) and its corresponding image grayscale value is I(x, y).

[0060] Using these sample points, we can fit a quadratic surface that represents the grayscale distribution near the image corners. The general form of the quadratic surface is I(x,y) = ax² + by² + cxy + dx + ey + f, where a, b, c, d, e, and f are the coefficients to be solved. These coefficients can be calculated using the least squares method, where a, b, and c form the quadratic coefficient matrix, and d and e form the linear coefficient matrix.

[0061] Once the quadratic coefficient matrix and the linear coefficient matrix are obtained, the sub-pixel corner position can be calculated by resolving the extreme points. Specifically, the quadratic coefficient matrix is ​​[[a,c / 2],[c / 2,b]], and the linear coefficient matrix is ​​[d,e]. The offset of the sub-pixel corner position can be obtained by multiplying the inverse of the quadratic coefficient matrix with the linear coefficient matrix and then negating it. For example, if the calculated offset is (Δx, Δy), the precise sub-pixel corner position is (x0+Δx, y0+Δy). In practice, if the initial corner position is (100.0, 150.0) and the calculated offset is (0.23, -0.15), the precise sub-pixel corner position is (100.23, 149.85).

[0062] Using this method, we can calculate the sub-pixel precise positions corresponding to all initial corner points. These sub-pixel corner point positions are then combined into a benchmark feature point set. This feature point set can be used for subsequent applications such as camera calibration and object detection. In practice, the calibration reference plate typically contains an 8×10 intersection array. The resulting benchmark feature point set should contain 80 sub-pixel corner point coordinates with an accuracy of 0.01 pixel.

[0063] Under high-speed prepreg production conditions (e.g., a production speed of 80 m / min), to ensure the accuracy of corner point detection, this embodiment adopts the following optimization strategy: First, the parameters of the Gaussian window function are adaptively adjusted according to the production line speed. When the speed exceeds 60m / min, the Gaussian kernel standard deviation is adjusted to 2.0 and the window size is increased to 9×9 to enhance the ability to suppress motion blur. At the same time, the preset coefficient k can be dynamically adjusted to 0.06 to improve the detection sensitivity of weak corner points. Secondly, when calculating the sub-pixel corner point position, for high-speed motion conditions, the window size around the initial corner point is expanded to 7×7, and the number of sample points is increased to improve fitting accuracy. At the same time, the weighted least squares method is used to assign greater weights to samples closer to the center point to reduce the impact of edge blur caused by motion on accuracy.

[0064] Practice has shown that, through this optimization strategy, corner detection accuracy can be maintained within 0.05 pixels, even when the calibration reference plate is in high-speed motion, meeting the accuracy requirements of industrial on-site online inspection. In particular, when processing image sequences with a frame rate of 100 fps, the optimized algorithm maintains stable real-time performance, with an average processing time of less than 8ms per frame.

[0065] This improved Harris corner detection method is not only suitable for static calibration scenarios, but can also be reliably applied to the online detection system of prepreg production lines, providing accurate benchmark information for tasks such as dimensional measurement and defect detection during the production process.

[0066] In an optional embodiment, calculating the skewness vector of the multidimensional feature vector through a sliding time window and optimizing and constructing the adaptive control limit based on the Mahalanobis distance and entropy value includes: Setting a sliding time window length to obtain a sample set, calculating the second-order central moment and the third-order central moment of the sample set, and dividing the third-order central moment by the cube of the second-order central moment to obtain a skewness vector; Calculating the Mahalanobis distance between the multidimensional feature vector and the sample mean to obtain a feature deviation, substituting the feature deviation into an exponential decay function to calculate a dynamic bandwidth parameter, and subtracting the current feature vector from each sample point in the sample set and dividing the result by the dynamic bandwidth parameter to obtain a distance matrix; Initializing a preset number of class centers, calculating the Euclidean distance from each sample point in the sample set to each class center, substituting the Euclidean distance into an exponential membership function to calculate a membership matrix, iteratively optimizing the membership matrix based on a maximum entropy criterion until convergence to obtain an updated membership matrix, calculating the weighted centers of each class according to the updated membership matrix, and selecting the maximum class center and the minimum class center based on the eigenvector amplitudes of the weighted centers; The weighted covariance of the maximum class center and the optimal membership is added to obtain the upper control limit value, and the weighted covariance of the minimum class center and the optimal membership degree is subtracted to obtain the lower control limit value. The control coefficients of the upper control limit value and the lower control limit value are dynamically adjusted according to the norm of the skewness vector to obtain an adaptive control limit value.

[0067] The present invention relates to a method for calculating a skewness vector of a multidimensional feature vector through a sliding time window and constructing an adaptive control limit based on Mahalanobis distance and entropy value optimization.

[0068] In this method, the length of the sliding time window needs to be set first. For example, the data of the most recent 100 working points are selected as the sample set. For this sample set, the second-order central moment and the third-order central moment are calculated. The second-order central moment represents the variance of the sample data deviation from the mean, which can be obtained by summing the squares of the differences between each sample point in the sample set and the sample mean and dividing it by the number of samples. The third-order central moment represents the degree of skewness of the sample data distribution, which can be calculated by summing the cube of the differences between each sample point in the sample set and the sample mean and dividing it by the number of samples. Subsequently, the obtained third-order central moment is divided by the cube of the second-order central moment to obtain the skewness vector that reflects the asymmetry of the data distribution. For example, for a certain three-dimensional feature vector of temperature, pressure, and flow, the calculated skewness vector is [0.15, -0.23, 0.08], indicating that the temperature shows a right-skewed distribution, the pressure shows a left-skewed distribution, and the flow is nearly symmetrically distributed.

[0069] Next, the Mahalanobis distance between the multidimensional feature vector and the sample mean is calculated to obtain the feature deviation. The Mahalanobis distance takes into account the covariance structure of the data and can more accurately reflect the degree of deviation of the feature vector in multidimensional space. This feature deviation is substituted into the exponential decay function to calculate the dynamic bandwidth parameter. The function form is that the bandwidth parameter is equal to the basic bandwidth multiplied by the exponential decay term, where the exponential term is the negative feature deviation divided by the sensitivity coefficient. When the feature deviation is 2.36, the basic bandwidth is 3.0, and the sensitivity coefficient is 5.0, the calculated dynamic bandwidth parameter is 1.74. Subsequently, the current feature vector is subtracted from each sample point in the sample set and then divided by the obtained dynamic bandwidth parameter to form a distance matrix reflecting the relative distance relationship between the sample point and the current feature.

[0070] When constructing adaptive control limits, a preset number of class centers must be initialized. For example, five class centers can be initialized, and the initial values ​​can be determined by uniformly or randomly selecting them from the sample space. The Euclidean distances from each sample point in the sample set to each class center are calculated. For example, the distances from the first sample point to the five class centers are [3.25, 5.18, 2.76, 4.92, 6.31], respectively. These Euclidean distances are then applied to an exponential membership function to calculate the membership matrix. This function ensures that closer distances correspond to greater membership, and that the sum of all class memberships is 1. For example, the membership values ​​corresponding to the distances above are [0.28, 0.08, 0.35, 0.10, 0.19], indicating that this sample point has the highest membership in the third class.

[0071] An iterative optimization process based on the maximum entropy criterion includes: calculating the weighted center of each class; updating the membership matrix; calculating the objective function value; and checking for convergence. The algorithm is considered converged when the change in the membership matrix between two consecutive iterations is less than a preset threshold (e.g., 0.001). Assuming the algorithm converges after 15 iterations, the final membership matrix and weighted centers for each class are obtained. The maximum and minimum class centers are selected based on the eigenvector magnitudes of the weighted centers.

[0072] The control upper limit is obtained by adding the weighted covariance of the maximum cluster center and the optimal membership degree. The weighted covariance is calculated by first calculating the deviation of each sample point from its corresponding cluster center, then weighting the sum based on the membership degree, and finally dividing by the number of valid samples.

[0073] Finally, the control coefficients for the upper and lower control limits are dynamically adjusted based on the norm of the skewness vector. The skewness vector norm can be calculated using the Euclidean norm. For example, the norm of [0.15, -0.23, 0.08] is approximately 0.29. A large norm indicates a high degree of skewness in the data distribution, necessitating an increase in the control margin on the high-skew side and a decrease in the control margin on the low-skew side. Specifically, the base control coefficient can be set to 1.0, and the adjustment coefficient is the skewness norm multiplied by the sensitivity coefficient (e.g., 2.0). This yields an upper control coefficient of 1.0 + 0.29 × 2.0 = 1.58, and a lower control coefficient of 1.0 - 0.29 × 2.0 = 0.42. These coefficients are applied to the control limits to obtain the final adaptive upper and lower control limits.

[0074] The adaptive control limits established through this method can be dynamically adjusted based on the actual data distribution characteristics, effectively improving the accuracy and adaptability of anomaly detection. In practical applications, this method can adapt to the nonlinear changes and multimodal characteristics of industrial processes, reducing false alarm rates while improving the ability to detect true anomalies.

[0075] According to a second aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0076] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0077] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time detection method for yarn width during carbon fiber prepreg production, characterized in that: include: A binocular vision camera array and a structured light projection unit are set up in each process of the prepreg production line. The structured light projection unit projects a coded stripe pattern onto the surface of the prepreg, and the binocular vision camera array collects a sequence of structured light images of the prepreg. The structured light image sequence is subjected to multi-scale decomposition using a Gaussian filter kernel to extract edge features, and the edge features are calculated using an adaptive region growing algorithm to obtain a fiber bundle profile. The structured light fringe pattern is decoded to obtain depth information and a spatial mapping relationship is established in combination with the fiber bundle profile, and a three-dimensional point cloud model of the prepreg is reconstructed through binocular stereo matching. The three-dimensional point cloud model is spatially registered with the calibration reference plate, the coordinate transformation matrix is ​​calculated using an iterative closest point algorithm, the prepreg profile is projected onto a standard plane, and the cross-sectional profile curve is fitted using a RANSAC algorithm; Sampling along the yarn direction extracts local width values, calculating the weighted mean of consecutive sampling points as real-time width features, and calculating tension features based on the spatial distribution of the contour curve; The real-time width feature and the tension feature are combined into a multidimensional feature vector, the skewness vector of the multidimensional feature vector is calculated through a sliding time window, and an adaptive control limit is constructed based on the Mahalanobis distance and entropy value optimization; The trend analysis of the continuously sampled real-time width characteristic values ​​is performed to obtain the width change trend, the deviation degree of the multi-dimensional characteristic vector and the adaptive control limit is compared, and the defect type is determined in combination with the width change trend.

2. The method according to claim 1, characterized in that The structured light image sequence is subjected to multi-scale decomposition by a Gaussian filter kernel to extract edge features, and the edge features are calculated using an adaptive region growing algorithm to obtain the fiber bundle contour, which includes: The Gaussian filter kernel is used to perform multi-scale decomposition on the structured light image sequence to generate a multi-layer image pyramid; Calculating the horizontal gradient of each layer of the image in the multi-layer image pyramid to obtain a gradient magnitude map, performing non-maximum suppression on the gradient magnitude map to obtain a local maximum gradient point, setting a high threshold as the sum of three times the mean and the standard deviation based on the mean and the standard deviation, setting a low threshold as half of the high threshold, and performing double threshold processing on the local maximum gradient point using the high and low thresholds to obtain an edge feature map; Extracting candidate points whose gradient amplitude is greater than a high threshold value from the edge feature map, calculating the gradient direction difference between the candidate point and its neighboring points, and selecting candidate points whose gradient direction difference is less than a continuity threshold value as seed points; Taking the seed point as the starting point, the grayscale difference, gradient direction difference and connectivity measure between the point to be grown and the seed point are calculated and multiplied with the corresponding weight coefficients and summed to obtain the region growing criterion. The points to be grown whose region growing criterion is less than the preset growth tolerance threshold are merged into the current region to obtain the fiber bundle outline of each layer of the image. The fiber bundle outline of each layer of the image is projected to the original image scale, and the fiber bundle outline at the original scale is obtained by weighted superposition based on the edge response intensity.

3. The method according to claim 1, characterized in that Decoding the structured light stripe pattern to obtain depth information and combining it with the fiber bundle profile to establish a spatial mapping relationship. Reconstructing the 3D point cloud model of the prepreg yarn through binocular stereo matching includes: The structured light projection unit sequentially projects a multi-bit Gray code fringe pattern and a multi-phase shifted fringe pattern onto the surface of the prepreg to obtain a Gray code pattern sequence and a phase shifted pattern sequence; the left camera and the right camera in the binocular vision camera array synchronously capture images of the prepreg surface to obtain a left and right view image sequence; Binarizing the Gray code pattern sequence to obtain a Gray code sequence for each pixel, converting the Gray code sequence into a binary code sequence, calculating a phase value of the phase shift pattern sequence using a least squares method, decoding the phase jump to obtain a continuous phase map according to the binary code sequence, and calculating a depth map of the prepreg based on the continuous phase map and calibration parameters of the structured light system; Projecting the fiber bundle contour features into three-dimensional space, calculating the grayscale value difference, gradient amplitude difference, gradient direction difference, and contour distance difference of the to-be-matched points in the left and right view image sequences, and obtaining the initial matching cost by weighted summation; Calculating an aggregated cost of the initial matching cost along an epipolar direction, performing scanline optimization on the aggregated cost in the horizontal and vertical directions to obtain multiple sets of candidate disparity values, and selecting a disparity value corresponding to a minimum cost among the candidate disparity values ​​as an optimal disparity to obtain a disparity map; A fused depth map is obtained by weightedly averaging the depth values ​​of the depth map and the disparity map at the fiber bundle contour features. The three-dimensional coordinates of the prepreg yarn are calculated by triangulation based on the fused depth map and camera parameters to obtain a three-dimensional point cloud model of the prepreg yarn.

4. The method according to claim 1, wherein The three-dimensional point cloud model is spatially registered with the calibration reference plate, the coordinate transformation matrix is ​​calculated using the iterative closest point algorithm, and the prepreg profile is projected onto the standard plane. The cross-sectional profile curve is fitted using the RANSAC algorithm, including: A Harris corner detection algorithm is used to extract corner features of a calibration reference plate, and the coordinates of the corner features at a sub-pixel scale are calculated to obtain a reference feature point set. The point cloud feature set is extracted from the three-dimensional point cloud model and an initial correspondence is established with the reference feature point set. False matching point pairs are eliminated from the established initial correspondence to obtain accurate matching feature point pairs. Calculating the covariance matrix of the precisely matched feature point pairs, obtaining an optimal rotation matrix and translation vector by singular value decomposition of the covariance matrix, and transforming the three-dimensional point cloud model into a standard coordinate system with the calibration reference plate as the X0Y plane using the optimal rotation matrix and the translation vector; Extracting a contour point cloud set from the three-dimensional point cloud in the standard coordinate system, projecting the contour point cloud set onto the X0Y plane to obtain a two-dimensional contour point set, removing outliers from the two-dimensional contour point set using statistical filtering, and filtering edge points from the two-dimensional contour point set according to a preset curvature threshold to obtain a valid contour point set; The effective contour point set is divided into multiple local point sets along the yarn direction, three points are randomly selected from each local point set to calculate the quadratic curve, and the vertical distances from the remaining points in the local point set to the quadratic curve are calculated. The random selection and vertical distance calculation are iteratively performed until a preset fitting error threshold is met, and a standard plane contour curve is obtained based on the fitting of the finally retained points.

5. The method according to claim 4, characterized in that The Harris corner detection algorithm is used to extract the corner features of the calibration reference plate, and the coordinates of the corner features at the sub-pixel scale are calculated to obtain the reference feature point set including: Acquire a calibration reference plate image, calculate the gradients of the calibration reference plate image in the x-direction and the y-direction, convolve the squared terms and product terms of the x-direction gradient and the y-direction gradient with a Gaussian window function to obtain a grayscale change matrix of the calibration reference plate image, and subtract the square of the trace of the grayscale change matrix from the determinant of the grayscale change matrix and multiply the resultant by a preset coefficient to obtain a corner point response value of the calibration reference plate image; Searching for a local maximum within a three-by-three neighborhood of the corner point response value, taking a point greater than a response threshold and greater than other response values ​​in the neighborhood as an initial corner point of the calibration reference plate image, constructing a five-by-five window with the initial corner point as the center, and taking the pixel coordinates within the five-by-five window and the corresponding calibration reference plate image grayscale values ​​as fitting sample points; Calculate the quadratic coefficient matrix and the linear coefficient matrix of the fitting sample points, calculate the sub-pixel corner point positions of the calibration reference plate image according to the product of the determinant of the quadratic coefficient matrix and the linear coefficient matrix, and form the sub-pixel corner point positions into a reference feature point set of the calibration reference plate image.

6. The method according to claim 1, wherein Calculating the skewness vector of the multidimensional feature vector through a sliding time window and optimizing and constructing an adaptive control limit based on Mahalanobis distance and entropy value include: Setting a sliding time window length to obtain a sample set, calculating the second-order central moment and the third-order central moment of the sample set, and dividing the third-order central moment by the cube of the second-order central moment to obtain a skewness vector; Calculating the Mahalanobis distance between the multidimensional feature vector and the sample mean to obtain a feature deviation, substituting the feature deviation into an exponential decay function to calculate a dynamic bandwidth parameter, and subtracting the current feature vector from each sample point in the sample set and dividing the result by the dynamic bandwidth parameter to obtain a distance matrix; Initializing a preset number of class centers, calculating the Euclidean distance from each sample point in the sample set to each class center, substituting the Euclidean distance into an exponential membership function to calculate a membership matrix, iteratively optimizing the membership matrix based on a maximum entropy criterion until convergence to obtain an updated membership matrix, calculating the weighted centers of each class according to the updated membership matrix, and selecting the maximum class center and the minimum class center based on the eigenvector amplitudes of the weighted centers; The weighted covariance of the maximum class center and the optimal membership is added to obtain the upper control limit value, and the weighted covariance of the minimum class center and the optimal membership degree is subtracted to obtain the lower control limit value. The control coefficients of the upper control limit value and the lower control limit value are dynamically adjusted according to the norm of the skewness vector to obtain an adaptive control limit value.

7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Plano-convex lens curvature radius detection method and system based on structured light reconstruction and sub-pixel fitting, and medium

    CN121033013A

  • Machine vision-based polyester staple fiber spinning on-line detection system and method

    CN121633109A