IT 16 089 Examensarbete 15 hp November 2016

Improved of Rock Carvings

Filip Hedman

Institutionen för informationsteknologi Department of Information Technology

Abstract Improved Visualization of Rock Carvings

Filip Hedman

Teknisk- naturvetenskaplig fakultet UTH-enheten Digitizing rock carvings is a way to archive historically important sites and to make the data available for interpretation all around the world. Laser scanning has become Besöksadress: a very useful tool to capture the details of the rocks, and this thesis aim to answer Ångströmlaboratoriet Lägerhyddsvägen 1 how we can use different filters on the captured 3D data to visualize patterns from Hus 4, Plan 0 the rock carvings, while minimizing the noise from the surrounding geometry. Different coloring methods are evaluated to accentuate the rock carvings, while a Postadress: median filter is implemented to reduce the noise of the renderings. The results show Box 536 751 21 Uppsala that it is indeed possible to perform this kind of visualization, and that some methods are more suitable for the task than others. The results of this thesis will hopefully Telefon: make the choice of method easier for other researchers in forthcoming projects. 018 – 471 30 03

Telefax: 018 – 471 30 00

Hemsida: http://www.teknat.uu.se/student

Handledare: Filip Malmberg Ämnesgranskare: Anders Hast Examinator: Olle Gällmo IT 16 089 Tryckt av: Reprocentralen ITC

Contents

1 Introduction 8

2 Background 10 2.1 Galician rock carvings ...... 10 2.2 Traditional methods used in archeology ...... 11 2.3 Laser scanning ...... 11 2.4 Surface reconstruction from point clouds ...... 12 2.5 Visualization Toolkit ...... 13 2.6 PLY 3D format ...... 14

3 Methods 15 3.1 Altering the mesh ...... 15 3.1.1 Mesh decimation ...... 15 3.1.2 Mesh smoothing ...... 16 3.2 Shading and coloring ...... 16 3.2.1 Median filter ...... 16 3.2.2 Elevation coloring ...... 17 3.2.3 Curvature coloring ...... 18 3.2.4 Triangle area coloring ...... 20

4 Results 25

5 Related work 27

6 Discussion 29 6.1 Visualization of 3D scanned rock carvings ...... 29

7 Summary 31 7.1 Conclusion ...... 31 7.2 Future work ...... 32 7.2.1 A more robust visualization application ...... 32 7.2.2 Machine Learning ...... 32 7.2.3 Tactile feedback system ...... 33 7.2.4 Point light method ...... 33

References 34

5

Acknowledgements

I would like to acknowledge my supervisor Filip Malmberg for all the help and direction given to me in the beginning of the project. I would also like to thank my reviewer Anders Hast for carefully reviewing my thesis multiple times, and helping me finish the whole project.

7 1 Introduction

In recent years, work has begun to digitize rock carvings for archiving and further inter- pretation. Digitization of rock carvings may include more traditional methods such as simply photographing the carvings [1], but more recently laser scanning have become a prevalent method in the area [2]. With the help of a laser scanner, researchers can create a high definition 3D scan of the rock carving. The benefits of this method are clear; researchers can create a 3D scan that can be shared between multiple research teams for further interpretation without the need for each team to make an excursion to the actual site of the carvings. This lowers the barrier for research, and it keeps the physical wearing of the site to a minimum [3].

Problems occur if the carving is heavily weathered and the rock surface is far from smooth, since it can be visually difficult to discern the actual carvings. This problem can to some extent be handled by applying different kinds of shading in order to accen- tuate the pattern which has been carved on the rock. However, we think that different techniques could be used to improve the visualization and give better representations of the actual pattern.

The idea of using techniques from the field of computer graphics to achieve better visu- alization results have been explored before, for example by Trinks et al. [4]. Results can vary a lot between different types of data sets, and in this thesis we will take a look at scans of carvings obtained in the northwest part of Spain.

The first method that will be evaluated for this purpose is elevation coloring, which highlights the difference in elevation between two 3D models. The next one is curvature coloring, which colors each point in the model according to curvature at that specific point. The last coloring method is triangle area coloring, which simply colors a triangle according to its total area. A median filter will be implemented and evaluated as well, to enhance the renderings in conjunction with the methods mentioned before.

While the coloring itself is the main topic of this thesis, different methods to alter the mesh itself will be evaluated. Mesh decimation will be used to reduce the number of total polygons, and thus make the data easier and faster to work with. Mesh smoothing is used to reduce small details in the mesh data, which is a crucial part of the elevation coloring process.

