ARCHITECTURAL HERITAGE 3D MODELLING USING UNMANNED AERIAL VEHICLES MULTI-VIEW IMAGING

: Today, Architectural Heritage 3D models are created using Unmanned Aerial Vehicles (UAV) imagery and processing through Computer Vision (CV) methods. They are becoming more acceptable as reliable sources for study, documentation, diagnostics, intervention planning, monitoring, and management decision-making. The Deir-e-Kaj caravanserai, located in Qom, Iran, is a massive and half-destroyed architectural heritage that belongs to the Seljuk era. The obstructed access due to illegal deep excavations and the extensive demolished structure did not allow for a complete mapping using traditional and terrestrial techniques. Considering the condition and vulnerability of the artifact, it looks necessary to use a safe, non-destructive, and remote method for 3D documenting. The literature review shows in most of the research UAVs are used for acquiring nadir images, which are combined with the terrestrially acquired data for complete 3D modelling. In this case, a multi-view UAV imaging strategy is considered for the as-is 3D modelling of Deire-e-Kaj. Three different imaging angles are designed and used to carry out the comprehensive and all-needed data acquisition. The nadir images are acquired to cover the plan and enclosure, and the horizontal and oblique images cover the façades and interior spaces of the artifact. Adopting a suitable photogrammetric process based on the SfM workflow allows for obtaining an accurate, high-quality, and textured 3D model of the caravanserai. Accuracy evaluation of the result using Ground Control Points shows a total accuracy of ±1 cm. This study demonstrates the efficiency of multi-view UAV photogrammetry as a rapid, safe, and precise method to create a complete 3D model of massive, hard-to-access, and vulnerable Architectural Heritage.


General Context
The utilization of geomatic technologies to Cultural Heritage has a long history (Al-Bayari and Shatnawi 2022). The interest of using these techniques is their ability to document the current state of the heritage artifacts and provide insight into the past (Pappa & Makropoulos, 2021). UAV (Unmanned Aerial Vehicle) photogrammetry provides measurement tools high in flexibility, reliability, safety and easy to use, these systems can be deployed in minutes, initial measurement can be delivered yet on the field, and final accurate measurements are calculated rapidly and even using online services (Burdziakowski 2018). With the diffusion of digital images, Computer Vision (CV) began to develop algorithms able to orientate a sequence of images (Liang and Cai 2022). The image orientation techniques traditionally used in photogrammetry integrated with the new approach has allowed obtaining accurate 3D models, taking advantage of CV's high level of automation, without the need-toknow information "a priori" and, at the same time, to use rigorous geometric and models developed through traditional photogrammetry (Pepe and Costantino 2021). The importance of creating the 3D models is widely accepted for the extraction of metric and geometric information but they offer more exploitation opportunities (Barrile, et al. 2022). They not only can lead to producing traditional 2D plants and section representations but also can be used as inputs in Geographic Information Systems (GIS) (Bitelli, et al. 2019), Building Information Modeling (BIM) (Rocha, et al. 2020) or Virtual * Corresponding author Reality application (VR) (Secci, et al. 2019) and 3D printing systems to create physical replicas (Prerana, et al. 2022). 3D models make an opportunity to study artworks, as investigations are carried out directly on digital replicas and may lead to new knowledge and insights. From the restoration perspective, having a 3D model created beforehand can be a valuable resource for making an accurate and successful intervention (Eros, et al. 2020) In this study, UAV based multi-view images of an architectural cultural heritage site, the Deir'e Kaj caravanserai in Qom, Iran, are used to create an accurate and complete model of the artifact. Considering that impossibility to document the current situation of the caravanserai using traditional and field-based methods, the study found that the application of the UAVs provides a relatively quick, non-invasive, and cost-effective manner for documentation of the half-demolished caravanserai compared with traditional survey methods.

