Non-contact techniques based on a vision system for the inspection of composite material components: analysis of the influence quantities

In this paper two different approaches, based on a vision system, are compared for the inspection of a carbon fibre piece, realized using a tow filament winding process. The defect of interest is the surface void percentage, which can strongly influence the mechanical and functional characteristics of the component. The approaches differ in the method of image processing: the first is based on a colour threshold setting; the second is based on a semantic segmentation algorithm. The comparison between the two techniques allows the identification of the main causes of variability, and the individuation of the advantages and limits of each one, which make them more or less suitable for use, depending on the specific application. The preliminary results show that both methods are promising for in field use, provided that the causes of variability are identified and kept under control.


Introduction
In the composites industry, the process of filament winding has evolved to be one of the most efficient and cost effective methods for producing hollow composite structures, such as pipes and vessels, by cross-weaving polymer-impregnated continuous tows around a cylindrical mandrel [1]. The use of continuous fibers ensures the physical and mechanical uniformity in the direction of fiber arrangement, and the use of a cylindrical mandrel ensures the constancy in the inside diameter of pieces [2].
Furthermore, the filament winding process is well-suited for automation, being fast and compatible with high fiber volume requirements of lightweight and high-performance structures [3].
Although this method has been in use for an extended period of time, the effect of processing parameters has been investigated to a limited extend and it is still an object of interest to researchers in the field [4].
The main parameter controlling the mechanical behavior of the products obtained by filament winding, is the angle of the fibers with respect to the longitudinal direction, which is called winding angle. This angle is generally controlled by the control of the rotational speed of the mandrel and the longitudinal speed of the head dispensing the tow [2].
Irregularities and vibrations in the deposition process of the tow on the mandrel, as well as insufficient resin impregnation of the fiber and variability of the tow width, can produce weft irregularities and voids, i.e. through holes in the thickness of the cylindrical product, which compromise the functional and mechanical properties of the product, especially in critical regions, like joint regions.
In instances where these parameters are critical, it is imperative that tight controls be exercised over the void level and the fiber volume distribution through the thickness of the product. Given the complexity of the interaction between the different process parameters, it is important that these interactions be well understood and controlled to achieve the desired quality [3][4][5][6][7][8]. To this aim, a detailed process simulation could be a useful tool to take into account the effect of all the influencing quantities of the process, but it is not easy to realize, due to the complexity of the process itself, so it requires experimental techniques of defect identification for validation and improvement of settings [9][10][11]. Defect detection methods could be also useful for periodic non-destructive testing and for the on-line quality control of pieces. In the second case, in particular, the inspection technique should have, in addition to metrological requirements, also characteristics of easy automation, velocity and computational lightness.
The recognition of defects, which are identified as points of inhomogeneity of the material, presents on composite components specific difficulties due to the fact that the background is intrinsically inhomogeneous. Different non-destructive testing methods are proposed in literature for the inspection of composite materials, like for example those based on: eddy current [12,13], thermography [14], ultrasound [15], electrical resistance [16], micro tomography [17], and Scanning Electron Microscopy (SEM) [18].
These techniques are often very expensive or unsuitable for on-line use, or applicable only to specific categories of materials, such as conductive ones. Taking into account these drawback, direct vison-based methods appear advantageous, for the inspection of one-layer fabrics or of the uppermost layer, being non-destructive, contactless, relatively inexpensive, and automatable. They can be based, for example, on image analysis algorithms such as edge detection or gradient methods [19,20], or on the analysis of the bi-directional reflectance distribution function (BRDF) [21].
Based on the previous considerations, in this paper two vision-based methods are presented, for the measurement of the percentage of voids on the surface of a cylindrical piece composed of an epoxy resin matrix and carbon fibers reinforcement, obtained by a filament winding process. The techniques both provide for the acquisition of images by means of a camera, but differ in the algorithm of analysis of the images themselves: in one case the pixels belonging to empty areas are identified through an analysis of color levels, in the second a semantic segmentation method is used [22].
The comparison between the two techniques allows a mutual validation, and the identification of advantages and limits of each one: both methods appear to be promising, provided that the causes of variability are identified and kept under control [23,24].
In Section 2 the materials examined are described and the two methodologies are explained, together with the measurement strategy of the surface under analysis.
In Section 3 the results of both methods are presented and compared, and considerations concerning the most relevant aspects are discussed with the aim of improving the experimental procedure.
Conclusions end the paper.