The main questions we aim to answer is how different filters can be used on 3D data to visualize patterns from rock carvings, and how we can reduce the noise from the surrounding rock in the renderings.

The results of this thesis show promising results from curvature and elevation coloring on the data sets, while the implementation of triangle area coloring yielded only minimal improvements over the default shading. The results from these methods are improved

8 even further by the implemented median filter, which could prove to be a useful tool for other researchers in the area of visualization.

9 2 Background

2.1 Galician rock carvings

The data sets that serves as the base for this thesis is obtained from Galicia in the northwest part of Spain. The typology of the carvings are varied and very rich, and it is possible to advert different themes and different execution techniques on the rock surfaces. Geometric motifs are common in Galicia, which is basically simple circles, circle combinations, labyrinths and bosses. Naturalistic motifs can also be seen, with common motifs being humans and animals [5].

Figure 1 and 2 shows the Abelairas and Rotea de Mendo data sets rendered with standard computer graphics methods. The laser scans includes color data as well, which in this case showcase some imperfections in the surface caused by moss. The color data will be excluded when visualizing rock carvings, since it is easier to discern simple black and white patterns.

Figure 1: Abelairas stone carvings with color data.

10 Figure 2: Rotea de Mendo stone carvings with color data.

2.2 Traditional methods used in archeology

The problem of finding and interpreting rock art has existed for a long time in the field of archeology, and there is already a vast array of different methods available to handle it. Some of the traditional methods include rubbing and scraping on large sheets of paper laid over the rock surface. This method can only be conducted by a professional on site, and there is a risk of physical wear on the surface [6].

Taking of the petroglyphs and then improving them with the help of digital photo editing software is a more modern approach that was popular during the 1990’s [1]. That method works to some extent, but there is only so much detail you can get from a . The final result will depend a lot on the quality of the original photograph, and the lightning of the scene.

2.3 Laser scanning

With the use of a laser scanner it is possible to get a very detailed picture of the rock structure. In addition to being very precise, it does not alter the physical structure in any way, which is preferable since the rock formations are often very old and fragile.

There are several types of laser scanners, but in general they emit a light that bounces

11 off the object and back to the scanner. Since the speed of light is a known constant, it is possible to calculate the distance to a certain point of an object by taking half the round-trip time and multiplying it with the speed of light [7]:

C = Speed of light R = Round-trip time Distance = R/2 ·

The scanner will gather information about a large set of points, which will then form a point cloud. To be able to render the rock as an object with a surface, we need to triangulate the points. Triangulation is the process of creating triangles from the point cloud.

2.4 Surface reconstruction from point clouds

An important step in the process of digitizing rock carvings is the triangulation of the data captured by the laser scanner. The scanner merely returns a point cloud of the surface topology, and an extra step to reconstruct the actual rock surface with triangles is needed.

There exists multiple methods for surface reconstruction, but one of the most widely used is Delaunay triangulation. In two dimensions, this is a triangulation DT(P) of a set of points P, such that no point P is in the circumcircles of the triangles in DT(P) (See figure 3). This extends to three-dimensional data as well, with the use of circumscribed spheres instead of circles [8]. The visualization framework used for this thesis, VTK, implements a Delaunay-based triangulation algorithm [9].

Figure 3: A Delaunay triangulation for an example set of points with the corresponding circumcircles.

12 2.5 Visualization Toolkit

We will make use of the Visualization Toolkit [10], henceforth called VTK, which is a library created and maintained by Inc. [11]. It is originally written in C++ mainly for scientific and medical applications. There is also bindings available in several script languages such as Python and Tcl.

This project is not focused on rendering methods, but rather on the visualization itself, so we do not gain anything by building a rendering application from the ground up. Therefore we can save a lot of time by using the tools provided by VTK. There is also a very knowledgeable community surrounding the toolkit, with a lot of people that have worked with similar applications before, which could be a very useful resource.

A basic VTK application follows a certain structure, which can be seen in figure 4. The first thing to do is to load from a source, such as a 3D mesh file, into the program. In our case we read from our PLY source files containing the 3D models of the rock carvings.

In the next step we apply a filter to the data. There are multiple types of filters for different applications. For this project we will use the vtkCurvatures filter, among others, to highlight the details of the carvings.

The third step consists of mapping the filtered data to a mapper. The mapper works as an interface between the data and graphics primives, and lets us control which scalar values to use as colors on the final rendering.

