My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToUseYourOwnMarkers  
This page describes, how you can use your very own AR markers.
Updated Jul 6, 2010 by tdomhan

Introduction

This page describes, how you can use your very own AR markers. (for developers)

Details

For each marker there is a marker file. This file contains information, about how the marker looks. This information is used by the ARToolkit in order to distinguish different markers. All marker file have to be placed in the assets folder of the eclipse project. The name of this file has to be passed to the ARObject's constructor.

The tool, that allows you to create those mentioned files, is called mk_patt. It is part of the ARToolkit. You can download the windows binaries from here. The source code (e.g. for linux systems) can be downloaded here.

  1. Download the mentioned package.
  2. If your not using windows you have to compile the binaries from the source code.
  3. The executable can be found in the bin folder.
  4. Download the glut32.dll from here and place it into the bin folder. (windows only)
  5. Execute mk_patt. A command line window will appear. Hit the enter key.
  6. A live video stream from your webcam should appear.
  7. Hold your marker into the camera. The camera should be rotated until the red corner of the highlighted square is the top left hand corner of the square in the video image.
  8. Now click into the window.
  9. Enter a file name in the command line window.
  10. Copy this file into the assets folder of the Eclipse project.
  11. Refer to this file through the ARObject's constructor. (ARObject is abstract, so have a look at the class extending it, like the Model class in the AndAR Model Viewer)
  12. That's it!
Comment by rika...@gmail.com, Aug 12, 2010

AndAR seems to only consider the patterns inside the AndAR library project assets. Is there a workaround this?

Comment by aydinbet...@gmail.com, Aug 21, 2010

seems to be working to me, when you train the pattern and put it in the assets folder as explained here.

Comment by rupam.bh...@gmail.com, Sep 23, 2010

I did as mentioned for a window's system (Vista), but whenever I click on mk_patt.exe and press enter, the application hangs.

Comment by igyu...@gmail.com, Oct 9, 2010

I already made some markers. also i inserted my marker file in assert folder.but I have no idea how to adjust my markers. if i make 3 markers. i wanna show different 3d object. is that possible? and somebody can help me how to fix the source.plz help me.

Comment by project member tdomhan, Oct 11, 2010

sure, that's possible. have a look at the constructor of the ARObject. you have to specify the filename there. so you could create three different classes that inherit from ARObject. hope that helps.

Comment by srisu...@gmail.com, Nov 12, 2010

Dear tdomhan I have download the http://sourceforge.net/projects/artoolkit/files/artoolkit/2.72.1/ARToolKit-2.72.1-bin-win32.zip/download

I'm using WindowsXP

When I ran the mk_patt the app was hanged

How can I fixed it, it seems error on camera_para.dat

Thank you very much

Comment by srisu...@gmail.com, Nov 13, 2010

Dear tdomhan, Now I can run the RToolKit-2.72.1-bin-win32.zip with editing source code. I have to place camera_para.dat & WDM_camera_flipV.xml in c:\ the set default config. It run smoothly. Hope this also help others.

Thank you for your code.:)

Comment by jeanphil...@gmail.com, Feb 16, 2011

Hi, there is also another way to create your markers : http://flash.tarotaro.org/blog/2008/12/14/artoolkit-marker-generator-online-released/ Anyway, I've tried to make my own, but it works better when starting with the blankPatt.gif given with the ARToolkit. If you have any time, it would be nice to have a sample on how you retrieve the informations from an Object file. Thanks for your work!

Comment by sad...@gmail.com, Feb 16, 2011

Hello,

awesome project, but I have some troubles defining my own markers. I do not understand how you get the "markerWidth" for the markers.

Comment by derekla...@gmail.com, Apr 1, 2011

hi Tdomhan,sorry to bother u. could you like to say detail about how to do about " Refer to this file through the ARObject's constructor. (ARObject is abstract, so have a look at the class extending it, like the Model class in the AndAR Model Viewer) "

Comment by Qingp...@gmail.com, Apr 14, 2011

Dear tdomhan,you mentioned that we can place the markers out of the AndAR library project assets,so we can change our markers dynamically, but How can i do that? thank you very much! my email is Qingpoli@gmail.com

Comment by thiagofg...@gmail.com, Aug 16, 2011

How I can load direct a model, without the list? Thanks

Comment by vahakark...@gmail.com, Oct 24, 2011

Hi Tdomhan I have an issue here, the mk_patt.exe gives an error and cannot execute. it says that my computer doesn't have glut.dll. I did everything as was written above, can you please tell what my problem might be? I am using Windows 7, 64bit. I know this question may be stupid, cause I am totally noob. Thank you!

Comment by noitrait...@gmail.com, Mar 10, 2012

can who make a video to guiding a simple project andar for everyone.thanks

Comment by hiteshsh...@gmail.com, Apr 16, 2012

Hi! Tdomhan I have an issue regarding showing different objects when different markers are used. Can you lead me a way that I can follow and achieve this anyway. Thank you.

Comment by wael...@gmail.com, May 2, 2012

i am using win xp , and installed eclopse , and put the file in assets folder , how can i do "Refer to this file through the ARObject's constructor. (ARObject is abstract, so have a look at the class extending it, like the Model class in the AndAR Model Viewer) "

PLZ can any one help me

Comment by isikk...@gmail.com, May 20, 2012

According to api, the custom marker should be placed in res/raw folder. After creating your custom marker (xxxx.pat), place it into your Android project's res/raw folder. Not Eclipse asset folder. Please update description above. And thank you for this project


Sign in to add a comment
Powered by Google Project Hosting