Materials and methods
The piece under analysis is a hollow cylinder of carbon fiber (figure 1.a) realized using a tow filament winding process. This procedure consists in a resin-wetted filamentous tow uniformly wound around a rotating mandrel along a given path by an end-effector.
The percentage of voids on the surface is the quantity of interest, to be measured. The camera used for image acquisition is a DALSA Vision Camera Genie Nano-C4040, Color, CMOS, 4112x3008 pixels. As for the lighting system, two soft-boxes with 80W bulbs have been used in combination with a linear led lamp inside the cylinder ( figure 1.b). In figure 1.c an example of an image acquired in this mode is shown.
For the image analysis, National Instrument's high performance software "Vision Builder for Automated Inspection" and MATLAB have been used.
The whole specimen has length of 320 mm and diameter of 55 mm. The external parts (40 mm on both sides) has been excluded due to anomalous thickness of the piece; a circumferential sector is also excluded because a weft irregularity is present, because the piece is a prototype and its design has not been optimized yet. The rest of the surface has been divided into three zones and six sectors (figure 2). In total, there are 18 areas of limited extension. Positioning the camera perpendicularly to the cylinder surface, each scanned region could be approximated as flat areas. The perspective error caused by curved surface is expected to be negligible.
The reference settings for camera, working distance and software parameters are: • F ratio of f/8 • Exposure time of 200ms • RoI (Region of Interest) of 1030x2600 pixel. This corresponds to 30 x 70 mm Two techniques of image analysis have been developed: in the first, the pixels belonging to empty areas are identified through the comparison of the color level of the pixel with a predetermined threshold; in the second, a semantic segmentation method is used to distinguish the pixels belonging to void areas. The methods will be described in Sections 2.1 and 2.2.
For both methods the following analysis has been carried out: • Repeatability tests: a region with a low relative percentage of voids has been selected. 12 images of this area have been acquired, each time repositioning the piece: thus, repeatability considers also the variability introduced by the positioning of the piece. This is estimated as standard deviation of the void percentage measured on each image.

Method 1
This approach relies on the identification of a color threshold, in order to identify white pixels that represent voids on the surface. The method has been calibrated using a black metal plate of comparable thickness of the cylinder and holes of known diameter. The calibration procedure and their results are deeply described in [24]. To identify the pixels corresponding to voids, which appear as white, a threshold of 232 is considered for the red channel: all the pixels with a red value above the threshold are considered as part of a void.

Method 2
This technique is based on a semantic segmentation network to detect the voids on the surface. For this purpose, 90 RoIs have been acquired from the surface of the cylinder, using the reference acquisition setup described. This dataset has been divided into: 54 images for training, 18 for validation, and 18 for testing. The DeepLabV3+ segmentation net has been used for segmentation, and ResNet18 has been used for feature extraction [22]. The size of the input images has been chosen as 1300 x 512 pixels. To manage the great imbalance between the number of void pixels and the fiber ones, the considered model has been trained using the Tversky index [25] as loss function. Different training sessions have been carried out, in order to find the optimal setting for the parameters α and β of the loss function [25], in terms of performance of the net. With reference to the semantic segmentation network, the performance of the network is evaluated by the Intersection over Union (IoU) indicator, also said Jaccard Index [22]. α=0.7 and β=0.3 have been considered as suitable values for these parameters, as they guarantee a IoU on the testing set equal to 0.9997 and 0.8347 for "Fiber" and "Void" classes, respectively, which are very satisfactory. The network has been trained using the following hyper-parameters: • 22 epochs; • Stochastic Gradient Descent with Momentum (SGDM) as optimizer [26]; • momentum of 0.9; • initial learning rate of 0.001 reduced by 20% every 10 epochs. The percentage of voids is calculated as the ratio of pixels labeled by the network as "Void" over the total number of pixels of the RoI.