The fourth step of the pipeline is the actor, which represents the object as geometry with properties in the scene. The actor has a scaling, and it is possible to apply a texture to it.

Rendering is the fifth step, which is where all the viewing transformations between world, view and screen coordinates happen. Custom lightning is added in this step as well.

The last step of the application pipeline is the user interface. This is where interaction with the application is added. In the prototype application, two separate sliders are added to increase control over which scalar values to highlight on the 3D models.

Source Filter Mapper Actor Renderer UI

Figure 4: The VTK pipeline.

13 2.6 PLY 3D format

The format used for the scanned data is the PLY format, which was developed by the computer graphics division at Stanford University [12]. The PLY format consists of a list of polygons, and it may also store arbitrary data such as point color or surface normals.

VTK have built-in functionality to handle a lot of 3D formats, including PLY, so no further conversion is needed to handle the provided data sets.

14 3 Methods

We want to use methods that work directly on the 3D data to enhance the actual mesh structure, and also use shading and coloring techniques to improve the accentuation of the rock carvings. In the final visualizations we combine them to get the best results possible.

3.1 Altering the mesh

In this section we want to look at methods to alter the mesh to work in our favor, for example using mesh decimation and mesh smoothing. These methods are not used to visualize the data on their own, but rather in conjunction with the coloring methods.

3.1.1 Mesh decimation

The original Rotea de Mendo point cloud data consists of roughly 3.5 million polygons, while the Abelairas data has about 6.4 million polygons. Both of the data sets are very detailed, and while it is great to have scans in a very high resolution, we need to cut down on the resolution to be able to work efficiently with faster iterations, and also to improve the final results. How much we can simplify the mesh varies between different meshes. Both of the data sets used in this thesis were cut down by about 90 percent of their original polygon count.

The mesh decimation algorithm implemented in the VTK framework is based on the paper Decimation of Triangle Meshes by Schroeder et al. [13]. The algorithm makes multiple passes over all vertices in the 3D mesh data. During a pass, each vertex is a candidate for removal, and if it meets the criteria for deletion, the vertex itself and all the triangles that share it will be removed.

When deciding whether to delete a candidate vertex or not, the algorithm uses the average plain from the triangles that include the vertex. The average plain is then created by taking the average of all the triangles’ normals, areas, and centers. If the distance from the vertex to the average plain is within a certain distance, it can be deleted. This will create a hole in the mesh, which is repaired by triangulation. The process proceeds until a termination condition is met, and that condition is most often a target reduction from the original mesh triangle count [14].

15 3.1.2 Mesh smoothing

The original point cloud was very dense and really captured the small cracks and im- perfections in the rock. To make the most use of our methods in these experiments, we need to smooth out some of those smaller details to make room for the larger carvings to stand out. Trying to visualize the original data with something like elevation coloring will only result in a lot of black and white dots all over the rock rendering.

Laplacian smoothing is a popular method to make a surface smoother by approximating the neighboring points with each other [15], and the VTK framework implements a version of this which will be used in this project. The algorithm visits each vertex and determines its connectivity to the rest of the mesh. Using this connectivity information, the algorithm will iterate multiple times over the vertices to adjust each vertex position according to the average position over all neighbors’ positions. See figure 5 for a formal definition of the laplacian smoothing for a single vertex.

Figure 5: The formal definition of the laplacian smoothing of a vertex i [16]. N is the number of adjacent vertices to node i, x¯j is the position of the j-th neighbor, and x¯i is the new position of vertex i.

Using this method we can reduce the high frequency information in the mesh, which helps to reduce small deviations in height, which in turn can reduce the overall noise of the final rendering. The hard part is finding a balance in the amount of smoothing. Similar to mesh decimation, it is possible to lose a lot of carving details in the process of smoothing, and thus some trial-and-error is needed until a satisfactory result is found.

3.2 Shading and coloring

We will now shift our focus to different shading techniques that might be used on the data sets to accentuate the petroglyphs.

3.2.1 Median filter

To further enhance the visualizations and remove color spots caused by height spikes in the mesh data, a median filter was implemented in VTK [17]. The filter walks through the entire mesh and compares the neighboring scalar values for each point, and selects the

16 median scalar value. Since the filter works on the scalar values of a mesh, it is supposed to be used in conjunction with other filters such as a curvature or elevation filter.

