Problems of acquisition and postprocessing of 3D scans of large architectural objects

The article presents the 3D scanning methodology for large architectural objects, using stationary laser scanners in case of objects of cultural heritage. The developed methodology was tested in the field during 3D scanning of architectural monuments of the city of Samarkand in Uzbekistan. Particular attention is paid to technical and organisational problems of the 3D scanning process of architectural objects which appeared during the Second Scientific Expedition of the Lublin University of Technology to Central Asia. Next, methods for obtaining digital models adequate to the assumed archiving goals and dissemination of cultural heritage of Central Asia are presented. The described case study is, according to the authors, representative for 3D scanning of much-frequented architectural objects being monuments of great importance for cultural heritage.


Introduction
3D scanning of large architectural heritage objects is associated with many aspects that go beyond technical implementation of the scan [1]. Study [2] is a guide that provides a lot of information to perform effective 3D laser scanning of cultural heritage objects. The authors of [3] describe effective methods for the integration of laser and photogrammetric data on the example of various architectural objects. In [4] and [5] the meaning of realistic modelling of historical constructions for the assessment of the safety status using the 3D laser scanner technology is described. Reference [6] investigates the use of 3D scanning in the aspect of the accuracy of generated surface of the object, paying attention to efficiency and time-consuming process. In [7], a 3D scan is described using the Leica HDS 6000 scanner at the Hatshepsut Temple in Deir el-Bahari, Egypt, whose 3D acquisition process and photographic documentation lasted 3 weeks. Finally, [8] presents the use of laser 3D scanning of small-size objects to create their copies.
The studies reviewed, however, lack the methodology that would effectively carry out the digitisation process during research expeditions. On such occasions, one should cooperate with people who have information about cultural heritage objects, who know local communities and the relations within them, but who have no knowledge about various technical aspects of computer 3D technology.
The aim of the article is to present a coherent methodology of processing data from 3D scanning of large architectural objects, which will be useful during expeditions aimed at digitisation in the field. Main determinants of the methodology developed include: proper identification of the client's needs and the necessary personnel, limited time for performing the scan, availability of the object to be scanned and minimisation of the costs of digitalisation of the object.
The methodology in question was verified during the scanning of architectural objects of the city of Samarkand in Uzbekistan. Developed stages are illustrated with examples of 3D scans made at the Shahi Zinda Necropolis.

The nd scientific expedition
At the turn of May and June 2018 employees of the Institute of Computer Science organised and partook in the 2 nd Scientific Expedition of the Lublin University of Technology to Central Asia.
The main purpose of the expedition was to make 3D scans of selected architectural objects of the city of Samarkand in Uzbekistan, namely: Registan, Shahi Zinda, Gur-e Amir mausoleum and Ulugh Beg observatory, as well as unique murals at the Afrasiab Museum. No less important was the second goal of the expedition, i.e. to present to employees representing Uzbekistan museum outlets a compendium of IT knowledge related to the modern use of computer 3D technologies for documenting and creating virtual museum exhibitions. The latter goal was achieved by giving the International Practical-Scientific Seminar "3D Technologies in Museology". This move was aimed at predefining the expectations of a scanning team and eliminating potential misunderstandings.
Direct contacts with the authorities of Samarkand State University (SamSU) and the Director of the Scientific-Practical Museum-SamSU provided convenient access to facilities. The talks held prior to the expedition helped its participants to realise the time limit of 3D scanning due to the size of objects and the inability to close them to the visitors. These factors made it necessary to act and prepare a precise 3D scanning methodology, which will be geared for minimising the 3D scanning time and maximising the amount and quality of the data collected.
During a 3-days stay in Samarkand, 3D scans of 15 objects were made, which required the performance of 120 partial scans and the collection of data with a total volume of nearly 70 GB. One of the objects digitised was the Shahi Zinda complex.
The Shahi Zinda complex is located on the northern outskirts of Samarkand, on the edge of Afrasiab Hill, which is a huge archaeological site. It is composed of 11 mausoleums located along the street, connected in a series with each other in the 14 th and 15 th centuries [9]. One of the most visited buildings is the Mausoleum of Kussam ibn Abbasa cousin of the prophet Muhammad. In 2001, together with other ancient buildings of Samarkand, this complex was included on the UNESCO World Heritage List.

