• Nenhum resultado encontrado

Creating augmented reality

N/A
N/A
Protected

Academic year: 2023

Share "Creating augmented reality"

Copied!
62
0
0

Texto

The ARToolkit combines real world video tracking with the interaction of 3D virtual objects. In the year 1999, ARToolKit makes it possible to combine real world video recording with the interaction of virtual objects and provide 3D graphics that can be placed on any OS platform. Hirokazu Kato's ARToolKit software library is used to build AR applications in a Windows 7 environment.

In this project, source and header files are built using Microsoft Visual Studio 2010 as compiler. Autodesk 3ds 2015 is used to complete functional Virtual Reality Modeling Language (VRML) scene with animated character. Frank Baum was the first person to mention the idea of ​​an electronic display and glasses that overlay data to the people [3].

Today, head-mounted display is one of the most important devices used in both AR and virtual reality (VR).

3 AR GETS MEANING

That all changed when Hirokazu Kato of the Nara Institute of Science and Technology released ARToolKit to the open source community. It made it possible to combine real-world video tracking with virtual object interaction and provided 3D graphics that could be overlaid on any OS platform. Bruce Thomas and his team at the Wearable Computer Lab at the University of South Australia have unveiled the first outdoor augmented reality mobile video game.

When HMD crashed, users could find themselves in the parking lot of the University of South Australia joining demons on their way to kill each other. This allowed Android users to capture the world through their mobile phone cameras and see on-screen additions of nearby points of interest. In 2013, Google announced an open beta test of Google Glass augmented reality glasses, which became available to the public on May 15, 2014.

The glasses reach the Internet via Bluetooth, which connects to the wireless service on a user's cell phone.

4 THE EQUIPMENT SPECIFICATIONS

5 ARTOOLKIT