The implementation works well and gives the rendering a smoother appearance, with less dark spots spread over the stone and more pronounced carvings. Figure ?? and ?? shows the effect of using the median filter after a minimum curvature filter. The filter calculations are relatively fast, so it is a great addition to the visualization process with no apparent downsides.

(a): Median filter deactivated. (b): Median filter activated.

Figure 6: Detail from the Rotea de Mendo rock carvings, showing the effect of the median filter.

3.2.2 Elevation coloring

Elevation coloring is a method of coloring the mesh according to the height of the points in relation to a elevation vector in 3D space [18]. It is a method that feels natural to use when looking at height of terrain and other geometry. In theory it should work very well for the coloring of rock carvings as well.

Fortunately, VTK has built-in support for comparing the distance between every point in two data sets. The original data decimated to about ten percent of the original point amount was used as a base, and that data was compared to a data set containing only one percent of the original data points as well as being smoothed to even out the carvings almost totally.

17 (a): Median filter deactivated. (b): Median filter activated.

Figure 7: Detail from the Abelairas rock carvings, showing the effect of the median filter.

The results were satisfactory, with most of the details of the carvings highlighted in the final rendering. The results were especially good with the Rotea de Mendo data set (figure 8), with the large deer being highlighted clearly. The method did not perform as well with the Abelairas data set however, with quite a lot of unwanted highlights outside the actual carvings, as seen in figure 9. This is not surprising, since the Rotea de Mendo rock has a more flat natural shape and more pronounced carvings in general. Since a lot of smoothing is used to prepare the comparison data set, the final colorization will be smooth as well, which means that sharp details might get lost using this method.

3.2.3 Curvature coloring

Curvature at a certain point P can be defined using the circle that most closely approx- imates the slopes around the point. The curvature is then defined as the reciprocal of that circle’s radius R, 1/R [19]. If there is only a light slope, the osculating circle will be larger, resulting in a smaller curvature. See figure 10 for an example.

The maximum and minimum curvatures at a point are called the principal curvatures [20]. We get the mean curvature by taking the average of the principal curvatures:

1 M = (C + C ) 2 min max

Another definition of curvature that might be interesting is the Gaussian curvature [21],

18 Figure 8: Rotea de Mendo stone carvings visualized using elevation coloring. which is simply the product of the principal curvatures:

G = Cmin · Cmax

Unfortunately, coloring a mesh by curvature is not always as simple as applying a color filter. The amount of detail in the 3D mesh will have a big impact on the results, and there is a fine line between having too much detail and an uninteresting image. We have to experiment with mesh decimation and smoothing to get closer to the wanted results.

The best results resulted from visualizing the minimum curvature and inverting the colors of the result, which can be seen in figure 11.

To eliminate small and uninteresting spots of curvature, only curvature within a certain scalar range will be highlighted. The optimal range values will depend on the data and chosen definition of curvature, so the testing of different values is crucial for good results. To allow for intuitive control and faster iterations, two sliders controlling the scalar range was added to the application.

19 Figure 9: Abelairas stone carvings visualized using elevation coloring.

3.2.4 Triangle area coloring

The original data sets had very dense 3D meshes with millions of polygons. As pointed out earlier in this thesis, we had to do some optimizations to the data to make it possible to handle it in a better way. Mesh decimation and mesh smoothing are the main methods of use. The obvious benefit is that we can calculate and visualize the results in a faster and smoother way, since the resulting mesh is a lot easier on the computer hardware. A side effect of this is that the mesh will merge closely coupled points together into one point, with the new point being the result of the average positions of the original points. Combined with the smoothing process, it will make sure that surfaces that are close to being flat will make use of fewer points and thus bigger triangles in that area [13].

This behavior leads us to the next method of visualization; Triangle area coloring. The idea is that when the the area of a certain triangle is below a certain threshold, we should color the scalar accordingly. Big and flat areas of the rock should be represented with bigger triangles, while small and complicated areas such as rock carvings would need smaller triangles to show all the detail.

20 Figure 10: The osculating circle of a point P on a curvature C.

VTK does not supply a built-in filter that colors the mesh according to each individual triangle’s area. Instances of the vtkTriangle class have a method which returns the area however, so writing a custom filter is pretty straightforward. The main algorithm loops over all the different triangles and colors each point of the triangle according to the triangle area. Of course, each point can be a part of multiple triangles, and in that case the highest value will be chosen for that point.

