THE TERRESTRIAL LASER SCANNING APPROACH EX. 2 MESHLAB Afonso Maria C. F. A. Gonçalves 20130528
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN _INTRODUCTION In the last article we leaned over the process of using photogrammetry as a method to produce a point cloud for later mesh reconstruction. Although this approach provides a relatively quick and satisfactory way to survey an object it lacks the precision and quality needed for most survey studies. If the intention is to survey large areas, say a street or an archeological site, more precise survey methods are required. This is where laser technology proves its worth, especially TLS (Terrestrial Laser Scanners). Such scanners are capable of producing very dense and accurate point clouds without the rigmarole of taking vast amounts of photographs. This time, for the purposes of this exercise, we were given 4 existing point clouds from a survey conducted on a street using a TLS. The aim was to learn the workflow of working with several large and dense point clouds that need first to be edited and worked on in order to produce the intended results. As mentioned in the last article, this time, we ll lean over the methods of down sampling, aligning and gluing several point clouds for later mesh reconstruction. This time, the process will be entirely conducted in MeshLab since the point clouds have already been created by the TRL. The first stage will be to import these point clouds into MeshLab and then proceed to down sample them in order to make them easier to manipulate. In the second stage we will proceed to roughly align them according to one another by sequentially setting references and choosing homologous points in the point clouds. Since this process is a rough and not very precise way of aligning points we will then have to optimize the alignment by changing a few parameters. The final result should be a set of point clouds very closely aligned with each other. In fact, if the alignment is done accurately, there should be no clear evidence that the final composition is actually formed by more than one point cloud. 1
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN STAGE 1 DOWN SAMPLING POINT CLOUDS 1 IMPORTING ORIGINAL POINT CLOUDS TO MESHLAB AND DOWN SAMPLING Point clouds as they come out of the scanner can be unnecessarily dense for our purposes. Dealing with such dense clouds of points can not only make the alignment process more difficult but also decrease software and hardware performance due to large file sizes. Therefore, if we know we won t need high densities of points in the cloud we can down sample it to make it easier to manipulate. Therefore the first step of the process is to import each individual point cloud into MeshLab, down sample it and save the down sampled cloud to a new file. For this we make use of the Poisson-disk Sampling option (Filters > Sampling > Poisson-disk Sampling) which allows us to choose the average spacing between points. We should also check the Base Mesh Sampling box. For values I chose an explicit radius between 0.02 and 0.009. The down sampled points need then to be saved (File > Export Mesh As) with the Normals box checked. We do this step for all four point clouds. FIG.1 Down sampling through the Poisson-disk Sampling of all four point clouds 2
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN STAGE 2 ALIGNMENT OF POINT CLOUDS 2 ROUGH ALIGNMENT OF DOWNSAMPLED POINT CLOUDS USING HOMOLOGOUS POINTS When surveying a large area it s often necessary to survey it from different places to make sure every angle, feature and blind spots of the place are covered by the laser scanner. This obviously will wield more than one point cloud as we said before. If the laser scanner has an inbuilt inclination sensor then the point clouds it generates will come out already leveled and need only to be aligned together, using one of them as reference for the others. This means applying a transformation (translation and rotation) to every point cloud that is to be aligned with the reference cloud. This transformation will be translated into a transformation matrix that is stored in the project file. After importing all four of the point clouds into MeshLab and saving the project file (as.aln) we can open it on Notepad++ and see said transformation matrix (fig 2). What we see here are all of the four point clouds represented by their respective transformation matrix. Because, at this stage, no alignment has yet been done, all of them have the identity matrix assigned. As we will see, this will change once the alignment as been completed. FIG.2 Transformation matrixes of the unaligned point clouds We start the alignment process by clicking the Align button (or Edit > Align). To choose the point cloud that will be used as reference we first need to select it and then choose the Glue Here Mesh option. A small asterisk should then appear in the name of the point cloud telling us it has now been glued and set as reference. Next, we select the next point cloud and select Point Based Glueing to start the alignment process. In the new window that pops up we can see, on the lefthand side, the point cloud set as reference and, on the right-hand side, the point cloud that will be aligned. Now all we need to do is manually select homologous points in both clouds (at least 4 for a more accurate alignment), being careful to follow a certain order to make sure each point selected in one has its corresponding match in the other. After all points have been selected and the process acknowledged, the point cloud, which has just been aligned, will now too be set as a 3
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN reference. We now repeat the same process for the remaining two point clouds. After all point clouds have been manually aligned the project was saved once more. FIG.3 Alignment process by choosing homologous points 4
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN 3 ADJUSTING PARAMETERS OF ALIGNMENT No matter how careful or meticulous we are when choosing the homologous points it is almost certain that we won t reach a perfect alignment of all point clouds. To achieve a more satisfactory result we will need to optimize the previous manual alignment by changing the ICP parameters (Iterative Closest Points) in the Align Tool. For the parameters, the Minimal Starting Distance was set to 0.1 and the Target Distance to 0.005. If we are entirely sure all point clouds have the same scale, which we do in this case, then the box Rigid Matching should also checked otherwise a scaling factor will be applied. Clicking Process will launch the ICP algorithm and the result will be shown in the log window below. The end result should be a much more accurate alignment of all the point clouds. The project is once more saved after this step. FIG.4 ICP parameters optimization Comparing the three transformation matrixes (fig. 5) we can get a general idea of what happened to our point clouds during the alignment process. The first image shows all four point clouds as they come out of the TRL. They are all identified by the identity matrix since no transformation has been applied. The second image shows the transformations after the first alignment with homologous points. The first point cloud still shows the identity matrix because it was used as the base reference for the alignment of the other point clouds. The final image shows the result of processing the ICP parameters. This last step helps optimize and refine the rough alignment made previously. We can see that there was very little variation of the transformation values and that s to be expected since this last step helps optimize and refine the previous rough alignment process. 5
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN FIG.5 The three transformation matrixes 4 MERGING ALL POINT CLOUDS This final step is optional but, if desired, the point clouds can now all be merged into one single point cloud and used later to reconstruct a 3D mesh with respective color. To merge all four point clouds we choose Flatten Visible Layers in the Layer Dialog box (by right clicking on one of the layers), being sure to check Keep Unreferenced Vertexes. This merged point cloud can now be reconstructed and the color transferred. Since this process has already been covered in the previous exercise I won t go into detail here. FIG.6 The final merged result 6
ADVANCED STUDIES PROGRAM IN COMPUTATION APPLIED TO ARCHITECTURE, URBAN PLANNING AND DESIGN _CONCLUSION In this article we learnt the workflow of manipulation point clouds generated by a Terrestrial Laser Scanner. Because this method of survey wields more than one point cloud the data needs to be manipulated further by means of down sampling and aligning all point clouds. By setting references and choosing homologous points we are able to, at first, achieve a rough alignment that will afterwards be optimized by changing the alignment parameters. The aligned point clouds can then be merged together and used to any desired purpose. The alignment process can have one more step which was not covered here. For a correct surveying process, the acquisition of information from digital means, whether photogrammetry of laser scanning, should also be coupled with manual information collected in situ, such as measurements. The measurements collected can be used later in the process to guide the transformation process of aligning all point clouds. This will result in a much more accurate depiction of the observable reality since the information collected in situ is used as a source reference for the correct scaling, translation and rotation of the point clouds. This involves manipulating transformation matrixes with the aid of specific software like Java Graticule 3D and Cloud Compare and will be covered in greater detail in the next article. 7
Afonso Maria de Castro Fernandes Abreu Gonçalves, n.º 20130528 http://home.fa.utl.pt/~20130528 This work was conducted for the 3D Scanning course Advanced Studies Program in Computation Applied to Architecture, Urban Planning and Design Faculdade de Arquitectura Universidade de Lisboa 2013 / 2014