Measurement of complex freeform additively manufactured parts by structured light and photogrammetry

Additively manufactured parts are fabricated by generating complex shapes, allowing almost inﬁnite freedom of design. Such parts present signiﬁcant measurement challenges related to the accessibility and the quality of the measurement results, due to the presence of hollow features, and freeform geome- tries. Optical measuring instruments are being increasingly applied for complex form measurement, because, compared to contact measurements, they feature higher speeds, higher point densities and often better capabilities to access recessed regions. In this paper, a novel set of indicators is presented that can be used to investigate the performance of measurement solutions based on high-density point-based sampling when applied to form measurement of complex parts. The indicators address surface coverage, sampling density and measurement error as a function of local geometric properties. The indicators are applied to an example comparative analysis involving structured light scanning and photogrammetry measurements of a complex freeform additively manufactured automotive part. (cid:1) 2020 The Authors.


Introduction
Additive manufacturing (AM) allows for increased design freedom, therefore components can be fabricated with highly complex geometrical features, e.g. hollow, freeform geometries and lattice structures. This design freedom has led to a significant increase in the range of industries utilising AM, which includes the automotive, aerospace and biomedical sectors [1]. The measurement of the shape of an object is a key aspect for quality control of AM products, along with feedback for effective process control [1,2]. However, part inspection and verification of highly complex components present significant measurement challenges: a) freeform shapes, b) rough surface texture, c) occlusions and difficultto-access features, and d) a wide range of materials with different surface and optical properties [1,[3][4][5][6][7]. The geometrical complexity of AM components requires high sampling density in point-based measurement and may create accessibility challenges due to the contact nature of tactile coordinate measuring machines (CMMs) [8,9]. CMMs are also limited by slow measurement rates and low sampling of points, in comparison to non-contact coordinate measuring systems. Optical, non-contact methods present a number of advantages over CMMs and are increasingly employed for coordinate measurements of AM parts [1,7]. Their non-contact nature can lead to faster measurement rates, achieving higher sampling densities without the risk of damaging the part. However, optical techniques suffer from line-of-sight issues due to occlusions and shadowing. Despite their limitations, non-contact techniques are widely used due to their high speeds and accuracies.
Research into measuring solutions for complex AM parts and design of standardised procedures for their inspection and verification is on-going. Stavroulakis et al. [7] reviewed the optical measuring systems currently available for post-process form measurement of metal AM parts, identifying the advantages and limitations of several solutions for the measurement of freeform surfaces. In their review, they concluded that the most applicable form measurement principles for metal AM are laser triangulation and fringe projection. Guerra et al. [10] presented a comparison between four optical systems suitable for verification of damaged industrial components: two lasers triangulation, a fringe projection and a photogrammetry system. The comparison on a calibrated freeform artefact demonstrated the suitability of fringe projection and photogrammetry for the verification of AM parts. Several authors [2,[11][12][13][14][15] have proposed the use of photogrammetry for the measurement of AM components, demonstrating that threedimensional (3D) point measurement uncertainties of <10 lm are achievable, even with low-cost systems. Sims-Waterhouse et al. [16,17] demonstrated that AM parts with different geometries, materials and post-processing textures can be measured to high accuracy by using a photogrammetry system with laser speckle pattern projection.
The literature indicates that optical measurement of complex shapes (such as those often generated by additive technologies) is characterised by complex and multi-faceted challenges. Therefore, a more comprehensive assessment of measurement performance should not be limited to computing conventional indicators of metrological performance on scalar results from measurement (e.g. uncertainty associated to features of size) but should also cover performance and behaviour at the point cloud level, encompassing a larger range of viewpoints. Lartigue et al. [18] propose a set of four quality indicators for point clouds obtained with non-contact probes. These indicators are noise, density, completeness, and accuracy of the point cloud data. Similar indicators are found in Mehdi-Souzani et al. [19], to support measurement planning for freeform surfaces in reverse engineering. In both works, the method relies on an initial scan of the object set as reference, without the involvement of a CAD model. The point cloud is converted into a voxel space representation to evaluate the density indicator, considering the number of points which belong to each voxel (i.e. a volumetric density). To compute the completeness and rate of coverage indicators, the point cloud is converted to a triangle mesh and the distances between neighbouring points in the mesh are evaluated. Other authors (Zuquete-Guarato et al. [20]) present a comparison between three optical measuring instruments based on noise, trueness, measured area, and surface accessibility indicators. The trueness indicator is based on the measurement of a reference distance (the distance between two parallel planes fit to a calibrated step height). The accessibility indicator quantifies the ability of a measurement system to access critical areas; those are identified by the measured area indicator, which computes the areas where the data is missing. Quantitative indicators related to point clouds have also been used in the context of pose estimation: Karaszewski et al. [21] compared the results obtained for 13 next best view (NBV) planning algorithms based on four criteria: the number of directional measurements, digitization time, total positioning distance, and surface coverage, the latter computed on the point cloud.
In this work, a novel set of indicators is proposed, addressing high-density, optical measurement of complex geometries under multiple viewpoints, including measurement time, surface coverage, density of point-based sampling, and metrological performance. Aside from measurement time, the proposed indicators are assessed at the point-cloud level and are locally mapped to the underlying, measurand geometry, so that detailed threedimensional maps of measurement behaviour in correspondence to diverse geometric features of the part are obtained. The proposed indicators allow for planning more optimised, additional measurement processes, and can also be used as a starting point for the development of future intelligent measurement systems capable of self-assessment of measurement performance during execution. The use of the indicators is demonstrated through the comparison of two measurement solutions based on photogrammetry and structured light respectively, applied to a complex freeform AM automotive part. A contact CMM is also used to provide a traceable dataset for comparison.
The results presented in this work should not be intended as providing a general indication of which measurement solution is better, but should be seen as an application example, aimed at highlighting the benefits of comparing measurement solutions under multiple perspectives using dedicated indicators.

Materials and methods
The comparison reported in this paper utilised a photogrammetry system developed by the Manufacturing Metrology Team (MMT) at the University of Nottingham ( Fig. 1(a)) and an Artec Space Spider structured light system available at the BMW Research and Development Centre in Munich ( Fig. 1(b)). A Mitutoyo Crysta Apex S7106 CMM system available in the MMT laboratory ( Fig. 1(c)) was selected to provide dimensional measurements to act as the reference. The selected test case is an automotive part designed and produced by BMW Group (Munich, Germany). The part is a roof bracket (Fig. 2) approximately (120 Â 38 Â 35) mm total volume featuring a freeform, hollow geometry. The part was made in Al-Si-10Mg using laser powder bed fusion.

Measuring instruments and data acquisition
The photogrammetry system ( Fig. 1(a)) relies on a camera to capture a series of images around the object, then applies reconstruction algorithms to obtain a dense 3D point cloud [16,17]. A digital single-lens reflex (DSLR) camera (Nikon D3300, 24 MP sensor) was mounted on a translation stage and fixed within a distance from the part of 250 mm, providing a field-of-view that completely encapsulated the test sample at an elevation of approximately 45°. The translation stage is controlled via scripting to achieve the correct focal distance and/or to change magnification, providing pre-set elevation angles. A rotary stage located within an enclosure equipped with LED lighting was designed in order to achieve uniform, diffuse illumination during the measurements. For the test part, the camera settings were chosen to obtain optimal coverage of the measured sample and maximise the optical resolution. A 40 mm macro lens was used with F-stop of 11 to maximise the depth-of-field of the camera whilst ensuring the camera does not become diffraction limited.
The photogrammetry measurements were performed in a temperature-controlled laboratory at (20 ± 0.5)°C. The full acquisition of the test part was obtained by automatically acquiring images, over a total of sixty rotation steps (top and bottom of the part, full scan of sixty images). The 3D position of each measured data point was obtained by matching correspondences between the acquired images using the scale invariant feature transform (SIFT) method [22]. The images were processed using commercial photogrammetry software (Agisoft Metashape [23]) to obtain the final reconstruction of the full 3D point cloud. Based on the estimated camera positions and orientation, the software calculates depth information for each point to be combined into a single dense point cloud.
The handheld structured light system [24] featured a RGB camera surrounded by LED flash bulbs, a blue light speckle pattern projector and three sensors. The system measures up to one million points per second and produces images with a spatial resolution up to 0.1 mm with an ''accuracy over distance up to 0.03% over 100 cm" as reported by the manufacturer [24]. Four artefacts and a reference sheet with printed targets were placed within an enclosure open on one side and containing a strip of LEDs placed on the ceiling, in order to provide a diffuse and uniform light source ( Fig. 1  (b)).
The full measurement acquisition of the test part was obtained by manually scanning one side of the object, followed by the acquisition of the part rotated by 180°. The raw data from both sides were converted into point clouds via the instrument software and stitched into a single full 3D point cloud using Polyworks Inspector [25].
Selected features of the part were measured following the National Physical Laboratory (NPL) good practice guide No. 41 [26] using a CMM ( Fig. 1(c)) with a 21 mm long, 1 mm diameter ball tipped stylus. As stated by the manufacturer, the CMM has a maximum permissible measuring error E 0 = (1.7 + 3L/1000) lm (where L is the test length in millimetres) and a maximum permissible probing error P FTU = 1.7 lm [26,27].

Data processing and alignment to CAD geometry
Data processing involved removal of points belonging to the background surfaces surrounding the part, application of a noise filter based on outlier detection, and deletion of isolated points, using CloudCompare [28]. The noise filter algorithm locally fits a plane around each data point using its six closest neighbours found with the k-nearest neighbours (k-nn) algorithm [29]. The algorithm removes the query point if it is too far away from the fitted plane. The number of neighbours was chosen for the specific test case, based on point-to-point spacing (see Section 2.3.2).
In addition, a threshold radius of 1 mm between the selected query point and its neighbours allowed the identification and removal of isolated points with less than three neighbours within  the specified radius. Also, for the removal of isolated points the threshold value was selected by considering point-to-point spacing (Section 2.3.2).
The alignment of the final point clouds to the CAD model provided by the test case manufacturer (triangle mesh in STL format) was performed in Polyworks Inspector [25] using a two-step (coarse/fine) registration approach. Coarse registration consisted of the manual selection of pairwise matches between points of the measured point cloud and vertices of the triangle mesh. Fine registration was based on iterative least-squares fitting between the measured points and the mesh vertices [30,31]. The alignment was performed to a common datum (the CAD model) in order to provide a common coordinate system shared by all the measured point clouds (five from photogrammetry and five from structured light).

Computation of measurement performance indicators
The quality of the measurement results was assessed by using a series of performance indicators designed to capture various aspects of the measurement pipeline. The performance indicators are summarised in Table 1. Details on the indicators are provided in the following sections.

Measurement effort
The measurement effort indicators are associated with each individual point cloud and capture the time and resources needed to carry out the measurements. The following measurement effort indicators were adopted: Acquisition time: time required to perform the measurement and obtain a point cloud. In this work, such a point cloud is referred to as ''raw point cloud" or ''raw dataset" to signify that the dataset has not been processed in any way and it is considered ''as-is", i.e. as produced by the measurement instrument; Processing time: time required to perform processing on the raw point cloud into the ''final point cloud", i.e. a cloud suitable for form inspection and characterisation. Processing may include noise and outlier removal (cleaning), deletion of anomalous points and removal of cloud regions capturing background surrounding the parts (e.g. in photogrammetry).
It is worth pointing out that the measurement effort indicators describe the performance of a complete measurement solution (instrument, measurement technology, operator, software, setup) and thus comparison results may be misleading if used to compare the underlying measurement technologies.

Intrinsic properties of the measured point cloud
These indicators capture properties of the point clouds that are independent of the geometry of the measured part. The indicators are designed to be evaluated on each individual point cloud. For this work, the selected indicators were: Number of points in the raw datasets: number of points in the raw point cloud (i.e. before any processing is applied); Number of points in the final point cloud: number of points in the cloud after processing (i.e. cleaning, stitching and background removal); Point-to-point spacing: mean distance between each point of the final point cloud and its closest neighbours, located within a sphere of radius r. An r value of 1 mm was selected for this work, allowing the selection of at least six neighbouring points within the specified limit.

Part coverage
The part coverage indicators describe how much of the overall part surface is reached by the final point cloud (see reference [32] for more details). These indicators are designed to be computed on individual point clouds, and capture aspects, such as the presence of occluded or otherwise unreachable surfaces, and/ or the presence of differences in local point-sampling density across different surfaces of the part (lower local density implies lesser coverage). These indicators require a reference model in the form of triangle mesh, (i.e. information on triangles, edges and vertices is needed for computing the indicators). The indicators selected in this work were: Sampling density (within each triangle): number of points associated with each triangle (referred to as n pts ), divided by the total area of the triangle; Covered or uncovered triangle: triangle whose sampling density is greater or equal to a given threshold value (covered) or less than the threshold (uncovered). In this work, the defined threshold value was 75% of the maximum detected sampling density (i.e. the maximum sampling density observed by inspecting all the triangles of the mesh). The classification of triangles into covered/uncovered area is used as an intermediate variable to compute coverage ratio and coverage area ratio (see below); Zero-coverage triangle: triangle with zero sampling density (i.e. no measured points associated with the triangle); Coverage ratio: ratio between the number of covered triangles and the total number of triangles (i.e. covered + uncov ered) in the triangle mesh. Typically expressed as a percentage. Coverage area ratio: ratio between the total area of the covered triangles and the total area of all the triangles (i.e. covered + u ncovered) in the triangle mesh. Typically expressed as a percentage.

Metrological performance of measurement
This class of indicators is related to the accuracy and/or precision of the measurement, and focuses on either describing the spatial position of the points in the point cloud, or on describing the quality of the features of size identified from the measurement (e.g. a diameter obtained by fitting a circle to a set of points). In this work, most of these indicators could only capture precision-related terms contributing to uncertainty (i.e. dispersion-related terms). CMM results were defined as the reference for the characterisation of the features of size. Therefore, for dimensional characterisation, an indicator related to measurement bias was additionally provided. The selected indicators were: Point-to-surface distance (within each triangle): signed or unsigned distance between each point and its paired closest point on the associated triangle [33][34][35]. Point-to-surface distance was considered as an intermediate quantity needed to compute the indicators described thereafter; Point dispersion (within each triangle): standard deviation of the signed point-to-surface distances computed on all the points associated with the triangle. This indicator describes the local precision of the measurement within each individual triangle, regardless of the location of the data points with respect to the surface of the associated triangle. Considering x as the coordinate axis orthogonal to the triangle surface, and x i as the signed distance of each point with respect to the triangle surface (x = 0), point dispersion was defined as Standard and expanded uncertainty on features of size: the standard uncertainty [36] was defined in this work as the standard error of the mean computed on dimensions extracted by fitting point clouds to appropriate datums (using multiple point clouds from repeated measurements). Given n repeated measurements (point clouds) acquired with the measurement solution M (PG = photogrammetry and SL = structured light), and the n results for the dimensional feature x 1 ; x 2 ; Á Á Á ; x n computed from such point clouds, the standard uncertainty was defined as where S l x is the standard error of the mean and s is the sample standard deviation computed on the n repeats, i.e.
The expanded uncertainty U M was obtained by multiplying the standard uncertainty by a coverage factor k where k was set to 2 in this work, in order to provide a level of confidence of approximately 95%. As a consequence of the aforementioned definitions, standard and expanded uncertainty only capture the precision-related aspects of the measurement. As previously stated, an assessment of bias was generally not possible, due to the absence of more accurate point clouds to use as reference. However, for the assessment of dimensional features, a bias term could be computed by considering the CMM value as the more accurate reference, thus bias x: where bias x:ðCMMÀMÞ is the bias on the feature of size x measured with measurement system M with respect to the reference CMM value, and: x À M AE s ffiffi n p is the estimated population mean as obtained by considering n repeats with system M (i.e. sample mean plus or minus standard error of the mean).

Results
Five repeated measurements were performed with the PG and SL systems. The results of computing the indicators defined in the previous section are reported in the following.

Indicators of measurement effort and intrinsic properties of the measured point clouds
Results for the indicators of measurement effort (acquisition time and processing time) are summarised in Table 2.
Results for the indicators related to the intrinsic properties of the measured point clouds are shown in Fig. 3, using boxplots computed from the five repeated measurements. A two-sample t-test for equal means performed separately on the three indicators resulted in the null hypothesis (PG and SL having equal means) being rejected at the 0.05 significance level, with p-values: 5.79 Â 10 À12 , 1.69 Â 10 À9 and 1.09 Â 10 À11 (related to Fig. 3(a), Fig. 3(b) and Fig. 3(c) respectively).

Part coverage indicators
In Fig. 4, boxplots for the coverage ratio and the coverage area ratio indicators are shown. The two-sample t-test for equal means performed separately on the two indicators resulted in the null hypothesis (PG and SL having equal means) being rejected at the 0.05 significance level, with p-values: 3.96 Â 10 À6 and 1.60 Â 10 À4 (related to Fig. 4(a) and Fig. 4(b) respectively).
A graphical representation of the indicators: sampling density and covered/uncovered triangle, is shown in Fig. 5 and Fig. 6.

Indicators related to metrological performance of measurement
The results in Fig. 7 show the point-to-surface distances within each triangle: colouring is proportional to the Euclidean distance between each measured point and its paired closest projected point located within the nearest triangle [37,38].
The indicator of point dispersion within each triangle is shown in graphical form in Fig. 8. It should be noted that, while in an actual quantitative comparison point dispersion values must be used as-is, in Fig. 8    by division with the maximum point dispersion value recorded across both datasets. This is done for the sole purpose of obtaining a visually clearer distribution of point dispersion values across the geometry.

they have been normalised
The probability distributions of the point dispersion values are shown in Fig. 9 and Fig. 10 for each measurement repeat of PG and SL respectively, indicated as s 1 ; s 2 ; Á Á Á s 5 . The point dispersion values are reported in non-normalised form, and thus are expressed in millimetres. The statistics computed from the probability distributions are shown in Table 3.

Standard and expanded uncertainty on features of size
The features of size indicated in Fig. 11 were measured by contact CMM in accordance to reference. The CMM measurement results are shown in Table 4. For the CMM measurements, an error interval is reported, obtained from the maximum permissible error (MPE) provided by the manufacturer, i.e. E 0 = (1.7 + 3L/1000) lm (where L is the test length in millimetres) [26], and computed on the nominal features of size.
In order to obtain the analogous dimensional values from the PG and SL measeurements, least-squares fitting procedures [39] were implemented using Polyworks Inspector [25], leading to the results shown in Table 5 (the values for the five repeats are indicated as x 1 ; x 2 ; Á Á Á x 5 ).
As stated in Section 2, the standard and expanded uncertainties only capture the precision-related characteristic of the performed measurements. For the evaluation of features of size, the proximity of measurement results to the true value is expressed through the identification of a bias value bias x:ðCMMÀMÞ , computed considering the CMM value as a reference, located at the centre of the MPE interval. The bias indicator was defined at the end of Section 2.3.4 as a means to provide accuracy-related information in a quantitative way. The bias values are reported in Table 6 and shown in Fig. 12. A two-sample t-test for equal means performed separately on each feature of size resulted in the null hypothesis (PG and SL having equal means) being rejected with p-values of 6.58 Â 10 À3 Fig. 9. Histograms of point dispersion values for each measurement repeat of PG, indicated as s1; s2; Á Á Á s5. Point dispersion is expressed in millimetres; normalised frequency (vertical axes) is the number of occurrences of the values in a bin, divided by the total number of occurrences. and 2.51 Â 10 À2 for Ø slot-hole 1 and Distance 1 respectively, meaning that the difference of biases in these cases can be considered statistically significant (assuming a common CMM value as reference). The t-test resulted in the null hypothesis not being rejected at the 0.05 significance level for Ø hole 2, Ø slot-hole 3 and Distance 2. For these latter cases it is possible that the observed difference in bias (Fig. 12) may become statistically significant with larger sample sizes.

Summary of the results
The measurement processing times for the SL and PG measurements were found similar (Table 2). However, the acquisition times were significantly shorter for SL. This difference is due to the length of the reconstruction process required by the PG technology to obtain point cloud data from image data. Reconstruction can take from few minutes to several hours, depending on the number of  The PG measurement resulted in more populated raw point clouds (higher number of points, Fig. 3(a)). After processing (cleaning, filtering) the discrepancy in densities in the final point clouds was still significant (Fig. 3(b)). The result was reflected also by the point-to-point spacing indicator (Fig. 3(c)), highlighting the higher densities of the PG point clouds.
The results for the part coverage indicators are shown in Fig. 4, Fig. 5 and Fig. 6. The results show repeatability issues in part coverage for the SL measurement. The sample was kept in a fixed position for both the SL and PG measurements. However, because of the handheld configuration of the SL system, higher pose variability across measurement acquisitions resulted in higher variability of coverage, compared to the PG system adopting a fixed position for the camera and stage-controlled rotations. Also, in terms of coverage, fewer internal surfaces were acquired by SL, whilst the PG measurement showed no significant difficulties despite the limited depth of focus and the complexity of the part. Overall, for the PG measurement 99% of the triangles were sufficiently covered (coverage ratio) and 99% of the part area was sufficiently covered (coverage area ratio), compared to the SL measurement, which scored 75% coverage ratio and 80% coverage area ratio.
The point-to-surface distances within each triangle overlaid to the reference geometric model (Fig. 7) showed clear differences in the distribution of point-to-surface distances between the PG and SL measurements. The statistics (Fig. 8, Fig. 9 and Fig. 10) indicated better performance (smaller dispersion) for the SL measurements.
The inspection and verification of selected features of size ( Fig. 12) showed discrepancies between the values obtained with the CMM and the PG and SL measurements. The SL measurement results for the diameters of the slot-hole 1 and hole 2 were closer to the CMM; whilst the PG measurement results for the diameter of slot-hole 3 were closer to the CMM. The PG and SL results for the linear distance 2 between the centroids of the slot-holes 2 and 3 were found in agreement with each other. The linear distance 1 between the centroids of the slot-holes 1 and 2 showed no bias between the PG and the CMM results.

Conclusions
AM technologies allow the design and manufacture of highly complex parts. In high-demand industrial scenarios, such as automotive, aerospace, and biomedical, the inspection of such parts presents significant measurement challenges. In this paper, a series of performance indicators was designed to capture various aspect of measurement performance. The indicators were applied to the comparative evaluation of measurement results obtained using a photogrammetry and a structured light measurement system on the same freeform, automotive AM part. Measurements obtained from a contact CMM were used as reference baseline. Although   the results did not indicate a clear winner, they highlighted the complexity of the comparison and showed how each measurement solutions may be seen as prevailing when considering any specific performance aspect (e.g. sampling density, areal coverage, accuracy or precision). This suggests that measurement solutions should be carefully selected for each test case, and a proper mea-  Table 4). surement workflow should be planned based on consideration of performance under multiple perspectives, in order to achieve optimal results. As a side note, the results also highlighted the potential of the photogrammetry solution analysed in this work, resulting in high-density point clouds and low uncertainty in correspondence to critical areas (i.e. internal features) which could not be easily captured by neither structured light nor contact probing.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.