Design and realization of relic augmented reality system of integration positioning and posture sensing technology

On the purpose of presenting the old appearance of the relics through digitalization, and overlapping the virtual scenes with the actual scenes at the relic site, in this paper, we introduced the positioning technology, posture sensing technology and system development technology, put forward constructing cultural relic tourism platform based on integration positioning and posture sensing technology, we conducted detailed research and analysis on the users’ experienced process of cultural tourism, designed a relic augmented reality system of integration positioning and posture sensing technology. This augmented reality system mainly utilizes positioning technology to guide the users to the correct location of the relic on the corresponding map, and then overlaps the virtual object with the real relic, achieveing a 360-degree view of the overlapping effect, and the presentation effect of near-small, far-big. The system mainly employs Unity to develop the system and realize the above system on mobile terminal. It is no longer limited to a fixed point experience environment, and is suitable for outdoor natural scenes, it makes a breakthrough on the traditional overlapping of virtual scenes and real scenes, realizes the precise overlap of virtual 3D scenes with actual images, and enables the users to feel the vicissitudes of history along the movement of the mobile device in outdoor natural scenes, so as to inherit the history and culture, enrich the information and add some fun to the displayed scene, it has the advantages of bringing people more immersive feelings compared with the traditional virtual display platform.


Introduction
Cultural relics are the quintessence of our ancestors' wisdom, which directly reflect the historical, social, technological, economic and aesthetic values of human social development, and serve as an indispensable material evidence for our social development. Along with the development of social economy, the progress of technology and the popularization of network and computer [1] , relic inheritance are gradually shifting from physical protection to digitalized technology protection to a large extent, the digitalized inheritance and protection of relics has also become increasingly acceptable to the public [2] .
With the assistance of optoelectronic display technique, interaction technique, computer graphic technique as well as visualization technique, augmented reality system can create virtual object that does not exist in the real environment, and accurately place the virtual object into the real environment by use of sensor technology, which refers to integrate the virtual object into the real environment as a whole, present the users with a new environment that can bring them real sensory effects, enable the users to convince their sense organs that the virtual object is an organic part of the real surrounding environment [3] . Visitors to the cultural relics are unable to see what the relics looked like in the past. It can be very difficult for a modern visitor to picture the past brilliance of an ancient site. For this reason, some relic sites adopt an augmented reality system. Visitors equipped with outdoor augmented reality system can see the revived history created by the computer, and get some insight of the situation of cultural relics at that time [4] . In recent years, augmented reality technology has witnessed rapid development and become a good choice for the digital presentation of cultural relics.
In foreign countries, some European and American countries have carried out extensive exploration and research in the cultural relic protection area, applied augmented reality technology to protect the relics in situ, broke the span between time and space, and presented the scenes to users in different forms through a precise integration of virtual and real scenes [5] . In 2001, some research units in Greece joint together to develop a set of wearable AR system [6] , revived the Greek Olympic Temple in a complete way, people who travel here can see the vivid old appearance of the historical sites as well as the historical incidents took place there many years ago, so as to help people to gain a deeper understanding of these cultural relics. A Germany research group named Fraunhofer established AR project on the handheld device [7] , they employed augmented reality technology to present the historical changes of the Berlin wall on this device. By using the UMPC to photograph the relic, the user could see the old scene of the relic shown by the device. The Miralab laboratory in Switzerland made significant scientific achievements in the restoration of the relic site [8] .
Considerable progress has also been made in the cultural heritage protection in China. For example, professor Yongtian Wang and his partners from Beijing Institute of Technology have made outstanding contributions to the protection of cultural heritage [9] , they developed an augmented reality system that is suitable for outdoor scenes, and has achieved great results in the scene reconstruction of The Old Summer Palace.Professor Yongtian Wang and his research team successfully restored the site of the Xiyang Site of The Old Summer Palace by using augmented reality technology. Users can observe the original appearance of the site through a fixed-point observation system, thus enhance the restoration of the historic site [10] . This digitalized cultural relic protection technology has also made a successful case when applied to the Luoyang Paradise relic project, the new paradise of Luoyang relic [11] , which was built by the use of augmented reality technology, opened to tourists in April 2014, enabled tourists to feel the sacred hall culture more closely. This is a large-scale palace relic, which is based on the projection of space augmented reality technology, as it has low requirements for spatial positioning, it does not require registration algorithm of real-time tracking based on location and direction. Visitors can observe different 3D virtual models in different location, the perfect display of historical features will become a model of heritage conservation.
In this paper, by basing on positioning and posture sensing technology, an augmented reality system based on positioning and posture sensing technology is designed and implemented, navigation to the relics can be achieved through positioning technology, then the virtual 3D scenes and real scenes can be precisely overlapped through posture sensing technology, it is no longer limited to a fix-point environment experience, by holding a smart mobile terminal in the hand, people can feel the integrated images of real scenes and virtual scenes in the process of moving. It improves the interaction between people and cultural heritage, promotes the cultural heritage to be better publicized and protected.

Overall framework
This augmented reality system adopts a three-layer system framework, which are data layer, control layer and presentation layer.
The data layer mainly process scene database and overlay virtual model data. Among them, the scene database is used to load the relic map and other related resources; virtual model data refers to overlap the virtual relic models on the relic object.
The control layer includes resource loading,scene identification, accurate positioning and network sharing. Resource loading refers to load resource offline to realize online and offline resource loading. scene identification is implemented through visual SLAM technology, so as to identity the surrounding environment around the relic, finish the initialization of overlapping virtual and real scenes. Precise positioning refers to utilize arithmetic to accurately overlap the virtual object and real object in moving process. Network sharing control realizes the interface transmission between software and WeChat, it also offers shooting share function.
The presentation layer includes real scene scanning, overlap of virtual and real scenes, voice narration, video recording and WeChat sharing. Real scene scanning refers to obtain the feature points in the environment to match. By utilizing arithmetic, the virtual object can be accurately overlapped on the real object. Voice narration explains the historical background and scientific effect of the current scene. Video recording saves the overlap scenes of virtual and real scenes to local area, which can be used to retrospect and popularize the current relics. WeChat sharing facilitates the spreading and popularization of the site. The system structure diagram is shown in figure 1.

