# Two-Dimensional Shape Analysis of Complex Geometry Based on Photogrammetric Models of Iconostases
## 4 Method for 2D Shape Analysis Based on Photogrammetric Models
### Method for Detecting Contours and Extracting Plane Sections Based on Point Segmentation
#### 4.2.1 Point Cloud Preparation from Mesh  
The point cloud preparation implied converting a mesh to a point cloud. As computing geometric features and point segmentation in CloudCompare can be applied only to points, working with point data was required. First, the mesh generated by photogrammetric software Metashape was imported into CloudCompare. Due to the limitations of photogrammetric surveying in capturing high parts of the iconostasis' structure, the source point cloud used for creating a 3D mesh in Metashape contained cavities on the top parts of protruding constructive elements such as at the top side of the molding (Figures 7a and 8a). On the contrary, the mesh generated from the point cloud interpolated the unbound parts, producing cleaner and crispier results of the reconstruction (Figures 7b and 8b). Thus, the data from the mesh were converted back to the point cloud using the sample points option in CloudCompare (Figures 7c and 8c). When sampling points, it was important to ensure the same point density as the one obtained from the original point cloud as it entails the precision of the reconstruction. In the first case study (ICONB), the iconostasis point cloud was sampled to the same number of points as the original cloud has, which maintained the same point density (Figure 7c). In the case study of the second iconostasis (ICONC), the sampled point cloud was reduced to slightly above ten million points (Figure 8c) as the clouds over this value are difficult to handle and are automatically decimated when moving inside the CloudCompare program. It can be seen that the point clouds produced from the meshed surfaces appear cleaner and more complete. In addition, when converting the mesh to a point cloud, the colors on the new point cloud are improved as well, as it was sampled on the basis of the previously textured mesh.  
Figure 8: Digitized iconostasis, ICONC. Workflow of the point cloud sampling for iconostasis 1: (**a**) point cloud generated in Metashape, number of points: 17,324,365 (point cloud density 2.1 mm); (**b**) mesh generated in Metashape, number of faces: 3,464,872; and (**c**) sampled point cloud in CloudCompare, number of points: 9,500,000 (point cloud density 3.6 mm).  
Figure 7: Digitized iconostasis, ICONB. Workflow of the point cloud sampling: (**a**) point cloud generated in Metashape, number of points: 6,446,316 (point cloud density 5.36 mm); (**b**) mesh generated in Metashape, number of faces: 1,296,672; and (**c**) sampled point cloud in CloudCompare, number of points: 6,500,000 (point cloud density 5 mm).  
The next step of the point cloud preparation was applying ambient occlusion to the point clouds to complement the depth information (Figure 9). The ShadeVis Plugin was used in CloudCompare. Applying lighting processes is useful for the visualization of the 3D models and geometric analysis as it adds realism to the digitized models, allowing for more clear visual perception and identification of the small concavities of the surface that are poorly recognizable [50].