IMAGE MATCHING 3D RECONSTRUCTION TO UNDERSTAND THE VAULTS SYSTEM GEOMETRY

: This paper is part of a research about ribbed vaults systems in French Gothic Cathedrals. Our goal is to compare some different gothic cathedrals to understand the complex geometry of the ribbed vaults. The survey isn't the main objective but it is the way to verify the theoretical hypotheses about geometric configuration of the flamboyant churches in Paris. The survey method's choice generally depends on the goal; in this case we had to study many churches in a short time, so we chose 3D reconstruction method based on image dense stereo matching. This method allowed us to obtain the necessary information to our study without bringing special equipment, such as the laser scanner. The goal of this paper is to test image matching 3D reconstruction method in relation to some particular study cases and to show the benefits and the troubles. From a methodological point of view this is our workflow:

From reading of the Livre de Portraiture by Villard de Honnecourt, a fundamental document for the study of Gothic architecture, we understand how the geometric rules used in the Middle Ages constructions are defined.The vaults system regulates the building of medieval cathedrals, a system in which you can clearly recognize the elements carried by the ribs, whose load-bearing function becomes explicit when the groin vault transforms.The geometry of medieval vault could be originated by two different shapes: the sphere, the domical vault, from which the vaults with domed trend of Aquitaine, and the cylinder, the groin vault, characterized by perimeter semicircular arches and elliptical diagonal arches, from which derives the rib vault of Ile de France.The secret of Gothic buildings is the use of geometrical rules, rather than fixed modules, designed to optimize the construction stage, only the knowledge of these rules will help you to understand these architectures where the figurative outcome is closely related to construction methods.The first Gothic vaults are quadripartite rib vaults on square or rectangular plan.They have curved ridge if they are originated by transformation of the dome or they have horizontal ridge if they are originated by groin vault.The feature of these vaults is to have semicircular diagonal arches and the others are generally pointed arches.The arches can be composed of arcs with the same curvature of the diagonal arch, the keystones can be at the same level (horizontal ridge), or may have different curvatures and keystones placed at different heights (curved ridge).The evolution of quadripartite rib vaults is a more complex rib vault generated by introduction of eight additional ribs (Figure 1) that you can see in the intersection of the nave and transept of the cathedral of Amiens (Figure 2a).This kind of vault spreads with the introduction of additional secondary ribs that you can see in St. Gervais et St Protais (Figure 2b), and evolves to generate strange solutions characterized by hanging keys, like those that it is possible to see in Saint-Eustache (Figure 2c).A Gothic rib vault is composed by a three-dimensional mesh of ribs, which are semicircular arches usually contained in vertical planes, and the webs, that fill the space between the ribs.There are some different ways to construct the rib vaults: the survey has allowed us to compare the theoretical model with the exact configuration of the case studies chosen from among the most meaningful in Paris.

