SEMI-AUTOMATED CEMETERY MAPPING USING SMARTPHONES

Cemeteries are being considered as a symbol of love, religion, and culture across the globe. The maps of cemetery and grave are the interest of individuals and communities, who wants to identify the resting place of their beloved ones. It is also crucial to administrators who are building and maintaining cemeteries in urban space. Mapping cemeteries and its graves are complex and challenging since the practices involved in burying and policies for managing are different in regions. It is challenging for an individual to identify the graves of their beloved in a cemetery with thousands of graves. This study aims to address this problem by geotagging individual grave using the smartphone. The developed method allows the user to click pictures of the grave, add information like name, photo, surname, year of birth and death of the individual resting, and also enable the user to add a personal message or poem. These pieces of information are stored along with latitude and longitude are visualised as points on the google map in QGIS platform. In case of gravestones with a proper inscription, the user can mark its boundary so that the text embedded can be recognised automatically using the Google Tesseract OCR library in python environment. The Uncali Cemetery in Antalya had been chosen for this pilot study. The present framework extracted information with the accuracy of 65 %.


INTRODUCTION
Cemeteries are an intersection point between cultural heritage, religion and outdoor recreation, and essential in public life (Nordh and Swensen, 2018).They are also considered as a symbol of love, religion, and culture across the globe.Due to rapid urbanisation and associated population growth, the demand for the resting place is continually increasing and at times unmanageable in the urban setup.This has emerged as a serious concern to many urban municipalities across the globe since the sentiments are attached to it.Spatial mapping of graves provides an opportunity not only to manage efficiently, but also to locate quickly.It is quite difficult to generalise the managing practices followed by urban local bodies across the globe, it's mainly based on the religious practices followed in the region and space constraints.* In most of the literature, mapping cemeteries were generally part of archaeological studies (De Laet et al., 2015;Lysandrou and Agapiou, 2016;Salesse et al., 2018;Staboultzidis et al., 2017), and some was categorised in natural developments such as bird diversity in urban space (Tryjanowski et al., 2017).The geographical information system has been utilized in the development of the cemeteries in different parts of the turkey, and there are several projects associated with it.The idea of this pilot project is to cut down the cost spent on building a database using sophisticated advanced mapping technologies by introducing simpler yet efficient * Corresponding author mapping technique using smartphone and crowdsourcing technique.
In the city of Ankara, Ankara metropolitan municipality published an online map with the information of the graves, which allows users to find the location and other information of their beloved ones' on the digital kiosk.This is to reduce the workload of the workers guiding visitors at the cemetery.Mainly aimed to facilitate visitors during special days: Fathers, Mother's Day, and on other religious festivals (Ankara B.B., 2018).
Istanbul, Izmir, Malatya, Antalya municipalities have also developed similar information systems for helping the visitors of cemeteries, but some do not include the records from the past, example Izmir Cemetry (Figure 1).

Figure 1. GIS map of Izmir cemetery
Cemeteries are very dynamic, requires updating.Since most of the cemetery database in Turkey was created using traditional surveying techniques, it is difficult to update the maps produced and consumes enormous time and effort.Also, the information given by the kiosks contains the parcel number of the grave instead geolocation (latitude and longitude), and the visitor should follow the instructions and signboards given in the cemetery to reach out the beloved ones'.The gaps in the existing system motivated us to undertake this pilot study for extracting location and other information (Date of birth and demise, quotes and names) of the graves using simple smartphones.The proposed approach not only allows to search and locate a grave, but also enable navigation to it.Moreover, makes the updating process simple just by clicking a picture of the new gravestone.

MATERIALS AND METHODS
Uncali cemetery located at 36°53'51.8"N30°37'29.0"Ehas been selected as a test site for this study.It is one of the biggest cemeteries in the city of Antalya with thousands of graves.In this study, 170 graves were selected which are randomly distributed across the Uncali Cemetery.Figure 2 shows the location of the cemetery on the Turkey map.