Microsoft Visual Studio 6 and Microsoft Visual Studio .NET 2003 are supported, but it is also possible to build the toolkit using free development environments (eg Cygwin, http://www.cygwin.com/). A binary package containing GLUT for Windows can be downloaded from http://www.xmission.com/~nate/glut.html. DirectX Runtime Verify that DirectX Runtime is installed: with Windows XP it is installed by default.

GL.H, GLU.H and glut.h header files are copied to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL. Glu32.lib, glut32.lib and opengl32.lib library files are copied to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib. After this, all the executable files located in the C:\ARToolkit\bin folder can be deleted because new versions of the executable files are built with Microsoft Visual Studio 2010.

It can be used to control video playback, sound effects and peripheral input such as keyboard, mouse or joystick [19].

Table 3. ARToolKit prerequisites for Windows.
Table 3. ARToolKit prerequisites for Windows.

6 ARTOOLKIT PRINCIPLES

7 MARKER-BASED TRACKING

Four known points are enough to calculate the position of the camera uniquely and the easiest way to get these points is to use black square markers [21]. Because of the fast and reliable detection, many systems use black and white square markers. The camera used must find the contours of the markers and then collect locations of the corners of the marker in the image.

When detecting the position of markers, the system uses information from the detected location of the markers. Before the markers are detected, the system must acquire a grayscale image of the used marker. When an image is processed, the first task the system must perform is to find the edges of the marker used.

When the system finds potential markers, the location of the markers is not distorted to fit the line. When the system samples the 4 corner points using the track grid, the 4 straight lines are extended to their full length to find the exact corner points of the markers. When the system detects the 2D locations of edges and corners, even small detection errors can affect the calculated camera pose.

ARToolKit is one of those programs that assumes the markers are located at a suitable distance from the camera. There are results shown on the ARToolKit site where you can see how the camera's distance and size affects the markers when they are tracked. The location of the markers can be shown with 3 translation coordinates (x, y, z) and orientation as 3 rotation angles (a, b, c) around the 3 coordinate axes (picture 5).

The position of the calibrated camera can be uniquely determined from a minimum of 4 coplanar but non-collinear points [21]. In this thesis, the system is calculating marker poses in 3D coordinates using the 4 corner points of.

Table 4. Tracking range for different sized markers.
Table 4. Tracking range for different sized markers.

8 TEMPLATE MARKERS

For example, the similarity value of the markers can be based on SSD (sum of squared differences) or cross-correlation.

9 BUILDING ARTOOLKIT WITH VISUAL STUDIO 2010

The second test is made to confirm that OKER HD 335 HD Web Cam supports ARToolkit graphics module with OpenGL. A minimum frame rate of 15 fps (frames per second) is recommended, 30 fps is used and tested in this thesis. To test and show that video input is working, execute videoTest.exe from the C:\ARToolkit\bin folder.

Tests show that the OKER HD 335 HD webcam supports the ARToolkit video module and the ARToolkit graphics module (Figure 9). After the projects are successfully built, the 4 library files should be copied to the C:\ARToolKit\lib folder. These library files are and can be found in these locations:. antlr.lib, can be found in C:\ARToolKit\OpenVRML\src\openvrml- 0.14.3\ide-projects\Windows\VisualC7\OpenVRML\antlr\Release. openvrml.lib, can be found in C:\ARToolKit\OpenVRML\src\openvrml- 0.14.3\ide-projects\Windows\VisualC7\OpenVRML\openvrml\Release folder. openvrml-gl.lib, can be found in folder C:\ARToolKit\OpenVRML\src\ openvrml- 0.14.3\ide-projects\Windows\VisualC7\OpenVRML\openvrml-gl\Release. regex.lib, can be found in C:\ARToolKit\OpenVRML\src\openvrml- 0.14.3\ide-projects\Windows\VisualC7\OpenVRML\regex\Release.

After all the library files have been copied, open the ARToolKit.sln file again from the C:\ARToolKit folder with Visual Studio 2010. In this window, select Configuration Properties and check the libarvrml and simpleVRML boxes and confirm by clicking Apply and OK button . Then open simpleVRML properties and property pages and select Linker (General) from the configuration properties.

The output file option has been changed to (Figure 17). After library files were copied to C:\ARToolKit\lib, the SimpleVRML project was rebuilt without errors.

10 CALIBRATING THE CAMERA

The camera is pointed at the calib_dist pattern so that all the dots are in view and the left mouse button is clicked. After this, image is clicked with a left mouse button and dragged to draw a black rectangle over each point. When all 24 dots are found and the left mouse button is pressed again, the program saves the position of the dots and unfreezes the video image.

All captured images and calibration can be checked each time you click the left mouse button. The program calib_dist.exe The program stops when you click the right mouse button. The program for calibrating the camera for the lens and the program file for other parameters can be found in the C:\ARToolKit\bin folder.

The board is placed in front of the camera so that all the grid lines are visible as large as possible. The white line can now be moved to the top of the black grid line. The white line is placed on top of the black grid line as closely as possible.

When the line is rotated clockwise and counterclockwise, click the left and right arrow keys to move the line. This procedure is continued until every grid line from left to right has been placed. The positioning process is repeated 5 times and the calibration pattern is now 500 mm away from the camera.

To use the new camera parameters, the oker_parameters.dat is renamed to camera_para.dat and the file is placed in C:\ARToolKit\bin\Data folder. The distance between grid line values ​​from the calib_cparam_sub.c source code file can be adjusted if needed.

11 TESTING ARTOOLKIT EXAMPLES

12 MAKING OWN AUGMENTED REALITY

Once a character is made, it can easily be used with many modeling and rendering programs to create and render human figures. These 3D figures can be processed again with other programs that can handle 3D images and animations. Testing can now be started using patt.run, patt.walk, patt.crouch and patt.jump tags.

When the OKER HD 335 HD webcam is pointed at different tags, a 3D character appears on top of each tag. Testing shows that animations are not displayed because Cinema 4D does not fully support VRML scene export. Therefore, the animated characters are exported as an FBX file using Cinema 4D as the exporter.

The created 3D characters in FBX format are imported into Autodesk 3ds Max 2015 in FBX format (Image 30). Tests show that the camera identifies the Run cursor and the animated 3D character appears and runs on top of the cursor (Image 33). Several tests show that the camera identifies each marker and various animated 3D characters appear on top of each marker.

Testing also shows that animated VRML scenes made using Autodesk 3ds Max 2015 render correctly and that the files are compatible with ARToolKit.

13 SUMMARY

Retrieved from http://research.microsoft.com/en-us/um/people/szeliski/book/drafts/szelski_20080330am_draft.pdf [January 4, 2012]. Proceedings of the 6th IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR).

Imagem

Table 1. Lenovo Z500 specifications
Table 2. OKER HD 335 HD Web Cam
Table 3. ARToolKit prerequisites for Windows.
Table 4. Tracking range for different sized markers.

Referências

Documentos relacionados

10 Criada em 1957, a ACARESC – Associação de Crédito e Assistência Rural de Santa Catarina ‒ se constitui como órgão executor da extensão rural no Estado de Santa