Literature Review
The UAV photogrammetry approach to 3D modelling and reconstruction of immovable cultural heritage objects has been studied by many researchers and promising results have been reported by now (Remondino F., & others, 2011;Xu, Z., & others, 2014;Erenoglu, & others, 2017). Pierdicca (2017) at the virtual reconstruction of Palacio Tschudi's work, exploiting state-of-the art methodologies, demonstrated how, with a rigorous pipeline it is possible to achieve an accurate reality-based model (compatible for documentation purposes), even starting from unplanned acquisition and coarse datasets.
The study aimed to be an incentive to those researchers who hold priceless datasets of ancient areas that should be shared with the research community and demonstrated, whereas, not complete, a 3D survey and the consequent reconstruction can become paramount not to lose the memory of a place (Pierdicca 2018). (2019), demonstrated 3D modelling reconstruction for the traditional Malay city of Kota Bharu using multirotor drone data. In this study, the potential of multirotor drones for the 3D modelling of cultural cities was highlighted clearly. As a result, the authors mentioned, drones are capable of making sophisticated maps that help a lot in decision-making processes. Whereas, 3D city models can be considered as one of the important and most helpful products in planning as visualization will improve the efficiency in managing the planning process as well as can be handy when dealing with decision-makers, investors, and communities (Mohd Noor, et al. 2019). Templin and Popielarczyk (2020) showed that low-cost UAVs with non-metric cameras can be a capable alternative to the already-used methods. According to this study, UAV photogrammetry allows the production of 3D models of historical buildings with high accuracy that can be used almost directly in cultural heritage services and LBS (location-based services) applications. This study claims that the most important advantages of UAV-based photogrammetry are a cost-effective and quick way of accurate 3D scanning, measurement, surveying, and reality capture to the documentation of the cultural heritage (Templin and Popielarczyk, 2020). Ulvi (2021) used terrestrial laser scanning (TLS) and UAV photogrammetry to create a 3D document of a Water Monument and then made sensitivity comparisons in both techniques. This comparison shows the photogrammetric approach using UAV technology to generate 3D models is a low-cost but relatively fast technique compared to other modern techniques of preserving cultural heritage sites. UAV photogrammetry is a more suitable method for low-budget projects. (Ulvi 2021). Guo and colleagues (2022) tried to solve the problem of high precision in 3D information acquisition and multi-angle real texture feature acquisition. They proposed a new method of 3D reconstruction of ancient buildings combined with 3D laser scanning and tilt photogrammetry. According to the paper, this method modifies the advantages of the two technologies and uses the feature point matching algorithm to realize the accurate fusion of multisource data to gather the construction of a complete 3D model inside and outside the ancient building (Guo, et al. 2022) Literature review shows in most of the research, UAV nadir imaging is used individually for creating precise maps or in combination with the other complicating terrestrial methods for 3D modelling. According to the case study's situation that barricades using terrestrial acquisition equipment, a multi-view UAV imaging strategy is considered for as-is 3D modelling of Deire-e-Kaj. Three different imaging angles are designed and used to carry out the comprehensive and all-needed data acquisition. The nadir images are acquired to cover the plan and enclosure, and the horizontal and oblique images cover the façades and interior spaces of the artifact.

