3.5.1. UAV Image Processing

A series of UAV images depicting an archaeological site were obtained, and these were then matched to specific points of interest. The hierarchical orientation of the images was the methodology adopted to produce an approximate orientation of the image, using the form of an arbitrary coordinate system through a computer vision technique. To automate image-based modeling and produce high-quality 3D point clouds, a structure-from-motion (SfM) algorithm was employed to process using Pix4D software. A total of 12 GCPs measured using a real-time kinematic GNSS were manually assigned to the corresponding locations on the textured model (Figure 6). The georeferenced data from the bundle adjustment between the recovered image blocks and the 3D model were optimized using the GCPs coordinates. We analyzed the quality of 3D models, using the coordinates that were measured independently of the ground truth point, and compared them with the photogrammetric coordinates. The 3D point clouds, textured meshes, and orthoimages were created to provide useful and accurate information for archaeological purposes (Figure 7).

**Figure 6.** GCPs measured with a real-time kinematic global navigation satellite system (GNSS). (**a**) The locations of 12 GCPs. (**b**) GCPs marking.

**Figure 7.** Camera position of the area of Wat Maha That, Ayutthaya flight.

#### 3.5.2. 3D Pagoda Models Comparison

There were two datasets: One from TLS, which was the reference model, and the point cloud-produced nadir images from Pix4D. In order to compare the 3D pagoda model, point clouds were used to generate the 3D models using CloudCompare software. The 20 checking points scattered on the façade were mainly defined by using total stations to the physical structure of the pagoda. Obviously, the pagoda is a man-made structure, so some identical points can be measured and visually identified by the human eye; e.g., the pagoda's corners, windows, etc. However, the limitation of this study was not being allowed to place the checkpoint on the pagoda structure, due to the regulations and legislation governing historic structures with their conservative approaches, and the official suggestions were to declare it unsafe to climb the ruins of Wat Maha That.

#### **4. Results**

The initial UAV image processing of 417 images (0.016 m/pixel ground resolution at a flying height of 50 m) through the feature matching process, implemented in the SfM algorithm, produced a point cloud comprising 915,832 features over an area of 2020 m2. The 3D UAV-SfM's model accuracy was evaluated by 12 GCPs, uniformly distributed over the study area using the following equations (Equations (1) to (3)):

$$\text{RMSE} = \sqrt{\frac{\sum\_{i=1}^{n} \left(\chi\_{\text{RTK},i} - \chi\_{\text{computed},i}\right)^2}{n}} \tag{1}$$

$$\text{RMSE} = \sqrt{\frac{\sum\_{i=1}^{n} \left(\mathbf{y}\_{\text{RTK},i} - \mathbf{y}\_{\text{computed},i}\right)^{2}}{n}} \tag{2}$$

$$\text{RMSE} = \sqrt{\frac{\sum\_{i=1}^{n} \left( \mathbf{z}\_{\text{RTK},i} - \mathbf{z}\_{\text{computed},i} \right)^{2}}{n}} \tag{3}$$

where


After bundle adjustment processing, the reported horizontal RMSE value was 0.028 m, and vertical RMSE was 0.230 m. The result is given in Table 2.


**Table 2.** Unmanned aerial vehicle structure-from-motion's (UAV-SfM) model accuracy assessment.

Furthermore, TLS and total station were performed to acquire reference data in this study for the independent coordinate checkpoints. To evaluate the overall quality positional accuracy of UAV-SfM results in a 3D pagoda model reconstruction, the 20 checkpoints were spread across the pagoda façade (bricks, window corner, etc.). Figures 8 and 9 show the distribution of these checkpoints on the pagoda façade.

**Figure 8.** Comparison of the terrestrial and UAVs point cloud computed on 20 checkpoints for the Prang structure. (**a**) Point clouds from terrestrial laser scanning (TLS). (**b**) Point clouds from UAV.

**Figure 9.** Comparison of the terrestrial and UAV point clouds, computed on 20 checkpoints for Chedi structure. (**a**) Point clouds from TLS. (**b**) Point clouds from UAV.
