# Low-cost terrestrial photogrammetry for 3d modeling of historic sites: a case study of the Marinids'Royal Necropolis city of Fez, Morocco

Hamza Khalloufi, Ahmed Azough, Noureddine Ennahnahi, Fatima Zahra Kaghat

<figure><img src="image_1.png" /></figure>

► To cite this version:

Hamza Khalloufi, Ahmed Azough, Noureddine Ennahnahi, Fatima Zahra Kaghat. Low-cost terrestrial photogrammetry for 3d modeling of historic sites: a case study of the Marinids'Royal Necropolis city of Fez, Morocco. Mediterranean Archaeology and Archaeometry, 2020, 20 (3), pp.257-272. 10.5281/zen-odo.3930412. hal-03820637

HAL Id: hal-03820637

https://cnam.hal.science/hal-03820637

Submitted on 19 Oct 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

DOI: 10.5281/zenodo.3930412

# LOW-COST TERRESTRIAL PHOTOGRAMMETRY FOR 3D MODELING OF HISTORIC SITES: A CASE STUDY OF THE MARINIDS' ROYAL NECROPOLIS CITY OF FEZ, MOROCCO

Hamza Khalloufi*¹, Ahmed Azough¹, Noureddine Ennahnahi¹ and Fatima Zahra Kaghat²

¹Sidi Mohammed Ben Abdellah University, Fez, Morocco

²Conservatoire National des Arts et Métiers, Paris, France

Received: 18/06/2020

Accepted: 20/07/2020

*Corresponding author: Hamza Khalloufi (hamza.khalloufi@usmba.ac.ma)

## ABSTRACT

One of the main factors that make the conservation of heritage by 3D modeling inaccessible, especially in developing countries, is the high cost of the terrestrial laser scanner. One alternative solution is close-range photogrammetry, which is widely used as a less-expensive technique for the documentation of historical and cultural heritage through usually high-resolution DSLR (Digital Single-Lens Reflex) cameras. While main previous works have focused on the use of such high-end cameras, this paper studies the potential of the recent entry-level phone camera for performing close-range photogrammetry as an affordable abundant tool. To achieve this goal, Marinid Royal Necropolis from the UNESCO heritage city of Fez in Morocco were photographed and 3D modeled using a smartphone and a DSLR camera. The results are compared to a set of control points (CPs) collected using a total station and then evaluated through some statistical variables. Also, to analyze the impact of several parameters, Cloud-to-Cloud (C2C) distance is calculated for each 3D model. The mean C2C distance between 3D models and CPs clouds ranged between 6.8 mm and 11.6 mm using a few CPs, and from 11 mm to 21 mm without using any CPs. All comparisons suggest that the obtained results employing the smartphone camera are comparable, stable, and even slightly more accurate than DSLR cameras in our case.

**KEYWORDS:** Heritage Documentation, 3D modeling, Heritage conservation, Low-cost terrestrial, Photo-grammetry, C2C
# 1. INTRODUCTION

Today, the 3D modeling of cultural and archaeological sites has become a powerful tool. It changes the traditional known workflow and offers many benefits that were widely investigated (Tsiafaki and Michailidou, 2015). It is a significant solution, for many purposes such as preservation, documentation and keeping a digital record of culture to support maintenance and restoration operation in cases of damage or loss (earthquakes, fires, wars) (Lerones et al., 2010; Stylianidis and Remondino, 2016; Dominici, Alicandro and Massimi, 2017). The terrestrial laser scanner is the optimal standard for this purpose due to its highly accurate results (Arayici, 2007; Kwoczynska, Sagan and Dziura, 2016; Shanoer and Abed, 2018) and its automated and practical process. It can also be used under most weather and lighting conditions (Prokop, 2008). However, it has some limitations when it comes to complex cultural and historical objects (Mulahusić et al., 2020), and it remains a costly technique. This could prevent its use in some developing countries. Therefore, the proposal of low-cost and accurate alternative ways is necessary to support and enhance culture preservation in such countries. The digital close-range photogrammetry technique has been known recently as an accessible promising alternative for laser scanner in several fields. It is recognised as a major tool in cultural heritage and an added value to sustainability in the interdisciplinary field of archaeometry for conservation-restoration purposes (Liritzis et al., 2020). It can have been frequently used in conservation, restoration, documentation (Peña-Villasenín, Gil-Docampo and Ortiz-Sanz, 2017; Fioretti et al., 2020), archaeology (Lerma et al., 2010; Haukaas and Hodgetts, 2016; Al-Ruzouq and Abu Dabous, 2017; Waagen, 2019; Jones and Church, 2020), construction (Liu et al., 2009; Abdel-Bary Ebrahim, 2012; Zhang and Hu, 2018), and extended realities (Hou et al., 2014; Putra, Wahyudi and Dumingan, 2016; Murtiyoso et al., 2018). This success is due to the ease of processing and high accessibility from most archaeological and researchers having limited budgets around the world. However, most of the close-range photogrammetry studies use an expensive digital single-lens reflex camera (DSLR) to take photos to the sites. Therefore, the optimization of cost-effectiveness is necessary.