System model design
The software development is made up of 3 sections, including planning, art design and programing, Fig. 2 is a diagram illustrates the system's overall module division, which also serves as the main basis for work division.  The system is mainly divided into two scenes. The first one is the positioning scene. Users are roaming to the correct site location on the corresponding map through the positioning technology. The second scene is the augmented reality scene, which is achieved through posture perception. Through visual SLAM technology, the virtual object is superimposed on the actual site, and the virtual and real superimposed effect can be viewed in 360 degrees, and the presentation effect of near-small, farbig can be achieved. In Unity3d, the system logic and roaming scenes are loaded and switched through C# script, and the relic augmented reality system is eventually generated. The generated virtual tourism landscape is exported from Unity3d to APK file, which can be applied on mobile devices and eventually form a complete relic augmented reality system. In this system, the user can roam around the tourism landscape in the first person, the main interface procedures in the system is shown in Figure. 3 below. Currently, world outdoor positioning technology mainly includes GPS satellite positioning and inertial sensor positioning [12] . This system mainly adopts GPS satellite positioning technology, and is based on Baidu map SDK as research basis, by packaging the Baidu Android positioning SDK into jar package, so as to acquire and invoke the GPS data processed by Baidu SDK through C# language under the Unity development platform. The illustrative example is shown in Figure. 4.

Positioning information and virtual coordinate mapping technique
The Baidu longitude and latitude information can be obtained through Baidu positioning SDK, then the information will be transformed into a 2D coordinates of the virtual scene in Unity3D. The obtained coordinates of virtual scene can be used to accurately load the corresponding map and user information. To correct possible location deviation, a precise point on the upper left corner of the map is set as a correction point. The illustrative example is shown in Figure. 5 below.

Posture sensing technique
This technology mainly consists of two parts. One is visual SLAM technology, which refers to have the virtual relic fixed in the real scene. By recognizing the plane in reality, combine the virtual object and plane information together in the real scene, so as to realize the integration of the virtual object and the real scene. Finally, by generating binocular view to generate 3D visual effect that is visible to human eyes. As for the other part, it is considered that during the actual touring, the postures of users' terminal unit are uncertain each time the users experience augmented reality system, and each initialization of visual SLAM technology is closely related to the posture of the camera at that time, which means the location where the virtual model overlaps the real scene can be different each time, as a result the virtual relic cannot accurately overlap with the real relic. Therefore, in order to have the virtual relic accurately overlap with the real relic, a posture adjusting arithmetic is designed as follows figures.  In the virtual world(Unity Coordinates system), according to the visual SLAM principle, C indicates means that each initialization position of the scene camera is oriented towards the right ahead, in the Unity, the camera is provided with a parent object to make it orient towards right north. Therefore, during each initialization of the camera, the right ahead refers to the right north. (1) x r and y r refer to the GPS position information of the real relic is converted into the two-dimensional coordinates in Unity through mapping technology. Similarly, x u and y u refer to the GPS position information of the user is converted into the two-dimensional coordinates in Unity through mapping technology. The two coordinates are respectively used to obtain tangent value through deduction, and the angle between the relic and the north is obtained. θ refers to the angle between the camera and right ahead, whose range is (-180，+180). The difference between the two values is the value of u. So the position of the virtual relic is as follows: In the virtual world, the camera's initial orientation is always towards right north. In the real world, the angle between the camera and the north is θ in the coordinate system, so in the virtual coordinate system, the rotation angle of the virtual relic is -θ.

System realization
This system is different from the existing mobile augmented reality system, it integrates positioning and sensing identification technology and is suitable for outdoor environment. The overlap of virtual scenes and real scenes is achieved through the positioning system of mobile terminal. This system is mainly used to enable users to get to the destination site through navigation function in the mobile terminal positioning system, so as to accurately overlap the virtual relic model with real site through posture positioning, and share the presentation effect, realize the function of augmented reality roaming system. Main functions are as follows: 1)Display current position: through network connection, it will display the current GPS position information.
2)Destination relic area selection: select current region, and load corresponding map, current mobile terminal location, destination relic area, etc. according to geographic position 3)AR experience: within a certain range of the destination area, the AR experience button can be loaded out, click the button to precisely overlap the virtual site model on the real site through posture positioning. 4)Posture sensing: the visual SLAM technology is implemented on the platform of Unity3D, so as to extract the environmental features, then, the virtual object can be precisely overlap on the real relics through adjusting the posture of virtual relic.  2) The algorithm of virtual relic posture adjustment is designed and realized, which achieves the purpose of innovation.
3) On the basis of the research of relic protection, the augmented reality system is designed and developed, which can guide and navigate the visitors in the process of moving, enable the users to appreciate the overlap effect of virtual scenes and real scenes, help the tourists to obtain a deeper understanding of the cultural relics, and enhance their protection awareness of cultural heritage; At the same time, it breaks the time and space limitations to realize personalized touring of cultural sites. This mode will facilitate consumers' cultural demand and bring a digital reform to the tourism industry.

Outdoor positioning techniques
As for this system, further research work remains to be done, so as to improve the accuracy of overlap, optimize outdoor illumination intensity as well as positioning accuracy, figure out the disturbing factors' impact on the augmented reality system. Therefore, further discussion and research remain to be done.