The evolution of ribbed vaults in France
Gothic architecture was first developed in France, so it is there that you can find the greatest number of transitional buildings.The great abbey of St. Denis (1140-44) can be considered the earliest gothic church in France.It is characterized by a quadripartite vault system used to make these Gothic churches larger.In which you can see all the main features of gothic cathedral: the high rib vaults system in the central nave and in the transept that allows to open large windows and to generate the clerestory and the triforium below, thanks to a system of external supports and flying buttresses.
From cathedral of St. Denise the buildings became more complex and the vaults systems too: the quadripartite vaults at St. Denise's nave gave way to sexpartite vaults at Notre Dame de Paris (1163), and, in 1220, the introduction of the first rib vault at Amiens Cathedral.We think that the evolution in Gothic churches design was determined by development of the quadripartite vault.From the so called high Gothic Period to late Gothic, known in France as the flamboyant style, the interiors underwent a drastic simplification by eliminating the capitals of all the pillars and reducing them to plain masonry supports.In flamboyant churches all architectural ornamentation was concentrated in the vaults, the ribs of which formed an intricate network of even more complicated patterns.Flamboyant work is characterized by structural simplicity and lavish ornament.Vaulting ribs and pier arch mouldings of many small elements were often carried unbroken down the piers to the floor, or else were allowed to die on the surface of simple cylindrical piers.Between 1600 and 1628, a second row of chapels was built on the north side including the golden chapel ornamented with painted woodwork (Huisman 1966).The main façade, in classical style, was built in 1616-1620 by Claude Monnard.
The church is composed of three naves and a choir that ends with a pentagonal apse.Twelve chapels are located longitudinally and five others are located around the ambulatory (Figure 5).
The main nave and the transept are characterized by rectangular ribbed vaults, a square vault at the intersection between the nave and transept and a complex system of ribbed vaults in the pentagonal apse.Survey and analysis of the ribbed vault system of St. Gervais et St Protais started from the study of the vaults and their geometric construction process.First we have analysed the rectangular ribbed vaults, with six keystones, that are in the nave and in the transept.They are characterised by three ribs, tiercerons, that start from each pillar.Two of them are the diagonal arches that meet in the vault's main keystone and the others are the secondary ribs that meet in the seven minor keystones.This kind of vault can be considered an evolution of a so called five keystones vaults characterised by three main ribs from pillars, tiercerons, and four secondary ribs, liernes, which link the minor keystones (Figure 1).It is obtained with the introduction of four secondary ribs on longitudinal axis to link the main arches' keystones with the four secondary keystones (Figure 6).The geometry of the main vault, located on the crossing between nave and transept, is quiet the same, in this vault there are eight secondary keystones connected by sixteen minor ribs, liernes (Figure 6).
To construct 3D model based on the theoretical vault construction system we need to recognize which theoretical model we have to consider, because there are some different geometrical constructions for the same type of vault.
We hypothesized that the ridge is curved.If you know the cross section of the vault and the ridge AB, you know the elevations of all the keystones and you can draw all the ribs.For example, to draw the rib D2', you have to extend the D2' line until AB, in point 1'.You have to draw the vertical line from point 1' to determinate point 1''.Turning over the vertical plane for the rib D2' you can determinate the elevation of keystone 2 (Figure 7).We have surveyed the keystones' elevations and we have verified that the ridge isn't horizontal but it is curved.
Following the same methodological path we construct the model of rectangular ribbed vault.