Case Study
Deir-e-Kaj caravanserai is located in the village of Mohammadabad in the Qomroud district of Qom city. This artifact also known as Qala-e-Sangi and Mohammadabad caravanserai, was registered in the list of national monuments of Iran in 1998 (registration number 2138) (National registration document, 1998: 1). The settlement area of the caravanserai at the north of the old village of Kaj has been a significant residence on the old historical roads for centuries. There are the remains of Mohammadabad castle dating back to Parthian and Sassanid, which indicates the antiquity and strategic position of this route from ancient times on the top of natural rocks (Arab, 2006: 98). Being located next to one of the sub-branches of the Silk Road (Isfahan to Rey road) and the need to provide life and financial security for commercial caravans, have been among the main factors in the creation and development of this area. The primitive core of the Geli Castle in the Parthian period was formed as a facility related to the communication route around it. During the Sassanid period, trade relations expanded, and Geli Castle became a small town. With the arrival of Islam in Iran and following the recession of economic activities, living in Qala-e Geli also flourished for several centuries. Coming to the power of the Seljuks and re-paying attention to trade, with the reconstruction of the architectural structures of Qaleh Geli and the construction of a Sangi caravanserai in its southeast, this town was rebuilt (Ahmadi, Mehrafarin, and Mousavi Haji, 1400) ( Figure 1).
The Deir-e-Kaj caravanserai and the route were still an authentic and used way throughout the Islamic period until the end of the Safavid era, which is why the authors and geographers of the Islamic period have repeatedly written about this route. After changing the route of Qom to Rey -in the Qajar era from 1264 AH-Both were gradually abandoned (Arab, 2006: 99).
The exact date of construction of this caravanserai is not known but, as mentioned above, researchers considering the architectural quality of the work and its similarities with Seljuk caravanserais such as Robat Sharaf (Sarakhs), Anoshirvani Caravanserai (Semnan) and others, it has been considered as belonging to the Seljuk period (Kiani and Kleiss, 1373: 435;Siroux, 1949: 100;National Registration Document, 1377;Kaboli, 1378;Arab, 1385;Sultan Ahmadi and Seyed Hamzeh, 1395: 30). This caravanserai has a Four-Iwān 1 pattern plan. Another hand, there are entire verandas in front of the rooms, and direct entrances to the central courtyard without intermediaries. The existence of those architectural elements is the general feature of Seljuk-era caravanserais ( Figure 2).
The Four-Soffeh spaces located in the northwest and southwest corners of the caravanserai also have been used as opulence residency for special people (Sultan Ahmadi and Seyed Hamzeh, 1395: 36). There are seven round towers in the caravanserai, located at the external corners of the caravanserai and in the middle of each exterior facade. The construction of caravanserais' walls was carried out with stone, and its roof, which collapsed totally, was made of brick ( Figure 3) (Kiani and Kleis, 1373: 660). The builders have paid utmost care and delicacy in choosing the stone and stacking it, then latched it with Sarooj mortar (Kaboli, 1999: 109).
Nowadays, Deir-e-Kaj caravanserai is in an abandoned and halfruined situation. It seems the condition of the caravanserai will worsen if the authorities don't take the necessary action. As a massive artifact that illegal excavation messed up, 3D documentation of this artifact using terrestrial survey is laborious, time-consuming, and expensive. Hence a multi-view UAV survey method was used to 3D documentation the artifact.
The Four-Soffeh spaces located in the northwest and southwest corners of the caravanserai also have been used as opulence residency for special people (Sultan Ahmadi and Seyed Hamzeh, 1395: 36). There are seven round towers in the caravanserai, located at the external corners of the caravanserai and in the middle of each exterior facade. The construction of caravanserais' walls was carried out with stone, and its roof, which collapsed totally, was made of brick ( Figure 3) (Kiani and Kleis, 1373: 660).
Nowadays, Deir-e-Kaj caravanserai is in an abandoned and halfruined situation. It seems the condition of the caravanserai will 1 Iwān is a term for a building division in Persian architecture which is located at main axes of a building at side of a courtyard. It is a covered vaulted space with one open side adjacent to the courtyard.
worsen if the authorities don't take the necessary action. As a massive artifact that illegal excavation messed up, 3D documentation of this artifact using terrestrial survey is laborious, time-consuming, and expensive.
The UAV used to carry out this study is a quad-copter rotarywing platform (Figure 4). This quad-copter was equipped with a three-axis gimbal mounting a digital camera with a lens with a fixed length of 24 mm, and a diagonal FOV of 65 degrees. The camera has a CMOS sensor of 1/2,3 inch and 12 megapixels (4608 × 2592) (Table 1). This specification theoretically enables a ground sampling distance (GSD) of up to 1 cm at a distance of 80 m.