Numerous studies have investigated low-cost image-based digital close-range photogrammetry techniques for cultural heritage. The accuracy of many datasets was evaluated with different complexity degrees with using the control points and scale bars as a bundle block adjustment, in order to derive the potential of low-cost automated image-based 3D

modeling. The results indicated good accuracy when ground control points were used (Remondino et al., 2012). Low-cost image-based 3D modeling methods for cultural heritage and archaeological for non-technical users were also investigated, using cheap or free instruments and software, with variable geometric accuracy level (Boochs et al., 2007; Kersten and Lindstaedt, 2012).

Several studies have also evaluated the feasibility of low-cost image-based modeling quality of cultural heritage in comparison with a terrestrial laser scanner and/or CPs. A masonry arch bridge was 3D modelled using the photogrammetry and dense cloud as low-cost methods. Although the results were evaluated through several parameters, the number of used images and the processing time were very high (Altuntas, Hezer and Kırlı, 2017). The profits of low-cost image-based reconstruction of the historical and cultural heritage of Nepal devastated in an earthquake was investigated, using phone and DSLR cameras. The obtained models were uncontrolled, i.e., the models were not in the real scale (Dhonju et al., 2017). Otherwise, the parameters that impact the accuracy of the obtained results according to the used software, the number of photos, and ground control points using smartphone cameras were analyzed by (Altman, Xiao and Grayson, 2017), yet the achieved results were not always steady. The potential of a cheap camera using tow solutions for the bundle block adjustment was exploited by (Elkhrachy, 2019). The first solution is using ground control points, whereas the other one, the controlling model employs scale bars. The obtained 3D models were compared to a section of CPs and exhibit high quality, mainly when CPs were used. Also, the effect of the number of CPs on model quality was analyzed. Nevertheless, the case of study was perfect, i.e., the building had no historical value and presented no architectural challenges.

The main goal of this article is to optimize the cost-efficient, to conserve a high level of accuracy, and to exploit the tools that already exist among archaeological, researchers, and also unprofessional users. Today, the use of smartphones is widespread worldwide. According to the Mobile Economy report, By the end of 2019, 5.2 billion people subscribed to mobile services, accounting for 67% of the global population, with almost 3 billion smartphones (Denis, 2019; GSM Association, 2020). The approach proposes different solutions targeting two different budget categories; by using two different digital cameras. The first one is a DSLR camera, and the second one is an entry-level smartphone camera, and/or the control points. In order to challenge those two technologies to the case of heritage preservation, we have chosen one of the most valuable
ble heritage and understudied monument: Marinid tombs of the Marinid Royal Necropolis (built-in 1582). The monument is located in the old medina of Fez in the north of Morocco, which was listed on the UNESCO list of world heritage (Centre, 2020). The building is in a bad situation, and it has lost a few parts due to many reasons such as water erosion and lack of maintenance.

## 2. STUDY AREA AND DATA ACQUISITION

### 2.1. Marinid Tombs

Between the 13th and 15th centuries, the Marinids were the kings of the Maghreb and the Iberian Peninsula. They built a large part of the old city of Fez, "Fez el-Bali." They were the ones who made Fez the cultural capital of the country. The medina, which was listed in UNESCO in 1981, has become an icon of architecture and history. The sultans were given beautiful tombs after their hard work. The first was

buried in Rabat, in the necropolis of Chellah, the last in Fez, in Marinid Royal Necropolis (Fig. 1 and 3). After the fall of the Marinids, the following dynasties did not wish to maintain the tombs. The sites fell into ruin, worn out by sun, wind, and weather Fig. 2. Today, the Marinid tombs are dilapidated. There are still a few structures on which beautiful motifs and friezes can be seen, but it is evident that the site has lost some of its splendor. That is why it is necessary to work on the conservation of this dilapidated heritage in order to avoid losing it.

One tomb was chosen for the reconstruction. The tomb also is in a bad situation, and it has lost some of its parts, especially the roof and the corners. The tomb dimension is approximately 9.5 m in height and 7 m in width. The photographs were taken during the journey using three different sensor cameras. Table 1 below shows the list of the cameras and their sensor parameters.

<table><caption>Table 1. Characteristics of utilized DSLR and mobile phone cameras.</caption><thead><tr><td>Sensor</td><td>Image size</td><td>Focal length (mm)</td><td>Number of used images</td><td>ISO</td><td>Price points</td></tr></thead><tbody><tr><td>Canon EOS 800D</td><td>6000 x 4000</td><td>18</td><td>7</td><td>100</td><td>DSLR (expensive)</td></tr><tr><td>Xiaomi Redmi 7</td><td>3000 x 4000</td><td>3.84</td><td>7</td><td>100</td><td>Entry-level Budget</td></tr></tbody></table>

### 2.2. Taking Pictures