Structure From Motion. 3D model based on image matching 3D reconstruction methods
What is the best way surveying and modeling for this kind of architecture?In recent years it is one of the most common topic of the international meetings, the questions are the comparison between different techniques, Photogrammetry or laserscanning, the estimate of 3D models accuracy and sometimes the advantages from mixed use of more than one survey methods.It's clear that the choice of technique depends on "what" we have to survey and "why".Generally, when it is required a great metric accuracy you have to use conventional Photogrammetry or laser scanning and you can use methods based on computer vision approach to produce textured models which do not have to be metrically accurate.Advances in terrestrial laser scanning technology and digital photogrammetry techniques for creation of building documentation allow you to obtain in a short time a point cloud and to create accurate 3D models.The high costs of data collection and the complex equipment needed often make terrestrial laser scanning not very affordable thus the Close-Range Photogrammetry has been used successfully for documentation of Cultural Heritage for many years.The Photogrammetry traditional workflow consists in Image Acquisition, Camera Calibration and Photogrammetric Modelling Process, the result of this process is a point cloud or a 3D model used for accurate orthophoto production.Traditional softcopy photogrammetric methods require the 3D location and pose of the cameras or the 3D location of ground control points to be known to facilitate scene triangulation and reconstruction, on the contrary the SfM method solves the camera pose and scene geometry simultaneously and automatically, using a highly redundant bundle adjustment based on matching features in multiple overlapping, offset images (Westobya, 2012).There are some different image-based process to obtain 3D model or point clouds based on IT (Image triangulation) (bundle) such as Bundler, Photosynth, Apero, DIM (Dense image matching) such as PMVS, MicMac, Photomodeler scanner or SfM (Structure from motion) such as Autodesk's 123 Catch3D, Insight3D, Arc3D, PhotoModeler smar, VisualSFM, AgiSoft's PhotoScan.Between the DIM sofware, MicMac, developed by the IGN MATIS team, which is available within a LINUX OS shell with an end-user GUI, derives the point cloud input with the use of a specific energy minimization function in order to smooth the final geometry and filter unlikely local disorders.Still, the derived camera poses computation and the multi-stereo correlation produces a dense 3D metrics point cloud based on an accurate projection of each scene pixel in the object space.Finally, we can derive a rigorous orthographic view over any desired projection plane; this function is particularly useful in architecture as orthographic metrics are often fundamental for the very expression of the objects characteristics (Saleri 2013).The first step of the calculation process involves an open-source software -APERO -which is targeted to determine the orientation of a wide range of terrestrial or aerial images.After estimating the camera poses, a dense point cloud is extracted using a multi-scale, multi-resolution pyramidal approach (Saleri 2013).The data acquisition has been transformed most significantly by a new generation of high-resolution terrestrial cameras and new processing algorithms of image matching have revolutionised data processing.Using one of the software packages available you can obtain image-based surface models in an almost automatic way, this low-cost, user-friendly image-based technique to obtain 3D models, is the so called 'Structure-from-Motion' (SfM).SfM diffusion is based on advances in Computer Vision and improvements in computer processing power, this technique allows producing image-based reconstruction and modeling without skills or photogrammetric knowledge and so it's very easy to learn.The increasing number of SfM software solutions free, such as Autodesk's 123d Catch, and commercial solutions such as AgiSoft's PhotoScan or Pix4D's cloud processing software, are fully automated and they are based on bundle adjustment and image matching algorithms.The main difference between these software are that some work server side, such as Autodesk's 123 Catch3D or Microsoft's Photosynth and others work stand-alone, such as AgiSoft's PhotoScan, Pix4D and VisualSFM.For example VisualSFM is a client side open source software, it is a GUI application for 3D reconstruction using structure from motion (SFM).The reconstruction system integrates several previous projects such as SIFT on GPU(SiftGPU), Multicore Bundle Adjustment, and Towards Linear-time Incremental Structure from Motion.VisualSFM runs fast by exploiting multicore parallelism for feature detection, feature matching, and bundle adjustment.For dense reconstruction, this program supports Yasutaka Furukawa's PMVS/CMVS tool chain, and can prepare data for Michal Jancosek's CMP-MVS.At beginning SfM method was characterize by high quality rendering and it is considered opposed to photogrammetric method for metrically correct outcomes.Recent new developments in high-resolution terrestrial cameras and software applications allow obtaining 3D high-resolution models processing photographs in SfM software that can be compared with 3D model from laser scanner or from traditional softcopy photogrammetric methods.To survey the vault systems of St. Gervais et St Protais Church we used Agisoft PhotoScan.It is a stand-alone software that performs photogrammetric processing of digital images and generates 3D spatial data.It can be used in GIS applications, cultural heritage documentation, and visual effects production as well as for indirect measurements of objects of various scales.Wisely implemented digital photogrammetry technique enforced with computer vision methods results in smart automated processing system that, on the one hand, can be managed by a new-comer in the field of photogrammetry, yet, on the other hand, has a lot to offer to a specialist who can adjust the workflow to numerous specific tasks and different types of data.Processing Images you can obtain: Photogrammetric triangulation, dense point cloud generation and you can generate textured 3D models.It is possible to operate using arbitrary images, photos taken from any position, but you have to provide that the object is visible on at least two photos, the image alignment and 3D model reconstruction are fully automated, it is based on a database of features automatically extracted from a set of multiple overlapping images (Snavely, 2008).

