PHOTOGRAMMETRIC MODELING OF SUBTERRANEAN FEATURES THROUGH THREE-DIMENSIONAL SOFTWARE ANALYSIS

LiDAR is a popular and accurate method for mapping that can be utilized for three-dimensional model analysis. However, the equipment set-up and usage can become tedious, and ultimately impractical when applied to locations that are remote and confined in nature. In this investigation, three-dimensional analysis was conducted within a cave system. With this, limitations of LiDAR technology in these conditions become prominent; mapping non-planar surfaces can cause a potential decrease of the quality of the point cloud data. In all, a LiDAR application would be an inefficient use of methodology to conduct this investigation. This prompted a need to set-up and conduct a photogrammetric based evaluation. With this, smartphone camera technology was used in conjunction with free-to-use software and three-dimensional modeling applications. Through the use of photogrammetric concepts and structure from motion software, a three-dimensional model of the cave can be generated. Long term, this model can also be utilized to document the impact and health of the cave system. ​For the methodology, the on-sight portion of the investigation relied heavily on smartphone camera technology. The procedure draws parallels to drone paths; specifically, two flight-plans were developed to evaluate different perspectives within a 15 by 15 meter space in the cave. Within each flight path, the use of photo overlapping techniques established a denser and more fluid point cloud model. Once the data was processed, two different three-dimensional models of the cave were created. From those models, the point cloud data was extracted in order to merge the two separate models. Afterwards, the models underwent several format conversions in order to import it into the Unity game engine. The final result is an accurate three-dimensional model of the cave that is viewable and playable in a simple video game platform.


INTRODUCTION
Karst topography is made up of complex systems that are shaped by fluvial forces and can act as conduits for groundwater. They can form from any soluble rock, the most common being limestone. The solution of limestone is a reaction of the groundwater, which is naturally acidic from carbon dioxide dissolving away the calcium carbonate where limestone originates. Resulting in geological features including, but are not limited to, disappearing streams, sinkholes, and caves. These features have become points of research interest among several hydrogeologists due to groundwater movement being unusually fast within karst. Caves, in particular, are a source of recreation for many in the public and has resulted in maps of thousands of caves worldwide. However, some of these maps may not be ideal in conveying minute details and spatial references. The documentation of these features realizes a lack of cited ecosystem exchanges and reveals the significance of global contributions.

______________________________ * Corresponding author
To understand planetary interactions of these features, particularly caves, more detailed research in their mapping is required. It is important to understand these environments to understand both the biota that rely on them and water resources upon which we rely on. With this, a fascination to find a medium to accurately map or chart a karst feature led to the inference that a mapping software or modeling application would be needed for a deeper investigation. This prompted an interest towards both LiDAR (Light Detection and Ranging) technology and photogrammetric 3D modeling.

Potential Applications
With LiDAR, modeling karst features and establishing algorithms to calculate precise measurements and distances would aid in the illustratration of subterranean interactions. However, many variables must be accounted for before the actions of an investigation of this nature are executed. To start off, within a karst system, edges, non-planar, and variable depth of surfaces can result in low point cloud concentrations ( Gurram, P., Lach, S., Saber, E., Rhody, H., & Kerekes, J., 2007) . Point clouds are a series of data points that have an X,Y and Z location all stored in a file. This would lead to a decline in the quality of data. The narrow corridors and passageways within a cave can also become an issue when attempting to collect data by being physically impassable or difficult to navigate with delicate equipment.. This prompts a safety and mobility concern due to the combination of equipment care and potential tight spaces. These factors, combined with cost and limited knowledge on how to use LiDAR technology for cave mapping is why more traditional survey methods with suuntos and Disto-Xs are common and preferred ways of mapping among the caving community. Therefore, from the constraints that both LiDAR and traditional cave mapping have, it was reasoned that the use of a more portable, cheaper method to LiDAR would be utilized in the involvement towards the creation of an accurate 3D model. With this in mind, a potential solution is the use of smartphone camera technology, personal measurements, and modelling applications. This will not only document the cave with photography but the resulting 3D map will provide as a tool of safe passage for cavers and researchers alike. The data collected is in the form of in-situ measurements, or on-sight data collection, establishing and emphasising the factor of human observations and interactions within a karst feature.

Hypothesis
This investigation explores the practicality of accurately mapping and modelling a cave environment using smartphone camera technology processed with three-dimensional model analysis. This is to explore a cost-effective and lighter load bearing solution compared to LiDAR. This idea promotes a portable experience, allowing for more data to be collected in tight spaces within a cave system, and establishing preventive measures to be taken during data collection to limit ecological disturbances. If the combination of smartphone camera technology with the use of three-dimensional photography stitching is a medium that can bypass the use of LiDAR equipment within a karst feature, then cave systems can be accurately charted and mapped to help determine ecological health and natural changes, and promotes further interest of research for remote environments.

METHODS
The investigation took place within Inner Space Caverns in Georgetown, Texas. This cave offered the opportunity to collect data in a large room on the eastern side of the cave. The room simulated different experiences for surveyors, which established different methods and strategies to sample and collect the data. All in all, this location illustrated the importance of portable data collection due to the array of topological changes and limited mobility.