Photographs were captured using an entry-level smartphone camera (Xiaomi Redmi 7) and DSLR camera sensors (Canon EOS 800D). Thus, the sizes of the images are dependent on the camera used. The images were taken during the day and without a tripod or any fixing tools with a concern to get as close as possible to limited use conditions. The cam-

era settings were fixed according to sensor types, including maximum f-numbers, fixed focus, and minimal ISO to improve the quality of the images and to reduce noise.

Two sets of several images with different resolutions were taken on different days, close to the building, but just seven from each set were chosen to make the tests after elimination of redundancy.

<figure><img src="image_5.png" /><figcaption>Figure 1. Study area from Google Maps.</figcaption></figure>
<figure><img src="image_6.png" /><figcaption>Figure 2. Marinid tombs ruins ('Les tombeaux des mérinides à Fès', 2016).</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 3. Location of the site at the top of the hill overlooking the old medina of Fez</figcaption></figure>

### 2.3. Reference data

Thirty-four control points (CPs) were measured on several points over the building facade using Leica TCRP 1203 R300 (Leica, 2008), as shown in Fig. 4. The total station measures the three coordinate points based on the distance between the total station and the point concerned. The used coordinates

system was Merchich / North of Morocco. As an alternative to coded targets, natural targets were used, such as windows, corners, and holes existing on the facade, as a CPs. The architecture of the facade made the choice of well-distributed targets difficult, wherefore the distribution of points was more intensive at the top.
<figure><img src="image_8.png" /><figcaption>Figure 4. (a): The position of the used total station. (b): The building facade and the chosen CPs.</figcaption></figure>

# 3. METHODOLOGY

## 3.1. From images to point clouds

A point clouds is a set of points which represent the 3D objects using the geometric coordinates system, each of the point clouds that forms the clouds representation are defined by X, Y, and Z coordinates and by its color characteristics. The point clouds are obtained by the identification of several photographs. Therefore, the density is influenced by the quality and quantity of the image sets. The point clouds can extract much valuable information, such as accuracy of points position and other metric information, by using several techniques and algorithms, including the used software. The processing involves camera calibration, image orientation, and finally generating the point clouds.

### 3.1.1. Bundle adjustment

Bundle block adjustments (BA) have been conceived by the photogrammetric community in the '50s, used to compute 3D coordinates through a bundle adjustment method that was developed for the first time by Brown in 1958. It is an optimization problem on the sought 3D structure and camera parameters, such as position, orientations, and eventually internals, in order to estimate 3D reconstruction. BA has become the standard solution for 3D reconstruction problems in the '80s.

In our experience, two different BA solutions were proposed to make the comparison between different cameras from different ranges. The first one is the use of 12 CPs that were computed employing the total station. The second one is to reconstruct the object without using any CPs; the model was controlled by using scale bars. Agisoft Metashape Professional software (commercial software developed by Agisoft Corporation) was used to build models and to compute the residuals.

### 3.1.2. Ground control points

Agisoft Metashape professional version allows users to add additional measurements that could improve the results such as CPs and the Scale Bars. In this case, 12 CPs were chosen and measured using a local coordinates system (Merchich/North of Morocco). Those points are already known on the facade of the building. It remains to match each point in the photographs to its corresponding coordinates obtained by the total station. The accuracy obtained using the software for both of the cameras was computed by comparing the CPs coordinates from the total station, and the CPs coordinates obtained using the software. A second test was conducted by reducing the number of CPs to six and evaluating the impact on the accuracy, as depicted in Fig. 5. The third test was about the creation of the models without any CPs, and only scale bars were employed to control the models at that last test.
<figure><img src="image_9.png" /><figcaption>Figure 5. Configuration of the 4, 6, 8, and 10 control points (green points) from 34 collected points (red points). Clockwise from top-left</figcaption></figure>

## 3.2. Cloud-to-cloud distance and data comparison

CloudCompare is a user-friendly open-source processing software (Agisoft and R., 2018), oriented mainly to calculate the distances between two dense 3D point clouds (Girardeau-Montaut, 2011). The software has several tools to calculate the distances; in our case, we used the cloud-to-cloud (C2C) distance tool.

As shown in Fig. 6, it measures the difference between each photogrammetric point clouds and a reference cloud. Several performing algorithms were used to calculate the distance, such as iterative closest point (ICP) (Ahmad Fuad et al., 2018). As shown in Fig. 5, CloudCompare takes the nearest point in the reference point clouds and computes their C2C distance using the nearest neighbor distance algorithm.
<figure><img src="image_10.png" /><figcaption>Figure 6. The nearest neighbor distance that cloud-to-cloud (C2C) distancing is based on</figcaption></figure>

## 4. RESULTS AND ANALYSIS

The software used to obtain points and process and create image-based 3D models of point clouds is Agisoft Metashape professional version. The software extracts the tie points, before the external orientation of the camera is automatically calculated from

these points. For the camera calibration, Metashape uses Brown's distortion model to simulate the distortion of the lens (Agisoft and R., 2018). As shown in Fig. 7, the parameters of accuracy and number of the tie point were set at the best configurations possible.

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /><figcaption>Figure 7. Initial using parameters in Agisoft Metashape</figcaption></figure>

