FAST AND ACCURATE DOCUMENTATION OF ARCHITECTURAL HERITAGE WITH LOW-COST SPHERICAL PANORAMIC PHOTOGRAPHS FROM 360 CAMERAS

: This research wants to show the possibility of quickly making high-quality photogrammetric models using 360-degree panoramic photographs, but made using low-cost, single-shot cameras. Currently there is a wide variety of single shot cameras, in which the shape of the camera can vary according to the number of lenses that it incorporates in the camera mount, but this will directly affect the quality of the photography. result and in the price of the team. The fundamental characteristic of single-shot cameras is that they are capable of capturing a 360-degree panoramic photo at the very moment of shooting, which allows to greatly reduce data collection times compared to the normal method of taking photos spherical. This occurs thanks to the fact that they have several lenses that allow them to capture everything that happens around them in a fraction of a second. In addition, the composition times of the final image are also reduced, since they incorporate a processor that allows them to stitch the panorama automatically. These features make data capture very fast, greatly reducing work times. To demonstrate the efficiency of this equipment, several tests have been carried out in different spaces, interior and exterior, of the Cathedral of Plasencia. For each data set, the object documentation was performed twice. The first time it was done with a Faro Focus 3D laser scanner to generate the highly metrically accurate control model. And the second time a Xiaomi Mi Sphere camera was used to generate the comparison model. The photogrammetric models were processed with the Agisoft Metashape software and the comparison of the models in the CloudCompare software. The results obtained in these comparisons have been very


STATE OF THE ART
The normal method of performing photogrammetry is by making collections of photographs completely covering the object to be documented, but for some time in heritage documentation, threedimensional models have been created by photogrammetry using 360° panoramic images (De Amorim et al., 2013;Fangi & Nardinocchi, 2013;Pisa et al., 2011) or equirectangular photographs ( Figure 1). These are generated from various photographs captured with cameras and fisheye or wide angle lenses. These, depending on the objective of the camera, require the capture of several photographs from the same position, but at different horizontal and vertical angles until they cover the entire environment around the camera. For this it is necessary to use a spherical or nodal panoramic ball joint. The generated spherical photographs will have a high pixel resolution since they are the result of the sum of all the captured photographs. For example, a spherical photograph captured with a 12megapixel Nikon D700 camera and with a 14mm objective would be made up of 18 photographs, 8 of them taken at 30º with respect to the horizontal axis Taken every 45º, another 8 taken at -30º with respect to the horizontal axis Made every 45º, and the sphere would be closed with the upper photograph (Zenit) and the lower photograph (nadir). All these photographs have to be subsequently processed by analyzing all the homologous points between them in order to perform the stitching and result in a photograph of approximately 20,000 x 10,000 pixels, which is equivalent to 200 Mpx.
These spherical photographs will have a very good resolution, which will allow models of great metric and color precision to be obtained. Traditional spherical photography requires data collection time, digital development time and data processing time to obtain the final photograph. In our case we seek the use of single-shot cameras, since the advantage of the photographs obtained with these machines is the speed of data capture and processing compared to the traditional spherical panorama. One of the advantages of low-cost spherical photography over rectilinear photography is that fewer photos will need to be captured. Each spherical photograph would be equivalent to 6 normal photographs, since it can be broken down into the 6 faces of a cube ( Figure 2).  For each one of these spaces, two data collection tests have been carried out, on the one hand, the control model made with a 3d laser scanner and, on the other hand, the model obtained with the low cost spherical panoramic camera.

Material used
To obtain the control model, a Faro Focus 3D spherical laser scanner was used ( Figure 4). This equipment is capable of capturing up to 900,000 points per second and spherical images, which makes it possible to obtain color scans in approximately 6 minutes. This team is not able to join the scans in real time since they do not have hardware prepared for it, so all the scans made will appear in a local coordinate system in which the center of the scan or position of the scanner will be the point zero. Therefore, it is necessary to later align or register all the scans with each other and thus achieve a unique point cloud model.
To capture photographs, a Xiaomi Mi Sphere 360 camera ( Figure  5) was used, equipped with two 190° wide-angle fisheye lenses with an aperture of F2.0 and two mirrors. It has a dual 1/2.3" Sony image sensor. The size of the panoramic photographs obtained is 23.88 megapixels (6912x3456), 7K resolution.

Control model (model A):
The Tiled Courtyard and Old Cathedral Cloister: Three scans were made, without color capture, in the Tiled Patio and four scans, without color capture, in the Cloister of the Old Cathedral. The scans have been carried out under the exterior profile of more than 20 m with the capture of data from the complete sphere. The resolution of the scan has been at 1/5 and the quality at 2x. The total time of each scan has been 2 minutes and 10 seconds, resulting in a mesh density of approximately one point every 6 mm at a distance of 10 m. The resulting scans each contain approximately 44 million points, of which 1/3 are lost in the sky zone.
Interior of the New Cathedral: 13 scans have been carried out, without color capture, distributed in this space. The scans have been carried out under the Interior profile of more than 10 m with the capture of the complete sphere. The resolution of the scan has been 1/4 and the quality 2x. The total time of each scan has been 2 minutes and 47 seconds, resulting in a mesh density of approximately one point every 6 mm at a distance of 10 m. The resulting scans each contain approximately 44 million points.