Smartphone Camera Application
During the on-sight portion of the investigation, pictures of the cave were captured with an iPhone XS. The investigation was centralized on two flight-paths within an area of 225 square meters. The two flight-paths evaluated different point-of-views of the cave, establishing a perpendicular contrast between the two. During the first flightpath, the collection of photographs started at one corner, and subsequent pictures were taken along a laid-out line at one-meter intervals for 15 meters. After completing a line, the camera was rotated, capturing three photographs. One at the last point of the line, and two after rotating counter-clockwise at 90 and 180 degrees. After the collection of the photograph at 90 degrees, one step was taken before the collection of the next photograph, prompting the start of a new line. This provided a good amount of overlap between the pictures for the entire cave room, allowing for an increase of quality for the development of a 3-D model. Due to this, the establishment of the minimum requirement of 83% overlap between the taken photographs was achieved, prompting a similar technique to the construction of drone flight-paths. This process continued until the entire marked-off area was captured, resulting in the completion of the first flightpath. During the second flightpath, the adjacent corner from the first flightpath became the new starting point. This approach was similar to the first; however, this application allowed for a different view of the cave, ultimately increasing the quality of the point cloud for modelling purposes.

3-D Model Processing
After the data collection, 500 pictures of the cave room were collected. 258 of the pictures faced the front side of the cave and the remaining 242 faced the rear. The downloaded pictures of the cave were filtered according to their respective side of the cave. This prompted the 3-D modeling software to avoid high amounts of uncalibrated pictures while performing the modeling tasks. One set of images focused on the front side of the cave, while the other set focused on the rear side of the cave. The area of the cave that was photographed is marked by a blue square seen below in Figure 1. With the pictures filtered, two models were made using Pix4DMapper©, a proprietary 3-D modeling software that uses photogrammetry and computer vision algorithms to create said models (Pix4Dmapper Development Team, 2019). The previously mentioned software provided two 3-D models of both sides of the cave area alongside the point cloud data in a LAS file format. The LAS format is a commonly used file format for LiDAR point cloud data. Afterwards, the two different 3-D models needed to be merged into one so a model of the entire cave would be available.
To merge the separate 3-D models into one, LAStools was used. LAStools is a command line toolkit written in the C++ programming language developed by rapidlasso GmbH. It was used for processing and editing point cloud data. It can do multiple tasks such as creating Digital Elevation Models (DEM), establishing point cloud file attributes and, most importantly, merge multiple point clouds into one ( Rapidlasso Development Team, 2019 ). Using this toolkit, the point clouds were successfully merged into a single data set. The resulting point cloud can be seen in Figure 2. and front view of the pictures. This is shown using lidarview.com.

Unity Game Engine
One of the main goals for this investigation is to import the 3-D model of the cave into a video game, specifically the Unity game engine. Game engines are developmental kits that contain libraries and components that are used in the creation of video game platforms. With this, Unity is a popular game engine made by Unity Technologies in 2005. Since then, it has grown to be a commonly used engine in modern video games. It's user friendly, hands-on tutorials establishes simple notions to help create a platform that can aid in the navigation and manipulation of data ( Unity Technologies, 2019 ).
Now that a merged point cloud model was available, it needed to be converted to a format that Unity can recognize. LAS files are not easily convertible into game engines and the cave model had to be reformatted. Fortunately, Keijiro Takahashi created a Unity module called Pcx. This module allows for 3-D models to be imported into a Unity game with ease (Takahashi, 2019). However, the module only reads Polygon File Format files, which is a different format for 3-D models but with polygons in-between the points.
To achieve this, CloudCompare was used to convert the cave's LAS file into a PLY format. CloudCompare is an open source 3-D point cloud processing software ( CloudCompare Development Team, 2019 ). Similar to LAStools, CloudCompare can process point cloud data but it can also provide PLY format files. The software has an easy-to-use command line interface which was used to convert the point cloud model into the desired format.
After CloudCompare provided a PLY file, the Pcx module easily imported the cave into Unity. In Unity the cave was properly oriented. An invisible floor was placed in the cave and a movable first person camera was added into the game. Now, the photographed cave area was brought into a simple video game, where players can look around the cave and move around in it. There is a satisfactory level of detail in the cave. The point cloud model provided an accurate amount of the cave's detail in the final result. In Figure 3, the first person camera is facing the entrance of the front side of the cave.

RESULTS
3-D Models were made from the two flight paths. Point cloud models were then extracted from the models and merged into one single point cloud. The resulting point cloud is illustrated in Figure 2. From the 500 pictures that were taken, 450 were successfully processed into the finalized 3-D model. The remaining 50 were deemed as uncalibrated by Pix4DMapper©.
The combined model was then converted into a different format that is compatible with the Unity game engine. This allows users to be able to view and interact with the cave from a first-person perspective. The game also allows the user to walk around the mapped cave area and observe its interior.

CONCLUSION
Many obstacles were faced during the investigation, with one being the topography. The enclosure's topography varied as the pictures were taken, which made it difficult for the photographer to accurately capture the image alongside the proposed flight path.
Next, due to overlap, the resulting model of the mapped area produced certain regions to be more defined. On point cloud, the overlaps were more concentrated, which allowed higher quality data. This established a flow between flight paths that created a better model resolution. Our modeling system didn't provide the exact measurements of the overlap, but it is estimated to be over 80%. This was due to our basic understanding of photogrammetry which let to tight flight paths.
Also, the angle of the phone had to be adjusted due to poor lighting and casting of shadows. Each picture was uniquely altered due to the various corners, edges, and sides shown throughout the cave.
Additionally, some software issues were found along the way. Pix4Dmapper wasn't able to create a merged 3-D model so that prompted looking into other software solutions such as LASTools and CloudCompare.
Furthermore, there is no existing LiDAR data to be able to compare the results from the created 3-D model. There is an assumption that LiDAR is more accurate but the only way to determine this is to map the cave with the aforementioned equipment.
Overall, a representation of the cave was still successfully produced. Though it may not be as detailed as LiDAR, this method is still acceptable due to its easy access and cheap expense. Surveyors can easily use this method to create maps to observe the interior of a cave, or any other enclosed area.