The filter worked fairly well on heavily decimated data, and did indeed color the triangles according to size. It did not perform well on moderatively decimated data however, which is the case of the rock carving data sets. We can see in figure 13 that some details are slightly highlighted by the triangle area filter, but the effect of the filter is mainly seen in the natural cracks on the stone, which are more heavily defined than the carvings.

21 Figure 11: Rotea de mendo central stone carvings visualized using minimum curvature through a median filter.

22 Figure 12: Abelairas stone carvings visualized using minimum curvature through a me- dian filter.

23 Figure 13: Rotea de Mendo stone carvings visualized using minimum triangle area filter.

24 4 Results

Below is a side-by-side comparison of the different methods and how they perform on the two data sets. The median filter is applied in conjunction with the other methods in all renderings.

(a): Default surface coloring (b): Elevation coloring

(c): Minimum curvature coloring (d): Minimum triangle area coloring

Figure 14: The Abelairas data set visualized using the different methods.

25 (a): Default surface coloring (b): Elevation coloring

(c): Minimum curvature coloring (d): Minimum triangle area coloring

Figure 15: The Rotea de Mendo data set visualized using the different methods.

26 5 Related work

Trinks et al. [4] use very similar methods to those in this thesis, and the paper was an important inspiration during this project. They use VTK as a framework for the visualization, and methods such as coloring using maximum curvature is explored in their paper as well. Their 3D scanned data is of the Horseshoe Rock however, which has quite a different characteristic compared to the petroglyphs of Abelairas and Rotea de Mendo. Therefore it is still interesting to see the methods used on rock carvings that have more shallow carvings.

Vilas-Estevez et al. [22] is very interesting as well, since they used the same Abelairas petroglyph as a model for their methods. There are multiple differences however, since they use photogrammetry to create the 3D model instead of laser scanning, and the open- source software MeshLab [23] is used instead of VTK. For the visualization, they focus on two different techniques, radiance scaling [24] and Algebraic Point Set Surfaces [25].

Photogrammetry is further evaluated as a cost-effective way to create 3D representations of rock carvings in Chandler et al. [26]. Instead of using VTK for visualization, they use the Leica Photogrammetry Suite to construct a spatial model that smooths out the parts of the stone that have larger topographic differences.

AsTrend is a new technique showing promise as a way to visualize rock carvings. In the article by Carrero-Pazos et al. [27] it is evaluated on the same Rotea de Mendo petro- glyphs as used in this thesis. It is a combination of two LiDAR techniques, accessibility shading [28] and trend removal [29]. The results show that it is well suited for the ap- plication, but the downside is that it is not possible to see the highlighted results in 3D, but only as a 2D image.

In Cassen et al. [18] one of the methods mentioned is coloring the deviation in height between two meshes, which is very similar to the elevation method presented in this thesis. The idea is to compare a smoothed mesh to the original data. They have used the commercial software GeoLab however, while we use the open source Visualization Toolkit to implement the functionality.

Another way to extract details in geometry is using the Sky-View factor, which uses laser technology from a helicopter to calculate how visible the sky is from a certain point on the ground [30]. This is similar to how Ambient occlusion works to create realistic lightning in 3D scenes [31]. The main idea is that ridges are more strongly illuminated than deep valleys, since a larger part of the sky can be seen from the ridge. This applies to smaller features in the same way, and the method can thus be useful for visualization of rock carvings as well. The method is able to see through some vegetation, which makes it a great choice for exploring petroglyphs that are located in deep forests or other areas that are hard to reach by ground. The airborne nature of this method does limit its use

27 when exploring petroglyphs in indoor areas such as caves.

Reflectance Transformation has proven its value as a quick and cheap way to document and visualize petroglyphs [32]. It works by taking multiple photographs of a petroglyph from the same static position. In each photograph, the lightning is adjusted to a new position. The pictures are then composited and viewed in an RTI viewer. Using this application, the user can inspect the highlighted petroglyphs with artificial lightning. The biggest downside compared to laser scanning is the fact that the output image is only two-dimensional, which makes further exploration of the actual rock structure impossible.

Lymer et al. [33] evaluates multiple methods of visualizing 3D scanned rock carvings using the commercial software ArcGIS. Methods tested include Digital Surface Models, Reflectance Transformation Imaging and a Principal Component Analysis on the result- ing RTI image. While the methods and data sets are different from those in this thesis, the ultimate goal of visualizing rock carvings from 3D scanned data remains the same.

28 6 Discussion

6.1 Visualization of 3D scanned rock carvings