Methodology of 3D-scanning large architectural objects
The developed methodology refers to the 3D scanning process itself, as well as the subsequent processing of the obtained data. The methodology steps are presented in Figure 1.

Scanning device
During the expedition, the Faro Focus X330 scanner was used (Fig. 2). The scanner uses LIDAR (Light Detection and Ranging) technology with the use of an infrared laser to determine the position of 3D surface points around the scanner. The scanner also makes photo documentation of the object in order to impose colour information on the obtained results. The scanner is a stand-alone device and records data to a flash drive [10]. Parameters regulating the operation of the scanner and their impact on the acquisition process are included in Table 1.

Stage S1: Planning the setting
The 3D scanner working in laser technology is able to measure only the surfaces of the object to which the laser beam reaches directly. Architectural objects usually have various shapes and details that can obscure some surfaces when observed from a particular point of the scanner setting. It is therefore necessary to repeatedly scan the object from different scanner positions relative to the object, in order to reach all the surfaces of the object (Fig. 3a). Large flat surfaces (e.g. walls) should be scanned from the optimal distance. Too large distance increases the positioning errors of the collected points and worsens recognition of details. At too close distance, the surface is scanned at a significantly changing angle, resulting in an uneven distribution of surface points (Fig. 3b). The exact measure of optimal distance depends on scanner parameters, shape of the object, and desired purpose of a scan. I. e. scanner measuring distance with a rotational resolution of 0,009° placed 5m from the wall will measure spots with a ~0.8mm distance to each other in the centre of scanned surface, while for scanner placed 50m from the wall the distance between spots rises to ~1cm. On the other hand, the first position causes significantly uneven spread of the measured points while for the second position the difference is negligible. It is equally important to plan the position of the scanner so that individual scans contain a significant amount of data about overlapping areas of the scanned object. This will ensure correct operation of algorithms that adjust partial scans. The detailed assessment of details of the object allows to determine if the scaling matching algorithms will be able to position individual partial scans into one. Otherwise, one should use markers in the form of balls, which are spaced in the object.
If it is not possible to set the scanner at the optimum point of scanning the object's surface, deficiencies should be compensated for by increasing the density of the acquired data at the expense of extending the scanning time. The increase in scanning time can be minimised by limiting a more accurate scan only to a sensitive area.
The planning of the scanner settings should also consider the definition of the appropriate naming of individual partial scans. It is recommended to include in the nomenclature division into groups corresponding to particular areas of scanning. Such action is important in order not to "lose" partial scans, especially if there is a need to perform additional scans at a later time.

Stage S2: Scanning
Scanning is carried out in accordance with positions of the scanner and parameters set in the previous step. It is important to verify the correctness of the previously determined parameters. This can be achieved by making a low-resolution scan (saving time). At this stage, it may also be necessary to modify the set schedule, due to unforeseen circumstances, e.g. temporary unavailability of the area.
In the case of scanning the open space, the scan duration can be slightly reduced by eliminating the scanning of the sky area. An important step is to verify the correctness of the scan, e.g. check whether during the scanning the object was not obstructed by an obstacle, which would require repetition of digitisation from that particular scanner position.
In the case of significant distances from the object, photographic documentation may have insufficient resolution. It is advisable to make such documentation using professional photographic equipment, which will allow for subsequent improvement of the colour quality of the object model.
An important aspect is the backup of the data collected during the scan.

Stage S3: Pre-processing
In the case of scanning the area of an object with a complicated shape, it is uncertain whether the planned layout of the scanner's position and parameters will ensure the desired final result. The answer to this question can be obtained by pre-processing and matching the subset of scans. Such processing can be carried out in two ways: • Use of on-site software and hardware. • Use of remote processing.
First solution allows to get a result in a relatively short time and perform additional scans in the same session. However, it requires a portable computer with high computing power (multi-core processor and 32 GB RAM) and access to the power source at the scanning location.
During the second solutions scans of sensitive areas are sent to a team with appropriate equipment and software that processes scans independently of the team conducting further scans. Then, the results are passed to the field team, which decide whether to carry out any additional scans. Unfortunately, this method requires data channels with high bandwidth. It is also possible to use a combined method, i.e. to process data provided on flash memories to a stationary processing station (e.g. located in a hotel). This method is effective for a scan session of a given area for several days.