Data collection
The images are acquired in RGB composite with 3000 × 4000 pixels using iPhone SE mobile phone having a 12megapixel rear camera and Apple A9 processor.The images collected were Geo-tagged, thus allows us to extract the latitude and longitude from the image.In general, the Turkish headstone / gravestone has the following information: name, surname, date of birth and date of demise.Also, few gravestones include a passage from holy books or poems.'Ruhuna Fatiha' is mostly being embarked in gravestone meaning "prayers for the soul", seeking visitors to pay homage to the resting soul by reading specific passage 'Fatiha'.Figure 3 is a typical example of Turkish gravestone.Turkish cemeteries also include the graves of other religion followers.Figure 4. Shows the gravestone and grave of a Christ follower.
Figure 4. Showing a gravestone of a Christ follower.

Method
The study has four significant processing steps:

Image acquisition
Any smartphone with a camera and navigation system can be used to capture the image.Geotagging option in the camera must be enabled.It is recommended to click the image of a single gravestone at a time.Avoid oblique acquisition that can cause false or no detections in the text extraction process.

Location extraction
Images clicked in smartphone are having an Exchangeable image format (EXIF), which include details about the manufacturer, model, orientation (rotation), operating system, date and time of the image, YCbCr positioning (luminance component), compression X and Y resolutions, resolution unit, exposure time, Exif version, exposure bias Max.Aperture value, focal length and geolocation.

Pre-processing of the images
The image dpi values were improved first with the use Phyton Imaging Library (PIL) which downscale image with high quality.The dpi was set as 500 empirically, but this already means a high-quality image.Then, the images were filtered with a mean adaptive threshold which is the mean of neighbourhood area of search kernel.Then, the images were processed with morphological filters, opening and closing.The kernel was restricted to 3 x 3 pixels.
Figure 5. Pre-processed image for text extraction

Text extraction
This step is to extract the information written on the graves automatically.The date of birth and demise were extracted using the Google Tesseract library.Tesseract is an open source text recogniser (OCR) Engine, available under the Apache 2.0 license.It can be used directly, or (for programmers) using an API to extract text printed on the images.It supports a wide variety of languages.
For example, the following information was extracted from Fig 5 .['RUHENA', 'EATEHA', 'D', '07', '03', '1938', '6218', '12', '1999'] Here we had compared the extracted numbers with four digits, and the maximum one was assigned as 'death year', and the minimum one was assigned as 'birthyear'.At times, the letters could not be recognised by terrasact library due to obstruction of small vegetation in front of graves or oblique acquisition or failure of the library.Therefore, the user input option is set as default (figure 6) in this version, so, the name, the surname can be entered manually while the birth and death year are extracted automatically from the images.
Figure 6.Python console is showing automatic extracted birth and death year information and seeking input from users for name and surname.

RESULTS
In this study, images of 166 graves (randomly distributed across the cemetery) were captured and processed.The information extracted from the graves were automatically converted into an ESRI shapefile with details: Name, Surname, A_Birth (Automatically extracted), A_Death, Birth (Automatically extracted), Death, Latitude, Longitude in the database.

CONCLUSIONS
The result of this pilot project is satisfactory by considering the complicity involved in mapping graves and its importance.The framework followed not only allows the user to search and locate a grave, but also enabled them to visualise it spatially.This also allows one to update the existing database by merely clicking a picture of the new gravestone.The future work focusses on making it completely automatic by incorporating all the algorithm and visualization in the smartphone itself as an application.The comprehensive app for grave and cemetery mapping will allow the user to add more information about the beloved one, in addition to the information available in the gravestone.The database can be built upon a crowdsourcing platform.The accuracy of automatic information extraction, mainly depends on the position, angle and condition (presence of an obstruction in the FOV) in which the images are acquired and the processing mechanism.Some of which are left for future research work.

Figure 2 .
Figure 2. A map showing the location of the Uncali Cemetery (source: Google maps)

Figure 3 .
Figure 3. Showing a typical gravestone of Turkish, this gravestone belongs to the grave of Necip Demir (the father of Nusret Demir, first author of this article).
A_Birth and A_Death refer to the information which was automatically extracted birth and death year information with use of Tesseractt library.The automatically extracted information was validated with the field observed the position and textual values in the QGIS software package.The accuracy of automatic extraction was 65%, which the preprocessing of the images have a direct effect on the results.Better preprocessing and the making the letters with better contrast, would increase the extraction rate.One other problem is any obstacles (e.g.vegetation in front of the letters) decrease the correctness rate.The extracted shapefile was further visualised by overlaying on the Google Maps through QGIS.Showing: (A) Location of graves and (B)Attribute table of one of the grave selected (highlighted in red colour in the first image).