The results of this thesis show that visualizing 3D scanned rock carvings using methods from computer graphics performs well. The Visualization Toolkit is well suited for this kind of application, and it only requires moderate skills in a script language like Python to get started. Furthermore, it is possible to handle detailed 3D data sets using a modern laptop with a built-in GPU, which lowers the barrier of entry even more.

The main problem of this method is probably the initial retrieval of 3D scanned data of the rock carvings of interest. Industrial grade 3D scanners are still very expensive, and while customer grade 3D scanners are emerging on the market, they are not commonplace just yet. An alternative might be to use photogrammetry to scan the petroglyphs instead, as done by Vilas-Estevez et al. [22]. The results from their scans used in the paper show that it is certainly a suitable method that delivers detailed scans. It only needs a consumer grade camera and some photogrammetry software, of which there are multiple free alternatives available on the market. Internet is of course going to be an important way to share data sets between researchers in the future as well, so if the rock carvings are already scanned by someone else, the same data can be explored in other projects.

The visualization method that delivered the best results was minimum curvature coloring filtered through a median filter. This is also one of the easiest methods to use, since VTK already has a filter for minimum curvature built-in. The median filter was developed for this thesis, and will be made available for further use.

Triangle area coloring did not perform well compared to the other methods. This is probably due to how a laser scanner produces a point cloud with near-equal length between the points. This makes the differences in the triangle areas too small, thus making the method uneffective. Efforts were made to simplify the mesh to improve the results, but there is a fine line between 3D data that is too heavily decimated, so that the original details are removed entirely, and data that is not decimated enough for the application of the triangle area filter. A lack of knowledge of the decimation and smoothing algorithms made it difficult to find the proper settings, and time constraints for the project halted further exploration.

Since the final rendering results depend a lot on the chosen range of curvature values to fill with color, a lot of trial-and-error was needed to find good values that works for the specific 3D data. A simple slider interface was implemented to be able to change these ranges on the fly, but since changing these values are too calculation-heavy for realtime rendering, a lot of time is spent waiting for the computations to finish. A better solution would be to automate the process in some way to find good candidate values for the ranges.

29 It is important to remember that while the results from the methods in this thesis looks pretty good in two-dimensional images, one of the main advantages of these methods comes from the fact that we can look at the rendering in 3D. We can rotate and zoom in at the different carving details as much as we like, in addition to the filters that highlight the carvings. The perception of depth can be very important when interpreting the petroglyphs, and is something that was only available at the actual site of the rock carvings before.

30 7 Summary

7.1 Conclusion

Using techniques from the computer graphics and visualization field, we have success- fully managed to accentuate patterns of 3D scanned rock carvings, while reducing the amount of noise in the renderings. Different coloring methods were applied to visualize the patterns of the actual carvings, while the median filter implemented for this thesis performed well as a way to reduce noise.

Curvature coloring showed the most promising results across both data sets as a way to color the carvings. The renderings using this method maintained a lot of detail of the carvings, while most of the natural shape of the rock was excluded from the coloring highlights. This method is available as a built-in filter in VTK, and proved to be one of the easiest methods to get good results with.

Elevation coloring achieved satisfactory results as well, especially on the Rotea de Mendo data set. In that case, this method was superior in highlighting the carvings, producing a smoother picture that was easier to interpret. There is a lot of preprocessing needed for this method however, such as mesh decimation and mesh smoothing, which makes this method really slow. The rendering times themselves are slow as well, so it was not possible to work with fast iterations on a modern laptop.

The final method evaluated, triangle area coloring, did not perform well on the data sets provided. This is most likely due to the fact that the original point cloud data has an equal distance between the points due to the nature of laser scanning. Time constraints for the project halted further exploration of the method.

The median filter implemented in VTK successfully removed color spots that stemmed from height spikes in the mesh data, and made the actual carvings more pronounced. The calculations done within the filter are fast as well, making it a great addition to the rendering pipeline with no apparent downsides. The filter can thus be a useful tool for further use in visualization of rock carvings, and other types of visualization as well.

VTK has proven to be a suitable environment for this type of visualization. For example, it is possible to use methods such as curvature coloring and elevation coloring with the built-in classes of VTK. This means that you can perform visualization using wrappers for script languages such as Python or Tcl, which is arguably easier and faster to get started with than the native C++ code. More advanced methods may need to be implemented with custom filters, but there is a lot of help to get from the mature documentation and other members of the community.

Other digital methods such as refining details using photo editing software can easily be