Stage S4: Full processing of scans
Each of the partial scans is a cloud of 3D points stored in a coordinate system with the centre located in the scanner position. To merge them into a common coordinate system, a few steps need to be done to process these points.

Pre-processing of individual scans.
The first step in data processing is to use filters to improve or eliminate misplaced points. The following filters are distinguished: • Stray pointto remove points significantly protruding from the points in their surroundings and smaller artefacts.
• Dark pointfor eliminating points occurring from reading reflections of low brightness (dark points).
In the second step, points outside the area of interest are eliminated, e.g. a captured fragment of a building nearby. In the scanning process, random objects are also registered, e.g. people, animals or vehicles passing by and causing disturbances in the point cloud. Such situations are partially compensated by firmware of the scanner, on the basis of several measurements of the same position. Nevertheless, the point cloud can contain so-called "ghosts", or fragments of moving objects (Fig.  4). Manual point cloud editing tools can be used to remove them.

Matching scans.
Matching the scans to each other, so that they form a view of the whole object is performed by means of algorithms that look for correspondences between individual scans. On their basis, transformations of coordinate systems to common coordinates are calculated. This can be done on the basis of finding similarities in the details of the scanned object, or by searching for the position of the markers (if used). The operator can assist the matching algorithms by manually pointing out the corresponding points on the scans.
The support for matching the positions of partial scans can be additional data obtained from the scanner sensors, such as a GPS, inclinometer, or compass. They allow coarse positioning of scans relative to each other, which greatly facilitates the further adjustment process. Figure 5 shows a control view after the point cloud matching process.
The process of matching scans is based on the iterative methods (e.g. bundle adjustment [11]). It is advisable to monitor the parameters of the obtained match and, if necessary, repeat the matching with the changed parameters.

Deduplication of the point cloud
Partial scans have a significant amount of data relating to the areas of the object occurring (also on other scans). This redundancy, necessary for the correct adjustment of partial scans, is not recommended in the final point cloud of the object (it significantly and unnecessarily increases the amount of data processed). The step that completes generating the point cloud of the scanned object is, therefore, the deduplication process. The result of this process is to merge the positions of counter-points from different partial scans into one averaged position of a given point (on different scans the same points of the object surface will be slightly different). For example, the deduplication process of a 217 104 260th point cloud reduces the number of points to 123 895 333.

Stage 5: Obtaining the target effects
The point cloud obtained in step 4 contains a significant amount of data, representing the highest accuracy of the mapping available as a result of the scan. However, it is not useful as a target model, in particular when the goal is to obtain effective visualisation of the object [12]. Further processing of the cloud depends on particular needs. Several possible paths can be distinguished, namely: • building a 3D model, • construction of VR visualisation, • documenting objects.

Building a 3D model
As a standard, a 3D mesh model based on the representation of the object surface by triangles is used in applications presenting 3D objects. To obtain such a representation, a triangulation process is used, which can be optimised according to the required level of detail imaging. For example, an object in high detail contains more than 2 million triangles, while for visualisation purposes it should not exceed 100,000 triangles. Simpler models with lower accuracy are usually used in the online media (Fig. 6).

Developing virtual reality visualisation
An often-used method of data presentation is the socalled 360o visualisation that provides omnidirectional images from all scanner positions, creating a kind of virtual reality tour thanks to the ability to display these views using 3D glasses (Fig. 7). A more sophisticated approaches are also undertaken [13,14].

Documenting objects
Laser scanners allow a relatively high precision of positioning individual surface measurement points (position errors are counted in mm) compared to other known high-volume technologies. The point cloud of the object is scaled in metric units corresponding to the actual size of the objects. The right tools allow to make precise measurements of distance, surface area or even curvature [15]. This is especially useful in hard-to-reach places and large objects. The acquired data may thus be a component of the documentation of historical objects.

Problems of applying the developed methodology
At each stage of the presented discussion on the developed methodology there arise problems that require effective resolution.