Photogrammetric model (model B):
The spherical photographs have been taken with the Xiaomi Mi Sphere Camera. The resolution of each of the photographs is 6912 x 3456 pixels, which is equivalent to 23.9 Mpx. The capture time of each spherical photograph has been less than 1 second, both in the exterior spaces and in the interiors (there was sufficient lighting so that it was not necessary to set an exposure time).
The distribution of the cameras ( Figure 6) has been as follows.
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 For the Tiled Courtyard, 56 spherical photographs have been taken at an approximate height of 3 meters above the ground. For the Cloister of the old Cathedral, 25 spherical photographs have been taken at an approximate height of 3 meters above the ground. And for the interior of the New Cathedral, 72 spherical photographs have been taken at an approximate height of 3 meters above the ground.

3D modeling
2.4.1. Control model: the laser scans have been processed with the Faro Scene software, for which scan by scan has been aligned using control points until a complete cloud with all the scans is obtained as a result. Subsequently, an alignment with fine adjustment was carried out using the cloud to cloud method. A mesh of the cloud of points has been made (Figure 7) to be able to use it later in the comparison.

Photogrammetric model:
The spherical photographs have been processed with the Agisoft Metashape software to obtain a solid model with texture. In the latest versions of the software the possibility of using spherical photographs has been implemented. For this, the usual workflow described below has been followed. Once the photographs have been imported, the calibration data of the cameras have been modified to spherical type. Next, the dispersed cloud that defines the geometry of the object has been calculated by means of the orientation of the cameras, finding their positions in space. The next step has been the calculation of the triangle mesh using depth maps, which yields a higher quality mesh definition. The quality of these models has been made in Ultra High quality to achieve the best definition on the surfaces. To scale the models, several markers have been introduced to which the coordinates extracted from the point cloud model obtained with the laser scanner have been applied.
At first glance and reviewing the confidence models of the generation of the models (Figure 8) it can be observed that the reconstruction of the meshes has been quite exact and precise, yielding worse values in the highest areas or with less redundancy due to lack of data. This could have been resolved if more photographs had been taken at different heights by using a telescopic pole. Tiled Courtyard (bottom right).

Comparative analysis
In order to know metrically how precise the geometry obtained from the spherical photographs with low-cost cameras is, the comparison of both meshes is made with the CloudCompare software by calculating the deviation between the two surfaces and taking those of the models as reference control obtained with the laser scanner (model A). To do this, both models are located in the same position and aligned with each other, for which the study model (model B) is moved and rotated until it coincides with the position of the control model (model A). The finer adjustment is then performed using the action "Finely registers already (roughly) aligned entities (clouds or meshes)" (Figure 9). In this step it is necessary to indicate various parameters and determine which model is the reference model (model A) and which is the one that is adapted (model B). This comparison is shown visually by means of a color scale, from coldest to warmest, on the object and a C2M histogram ( Figure 10). In all three cases the result is quite similar and shows that both surfaces, the control surface and the surface generated from the spherical photographs, fit quite well.
For example, in the case of the Cloister of the Old Cathedral, the histogram shows 1,003,792 values of comparison classified into 256 classes. A quick check shows that very few of these (26) have errors of less than ±6.5 mm. But they are also the ones that gather the most values; that is, most of the surface of the mesh. The rest of the classes (230) hardly have any representation on the surface of the mesh, so their errors are not very significant and are mainly reduced to the areas where pots with shrubs were located or the faces of the buttresses in the corner of the cloister.
The interior space of the New Cathedral or the Tiled Courtyard are spaces of greater height, and it is in those high points where the highest deviation errors have been recorded.

CONCLUSIONS
This work demonstrates the great effectiveness of low-cost spherical panoramic cameras in heritage documentation, both indoors and outdoors. The main advantage is that they are cameras capable of capturing everything that is around them at the moment of shooting, and above all the speed in data collection and in the stitching of the panorama, since it saves a lot of time compared to spherical panoramic photographs obtained with the traditional method. The main disadvantage is the resolution of the photos since, for example, the low-cost camera used in the test generates a 23.8 Mpx photo compared to the 200 Mpx that can be obtained with a Full Frame SLR camera, which influences the detail of the final model. But this disadvantage can be eliminated by increasing the number of photographs, and even in outdoor spaces or high-altitude areas, taking these at different heights by using auxiliary means such as telescopic poles and controlling the shot through the camera's Wi-Fi connection.