Georeferencing 3D Tiles Generated from Photogrammetry-Derived Mesh Using Ground Control Points ()
1. Introduction
In recent years, photogrammetry technology has made tremendous progress technically and automatic 3D model reconstruction technique is becoming more and more mature. However, the significant amount of data associated with 3D models poses a challenge in terms of efficiently transmitting and visualizing 3D models on the Web-based 3D model viewer. To accommodate the streaming of massive 3D models, various open 3D model format specifications such as 3D Tiles, Indexed 3D Scene Layer (I3S), and Spatial 3D Model (S3M) were developed, and among them, 3D Tiles exhibit greater flexibility, higher customizability, better portability, and openness [1].
3D Tiles [2] is an open specification for streaming and rendering massive multi-source heterogeneous 3D geospatial datasets. It defines a spatial data structure and a set of tile formats designed for 3D and optimized for streaming and rendering. Its primary purpose is to improve the streaming and rendering performance of massive heterogeneous datasets.
As 3D Tiles has gained widespread adoption as the preferred way for streaming massive 3D data on the web, more and more software platforms have added support for the 3D Tiles, and many photogrammetry software tools such as FME [3], Bently ContextCapture [4], Agisoft MetaShape [5], and RealityCapture [6] support exporting 3D Tiles.
In order to accurately render 3D Tiles in the real-world location, they should be georeferenced, and this can be done in various ways depending on how 3D Tiles are generated.
Many photogrammetry software tools use GCPs to ensure that a 3D model’s reconstruction has the correct scale, orientation, or absolute position information [7] but, the way to georeference 3D Tiles generated from the 3D model with used GCPs which is very desirable has not yet been reported.
Therefore, in this paper, we suggest and implement the method to georeference 3D Tiles with GCPs based on the Kabsch algorithm [8], which is very similar to georeferencing raster data with GCPs in traditional GIS.
The remainder of the paper is organized as follows: Section 2 provides the review of related works, and the suggested idea is presented in Section 3, in Section 4 we demonstrate the implementation of our system. In Section 5 the validity is tested through experiments for sample 3D Tiles. Finally, Section 6 concludes the paper.
2. Related Works
Converting different kinds of geospatial data such as photogrammetry-lidar derived mesh, BIM, and point cloud into 3D Tiles has drawn much attention since the strength of 3D Tiles was known, and a few commercial software tools and platforms like Cesium ion [9], FME, Bently Context Capture, RealityCapture for it were reported. However, there are some limitations in customizing 3D Tiles generation because the conversion workflow is still a blackbox for users. Moreover, using them is infeasible in case the data are sensitive to the restricted public access requirement.
It is generally agreed that so far, no standard, a wholesome open-source solution exists for converting geospatial data into 3D Tiles. Therefore, many researchers have studied different tiling methods according to the characteristics of their data and the purpose of their project.
Schilling et al. [10] described the data processing steps from CityGML to 3D Tiles, which used CESIUM_RTC [11] extension to georeference glTF. Gan et al. [12] suggested a method of generating 3D Tiles from DSM (digital surface model). Song et al. [13] proposed 3D Tiles dynamic loading and scheduling strategy based on terminal memory size and screen space error but did not explain how 3D Tiles used in their experimental was generated. Chen et al. [14] presented the workflow to convert IFC to 3D Tiles using multiple open source tools and libraries. Visuri et al. [15] used Cesium ion to convert their CityGML data to 3D Tiles. Kolarić et al. [16] implemented a set of routines for generating 3D Tiles that contain buildings with OpenStreetMap(OSM) data. Xu et al. [17] studied creating 3D Tiles from IFC using obj2gltf, and discussed how to calculate the transition matrix between the local coordinate system of IFC and EPSG:4978. Lu et al. [18] described the converting steps for generating 3D Tiles from WRCD (weather radar composing data) and they calculate a transform property of tileset.json to georeference 3D Tiles using the geographic coordinates of the WRCD center point. Mao et al. [19] proposed a workflow for generating 3D Tiles from CityGML. Li et al. [20] used objTo3dtiles to convert 3D electrical model to 3D Tiles but did not describe how their 3D Tiles was georeferenced. Jaillot et al. [21] suggested the temporal extension of 3D Tiles, and converted CityGML data of a 3DCityDB defined in a projected coordinate system to 3D Tiles using their own software, Py3DTiles for delivering time-evolving 3D city models on the web. Zhan et al. [1] presented a tiling algorithm of complex BIM models based on the R-tree.
In summary, although there were a few studies on generating 3D Tiles, to the best of our knowledge, no researchers have attempted to use GCPs to georeference 3D Tiles.
One of the easy and convenient ways to tile photogrammetry-derived 3D mesh is to use Cesium ion, which provides the “3D Tiles Location Editor” to georeference generated 3D Tiles. However, the “3D Tiles Location Editor” has a limitation in using because it is not easy to determine parameters like longitude, latitude, height, heading, pitch, and roll for georeferencing [22].
In the following section, technical specifications about our idea behind the georeferencing of 3D Tiles with GCPs are described.
3. Suggested Approach
We suggest a way to georeference 3D Tiles generated from a photogrammetry-derived mesh with GCPs using the Kabsch algorithm [8]. We do not mind how a mesh is converted to 3D Tiles and focus on only georeferencing generated 3D Tiles. And we assume coordinates of all vertices of 3D Tiles are defined in the local coordinate system and the given tileset does not contain any nested tileset.
3D Tiles can have georeferencing information in two ways: directly define vertex positions in WGS84, Earth-centered, Earth-fixed coordinate system (ECEF or EPSG:4978 [23]) using RTC_CENTER [24]; to define vertex positions in the local coordinate system and to specify the “transform” property of each tile so that all vertex positions are transformed into EPSG:4978.
The basic idea is to set up points corresponding to the given GCPs on the 3D Tiles and find the best transformation by which transformed corresponding points match GCPs, and set the “transform” property using calculated transformation. This is formalized to the problem to find the optimal/best rotation and translation between two sets of corresponding 3D points data (Figure 1).
To solve this problem, we use the Kabsch algorithm [8] which is the method for calculating the optimal translation and rotation that minimizes the Root Mean Squared Deviation (RMSD) between two paired sets of points. It is widely used in structural bioinformatics, molecular simulations, molecular modelling, structural biology research to superimpose pairs of molecules and physics simulation. Figure 2 shows the flowchart of Kabsch algorithm, and it is efficient and easy to implement because it only requires a few matrix operations.
However, the algorithm requires a predefined mapping between the sets of points, for example, in our case, the mapping of GCPs and corresponding points. We will describe how to setup such mapping in our system in Section 4.
Let
be latitude, longitude, and height of GCPs and
a point corresponding to ith GCP on the 3D Tiles.
So,
of the Kabsch algorithm can be directly constructed with
(1)
of the Kabsch algorithm can be constructed by converting the geographic coordinate of GCPs into ECEF coordinate system.
(2)
Figure 1. Georeferencing 3D Tiles by transformation.
Figure 2. Flowchart of Kabsch algorithm.
where
is a cartesian coordinate in ECEF for
.
is a constant called “altitudeOffset”, and its meaning is explained in the following section.
Let
are centroids of GCPs and corresponding points.
(3)
(4)
Then the Translation step of the Kabsch algorithm is done using
, and P, Q are updated so that their centroid coincides with
.
(5)
(6)
Next, the optimal rotation matrix R that turns P as close as possible to Q is calculated using Singular Value Decomposition [25] module as follows.
(7)
(8)
(9)
As a result, we get a 3 × 3 matrix R and then, we convert it to a 4 × 4 matrix:
(10)
Finally, the transformation is determined:
(11)
where,
(12)
(13)
Error for each GCP is estimated as a distance between the GCP and corresponding point transformed by the calculated M. Based on our assumption above we can simply georeference 3D Tiles by setting the transform property of the root tile of the given 3D Tiles with M.
4. System Demonstration
The suggested method in this paper has been adapted to the georeferencing module of Construkted Reality, which is the platform to stream and visualize massive photogrammetry and point cloud datasets with ease on the web. An online portal is available at https://construkted.com. The rendering and georeference module were developed with CesiumJS.
Once the photogrammetry-derived 3D mesh is uploaded, the backend of the Construkted Reality converts it to the 3D Tiles. The system detects whether or not the 3D Tiles are georeferenced and displays the 3D Tiles on the blank background if it does not have georeferencing information so that the user is notified that she/he needs to georeference 3D Tiles (Figure 3).
Then the user can start georeferencing on the “Multiple GCP Editor” panel (Figure 4), where it is possible to add necessary GCPs and input the latitude, longitude, and altitude of each GCP.
Next, by simply mouse clicking, users can specify points corresponding to all GCPs on the 3D Tiles (Figure 5).
The mapping info between GCPs and corresponding points on the 3D Tiles is stored in the “gcpData” metadata which is represented as a JSON object like Figure 6.
Figure 5. Specifying corresponding point.
Figure 6. JSON structure of “gcpData” metadata.
The “gcps” property in the “gcpData” metadata defines an array of ground control points defined in the geographic coordinates so that each element has the meaning of latitude, longitude, and altitude. The “correspondingPoints” property defines an array of cartesian points corresponding to ground control points. The “altitudeOffset” property is the offset value of altitude which is added to all ground control points’ altitude in calculating georeferencing information. The surveyed altitude of GCP may be different than the altitude of the terrain on the virtual globe, so this is very useful in case users hope to correctly clamp 3D Tiles to the scene’s terrain, for example, Cesium World Terrain [26].
At least 3 GCPs must be specified because the Kabsch algorithm requires a minimum of 3 unique points for a unique solution.
Once the user finishes the input of GCPs and corresponding points and clicks the “Update Asset Location” button, the system calculates M with GCPs and corresponding points as in described section 3, and displays an error for each GCP, and the camera of the scene flies to the calculated georeferenced location of the 3D Tiles (Figure 7).
5. Experiments
In order to evaluate the feasibility of the suggested method, several experiments were carried out with 3D models generated from sample datasets of OpenDroneMap[27], Pix4DMapper [28], and RealityCapture [6] that have GCPs (Appendix A).
5.1. Experiment 1
The dataset used in the experiment is an example dataset, “sheffield_cross” for OpenDroneMap, which has 5 GCPs defined in the WGS 84/UTM zone 17N. This dataset was processed through WebODM Lighting [29]. Points corresponding to GCPs were visually identified on the 3D Tiles using the GCP file and images included in the dataset (Figure 8).
Table 1 shows calculated errors for all GCPs, where Latitude, Longitude, and
Figure 8. Georeferenced “sheffield_cross”.
Table 1. Calculated errors for GCPs of sheffield_cross.
Altitude columns represent the geographic coordinates of a ground control point, and x, y, and z columns are the cartesian coordinate of a corresponding point defined in the 3D Tiles’ local coordinate system.
5.2. Experiment 2
In this experiment, we used an example project, “quarry” for PIX4DMapper. GCPs are defined in EPSG:21781 [30] and corresponding points were visually identified using GCP overview images of the dataset and 3D GCP Markers of the project (Figure 9).
Figure 10 and Table 2 show the result of georeferencing of 3D Tiles for this project.
5.3. Experiment 3
We used a sample dataset called “Drone Imagery + Ground control points” for RealityCapture, where all GCPs are defined in EPSG:4258 [31]. All GCPs are marked on the texture of the generated 3D model like a small section of a checkerboard (Figure 11) which leaves very little ambiguity about where the “point” of the ground control point is so we could identify all GCPs clearly on the texture of the 3D Tiles.
Figure 9. 3D GCP marker and overview image about first GCP.
Figure 12 and Table 3 show the result of georeferencing 3D Tiles. As can be known in Table 3, the errors on all GCPs have a margin of a few centimeters.
Table 2. Calculated errors for GCPs of quarry.
Figure 11. The shape of GCPs on the texture of the 3D model.
Table 3. Calculated errors for all GCPs.
6. Conclusion
From experiments in this paper, it can be concluded that the Kabsch algorithm can be applied to georeferencing 3D Tiles using GCPs. Georeferencing errors were inevitably affected by the accuracy of “clicking on the 3D Tiles” for specifying points corresponding to GCPs. In experiment3 error was very small enough to accept the georeferencing result because it was easy to recognize GCP on the 3D Tiles. In order to clamp 3D Tiles to Cesium World Terrain, different values of “altitudeOffset” were used for the reason that Cesium World Terrain does not provide elevation relative to the WGS84 ellipsoid.
Data Availability Statement
Datasets used in this study are available at the following links.
https://github.com/pierotofy/drone_dataset_sheffield_cross/
https://support.pix4d.com/hc/en-us/articles/360000235126-Example-projects-real-photogrammetry-data#quarry
https://www.capturingreality.com/SampleDatasets
Appendix A
Results presented in this study can be found at the following links.
https://construkted.com/asset/a1fg3o0r69r/
https://construkted.com/asset/avajuri6r3g/
https://construkted.com/asset/avplbp844b3/