Results
As for the repeatability tests, a standard deviation in the order of 0.01 as voids percentage has been obtained for both approaches.
With regards to the surface analysis, the main results are described in the following: • Mean and standard deviation of the 18 average values corresponding to the 18 areas in which the surface is divided, in terms of percentage of voids, are: o for color thresholding, equal to 0.12 and 0.10, respectively; o for semantic segmentation, equal to 0.18 and 0.14, respectively. Therefore, for the piece under analysis, both methods highlight a great inhomogeneity of the void percentage along the surface of the cylinder. In fact, the standard deviations of the all areas is considerably greater than the estimated repeatability of the methods (0.01 as voids percentage). • In figures 3-5 the average values of the voids contained in Zone 1, Zone 2 and 3, respectively, are reported. As it can be noticed, the void percentage calculated using color thresholding and semantic segmentation methods, presents the same trend, but there is a systematic difference between the results of the two techniques. • From the examination of figures 3-5, it can be also observed that in Zone 3 the voids percentage is overall lower, as well as, for all zones, in Sectors 3 and 4. This is evidently due to specific characteristics of the kinematic chain, which appears more stable in these areas. • It can be noticed that where the percentage of voids is higher, the variability also increases: this is caused by the proximity of the voids to the edges of the RoI, so, after repositioning the piece, small shifts of the RoI produce variations in the estimated void percentage.

Discussion
In all the analyzed areas (figures 3-5) the trends of results are similar, but the values of void percentage are greater when the semantic segmentation method is adopted. It should be considered that the labeling of the pixels in the training phase is characterized by a certain level of discretion on the part of the operator, which is the cause of the bias between trends.
In this regard, it should be noted that, while Method 1 has been calibrated using a reference piece, in Method 2 a similar approach would require carrying out labeling and training operations on a dimensional standard. This would represent a problem, since the training of a neural network must be carried out on the same types of images, and therefore of pieces, on which the testing is done.
On the other hand, semantic segmentation presents some advantages over color thresholding method, because it can be made robust through an appropriate training phase, with respect to ambient influence factors, like suboptimal illumination conditions, that, for example, could cause reflections or shadows on the surface. If different possible situations are considered during the training phase of the network, in fact, the algorithm will be able to correctly recognize the elements of the images in testing phase or in field use, even in presence of interfering variables, thanks to the complexity of input processing. On the contrary, being Method 1 based on a fixed color threshold, that is a deterministic law, it is highly sensitive to variations in the image acquisition conditions.
In light of this, Method 2 appears preferable, when a significant variability of the acquisition conditions is expected, as long as a preliminary "calibration" of the method is performed, to eliminate the bias introduced in the labelling phase, for example by comparison with Method 1, whose traceability is guaranteed due to the calibration by a dimensional standard.

Conclusions
In this paper, two different approaches are analyzed for the inspection of a carbon fiber piece, both based on a vision system. The defect of interest is the surface void percentage, which can strongly influence the mechanical and functional characteristics of the component.
In the first method, the pixels belonging to empty areas are identified through the comparison of the color level of the pixel with a predetermined threshold; in the second, a semantic segmentation method is used to distinguish the pixels belonging to void areas.
Repeatability of measurements is in the order 0.01 of void percentage for both methods, which is a significantly lower value than the variability of the measurand, so the methods appear adequate to highlight particular trends along the surface, due to the characteristics of the specific winding process.
A bias is identified between the two methods, evidently introduced in the labelling phase of Method 2, that could be eliminated by means of a preliminary "calibration" of the Method 2 by comparison with Method 1, whose traceability is guaranteed due to the calibration with a dimensional standard.
Method 2 is preferable when a significant variability of the acquisition conditions is expected, especially in terms of lighting conditions, because it can be made more robust by means of an appropriate training phase. If environmental variability is low, Method 1 is certainly a simpler method to implement.
The application of the methods to real products could provide interesting information not only with reference to the product quality assessment, but also for the process optimization, especially when process parameters, like winding velocity, have to be enhanced to increase the process capability.