31 combined with the visualizations from the prototype. Even though most of the filters from popular editing software like Photoshop [34] could be implemented and used directly in the prototype software, it would probably be quite cumbersome and reduntant.

The results have shown that it differs a lot between different data sets and the detail of that data in how the final visualization will behave. It is difficult to find an algorithm that successfully highlights rock carvings well in any data set, and this makes it important to leave some of the interpretation to the user of the software.

7.2 Future work

Following the interesting results from this project, one might be interested in pursuing even better results using other similar techniques.

7.2.1 A more robust visualization application

During the work on this thesis, a simple prototype application was built to make it possible to test the different methods of visualization. While the current prototype allows for some interaction from the user, such as changing which scalar values to visualize, and simple zooming and rotating; there is a lot more that could be done. As of right now, changing the actual visualization method is done directly in the code, and if that could be done by pressing a button in the application instead, it could have real use in the field of archeology.

7.2.2 Machine Learning

Machine learning is currently gaining a lot of momentum in many different fields as an effective method to determine the outcome of a question posed on a dataset. Given some sample data sets with correct markings of petroglyphs, one might be able to automatically determine the rock carvings on other laser scanned datasets. Xu et al. [35] uses a deep neural network to learn smoothing filters, which can then be applied constantly on an image. Their network uses 2D images as input, but the main idea of learning a network according to a set of rules remains the same. One idea is to learn a network how to smooth the visualization on the actual scalar data, or an alternative is to simply incorporate a neural network on an exported 2D image from VTK.

32 7.2.3 Tactile feedback system

One idea that sprung up during the research of this project was to incorporate a 3D feedback system as a way to handle the scanned data. This would be a way to simulate the traditional methods where you work on the actual stone, only that this would be with a virtual model in 3D space. This could be interesting for archeologists to explore since they could use their skills from the real world on a virtual object.

7.2.4 Point light method

Using 3D graphics to our advantage does not necessarily mean everything needs to be automated; quite the opposite. Having a 3D scanned object means that we can look at it from all different kinds of angles, and with artificial light in a way that is simply not possible with the real physical object.

A simple way of amplifying the structure of a rock carving is to illuminate it from different angles using an artificial light source. Due to time constraints this was never implemented, but it could be built using the LightKit [36] classes supplied by VTK. Using sliders to move the main directional light we can make it possible to look at the carvings with the help of shadows. To further enhance the results we could increase the specular of the stone.

33 References

[1] M. Mudge, C. Schroer, T. Noble, N. Matthews, S. Rusinkiewicz, and C. Toler- Franklin, “Robust and scientifically reliable rock art documentation from digital photographs,” Wiley-Blackwell Companions to Anthropology: A Companion to Rock Art, 2012.

[2] E. M. Payne, “Imaging techniques in conservation,” Journal of Conservation and Museum Studies, 2013.

[3] M. Ashley and C. Perlingieri, “Engaging a new digital citizenry,” Wiley-Blackwell Companions to Anthropology: A Companion to Rock Art, 2012.

[4] I. Trinks, M. Diaz-Andreu, R. Hobbs, and K. Sharpe, “Digital rock art recording: visualising petroglyphs using 3d laser scanner data,” Rock Art Research 22, pp. 131– 139, 2005.

[5] Y. S. Veiga, “Galician rock art: From the past to the present,” Adoranten 2007, 2007.

[6] L. M. Brady and R. G. Gunn, “Digital enhancement of deteriorated and super- imposed pigment art: Methods and case studies,” Wiley-Blackwell Companions to Anthropology: A Companion to Rock Art, 2012.

[7] P. Bryan, M. Cooper, and A. La-Pensee, “Chiswick house, london: Laser scanning tests on a gilded 18th-century ,” Research Department Report Series no 19., 2007.

[8] F. Cazals and J. Giesen, “Delaunay triangulation based surface reconstruction,” in Effective Computational Geometry for Curves and Surfaces (J.-D. Boissonnat and M. Teillaud, eds.), ch. 6, pp. 231–273, Springer, 2006.

[9] “VTK Delaunay3D class reference.” http://www.vtk.org/doc/nightly/html/ classvtkDelaunay3D.html. Accessed: 2016-11-01.

[10] “The Visualization Toolkit(VTK), a toolset for rendering and visualization.” http: //www.vtk.org/. Accessed: 2016-09-19.

[11] “Kitware inc. - Leading edge, high-quality software.” http://www.kitware.com/. Accessed: 2016-09-19.

