Photogrammetry and Colorimetry in Heritage Digitization

0
1155

In previous articles, I delved into the installation of VisualSFM as a proposed tool for photogrammetry work for 3D digitization in the field of cultural heritage. Throughout this article, I will explore further the work with VisualSFM and MeshLAB as a point cloud editor, placing special emphasis on certain reflections regarding the colorimetric aspects of photogrammetry.

Photogrammetry is understood as the study of the geometric characteristics of objects or scenes; however, as we will see, there is important colorimetric information in the data generated from a photogrammetry project. This has been a widely used strategy in recent years in documentation and study processes of Cultural Heritage, and generally in all fields of heritage such as archaeology, conservation of CH, etc.

Although the undisputed leading tool in this sector is Photomodeler, its costs make it inaccessible to all professionals, or at least those who need to resort to occasional work. Therefore, I will focus on working with VisualSFM, an open-source tool with a more simplified workflow.

Workflow

photogrammetry in archaeology heritageThe fundamentals of the workflows and processes on which photogrammetry based on series of photographs is founded are as follows:

A.- On one hand, we need a series of images that capture all possible views of an object or building. There are no rules for taking these captures, as the distance and angle of the camera can vary in order to capture as many geometric characteristics of our subject as possible.

B.- In a second phase, it is necessary to compute these images within VisualSFM, which consists of three essential phases:

  1. Load the images.
  2. Find common points between our images. For this, we must compare our image collection through pairs, so the more images we use, the times for this operation grow exponentially. While in Photomodeler these common points must be manually introduced through visual inspection of each image or the use of targets, a situation that requires considerable time, VisualSFM automatically calculates these common points, perhaps needing more images with more details for this. It is common that after taking a good number of shots, it is not possible to correctly detect these common points, so many of them are discarded by the application. VisualSFM uses the EXIF data of the focus distance of our images to assist in the positioning of the cameras; however, it is also capable of functioning without this information.
  3. After detecting common points in the image pairs, a third action triggers the creation of the 3D point cloud. After completing this process, depending on the number of images used and points created, we can roughly infer the shape of our object.
  4. The fourth process remaining is to create what is known as a “dense point cloud,” or in other words, from the previous “sparse” cloud, new points are generated from our images. While in the previous step we only have points with XYZ coordinates, through the creation of the dense cloud we will have points with XYZ RGB information, so the final result will be a point cloud whose appearance will be that of a more or less realistic 3D image.

photogrammetry in heritage digitizationC.- At this point, we have finished the work process with VisualSFM, so we already have a point cloud that can be used in many 3D modeling programs. To continue the modeling work, we can use another very popular free tool called MeshLAB, which will allow us to assign a scale to our point cloud, clean up excess points, convert this cloud into a mesh, or perform exports to other formats.

As we see, the process is extremely simple, which in a few minutes can allow us to have a highly reliable 3D model.

Remember that photogrammetric models are perfectly proportioned; there are no distortions due to perspectives or lenses as occur in 2D photography. However, it should be noted that to know the original dimensions of an object, we must always have a reference to reality.

Considerations in the use for digitization of heritage assets.

Although, as we see, it is a simple process, there are several considerations we must address if we want to endow our digitizations with a certain preservation character.

Since there is a vast literature regarding the geometric virtues of these techniques in the recording and documentation of heritage, I will focus on the colorimetric aspects and preservation of these projects.

At a philosophical level, we can understand a point cloud as a photograph in three dimensions where the points correspond to pixels, which, in addition to containing RGB information, possess a third spatial dimension.

As I mentioned in the previous chapter of this article, in our dense point cloud there is spatial information but also colorimetric information, so it is a pity to focus solely on geometric aspects.

sfm colorcheckerThe colorimetric information of these dense clouds is reduced to RGB values plus, in certain cases, an Alpha channel. At present, there are no initiatives in color management in point clouds, but at least we can maintain some prophylaxis in this aspect since the colorimetric information contained in these points can reach a certain reliability and therefore documentary interest.

Initially, during the experiments carried out for the preparation of this article, I created a point cloud of my Colorchecker Passport from the usual series of images.

Although VisualSFM only supports jpeg images, we must not fall into the temptation of taking our shots directly in this format, since the resulting images will be indeterminately conditioned by our camera settings, so the resulting colorimetry will be somewhat imprecise. Therefore, it is more appropriate to work as always in RAW and subject our development to the corresponding color management workflow. As should be usual in any photographic capture process of some rigor, I created a camera profile and an ICC characterization profile in order to establish the appropriate corrections in my series of images. The target profile for this series of images was Adobe RGB to have a sufficient gamut to avoid clipping any value of my chart.