Methodological Approach
The overall workflow to carry out this research is summarized in Figure 5. Prior to starting the multi-view UAV survey, a historical study of the Caravanserai's background was carried out to provide information on its original state. It was also necessary to know exactly the current state of the caravanserai before starting the study.
Considering the situation of the artifact, one of the main scopes of the study is to set up and test the procedure to define the correct pipeline that could be used for complete 3D modelling. The photogrammetric survey started by determining the flight parameters. The acquisition area`s boundary is defined considering the circumstance of the caravanserai. The possible locations for take-off and landing are identified. According to the desired acquisition precision and 3D modelling purposes, a quadcopter with 0.46 µm pixel is selected for acquisition. As the main phase of the acquisition process flight planning is carried out regarding the site characteristics, the possible presence of obstacles, such as roads open to vehicles or high-raised electrical installations, and boundaries of different estate properties. Three different views are considered for Deir-e-Kaj's complete data acquisition ( Figure 6). The nadir imaging flight is planned to capture the top view of the artifact and the enclosure.     grey spots in the model. A topographic reference network is designed to guarantee the precision and evaluation of the results. In the acquisition phase, the designed flight plans are executed. In the last phase, qualified images are processed in Zephyr software. Image orientation (SFM -"structure from motion"), dense point cloud extraction, geo-referencing, scaling of the model by flight sectors, mesh building over the dense cloud, and Texture projection on the mesh are the steps that are followed for 3D modelling of Deir-e-Kaj Caravanserai.

Data Acquisition
In order to achieve an accurate automated image acquisition strategy for photogrammetric processing, the flight path of the UAV has been calculated in advance. Considering to the survey targets, assuming a general GSD (Ground Sampling Distance) of 1cm is considered, three different flights were carried out.

Nadir Imaging:
This flight aimed to capture the top view of the artifact and the enclosure. Figure 7 shows the flight plan and execution. The camera was triggered every two seconds and the flight speed had been set to obtain 80% forward and 60% side overlaps. A cross-flight was also planned to achieve stronger geometry and better overall accuracy and smaller RMSE values, especially in the horizontal components. A total of 330 images were used to carry out the photogrammetric processing.

Horizontal Imaging:
The second flight was carried out to capture the caravanserai's exterior and central yard façades. The horizontal imaging flight plan was designed considering the highest part of the artifact out at the height of 9m to capture the whole of the façades. In this flight 302 pictures acquired. ( Figure  8).

Oblique Imaging:
The Third flight was carried out to obtain oblique photographs, with the aim of guaranteeing the photographic capture of the interior of the building and of the four façades of the central yard of the caravanserai. This flight was carried out at a height of 15 m, because the highest part of the building was about 10 m. In this way, the entire study area could be flown over without danger of collision. In addition, due to the FoV of the camera, it was possible to cover the whole façade without having to move too far away from it. The angle of inclination of the camera was around 45° to avoid the appearance of the horizon in the 357 photographs (Figure 9-10). The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-M-2-2023 29th CIPA Symposium "Documenting, Understanding, Preserving Cultural Heritage: Humanities and Digital Technologies for Shaping the Future", 25-30 June 2023, Florence, Italy

Camera Calibration
When non-metric cameras are applied in image acquisition and specially when a wide-angle lens is used, lens distortion removal is required by calibrating the camera and removing the distortion by estimating the camera calibration parameters of the principal distance, centre principal point displacement, square pixels, and lens distortion models (Themistocleous, 2020). In this study, calculating the camera calibration parameters was carried out by the Agisoft Lens software.
In Table 2 the values of the internal parameters of the camera are reported, where F is the focal length measured in pixels, Cx, and Cy are the principal point coordinates (coordinates of lens optical axis interception with sensor plane in pixels). k1, k2, k3, are the radial distortion coefficients, while p1 and p2 are tangential distortion coefficients.

Data Processing
Prior to the image acquisition, nine targets were located on the studied surface for the purpose of georeferencing (ground control points, GCPs) and evaluating the accuracy of the photogrammetric project (checkpoints, CPs) ( Figure 11). The targets consisted of A3 size (420 × 297 mm) with black and white squares. the targets were located on the perimeter of the study zone, and the center of the Caravanserai's yards as shown in Figure 9. This distribution of targets ensures that the results to be obtained with acceptable accuracy in both planimetry and altimetry coordinates. The three-dimensional coordinates of these points were measured with a Global Navigation Satellite System (GNSS) receiver working in Post Processed Kinematic (PPK) mode, with the base situated at the points near the centers of the building's yards. Four targets presented in yellow placed on the exterior of the caravanserai's corners were used as Ground Control Points (GCPs) for the georeferencing of the project. The shown cyan targets were used as Control Points (CPs) to evaluate the accuracy of the photogrammetric project.
The model was developed using ©3D Flow Zephyr Aerial software (Hilal, A. H et al, 2022). This software has allowed performing various workflows that lead from photographic images to the three-dimensional textured model of the Deir'e Kaj caravanserai. The photogrammetric process of acquired images in Zephyr is carried out following three main phases. In the first phase, referred to as Structure from Motion (SfM), the images are loaded in the software, and camera positions are defined. The camera calibration parameters, created with Agisoft Metashape, are loaded into the software. In this phase, a sparse point cloud as an initial 3D result is created ( figure 12). Then 3D spatial coordinates of GCPs and CPs are imported from text files. These control points are used to adjust the reconstruction. In the second phase, the 3D model was created by extracting a dense point cloud, specified as the Multi-View Stereo (MVS). In the last phase, the real texture is applied to the 3D surface, and Deir-e-Kaj`s textured 3D model is obtained.