### 4.1. Comparison of the bundle block adjustment for the cameras

In order to compare the two cameras, two different bundle block adjustments were used. The first one was based on the CPs, and the second one used only the software without using any CPs.

#### 4.1.1. BA accuracy based on using CPs

The statistical parameters of the Canon and the Redmi cameras measured after georeferencing using 12 CPs are summarised in table 2. For the Redmi camera, one CP was considered as an outlier as it

affects the results negatively; consequently, it was removed. The RMS (Root Mean Square) values of the two cameras were calculated spatially and along the three spatial axes. For the canon camera: the observed RMS value along the x-axis was 24.99 mm, RMS value along the y-axis was 22.08 mm, RMS value along z-axis was 15.27 mm, and the spatial RMS was 35.12 mm. For the Redmi camera, the RMS value along the x-axis was 9.75 mm, the RMS value along the y-axis was 15.51 mm, the RMS value along the z-axis was 11.93 mm, and the spatial RMS value was 21.86 mm, which is more accurate than canon camera. As shown in the histogram and Q-Q plot for the
canon camera Fig. 8, the residual data are typically distributed. As can be seen, the central part of the curve follows the straight line well (Fig. 8). The skewness value is between -0.5 and 0.5, which means an asymmetrical distribution of the data. The kurtosis value is negative -0.8, which means that the data follows a platykurtic distribution with flat tails that indicates the small outliers in distribution.

Fig. 9 and 10 show the histogram and Q-Q plots of discrepancies of the Redmi camera before and after the removal of the outliers. The histogram before filtering shows that the distribution is not similar to a normal distribution while it is highly positively

skewed. The positive excess kurtosis on its side indicates a leptokurtic distribution with a heavy tail, which indicates significant outliers. As can be seen, after removing the outlier, the tails of the residual distribution are flat and close to the normal distribution while the standard deviation was improved to 6.86 mm from 10.99 mm, and the data follow a straight line as shown in the Q-Q plot (Fig. 10).

On the other hand, the mean value of the Redmi camera was around 2 cm and 3.5 cm for the Canon camera, and their standard deviations were between 6.87 mm and 15.67 mm.

<table><caption>Table 2. Obtained statistical parameters of the Canon and Redmi 7 cameras results</caption><thead><tr><th></th><th></th><th>Canon</th><th>Redmi</th><th>Redmi (After outliers)</th></tr></thead><tbody><tr><td rowspan="3">X-direction</td><td>Mean (mm)</td><td>0.00</td><td>0.00</td><td>-3.01</td></tr><tr><td>Standard deviation (mm)</td><td>24.99</td><td>13.95</td><td>9.72</td></tr><tr><td>RMS (mm)</td><td>24.99</td><td>13.95</td><td>9.75</td></tr><tr><td rowspan="3">Y-direction</td><td>Mean (mm)</td><td>0.00</td><td>0.00</td><td>3.55</td></tr><tr><td>Standard deviation (mm)</td><td>22.07</td><td>19.48</td><td>15.83</td></tr><tr><td>RMS (mm)</td><td>22.08</td><td>19.48</td><td>15.51</td></tr><tr><td rowspan="3">Z- direction</td><td>Mean (mm)</td><td>0.00</td><td>-0.42</td><td>0.38</td></tr><tr><td>Standard deviation (mm)</td><td>15.27</td><td>12.25</td><td>12.50</td></tr><tr><td>RMS (mm)</td><td>15.27</td><td>12.26</td><td>11.93</td></tr><tr><td rowspan="3">Spatial position</td><td>Mean (mm)</td><td>31.75</td><td>23.4</td><td>20.86</td></tr><tr><td>Standard deviation (mm)</td><td>15.67</td><td>10.99</td><td>6.87</td></tr><tr><td>RMS (mm)</td><td>35.12</td><td>25.66</td><td>21.86</td></tr><tr><td>Skewness</td><td>-</td><td>0.42</td><td>1.63</td><td>0.63</td></tr><tr><td>Kurtosis</td><td>-</td><td>-0.8</td><td>3.03</td><td>-1.14</td></tr></tbody></table>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /><figcaption>Figure 8. Histogram and Q-Q plot of photogrammetry using Canon and Total station residuals with normal distribution</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>Figure 9. Histogram and Q-Q plot of photogrammetry using Redmi phone and Total station residuals with normal distribution (before outliers removing)</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>Figure 10. Histogram and Q-Q plot of photogrammetry using Redmi phone and Total station residuals with the normal distribution (after outliers removing)</figcaption></figure>

### 4.1.2. Cloud-to-cloud comparisons

