# A Gamified Augmented Reality Application for Digital Heritage and Tourism
## Materials and Methods
### Museum Artefact Detection  
Despite the technological progress made on Wi-Fi, Bluetooth, Radio-frequency identification (RFID) technologies and more, orientation in mobile AR applications in indoor places is still an open question [22]. Market-ready solutions are based on easy-to-implement and reliable techniques in order to offer smooth visitor experiences without breaks and interruptions while keeping technology transparent. Following this trend, the e-Tracer AR scenes are subdivided into applications that require a marker to detect a museum artefact and project a 3D object on top of that. Those that do not require an additional identifier but use the museum artefact itself (displayed through the mobile camera's image) as an identifier are still under development. The use of printed Quick Response Codes (QRC) as markers, although they are easy and cheap to be produced by museums using their own equipment, was finally avoided, mainly because they are not human readable, and thus, people may not always understand which marker corresponds to which museum artefact. Moreover, QRC markers are not aesthetically accepted in a museum or gallery context and are relatively small in sizes; thus, they may cause a loss in object detection stability. On the other hand, markers that contain a printed copy of the depicted artifact were considered more appropriate for museum settings for a number of reasons: they are aesthetically accepted, relatively small in size, cheaper to be produced with the museum's own equipment, require relatively low device profiles, and provide effective object detection in controlled environments. In the physical environment, the AR markers were located next to the artefacts after they had received optimization for a better object detection accuracy to fix certain problems caused by the marker-less and QR code techniques (e.g., not human-readable, poor detection quality in low-lighting conditions, efficient algorithms too demanding for mobile devices). From a technical point of view, the initial markers (Figure 4a) were first pre-validated using their grayscale histogram in order to evaluate their initial suitability as markers. Images that combined a low overall contrast and a narrow and sharp grayscale histogram were not likely to be selected as target markers. In contrast, if the grayscale histogram was found wide and flat, the image had a good chance to be selected as a marker, since it contained a nice distribution of visual features. Figure 4: Museum artefacts used as AR markers: (**a**) example of original picture evaluated by the object detection algorithm as a 3-star marker, (**b**) optimized picture evaluated as a 4-star marker for the same object, (**c**) a second example of a 4-star object marker (inkwell), (**d**) another example of an object marker seen from two different angles (pistol). Afterwards, potential markers were optimized according to the Vuforia's guidelines [38] for achieving a better object detection accuracy:  
* Gamma correction: Gamma encoding is applied on images usually to optimize the usage of bits during compression, by taking advantage of the non-linear manner in which humans perceive colors and light [39]. Here, gamma correction was applied with powers larger than 1 to make the shadows of the artefact darker (Figure 4b). * Local contrast enhancement adjustments: An overall contrast/brightness adjustment helped enhance visual features, especially around corners and borders of flat surfaces. A lighter color in the background layer resulted in more feature points, while higher contrast and lower brightness on foreground features improved the feature's quality. * Laplacian filter: applied to detect edges, enhance them, and thus increase the points of interest, making them easily discoverable in museum rooms, even with varying lighting conditions.