Planning problems (Stage S1)
The correctness of planning the 3D scanning process requires the prior knowledge of the digitisation goal. As a rule, it is the archiving of a cultural heritage object in combination with its visualisation for dissemination.
Employees of museum outlets usually do not know much about the possibilities of still quite new 3D scanning technology. Therefore, they have no awareness that 3D scanning can help them solve the problems they are currently facing (reconstruction of damaged fragments, renovation planning or detection of changes in objects), they do not report these needs to the scanning technologists. Thus, the problem may arise when there are several potential targets for scanning, but they have not been fully articulated by the contracting authority. As a result of this, a significant reconstruction of the system and scan parameters may be necessary, which may be incompatible with the already implemented schedule (e.g. go beyond the time of making the facility available).

Problems of data acquisition (Stage S2)
The work schedule can be disturbed by a number of factors: • unavailability of a given site, • presence of outsiders, • position of the sun and other light sources.

Unavailability of a given site
At the time scheduled for digitisation, other works are carried out in the area.

Presence of outsiders
The necessity to implement the 3D object scanning process when it is visited by tourists (it is not possible to disable a given scanning site from access to visitors). In this situation, people will move around in the scanning area, disturbing the measurement.

Position of the sun and other light sources
In the case of scanning architectural objects from the outside, the position of the sun in relation to the object and the scanner plays an important role. In extreme cases, too much sun exposure (or artificial lighting, reflections) may prevent scanning. Usually, however, distance measurement due to the use of an infrared laser runs smoothly. However, insolation significantly affects the acquisition of object colours, which takes place using standard photographic technologies. Two cases were distinguished: -In the first case, too bright sunlight causes shadows on the surface of the object, which will then be transferred to the colours of the points. -In the second case, too bright sunlight reflects off the surface of the object towards the scanner, creating reflections. Colours in such areas will be "burnt out" or completely reduced to white.

Processing problems (Stages S3 and S4)
Problems related to data processing will be discussed jointly.

Problems with unwanted objects in the process of acquiring points
Despite the compensation possibilities of the device itself and stray point algorithms, fragments of unwanted objects may appear in the raw point cloud (Fig. 3a).

Problems with unwanted objects in the process of image acquisition
Applying colours to designated 3D points in the event of unwanted objects in the pictures is a more difficult issue to compensate for. The image will be placed on the surface of the target object that it has obscured (Fig. 8).

Problems with access to resources
At the scanning location it is necessary to provide the appropriate class of a mobile computer and a trained technician in the team performing the scan. Alternatively, broadband Internet access is required to transfer data to be processed to the data centre. Both cases can significantly increase the cost of scanning, especially when it is carried out at a considerable distance from the headquarters of the scanning team.

Problems in obtaining target effects (Stage S5)
The problem of obtaining an appropriate quality of the triangle-surface model of the scanned object, when the acquisition process yields, for example, 2.5 billion points, and the maximum computable number of triangles reaches 100 K. There may also be problems with the lack of data that causes the 3D model to fail (e.g. the presence of open doors or windows).

Conclusions
Problems from Stage 1 (section 4.1) can be solved by training museum staff in aspects of 3D technology, through the presentation of the possibilities of technology used on examples of cooperation with other facilitiesseminars and pilot works.
Regarding the problems of Stage 2 (section 4.2), the proposed solution is to rebuild the schedule so as to shift the scan to another time or if it is not possible to plan other additional scanner positions to compensate for the lack of the required scan. Partial compensation of the problem of bystanders is to set the scanner so high above the ground that people approaching it are below the level of the laser beam. In this way, large-size disturbances are limited to the area in the immediate vicinity of the scanner, usually the floor. Also, warnings can be used that discourage people from approaching the scanner, e.g. "Caution, dangerworking laser". Compensation of digitisation at the wrong time can be done by additional photographic documentation in order to obtain uniform colours of the object.
Problems of Steps 3 and 4 (section 4.3)unwanted objects can be solved by manually editing a point cloud to remove them ( Figure 4). Removing an unwanted person in the picture can be achieved by downloading the appropriate image from other scans or photos taken as additional documentation.
Problems from Stage 5 (section 4.4)i.e. an open door in a closed scan space, is solved by covering these with a billboard prepared with additional photos. Processing too large point clouds can be done by their division, processing in batches and then concatenation of meshes generated.