In order to compare the two proposed low-cost cameras, we used 34 control points that were taken using the total station as a reference instead of the laser scanner point clouds. On the other side, two models of points clouds of the two cameras were extracted from Agisoft Metashape software. Each of these models was compared with the reference model using CloudCompare as a comparison tool that calculates the cloud-to-cloud distances (C2C) by taking each point from the compared model, finding its nearest neighbor on the reference model and then computing their distance. Table 2 summarizes the results of several statistical variables of comparison between the control points and point clouds models. The first statistical variable is the mean value of all

distances calculated by CloudCompare software, which was used to compute the accuracy. The second one is the standard deviation, which was used to take an idea about error margin, and the third one is the RMS that gives high weight to large residuals. As shown in Table 2, the mean C2C distances value of the Redmi has a lower value (6.84 mm) than that of Canon (11.66 mm). The residuals of the Canon are more significant when compared to that of Redmi. That is confirmed by standard deviation and RMS values. In Fig. 11, the histogram on the right indicates that 91% of points were under 7.4 cm using the Redmi Model, while the histogram on the left shows that 91% of points were smaller than 11.4 cm in the case of the Canon camera.

<table><caption>Table 2. Achieved statistical results of C2C distances between compared models and point clouds of total station as a reference</caption><thead><tr><th>Reference model</th><th>Compared model</th><th>Mean (mm)</th><th>Standard deviation (mm)</th><th>RMSE (mm)</th></tr></thead><tbody><tr><td rowspan="2">34 points</td><td>Canon</td><td>11</td><td>31</td><td>93</td></tr><tr><td>Redmi</td><td>6</td><td>18</td><td>54</td></tr></tbody></table>
<figure><img src="image_17.png" /><figcaption>Figure 11. Histograms of C2C distances for Canon model (left) and Redmi one (right)</figcaption></figure>

## 4.2. Relative comparison between Canon and Redmi

CloudCompare software allows making a relative comparison between two models of point clouds. Therefore, the achieved models using Agisoft Metashape were compared by computing cloud-to-cloud distances (C2C). Since the Redmi model was found more accurate than the Canon one, it was selected as a reference, while the Canon model as a compared model. As shown in Table 3, the mean and the standard deviation values of cloud-to-cloud

distances were 2.25 cm and 2.7 cm, respectively, and the RMS value was 3.15 cm.

The histograms shown in Fig. 12 indicate that for 90% of points, the mean of C2C distances is under 4.2 cm, while it is less than 15.17 cm for 99% of points are less than 15.17 cm. Fig. 13 is a graphical representation of the C2C distances between the reference and compared point clouds, where the blue area indicates a lower distance (less than 5 cm), the green area presents the distances around 12 cm.

<figure><img src="image_18.png" /><figcaption>Figure 12. Histograms of C2C distances of Canon camera using Redmi phone camera as a reference model</figcaption></figure>
<figure><img src="image_19.png" /><figcaption>Figure 13. C2C distances of Canon and Redmi relative comparison. Blue indicates low distances</figcaption></figure>

<table><caption>Table 3. Achieved statistical results of C2C distances for relative comparison between Redmi as a reference and Canon as a compared model</caption><thead><tr><td>Reference</td><td>Compared</td><td>Mean (mm)</td><td>Standard deviation (mm)</td><td>RMSE (mm)</td></tr></thead><tbody><tr><td>Redmi</td><td>Canon</td><td>22</td><td>27</td><td>35</td></tr></tbody></table>

### 4.3. *Bundle block without using CPs*

The self-calibration proposed by Agisoft Metashape allows automatic extraction of the tie points without any CPs before the external and internal orientation was computed from them (tie points). The obtained point clouds models were controlled by scale bars. The models were extracted with the local coordinates system (Merchich/North of Morocco), which were compared to the aligned reference points using iterative closest points (ICP) before computing C2C distances. The 34 CPs taken by the total station were considered as a reference model. The results of the statistical parameters are

summarised in Table 4. The mean value of the Redmi was always better (11 mm) than that of the Canon (21 mm). The standard deviation and RMS of the Redmi (32 mm and 94 mm, respectively) were less than of the Canon (60 mm and 176 mm respectively), and that means that the residuals of Canon were more significant than that of the Redmi. As shown in Fig. 14, over 73% of the points have a mean of C2C distances within 10 cm for the Redmi camera, while for the Canon camera, 85% of points have a mean of C2C distances that is under 22 cm for the Canon camera.
<table><caption>Table 4. obtained statistical results of C2C distances between compared models (without using CPs) and point clouds of the total station as a reference</caption><thead><tr><th>Reference model</th><th>Compared model</th><th>Mean (mm)</th><th>Standard deviation (mm)</th><th>RMSE (mm)</th></tr></thead><tbody><tr><td rowspan="2">34 points</td><td>Canon</td><td>21</td><td>60</td><td>66</td></tr><tr><td>Redmi</td><td>11</td><td>32</td><td>70</td></tr></tbody></table>

<figure><img src="image_20.png" /></figure>

<figure><img src="image_21.png" /><figcaption>Figure 14. Histograms of C2C distances for Canon model (left) and Redmi one (right) without using CPs</figcaption></figure>

## 4.4. Effect of the number of CPs