Results
The presented workflow demonstrates the application of a multiview UAV imaging strategy to produce a complete and accurate 3D model of architectural heritage. The aerial multi-view images are processed in a series of steps in 3DF Zephyr software for generating the 3D model. The obtained textured 3D model through cloud point processing is shown in Figures 13 to 15. As presented in Table 2, the area of interest is visualized with a low percentage of footprint deviation, and the total precision is around ±1 cm. Considering the obtained accuracy, it is possible to accept a nominal scale ranging from 1:100 up to 1:50 for the    The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-M-2-2023 29th CIPA Symposium "Documenting, Understanding, Preserving Cultural Heritage: Humanities and Digital Technologies for Shaping the Future", 25-30 June 2023, Florence, Italy orthophoto produced according to Metric Survey Specifications for Cultural Heritage (Historic England, 2015).

DISCUSSION AND EVALUATION
In this case study, there are obstacles to using terrestrial survey techniques like laser scanning, while the artifact's sensitive situation makes it laborious to acquire data directly. This condition made it necessary to use a multi-view survey through sensors mounted airborne platform. This method represented a valid and efficient tool for obtaining geospatial data of the entire historical building. The nadir, horizontal, and oblique images generated through the UAV made it possible to create the highquality textured 3D model of the Deir-e-Kaj caravanserai. As shown in Figure 11, the acquired multi-view images have been processed integrally. In this way, the complete 3D model of the massive and half-destructed structures of the caravanserai was created in a non-destructive and safe manner.
Using the SfM approach to aerial images, two main aspects were taken into account: the optimum data acquisition and the processing time. About the first aspect, top and horizontal views integration also intense shadows in the interior spaces of the caravanserai were considered. To obtain an integrated and complete data acquisition, decrease the information gaps, and avoid dark spots in the 3D model, oblique imaging was carried out in addition to the nadir and horizontal acquisition. As the paper shows, multi-view images with many homologous points are involved in a robust geometric configuration. The accuracy of the UAV-derived model was assessed by comparing its results with those of the GCPs (Table 3). After the SfM Bundle Adjustment was completed, an average deviation between the 5 GCPs and their corresponding points on the UAV-derived point cloud model was generated using the following equation: according to the formulation of the root mean square error (RMSE) (1).

CONCLUSION
This paper presents the methodology of using a multi-view UAV imaging strategy for the 3D modelling of Deir-e-Kaj caravanserai. It was shown how it is possible to create a 3D model of a massive and hard-to-access architectural heritage that includes metric and geometric information needed for conservation purposes. In the case of this caravanserai, the access obstacles due to illegal deep excavations and the Table 3. GCP and CP accuracy errors  The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-M-2-2023 29th CIPA Symposium "Documenting, Understanding, Preserving Cultural Heritage: Humanities and Digital Technologies for Shaping the Future", 25-30 June 2023, Florence, Italy widespread demolition of its structure did not allow for mapping the interior spaces and façades of the building using traditional and terrestrial survey techniques. Hence, it was necessary to acquire images of every part of the artifact only through an unmanned aerial platform, without the need to perform a terrestrial survey. Three different camera positions were used to carry out a complete acquisition. The nadir images were acquired to cover the plan and enclosure of the structure, and the horizontal and oblique images captured the façades and interior spaces of the artifact. Adopting a suitable photogrammetric process based on the SfM workflow allowed for obtaining an accurate, high-quality, and textured 3D model of the caravanserai with total ±1 cm accuracy.