# 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.3 Point Cloud Segmentation and Contour Detection  
The 3D models of the iconostases were first segmented on the basis of its DEM. The 3D models were segmented on the protruding parts that present supporting constructive elements and the rest of the construction mainly represent ornamental elements and framed icon places. To split the point cloud into the protruded and the mainly flat parts, we used the CSF (Cloth Simulation Filter) Plugin from CloudCompare, which is a tool to extract ground points in point clouds [65]. If the object is previously projected on XY-plane and an adequate resolution and classification threshold is set, the CSF filter will automatically extract the points which are protruded, compared to the flat surface. In this case, the iconostasis' columns have been split with respect to the rest of the structure (Figures 11a and 12a). While maintaining the information about parts' depths, the points are further filtered by certain values of the verticality geometric feature. Verticality is defined as the angle between the vector normal to the surface at that point and the vertical. It relies on eigenvectors and is obtained by calculating the local neighborhood of each 3D point and extracting 3D features encompassing the geometric relations between the respective 3D points. This way, the classes of points representing shapes with similar spatial orientation can be extracted, which allows for identifying the boundaries between surfaces at different scales. The verticality geometric feature was considered as relevant to distinguished iconostasis' structural and ornamental elements from the rest of the mainly flat surfaces as it allows for point description with respect to their normal orientation, i.e., the position at right angles to the vertical plane. The verticality was computed for each separated part to detect contours of the iconostasis' main elements. The value of the verticality on the histogram presents the applied threshold, i.e., the local neighborhood radius used to compute the feature. For the calculation of the verticality geometric feature, a threshold based on point density was applied. The thresholds were selected on the basis of the histogram of values for the feature of verticality considering they coincided with the previously calculated point density. Figures 11c and 12c show the extracted points that represent contours of the main constructive elements as well as the contour shapes of their ornaments, with the resultant point densities for the new sets of extracted point clouds. The verticality feature is normalized to the interval 0-1. A value of V 0.5 indicates an almost vertical structure, while the low values indicate almost horizontally oriented surfaces [35]. The high values (V \(\approx\) 1) indicate vertical surfaces. Therefore, as the 3D model was oriented so as to lie on the XY-plane, the contours of the carved ornaments and the constructive elements (green color) of the iconostases demonstrated the vertical surfaces (Figures 11c and 12c) compared to the rest of the structure representing almost horizontal surfaces (blue color). It is noted that by adjusting the normalized value from the 0-1 interval to a specific one, points can be filtered to represent the contours of certain 3D surfaces (Figures 11c and 12c). The 3D model was previously projected onto the XY-plane, thus the XY-plane was considered as a vertical plane instead of the XZ-plane. The value of the local neighborhood radius, displayed by the histogram, implies the point density of the point cloud on which the verticality feature was computed. Thus, the point cloud has been split into the points with the highest density and the rest of them, for which the verticality feature was further recomputed. Figure 11: ICONB. The complete workflow of point cloud segmentation and contour detection: (**a**) splitting the point cloud into the protruded parts and the rest of the construction using the CSF.