[12] “The PLY polygon file format.” http://www.dcs.ed.ac.uk/teaching/cs4/www/ graphics/Web/ply.html. Accessed: 2016-09-20.

[13] W. J. Schroeder, J. A. Zarge, and W. E. Lorensen, “Decimation of triangle meshes,”

34 SIGGRAPH Comput. Graph., vol. 26, pp. 65–70, July 1992.

[14] “VTK DecimatePro class reference.” http://www.vtk.org/doc/nightly/html/ classvtkDecimatePro.html. Accessed: 2016-11-01.

[15] N. Bray, Notes on Mesh Smoothing, No. 2. 2004.

[16] G. A. Hansen, R. W. Douglass, and A. Zardecki, Mesh enhancement, p. 404. Imperial College Press, 2005.

[17] T. Acharya and A. K. Ray, Image Processing - Principles and Applications. Wiley- Interscience, 2005.

[18] S. Cassen, L. Lescop, V. Grimaud, and G. Robin, “Complementarity of acquisi- tion techniques for the documentation of neolithic engravings: lasergrammetric and photographic recording in gavrinis passage tomb (brittany, france),” Journal of Ar- chaeological Science, vol. 45, pp. 126 – 140, 2014.

[19] M. Kline, Calculus: an intuitive and physical approach, 2nd ed., p. 458. 1967.

[20] M. Berger, A Panoramic View of Riemannian Geometry, p. 46. Springer, 2003.

[21] M. Hazewinkel, Encyclopaedia of Mathematical Sciences. 2002.

[22] A. Ippolito and M. Cigola, Handbook of Research on Emerging Technologies for Digital Preservation and Information Modeling, pp. 175–200. Advances in Library and , 2016.

[23] “MeshLab.” http://meshlab.sourceforge.net/. Accessed: 2016-11-08.

[24] R. Vergne, R. Pacanowski, P. Barla, X. Granier, and C. Schlick, “Radiance scal- ing for versatile surface enhancement,” Proceedings of the 2010 ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, pp. 143–150, 2010.

[25] G. Guennebaud and M. Gross, “Algebraic point set surfaces,” ACM Trans. Graph., vol. 26, no. 3, 2007.

[26] J. Chandler and J. Fryer, “Recording aboriginal rock art using cheap digital cameras and digital photogrammetry,” Proceedings of CIPA XX International Symposium, International Cooperation to save the World’s Cultural Heritage, 2005.

[27] M. Carrero-Pazos, A. Vázquez-Martínez, and B. Vilas-Estévez, “Astrend: Towards a new method for the study of ancient carvings,” Journal of Archaeological Science: Reports, vol. 9, pp. 105 – 119, 2016.

[28] G. Miller, “Efficient algorithms for local and global accessibility shading,” Proceed-

35 ings of the 21st Annual Conference on Computer Graphics and Interactive Tech- niques, pp. 319–326, 1994.

[29] B. Štular, Žiga Kokalj, K. Oštir, and L. Nuninger, “Visualization of lidar-derived relief models for detection of archaeological features,” Journal of Archaeological Sci- ence, vol. 39, no. 11, pp. 3354 – 3360, 2012.

[30] Z. Kokalj, K. Zaksek, and O. Kristof, “Application of sky-view factor for the visu- alization of historic landscape features in lidar-derived relief models,” Antiquity vol. 85, 2011.

[31] H. Landis, “Production-ready global illumination,” Siggraph course notes, vol. 16, no. 2002, p. 11, 2002.

[32] H. Hameeuw, A. Devillers, and C. Wouter, “Relighting egyptian rock art: Rapid, accurate hd imaging of prehistoric petroglyphs,” Proceedings ”Young Researchers Overseas’ Day” (16.12.2014), pp. 1–11, 2016.

[33] K. Lymer, “Image processing and visualisation of rock art laser scans from loups’s hill, county durham,” Digital Applications in Archaeology and Cultural Heritage, vol. 2, no. 2–3, pp. 155 – 165, 2015.

[34] “Adobe Photoshop Family.” http://www.adobe.com/products/photoshopfamily. html. Accessed: 2016-09-20.

[35] L. Xu, J. S. Ren, Q. Yan, R. Liao, and J. Jia, “Deep edge-aware filters,” Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1669– 1678, 2015.

[36] “VTK LightKit class reference.” http://www.vtk.org/doc/release/5.0/html/ a01682.html. Accessed: 2015-09-11.

36