Low-cost industrial photogrammetry for rapid prototyping

The field of extracting 3D information from photographs also known as photogrammetry has a wide range of applications, even in industry. It can be used to rapidly prototype a part with a decent precision. This paper analyses this possibility for a gas regulator that was cut in half. From the pictures taken of the part, a point-cloud can be generated that can be transformed in a mesh and subsequently in a CAD model. Alternatively, it can be compared with an existing CAD model to determine deviations.


Introduction
Being able to extract 3D information from an object is very important and leads to many applications especially in industry.In industrial applications, the extracted data can be integrated into a model that can be used to reverse engineer the original part or determine deviations of the physical part from an ideal CAD model.
There are many techniques used in measuring and reconstructing of 3D objects, that can be split into two types [1]: -contact methods (for example, using coordinate measuring machines, calipers, rulers and/or bearings); -non-contact methods (X-ray, photogrammetry, laser scanning).Today, 3D models are mainly generated by use of non-contact methods based on light waves [1].Geodetic measurement techniques such as spatial triangulation and optical alignment and levelling can be used [2].One method, that shows increasing promise, is photogrammetry.
The word photogrammetry means measuring from a photograph [3].This technique "allows one to reconstruct the position, orientation, shape and size of objects from pictures" [4].
When taking a picture of an object, we basically convert it from a 3D world into a 2D world.During this process, information, mainly related to depth, is lost.By using photogrammetry, we are able to convert 2D information back into 3D information.This process is based on triangulation, which consists of intersecting converging lines in space and determining the precise location of a point [5].For this we need at least two photographs in which a certain point appears (Figure 1).Usually the camera moves around the object taking pictures that have a degree of overlap.The camera must move both in a horizontal plane as well as vertical, to "see" the object from all possible angles.Of course, this process is not perfect, because information is lost during the conversion stages.The main application of photogrammetry is the production of topographic maps [4] but it has many other applications for big objects: mapping of cities or terrain, buildings, large equipment and even airplanes.Other applications include 3D modelling of agro-idustrial buildings [7] or a ship's hull [8] in the latter case even being preferred to laser scanning.In another study, it was used together with a neuro-fuzzy system to model and measure deformation of objects [9].

Experimental setup and methodology
The main purpose of this study was to determine the applicability of photogrammetry in the industrial environment for rapid prototyping of parts.To this end, a part was chosen as subjects and different variables were used to determine the factors that influence the most the accuracy of the resulting 3D model.
The experiment was conducted by using two different cameras: a 16 MPx camera (Nikon D5100) and a 12 MPx camera (Canon PowerShot SX20 IS).Their technical specifications are presented in Table 1.

Specs / Camera
Nikon D5100 The software used for photo processing and extracting the 3D information was Agisoft Photoscan.
The subject part of the experiment was a gas regulator that was cut in half (Figure 2).The cast metal part is of medium size (207x135x102 mm) and has both inside and outside complex surfaces.One challenge with metal parts is the shine of machined sections that tends to interfere with the 3D reconstruction process.During the preparation phase, we noticed that a random patterned background helps in the identification of tie points.The first step in the reconstruction process is the alignment of photos.In this step the software detects points which are stable under viewpoint and lighting variations and generates a descriptor for each point.The approach is similar to the SIFT (Scale-Invariant Feature Transform) algorithm.The result is a cloud of tie points that were identified from the pictures (Figure 3).The dense cloud (Figure 4a.) is created by calculating depth information for each camera based on its estimated position.This step has two basic parameters that can be set: quality (the higher the quality the higher the processing time) and depth filtering (aggressive for lower detail and mild for higher detail).[12] Next, the dense cloud data is used to build a polygonal mesh model (Figure 4b.).This approximation of the models' surface can be then used either in comparison with a CAD model or for reverse engineering.The mesh usually is not continuous, having holes where data is missing.It can be repaired (stitched) in a later step.In the general process described above some parameters were varied in order to see their influence on the end result.

