Squares in the video input stream are matched against pre-trained patterns. These patterns are loaded at run time and are contained in the Data directory of the bin directory. In this directory, we find for example patt. This file contain the pattern format, simply a sample image. In order to change the pattern recognized in simpleTest you need to modify your code and create a new template file. You can modify the simpleTest.
|Published (Last):||17 February 2010|
|PDF File Size:||13.42 Mb|
|ePub File Size:||12.77 Mb|
|Price:||Free* [*Free Regsitration Required]|
Next go the folder where you downloaded the ARToolkit to and double click on it. In the next window click on import to import the whole package.
If everything is imported correctly there should be no errors in the console window. Once everything is imported the next step is to populate the empty scene. We will need three empty objects and one camera object. If done correctly the Hierarchy window in Unity should look like this: After populating the scene in Unity we will start using the imported ARToolkit package.
In the inspector window we will have to make some adjustments to the added scripts to get them working. In this component we will not have to change anything. The last adjustments we will have to make are to the layers of the objects. Building the app at this point will look like it is not working. This is the object that will appear on the screen. As making beautiful intricate objects in Unity is not a part of this tutorial we will add a simple cube or sphere.
Change the scale in X, Y and Z to 0. You can always change the size to whatever you prefer later. Now zoom in to the object. To make sure the object is projected above the marker move the marker in the negative Z direction to about It is always possible to change this to the amount you want, but after some tests I found We are finished and ready to test it!
If we push the play button the object will appear on top of the marker when we put the pattern in front of the camera. The last thing we need to do is make a nice mobile app.
Make an Android app To make an Android app of the project we just created you could just try to build it and choose Android as the Platform. When doing this myself I did not get the camera stream as soon as I started the app. After some tweaking I found that the settings in the Plugins of the ARToolkit package needed changes from its initial settings.
It may work for you with these initial settings, but I had to change them. To change the settings you will have to choose the Plugins folder in the Assets. You will see 6 folders Android, ARWrapper. The Metro folder has two subfolders, Win81 and WindowsPhone Which have multiple subfolders themselves. In subfolder arm of Win81 click on the ARWrapper file and make sure nothing is selected. The WindowsPhone81 folder has two subfolders, arm and x Make sure that nothing is selected in the ARWrapper file in both folders.
It maybe that on windows machines other operating systems appear, I would make sure that x86 is checked for every appearing operating system. Now make sure only the checkbox for your created scene is selected. Under Platform select Android and click on the Player Settings button. It will open some settings you can change in the inspector window.
The only thing I changed here was the name of the app in the Product Name textbox. This is the name that will appear on your mobile phone, so choose a nice one. You can add a default icon or change the company name to make the app more personal. Then click the build button and save it wherever you prefer. After the apk file is created copy it to your phone and install it.
After installation the first time you run the app, it will ask for permission to use the camera. Of course this is needed for augmented reality so allow it. Making a birthday card The only thing left is to make a birthday card. You can make any card you imagine as long it has the marker somewhere hidden.
Do not make the marker too small, otherwise it will not recognize it. Also make sure the black outer border of the marker is visible. Also visible in the video is that it is not very stable if the marker is small. The closer you put the camera to the marker, the more stable the object appears.
ARTOOLKIT DOCUMENTATION PDF
Augmented Reality AR is the embedding of computer generated content into the natural environment, and has many potential applications in entertainment, media, advertising, industry, and academic research. Each of the individual platform downloads include a README file and example applications to help you get started immediately. The documentation pages here include: detailed APIs, tutorials, and examples from novice to expert levels. ARToolKit uses computer vision techniques to calculate the real camera position and orientation relative to square shapes or flat textured surfaces, allowing the programmer to overlay virtual objects. ARToolKit currently supports classical square marker, 2D barcode, multimarker, and natural feature tracking. Furthermore, ARToolKit supports any combination of the above together.
Creating Augmented Reality Cards with Unity and ARToolkit
In order to run the code you need to print out the hiroPatt. Best performance is achieved if this is glued to a piece of cardboard to keep it flat. In each case the simple program output is the same, so the final section describes how the simple program looks when it is running in different platforms. Running ARToolKit In each platform you have generally two choices: click on the program from your OS explorer or starting from the command line: the last choice is better since it give you the error and standard output stream and ARToolKit used it a lot. Each platform offer a dialog box to setup the video before starting the main AR loop.
Dive into the world of augmented reality.
Next go the folder where you downloaded the ARToolkit to and double click on it. In the next window click on import to import the whole package. If everything is imported correctly there should be no errors in the console window. Once everything is imported the next step is to populate the empty scene. We will need three empty objects and one camera object.
Subscribe to RSS