In order to study the effect of the number of CPs and their distribution on the accuracy of the results, several tests have been conducted. Each test has given a reduced number of CPs. Combinations of 10, 8, 6, and 4 CPs have respectively been tested. Agisoft Metashape Professional software has been used to obtain the five models corresponding to the different combinations above. The CPs were distributed, as shown in Fig. 5. The obtained 3D models of each set

of points was compared into CloudCompare software to the laser total station model, which is used as a reference model. The achieved results involving accuracies, mean values, and standard deviation of C2C distances are presented in Table 5.

The results suggested that both cameras exhibited stable means distances and standard deviation, as shown in Fig. 15 and 16 for the models obtained using CPs. Redmi models yielded accurate results (under 6 mm), better than Canon for all scenarios.

<table><caption>Table 5. Statistical results of the models as a function of CPs number</caption><thead><tr><th rowspan="2">CPs number</th><th colspan="3">Canon</th><th colspan="3">Redmi</th></tr><tr><th>Mean (mm)</th><th>SD (mm)</th><th>RMS (mm)</th><th>Mean (mm)</th><th>SD (mm)</th><th>RMS (mm)</th></tr></thead><tbody><tr><td>0</td><td>21</td><td>60</td><td>66</td><td>11</td><td>32</td><td>70</td></tr><tr><td>4</td><td>11</td><td>34</td><td>47</td><td>5</td><td>16</td><td>42</td></tr><tr><td>6</td><td>10</td><td>32</td><td>44</td><td>5</td><td>16</td><td>35</td></tr><tr><td>8</td><td>10</td><td>31</td><td>39</td><td>6</td><td>17</td><td>31</td></tr><tr><td>10</td><td>10</td><td>31</td><td>39</td><td>6</td><td>17</td><td>32</td></tr></tbody></table>
<figure><img src="image_22.png" /><figcaption>Figure 15. Graph of mean variation as a function of CPs number</figcaption></figure>

<figure><img src="image_23.png" /><figcaption>Figure 16. Graph of Standard deviation variation as a function of CPs number</figcaption></figure>

5. DISCUSSION AND CONCLUSION

This paper presented an evaluation of the accura-
cy of two solutions for low-cost image-based 3D
modeling of the Marinid Royal Necropolis in Fez.
Redmi Smartphone camera and Canon DSLR camera
have been used through different configurations,
with or without CPs collected by a total station. The
aim was to investigate the impact of many parame-
ters, such as camera type and the proposed bundle

block adjustment solutions. The 3D models were
obtained using Agisoft Metashape professional
software and were compared to a set of CPs.

The results indicate that the models obtained us-
ing CPs were generally more accurate, with mean
values of the C2C distances ranged between 5 mm
and 21 mm. When using 12 CPs, the highest accurate
model corresponded to the smartphone camera (5
mm), which results in a mean C2C distance equals to
6 mm mean. Otherwise, when four or more CPs
were used, the outcomes indicated that the accuracy
was stable and showed almost no changes. The
smaller mean value of the C2C distances corre-
sponded to 5 mm, and it was obtained when four or
six CPs and the Redmi camera were used. Although
the challenging task of CPs surveying and marker
location on such deteriorated historical heritage, ex-
plains the increase in standard deviation values, the
results were satisfactory.

The non-use of CPs has, as expected, negatively
affected the accuracy of the obtained 3D models for
both cameras. This is because of the known coordi-
nates provided by CPs, which ensure that any points
in the model correspond accurately with the real 3D
coordinates. The only thing that helped the software
to control the 3D model was the scale bars. In spite
of that, the accuracies were acceptably close to the
obtained ones by using CPs. They were ranging be-
tween 11 mm and 21 mm. In this case again, the

smartphone camera, with an 11 mm C2C mean dis-
tance, was more accurate than the DSLR camera.

After analyzing the results obtained from this case of study, it can be stated that 3D modeling of historical heritage using the smartphone cameras instead of the DSLR cameras is reliable, stable, and effective for many reasons such as accuracy, cost, and availability of instruments. Therefore, this solution can be an optimal close-range low-cost alternative. For obtaining more accurate results, the use of at least 4 CPs is still recommended for a facade of approximately 60 m². In the case of non-availability of a total station for CPs surveying, the use of a scale bar is widely recommended. The working distance between the smartphone camera and the captured monument is relative to the size of the monument. The angle of view should be adapted so that the monument occupies the maximum possible of the captured image.

ACKNOWLEDGEMENTS

The authors would like to thank Messrs. Sabouny Abdessamad & El Amrani Khalid for providing the
necessary equipment and personnel to carry out the measurements with the total station.

REFERENCES

Abdel-Bary Ebrahim, M. (2012) Using digital close-range photogrammetry as a QA/QC tool in construction: practical cases, *Survey Review*, 44(326), pp. 175-180. doi: 10.1179/1752270612Y.0000000007.

Agisoft, L. L. C. and R., S. P. (2018) Agisoft PhotoScan User Manual - Professional Edition, Version 1.4, p. 127.

