## 4 Data Processing
### Creating 3D Models from Photogrammetry  
Photogrammetry is still a relatively inexpensive way of making a high-quality textured 3D model. On top of that, photography is usually not a problem, and even transport does not require special permissions as with other instruments. Modern methods of automatic photogrammetry based on SfM (structure from motion) and MVS (multi view stereo) are ideal tools for object documentation in the field of close-range photogrammetry. In this project, photogrammetry was used in all three phases. In the Phase 1, the labelled and measured GCPs were also used for photogrammetry and the alignment of the photogrammetric model into the TLS model. The models of Phases 1 and 2 were created using the Agisoft Metashape software, version 1.8.1. In each phase of the project, the captured data from the shrine was divided into internal and external parts. This was for a more reliable automatic alignment of the images. The GCPs from the original TLS from Phase 1 using the Leica Cyclone software \begin{table}
\begin{tabular}{l c c} \hline
**Phase** & **1 (Faro S150)** & **3 (BLK360)** \\ \hline Number of positions & 84 & 36 \\ \hline Number of points & 3,684,126,896 & 331,930,402 \\ \hline Bundle error \(\sigma\) & 3 mm & 4 mm \\ \hline \end{tabular}
\end{table} 
Table 2: TLS parameters. Figure 6: Control point on the wall. were added to the photogrammetric models and the point clouds from the photogrammetric measurements from Phases 1 and 2 were aligned to these points. Next, the dense point cloud was calculated. Points with low confidence were automatically filtered out of the cloud and the cloud was manually cleaned. The Mesh model was generated by computing from the dense cloud adjusted in this way and its texture was computed. Finally, the final models were manually cleaned. The photogrammetric calculations of the last phase were performed using the Agisoft Metashape software, version 2.0.1. The first steps of the calculation were identical to the work in the older versions. However, the point cloud from the Leica BLK360 was uploaded directly into Agisoft Metashape and the GCPs were taken directly there. The new version changes the procedure, uses a depth map, and allows for the creation of a point cloud up to the Mesh model. The filtering procedure is also changed. Because it is less convenient to remove areas from the Mesh model with low reliability due to the creation of unconstrained polygons, the initial key points have already been reduced by the gradual selection function to filter out unreliable points. The model's calculation procedures are shown in Figure 7.  
The next lines represent the settings parameters when creating 3D models for all phases in Agisoft Metashape. 1. **Align: Accuracy--High**: Key point limit 40,000, Tie point limit 4000  
Accuracy--High: The software works with images at their original resolution without downscaling. This improves detection detail but increases time and computational requirements. Key point limit: The maximum number of key points detected in each image. These points serve as candidates for matching between the images. Figure 7: Illustration of differences in workflow in different versions of Agisoft Metashape when calculating the shrine model. Tie point limit: The number of points connecting frames, calculated as the intersections of key points between two or more frames. 2. **Build point cloud--High**  
The \"High\" parameter specifies that the software performs the process of generating depth maps with a partial reduction in image resolution (downscaling). For example, the original resolution is downscaled by a factor of 4 (2\(\times\) on each side of the image). A higher \"Ultra High\" parameter would use the full resolution, but would also increase the processing time. 3. **Point cloud filter:** Confidence remove classes 0 and 1 (0-255)  
This filter removes points with low confidence, typically noise or points from sections where there was insufficient image coverage. Classes 0 and 1 typically contain the lowest confidence points. 4.