meshlab colorchecker After building the dense point cloud with VisualSFM, we must move to MeshLAB. Unfortunately, this tool does not have any option to know the colorimetry of each point, so we must work by discarding all points in our cloud except those we want to study, for example, a specific patch. Subsequently, we export our project to the PLY format (Stanford Polygon File Format) disabling the binary option. From this file, we can easily discern the XYZ coordinates of each point and their RGB plus alpha values, which we can input into Excel for operations.

Since our colorimetry is in RGB, we can refer to the well-known work of Danny Pascale on the RGB values of the Colorchecker, and if we want to calculate deltas from LAB values, we must convert these RGB values through the Adobe RGB space.

With this small strategy, we can already make estimates of color differences between our point cloud and a color chart with known colorimetry. In this way, I have observed very low deltas, with an average around 2 ΔE* for CIED00 and 3.6 ΔE* for CIE73, which are proposed as highly optimistic values, as we can see in the following table:

Point cloud RGB->AdobeRGB->LAB Colorchecker Deltas
R G B L a b L a b CIEDE00 CIE76
A01 109 82 69 38,95 14,41 14,77 34,84 11,45 12,37 4,09 5,39
A02 189 148 132 67,07 19,35 17,35 60,01 17,25 16,20 6,00 7,35
A03 98 122 155 50,17 -6,12 -22,97 45,34 -3,46 -21,55 5,66 5,92
A04 100 109 69 44,60 -11,00 22,00 39,69 -12,45 20,99 4,75 5,48
A05 135 134 177 58,01 7,98 -23,37 50,05 8,68 -23,33 7,74 8,06
A06 130 191 174 71,65 -33,81 -0,53 64,45 -31,37 -0,93 5,64 7,28
B01 205 123 50 63,55 37,52 59,82 63,68 36,00 58,10 0,86 2,24
B02 74 91 171 40,36 10,99 -48,47 40,63 12,61 -46,06 2,25 2,83
B03 179 82 96 52,36 50,31 17,78 52,33 48,83 17,75 0,68 2,00
B04 89 60 105 31,56 24,29 -21,02 31,30 22,86 -20,19 1,00 2,24
B05 170 190 74 73,62 -23,17 58,45 72,69 -24,28 56,65 1,24 2,45
B06 215 161 51 72,57 19,83 69,31 72,64 17,42 68,03 1,10 2,24
C01 46 66 149 29,88 14,23 -52,31 29,39 13,73 -50,17 0,44 2,24
C02 104 154 79 57,76 -39,39 34,53 56,36 -39,73 32,31 1,25 2,24
C03 161 56 58 44,36 53,20 30,74 43,79 52,47 29,90 1,02 1,73
C04 235 206 48 84,69 2,76 83,33 82,16 1,91 80,76 1,58 3,74
C05 174 86 150 53,38 50,88 -14,32 52,51 50,97 -13,21 1,08 1,41
C06 54 136 167 51,27 -31,40 -28,54 50,00 -27,77 -28,06 2,06 4,12
D01 251 251 242 98,48 -1,17 4,36 96,25 -0,50 2,72 2,52 3,00
D02 215 216 213 86,59 -0,89 1,34 80,34 -0,05 0,11 4,14 6,08
D03 168 167 164 69,25 0,08 1,80 66,17 -0,50 -0,31 2,58 3,16
D04 126 125 124 53,18 0,40 0,77 50,05 -0,31 -0,15 2,98 3,00
D05 84 84 86 36,07 0,36 -1,26 35,89 -0,48 -0,71 1,28 1,41
D06 46 47 48 18,96 -0,45 -0,93 20,81 0,44 -0,17 1,37 2,00
Average 2,63 3,65
Max 7,74 8,06

Update: This table has been created according to the procedure cited in the article “CloudCompare, analysis of point clouds in photogrammetry” since this tool is more suitable for the analysis of dense point clouds than MeshLab itself

It should be remembered that these point clouds are formed from data from various images; for example, a single patch of my Colorchecker consisted of just over 600 points, which were probably extracted from the information of several images. Therefore, these are averaged colorimetric values where exposure errors, shadows, flares, etc., are somewhat minimized by the different captures.

Another quite relevant aspect in the use of this tool in combination with MeshLab is the possibility of preserving our 3D model in a PLY-type file where all the information is in plain text, very easily accessible in the future, which means we have a tool capable of generating very valuable information about an object for its long-term preservation.

meshlab colorcheckerIn MeshLab or other tools, we can convert the point cloud into meshes and transfer the colorimetric values of these points to the mesh; however, in this process, significant color interpolation is generated since there are numerous areas where it is necessary to fill empty gaps. During this process, the colorimetry is considerably altered, so for preservation purposes, it is more appropriate to preserve the geometric and colorimetric information of the dense point cloud than to save a project based on meshes and textures.