Ahmad Fuad, N. et al. (2018) Comparing The Performance Of Ppoint Cloud Registration Methods For Landslide Monitoring Using Mobile Laser Scanning Data, *ISPRS - International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences*, XLII-4/W9, pp. 11-21. doi: 10.5194/isprs-archives-XLII-4-W9-11-2018.

Al-Ruzouq, R. and Abu Dabous, S. (2017) Archaeological Site Information Modelling and Management Based on Close-Range Photogrammetry and GIS, *Conservation and Management of Archaeological Sites*, 19(3), pp. 156–172. doi: 10.1080/13505033.2017.1343061.

Altman, S., Xiao, W. and Grayson, B. (2017) Evaluation Of Low-Cost Terrestrial Photogrammetry For 3D Re-construction Of Complex Buildings, *ISPRS Annals of Photogrammetry, Remote Sensing and Spatial Information Sciences*, IV-2/W4, pp. 199–206. doi: 10.5194/isprs-annals-IV-2-W4-199-2017.

Altuntas, C., Hezer, S. and Kırlı, S. (2017) Image Based Methods For Surveying Heritage Of Masonry Arch Bridge With The Example Of Dokuzunhan In Konya, Turkey, *Scientific Culture*. Zenodo, 3, pp. 13–20. doi: 10.5281/ZENODO.438183.

Arayici, Y. (2007) An approach for real world data modelling with the 3D terrestrial laser scanner for built environment, *Automation in Construction*, 16(6), pp. 816–829. doi: 10.1016/j.autcon.2007.02.008.

Boochs, F. et al. (2007) Low-Cost Image Based System For Non-Technical Experts In Cultural Heritage Documentation And Analysis, XXI International CIPA Symposium, AntiCIPAting the future of the cultural past, 01-06 October, 2007 Athens, Greece, ISPRS Archives – Volume XXXVI-5/C53, 2007, p. 6.

Centre, U. W. H. (2020) *Medina of Fez, UNESCO World Heritage Centre*. Available at: http://whc.unesco.org/en/list/170/ (Accessed: 10 April 2020).

Denis, M. (2019) 39+ Smartphone Statistics You Should Know in 2019, *Review42*, 30 August. Available at: https://review42.com/smartphone-statistics/ (Accessed: 28 May 2020).

Dhonju, H. K. et al. (2017) Feasability Study Of Low-Cost Image-Based Heritage Documentation In Nepal, *ISPRS - International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences*, XLII-2/W3, pp. 237-242. doi: 10.5194/isprs-archives-XLII-2-W3-237-2017.
Dominici, D., Alicandro, M. and Massimi, V. (2017) UAV photogrammetry in the post-earthquake scenario: case studies in L'Aquila, *Geomatics, Natural Hazards and Risk*. Taylor & Francis, 8(1), pp. 87-103. doi: 10.1080/19475705.2016.1176605.

Elkhrachy, I. (2019) Modeling and Visualization of Three Dimensional Objects Using Low-Cost Terrestrial Photogrammetry, *International Journal of Architectural Heritage*, pp. 1-12. doi: 10.1080/15583058.2019.1613454.

Fioretti, G. et al. (2020) Study and Conservation of the St. Nicola's Basilica Mosaics (Bari, Italy) by Photogrammetric Survey: Mapping of Polychrome Marbles, Decorative Patterns and Past Restorations, *Studies in Conservation*, 65(3), pp. 160-171. doi: 10.1080/00393630.2019.1614270.

Girardeau-Montaut, D. (2011) Cloud Compare-Open Source Project; OpenSource Project: Grenoble, France.
GSM Association (2020) The Mobile Economy 2020. GSMA HEAD OFFICE.

Haukaas, C. and Hodgetts, L. M. (2016) The Untapped Potential of Low-Cost Photogrammetry in Community-Based Archaeology: A Case Study From Banks Island, Arctic Canada, *Journal of Community Archaeology & Heritage*. Routledge, 3(1), pp. 40-56. doi: 10.1080/20518196.2015.1123884.

Hou, L. et al. (2014) Combining Photogrammetry and Augmented Reality Towards an Integrated Facility Management System for the Oil Industry, *Proceedings of the IEEE. Proceedings of the IEEE*, 102(2), pp. 204-220. doi: 10.1109/JPROC.2013.2295327.

Jones, C. A. and Church, E. (2020) Photogrammetry is for everyone: Structure-from-motion software user experiences in archaeology, *Journal of Archaeological Science: Reports*, 30, p. 102261. doi: 10.1016/j.jasrep.2020.102261.

Kersten, T. P. and Lindstaedt, M. (2012) Image-Based Low-Cost Systems for Automatic 3D Recording and Modelling of Archaeological Finds and Objects, in Ioannides, M. et al. (eds) *Progress in Cultural Heritage Preservation*. Berlin, Heidelberg: Springer Berlin Heidelberg (Lecture Notes in Computer Science), pp. 1-10. doi: 10.1007/978-3-642-34234-9_1.