Results and discussions
There are many factors affecting the reconstruction of 3D models from pictures through photogrammetry.In this study, we wanted to see the influence of: picture quality, image editing (masking), picture overlap and the usage of virtual markers.To this effect the photos where edited (cropped) either manually or by using Agisoft Photoscan.Then, virtual markers were used to scale the model after it was completed.
The camera was placed at about 30 cm from the subject.The settings that were used for the two cameras, are presented in Table 2.A number of 16 photos were taken on each horizontal plane which meant that there was a 22.5-degree angle between the photos.There were four vertical levels with an increment of about 15-degrees, resulting a total of 64 photos.The position was assured by using an adjustable camera mount.Because the Canon is more suitable for long ranges, the results were not satisfactory and the experiments were continued by only using the Nikon camera.
The results of the three editing methods can be seen in Figure 6, with the gaps marked with blue.The horizontal overlap of the pictures was given by the angle at which the pictures were taken.The tested horizontal angles were 22.5° and 45° (16 photos and 8 photos respectively).Reducing the number of photos by increasing the angle between them from 22.5° to 45° greatly reduced the quality of the model, creating gaps in the resulting mesh.Some of the inside features of the regulator like the threaded part and the inside chamber required higher level of detail because they were constantly creating problems in the creation of the mesh.Thus, additional close-up pictures were taken to see if the quality of the resulting mesh would increase.Including these close-up pictures almost doubled their number, from 64 to 114, 111 of which were usable in the photo alignment stage.Adding virtual markers to the finished model, increased its accuracy because they could be used to scale the model.By defining a known distance between two points on the part, we could correct the scale of the model.
The best two results, the model without close-up pictures and the model with close-up and added virtual markers, were compared with a high precision scan of the part, in order to see their precision.The high precision scan was obtained with a GOM ATOS Core optical scanner and was used because there was no CAD model available for the part.The results of the two comparisons can be seen in Figure 7.The registration of the two clouds was made with CloudCompare using the Iterative Closest Point (ICP) method.
The greatest deviations were found on the bottom of the part where the part rested.In the inside part of the regulator the close-up pictures increased the precision of the model by reducing the distance of the mesh from the precision scan.The histograms of the distances from the precision scan can be seen in Figure 8.They have the same colour scale as in Figure 7. Adding the detail pictures and the virtual scale markers greatly reduces the deviations.If in the first case most deviations reach up to 6 mm, in the second case there are very few that go over 1.

Conclusions
The current research analyzed the possibility of using low-cost photogrammetry in an industrial environment to create a 3D mesh of a part.This study shows that there is a minimum necessary degree of overlap to obtain a decent mesh.By using 16 photos in a horizontal plane and 4 levels in the vertical one, we managed to obtain a usable mesh.By supplementing the photos obtained through revolving around the subject with close-up photos of complex zones, the quality of the model can be increased.
There are many factors affecting the quality of the resulting model that haven't been included in this study, such as lighting (position, number of sources, colour), markers placed on the part, higher resolution cameras etc.This low-cost method could be a rapid solution for rapidly prototyping a part, without the need of costly equipment or tools.This work was supported by a grant of the Romanian National Authority for Scientific Research and Innovation, CNCS/CCCDI-UEFISCDI, project number PN-III-P2-2.1-BG-2016-0216,within

Fig. 2 .
Fig. 2. The part used in the experiment.

Fig. 3 .
Fig. 3. Tie points resulted from the alignment of photos.

Fig. 4 .Fig. 5 .
Fig. 4. a. Dense cloud of points; b. the resulting mesh.The last step is texturizing of the model (Figure5).This is only to give the model a visual conformity with the original part.It doesn't have any useful geometric information.

Fig. 7 .
Fig. 7.The deviation map of the two resulting meshes a) without close-up pictures; b) with close-up pictures and virtual markers.

Fig. 8 .
Fig. 8.The deviation histograms for the meshes: a) without close-up pictures; b) with close-up pictures and markers.

Table 2 .
Camera parameters used in the experiment.