Structure From Motion -SfM pipeline
Our goal is to describe the photo-based 3d scanning process, "what" and "how" we have done to obtain a high quality 3d models and measurements from photographs.The main steps of SfM method based on using of PhotoScann are: -capturing photo -loading photos into PhotoScan; -inspecting loaded images, removing unnecessary images; -aligning photos; -building dense point cloud; -editing dense point cloud; -building mesh (3D polygonal model); -editing mesh; -generating texture; -exporting results.Our goal is to generate 3D model and a dense point cloud to study the geometry of vault system of St. Gervais et St Protais church.We followed some specific capturing guidelines to make photos for indoor applications.We have done more photos than it was enough, in this way you can reduce the number of "blind-zones" because PhotoScan is able to reconstruct only geometry visible from at least two cameras.To obtain high resolution textured 3D model we have captured about three hundred photos.The complex geometry of vaults system required a careful survey project and we have done photos from the bottom up, moving along the nave and transept, and around each pillar starting from the basement to the ceiling.Each photo is overlapped by 80%, in this way we have minimized the possibility to have lacks, we were careful each photo should effectively use the frame size and object of interest should take up the maximum area.We selected photos and separated them in chucks before loading.Once photos are loaded into PhotoScan, they need to be aligned.At this stage PhotoScan finds the camera position and orientation for each photo and builds a sparse point cloud model.When alignment having been completed, computed camera positions and a sparse point cloud will be displayed.In this way, it is possible to inspect alignment results and remove incorrectly positioned photos.PhotoScan, which helped us to produce very accurate 3D model.
To obtain better visual quality of the final model we tested some of texture mapping mode, Generic and Spherical, and we chose the best outcome.We used a reflex digital camera APS-C (Advanced Photo System type-C) we did Camera calibration using Agilens software by Agisoft.We captured photos using two different focal length lenses, and then we had to do two different camera calibrations.PhotoScan supports export of processing results in various representations: sparse and dense point clouds, camera calibration and camera orientation data, mesh, etc. Orthophotos and digital elevation models (both DSM and DTM) can be generated according to the user requirements.Point clouds and camera calibration data can be exported right after photo alignment is completed.All other export options are available after the 3D model is built.We exported dense point cloud in Pointools to obtain the sections we needed to verify the geometrical hypothesis that we have done to compare the theoretical model with data from SfM process.Carrying out measurements based on the reconstructed model, we take some measure to scale the orthophotos and 3D model according to the known distances.We exported orthophoto, to obtain a plan view of the vaults systems, this is high resolution imagery based on the source photos and reconstructed geometry.We exported 3D model too, as a matter of fact PhotoScan allows to export 3D model in many different formats, such as Wavefront OBJ, 3DS file format, U3D, Autodesk DXF, Adobe PDF and so on Some of these file formats (OBJ, 3DS, VRML, COLLADA, PLY, FBX) save texture image in a separate file then you can rendering 3D model as you like.

Advantages and problems
SfM method is very convenient when you have a short time collecting data, you have a low budget, don't have sophisticated equipment (you need only a good terrestrial camera) and your aim is to study the geometrical configuration of the objet that you are surveying.The software used is very easy, you just have to uploads multiple images of an object and the results are produced fully automatically without your interaction.As all image based methods the result depends on the photos, then the principal disadvantages of the technique are linked to image resolution and some mistakes that you can do capturing photos.Photographs can be taken by any digital high-resolution camera (5 MPix or more), both metric and non-metric, higher is the resolution better is the result.We have to avoid blurred photos, blurriness makes it difficult for the system to process details in a photograph, and one blurry photo can affect the entire reconstruction, than you have to be careful that the aperture value should be high enough to result in sufficient focal depth and shutter speed should not be too fast, otherwise blur can occur due to slight movements.The choice of the correct image focal length is crucial as it will influence the optimal number of shots to perform and the resolution of the final point cloud.Although not required, we used a tripod to avoid blurriness, loading photos captured used a tripod we got a better result.
You have to avoid introducing noise in the image, it is better TIFF files than JPG and ISO should be set to the lowest value because otherwise high ISO values could induce additional noise to images.
To obtain good results good lighting is required, blinks should be avoided and you have to remove sources of light from camera fields of view.For best results, use diffused light to avoid over exposure and try to eliminate any harsh shadows that may conceal details of your subject.Shadows on an object may be confused by the software as a real holes of the object captured, and consequently it will be reflected in the resulting reconstruction.For interior shots, you should avoid the use camera's flash, for exterior shots, it is best to capture scenes during the early morning or later in the afternoon, when sunlight is not so bright.You should avoid under or over exposure because, if photos are too light or too dark, the software will have more trouble locating points of reference.Sometimes there are some problems linked to object or to scene that you have to reconstruct.You should avoid not textured, shiny, mirror or transparent objects, you have capture the scenery avoiding moving objects within the scene and avoiding flat objects.SfM technique is image based modeling therefore you can reconstruct only what you see in the photos.To obtain the best result you have to "map" the entire object without lack, you have to take pictures in sequence so that each photo has 80% in common with the following and you have to move the camera.as soon as possible, parallel to the surface to be reconstructed.
In some cases it might be very difficult or even impossible to observe these rules, because there may be obstacles that force you to move randomly and to take pictures in a confused way.
Capturing photos of a little object it's very simple because you can turn around it and "mapping" all surfaces without lack, "mapping" a complex vaults system is more difficult because you can't move in suited way.We had some troubles connected with our case study especially during the step of collecting data.
In fact, in this case, to take many overlapping photographs the main problem is the great dimension of ribbed vaults systems that are the feature of French Gothic Cathedrals (Figure 15).Our goal was to demonstrate the efficiency of the method for this type of objects, we tried to follow all the suggestions above and we obtained a very good textured 3D model and a dense point cloud.We can underline some mistakes in the reconstruction (Figure 10) produced by some noise in the images and a wrong reconstruction of a part that we didn't "mapping".