Kwoczynska, B., Sagan, W. and Dziura, K. (2016) Elaboration and Modeling of the Railway Infrastructure Using Data from Airborne and Mobile Laser Scanning, in *2016 Baltic Geodetic Congress (BGC Geomatics)*. *2016 Baltic Geodetic Congress (BGC Geomatics)*, pp. 106-115. doi: 10.1109/BGC.Geomatics.2016.28.

Leica, G. (2008) Leica TPS1200+ User Manual.

Lerma, J. L. et al. (2010) Terrestrial laser scanning and close range photogrammetry for 3D archaeological documentation: the Upper Palaeolithic Cave of Parpalló as a case study, *Journal of Archaeological Science*, 37(3), pp. 499-507. doi: 10.1016/j.jas.2009.10.011.

Lerones, P. M. et al. (2010) A practical approach to making accurate 3D layouts of interesting cultural heritage sites through digital models, *Journal of Cultural Heritage*, 11(1), pp. 1-9. doi: 10.1016/j.culher.2009.02.007.

Les tombeaux des mérinides à Fès (2016) *Les voyages de Seth et Lise*, 6 November. Available at: http://www.sethetlise.com/tombeau-des-merinides-a-fes.html (Accessed: 4 June 2020).

Liritzis, I. et al. (2020) Archaeometry: An Overview, *Scientific Culture*. Zenodo, 6, pp. 49-98. doi: 10.5281/ZENODO.3625220.

Liu, R. et al. (2009) Construction Urban Infrastructure Based on Core Techniques of Digital Photogrammetry and Remote Sensing, in *2009 International Forum on Information Technology and Applications. 2009 International Forum on Information Technology and Applications (IFITA)*, Chengdu, China: IEEE, pp. 536-539. doi: 10.1109/IFITA.2009.287.

Mulahusić, A. et al. (2020) Comparison and analysis of results of 3D modelling of complex cultural and historical objects using different types of terrestrial laser scanner, *Survey Review*, 52(371), pp. 107-114. doi: 10.1080/00396265.2018.1528758.

Murtiyoso, A. et al. (2018) Multi-Scale and Multi-Sensor 3D Documentation of Heritage Complexes in Urban Areas, *ISPRS International Journal of Geo-Information*, 7(12), p. 483. doi: 10.3390/ijgi7120483.

Peña-Villasenín, S., Gil-Docampo, M. and Ortiz-Sanz, J. (2017) 3-D Modeling of Historic Façades Using SFM Photogrammetry Metric Documentation of Different Building Types of a Historic Center, *International Journal of Architectural Heritage*, 11(6), pp. 871-890. doi: 10.1080/15583058.2017.1317884.

Prokop, A. (2008) Assessing the applicability of terrestrial laser scanning for spatial snow depth measurements, *Cold Regions Science and Technology*, 54(3), pp. 155-163. doi: 10.1016/j.coldregions.2008.07.002.

Putra, E. Y., Wahyudi, A. K. and Dumingan, C. (2016) A proposed combination of photogrammetry, Augmented Reality and Virtual Reality Headset for heritage visualisation, in *2016 International Conference on*
ence on Informatics and Computing (ICIC). 2016 International Conference on Informatics and Computing (ICIC), pp. 43–48. doi: 10.1109/IAC.2016.7905687.

Remondino, F. et al. (2012) Low-Cost and Open-Source Solutions for Automated Image Orientation – A Critical Overview, in Ioannides, M. et al. (eds) *Progress in Cultural Heritage Preservation*. Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 40–54. doi: 10.1007/978-3-642-34234-9_5.

Shanoer, M. M. and Abed, F. M. (2018) Evaluate 3D laser point clouds registration for cultural heritage documentation, *The Egyptian Journal of Remote Sensing and Space Science*, 21(3), pp. 295–304. doi: 10.1016/j.ejrs.2017.11.007.

Stylianidis, E. and Remondino, F. (eds) (2016) 3D recording, documentation and management of cultural heritage. Caithness, Scotland, UK: Whittles Publishing.

Tsiafaki, D. and Michailidou, N. (2015) Benefits And Problems Through The Application Of 3D Technologies In Archaeology: Recording, Visualisation, Representation And Reconstruction, *Scientific Culture*. Zenodo, 1, pp. 37–45. doi: 10.5281/ZENODO.18448.

Waagen, J. (2019) New technology and archaeological practice. Improving the primary archaeological recording process in excavation by means of UAS photogrammetry, *Journal of Archaeological Science*, 101, pp. 11–20. doi: 10.1016/j.jas.2018.10.011.

Zhang, J. and Hu, Q.-W. (2018) A Visualization Progress Management Approach of Bridge Construction Based on Mixed Panoramic and Oblique Photogrammetry, in *2018 26th International Conference on Geoinformatics*. 2018 26th International Conference on Geoinformatics, Kunming: IEEE, pp. 1–6. doi: 10.1109/GEOINFORMATICS.2018.8557155.