COMPARISON BETWEEN 3D THEORETICAL MODEL AND 3D MODEL BASED ON SFM
Analysing the data obtained from image matching 3D model we are able to understand the true geometric configuration of the vaults system.We have analysed the vault system in the nave and in the transept, in particular, we report the results of the study of square vault and rectangular ones.
Our goal is to illustrate the methodological process, to test the SfM image-based modeling technique and to underline the advantages for this kind of study.
Processing dense point cloud in Pointools we obtained the sections, orthogonal image, that we needed to reconstruct the geometry of the vaults.
The square ribbed vault is a kind of vault can be considered an evolution of a so called five keystones vaults characterised by three main ribs from pillars, tiercerons, and four secondary ribs, liernes, that link the minor keystones.
From analysis of the 3D data we can deduced that the square ribbed vault is characterized by two diagonal ribs, AB and CD, that are circular arches and the main arch and the traverse arches, DA, BC and CA, BD, that are pointed arches.Thanks to 3D data from SfM we were able to verify that the radius of curvature of these arches is the same of diagonal arches AB and CD.The keystone is slightly higher than keystones of the perimeter arches thus the ridge is not horizontal and, looking at the section, we can see the curvature depends on the webs geometry.The study of the geometric rules allows us to underline that the main ribs, the liernes, A2, A3, C1, C8, B7, B6, have the same curvature of diagonal ribs and  In order to compare the two models, theoretical model and 3D model based on SfM process, we can underline that our hypotheses were correct but 3D data from SfM allowed us to understand the geometric configuration of all surfaces.

CONCLUSION
Our goal is to test SfM technique to generate a 3D model to study the geometry of vault system of St-Gervais-et-St-Protais church.We'd like to found a no-contact survey methods that is cheap, not needed complex equipment, fast and easy because we are going to use this method to analyse all gothic church in Paris and to extend the study to other Franch Cathedrals.
We can safely conclude that, for our case study , Soft from Motion is the best survey technique that we could choose because it is ideally suited for our low-budget research.

Figure 1
Figure 1 Theoretical model: different way to construct a five keystones vault.

Figure 2
Figure 2 Evolution of ribbed vaults in France.

Figure 11
Figure 11 Paris.St. Gervais et St Protais rib vaults system.Section: orthogonal image of dense point cloud obtained using Pointools.

Figure 14
Figure 14 Paris.St. Gervais et St Protais.Point cloud image is a very expressive image: without the weight of the material we can perceive the geometric configuration of the vaults system.

Figure 15
Figure 15 Church of St. Gervais et St Protais.Capturing Photos of complex vaults system

Figure 16
Figure 16 Church of St. Gervais et St Protais, square ribbed vault: study of geometric configuration from SfM 3D data.

Figure 17
Figure 17 Church of St. Gervais et St Protais, rectangular ribbed vault: study of geometric configuration

The church of Notre Dame at Alencon and those of St. Maclou at Rouen, St. Gervais et St Protais at Paris (Figures 3 and 4), St. Jacques at Dieppe, are beautiful examples of the developed
flamboyant church of the 15th and early 16th centuries.So vital was this flamboyant style, that, in ecclesiastical work, it remained in vogue until long after the Renaissance dominated secular building, and its structural ideas, even longer, as shown in the large church of St. Eustache in Paris, which is structurally late Gothic.
Mouldings were made to intersect in all sorts of curious ways, and double or triple bases are common.