ArToolKitPlus for Ogre3D

Binary Demo :

Source Code : svn on

License : other demos will be released under MIT license, but I don’t care what you do with this one.

This demo was done using :

The dancing Ogre named Sinbad was created by Zi Ye (aka “omniter”) see this post on Ogre3D website for license information.



  1. Lenno says:


    Where can I download your demo of ArtoolkitPlus + Ogre3D? I can’t find it

    Thanks in advance!

  2. admin says:

    I’m working on my website : the demo will be released in a few days, sorry…

  3. David says:

    Hi man,

    I’m trying to compile your ARToolkit Ogre3D application. First of all I get the following errors during compiling my application with the artoolkitplus headers:

    >::executeMultiMarkerPoseEstimator(ARToolKitPlus::ARMarkerInfo*, int, ARToolKitPlus::ARMultiMarkerInfoT*)’:
    /media/data/00_coding/AR-Demo/src/../include/ARToolKitPlus_impl/TrackerImpl.cpp:581: undefined reference to `rppSupportAvailabe()’
    TrackingSystem.o: In function `ARToolKitPlus::TrackerImpl::executeSingleMarkerPoseEstimator(ARToolKitPlus::ARMarkerInfo*, float*, float, float (*) [4])’:
    /media/data/00_coding/AR-Demo/src/../include/ARToolKitPlus_impl/TrackerImpl.cpp:556: undefined reference to `rppSupportAvailabe()’
    TrackingSystem.o: In function `ARToolKitPlus::TrackerImpl::arInitCparam(ARToolKitPlus::Camera*)’:
    /media/data/00_coding/AR-Demo/src/../include/ARToolKitPlus_impl/core/arUtil.cpp:71: undefined reference to `ARToolKitPlus::artkp_Free(void*)’
    TrackingSystem.o: In function `ARToolKitPlus::TrackerImpl::checkImageBuffer()’:

    and so on and so on…what did I wrong?

    my second question is, for what are you using openframeworks? I think you are using that library to get access to the webcam or?

    hopefully you can give me some informations. btw. I’m working under ubuntu 9.10


  4. admin says:

    @David : These errors are caused because you are not linking with ArToolKitPlus Project. I can’t help you that much with the linking error as I’m working with Visual Studio.

    You are right about openframeworks, I’ve just been using the version of this lib that is packaged in the FAT version of openframeworks.

    Good to see someone trying to use this ;-)

  5. rem says:

    Very nice project. How do I do without the ID marker. hiro markers such as, for example, and kanji. If you’ll be very happy to help

  6. admin says:

    @rem: sorry for the delay… been busy with other project.
    To use template marker you have to use a TrackerSingleMarker and use addPattern() method. I didn’t used them so it’s all I can told you.. Hope that can help you.

  7. Maylson says:


    First of all, thank you very much for sharing that amazing work.

    I’ve tried to compile the ArToolKitPlusDemo but I’m facing some linking errors as follow:

    1>—— Build started: Project: ArToolKitPlusDemo, Configuration: Release Win32 ——
    1>>>> not using SinCos LUT
    1>LINK : warning LNK4098: defaultlib ‘LIBCMT’ conflicts with use of other libs; use /NODEFAULTLIB:library
    1>VideoDeviceManager.obj : error LNK2001: unresolved external symbol “public: void __thiscall videoInput::setIdealFramerate(int,int)” (?setIdealFramerate@videoInput@@QAEXHH@Z)
    1>VideoDeviceManager.obj : error LNK2001: unresolved external symbol “public: static char * __cdecl videoInput::getDeviceName(int)” (?getDeviceName@videoInput@@SAPADH@Z)
    1>C:\Immersion\RA\Demos\Release\ArToolKitPlusDemo.exe : fatal error LNK1120: 2 unresolved externals
    1>Build log was saved at “file://c:\Immersion\RA\Demos\ArToolKitPlusDemo\script\Release\BuildLog.htm”
    1>ArToolKitPlusDemo – 3 error(s), 1 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I’m using Ogre 1.7.1 and Visual Studio Express 2005 sp1.

    I downloaded OpenFrameworks 0.0.6 Visual 2008 Fat from

    I uncompressed but I couldn’t find the folder “ofVideoInput”. But I found another one: \Dependencies\of_preRelease_v0.06_windows_VS2008_FAT\libs\videoInput\include\videoInput.h

    And there’s a pre-compiled lib: \Dependencies\of_preRelease_v0.06_windows_VS2008_FAT\libs\videoInput\lib\videoInput.lib

    Could you please give me some help with that? Or just put your dependecies libraries in your svn.

    Thanks in advance.

    Once again, thank you for sharing your work.

    Amazonia, Brazil.

  8. Maylson says:

    It’s working now but I have no idea why.

    For those wich has the same problem, here goes my solution:

    I downloaded OpenCV 2.1.0

    In the project, I removed all references of OpenFrameworks.

    In C/C++/Additional Include Directories, I put Dependencies\OpenCV-2.1.0\3rdparty\include

    In Linker/Addition Library Directories, I put Dependencies\OpenCV-2.1.0\3rdparty\lib

    In Linker/Additional Dependencies, I put videoInput.lib

    And it worked great!

    I dind’t know OpenFrameworks library (until I read this your post). Is it based on OpenCV? If so, is there some special reason for to use OpenFrameworks instead OpenCV?

    Thank you man!

    Amazonia, Brazil.

  9. Mike says:

    Tell me please, is it real to work with multi markers, using your ArToolKitPlusDemo source code?

  10. admin says:

    @Mike: yes, but you have to manually edit your ar_config.cfg to setup markers location.

  11. Mike says:

    Thanks for answer, i will try

  12. pokey909 says:

    I wonder how multiple single markers can be implemented in your code since you apply the transformation matrices to the camera node and not the objects themself.

    Would it work to just take the inverse of the matrices and apply them to the object nodes? But how should the camera be oriented to view them all?

  13. admin says:

    @pokey909: my code is using the TrackerMultiMarkerImpl class of ArToolKitPlus. This tracker can’t be used for multiple single markers, it is designed for tracking several markers that are fixed (you know the spatial transformations between all markers). So if you want to track multiple single markers you have to implement your own tracker (or create multiple instance of the single marker tracker, each one tracking one marker, but that would be overkill). I can’t provide you any code for that because I’m working on other demos now, sorry.

  14. pokey909 says:

    @admin Yeah i know about the multitracker. I implemented my own Ogre integration since i needed a stereo rendering (2 cameras) of the scene to display on a HMD.
    However, your code is much cleaner and nicely designed. I just always get confused about the transformation matrices of ARTK. You use them by inverting the transform to orient the camera. I just want to do the opposite and orient the object (and keep cam fixed). So using the matrices as they come in from ARTK (without the inversion) should give you the transformation of the objects right?

  15. admin says:

    @pokey909: I’ve done that (keeping the cam fixed and moving the object) in a previous version but I think that you need to keep the 180° rotation around z. Best solution is to try by yourself.

  16. Oliver says:

    Thanks for sharing your great demo.
    I successfullycompiled it and runed it.
    But I have encountered two problems.
    1. The marker detection works in the release target but not in the debug target.
    The Ogre doesn’t appear on the marker in the debug target.
    2. The application exits unexceptionally when trys to run it in the debuging mode vis VS. Each time, it exits when calling videoinput::setupdevice().
    But it is launchable by double clicking the executable file directly.
    Sorry to bother you but I have now better person to ask to.
    Do you have any idea about these 2 problems?
    The following is my working environment.
    videoinput VI_VERSION 0.1995
    OS Window7
    VS 2010
    camera: notebook web1.3M

    Thanks advanced.

  17. alekos says:

    i can download the demo code from svn??
    how i can get the code?

  18. alekos says:

    i cant download the source code from svn

  19. admin says:

    @alekos: yes, we can ;-) The link to the zip file and to the SVN are on this page.

  20. kuta says:

    hi, i was compile with the newest OGRE 1.7.2, can run, but when the marker appear in webcam, the screen became black, what’s the problem, i modified some code to compile but should not affect the main program, is it difference between 1.7.0 and 1.7.2?

  21. kuta says:

    my fault! sorry for that. I recompile artoolkitplus and every thing get right. my old artoolkitplus build was very strange that debug version and release version example got different result which i never met before. thank you for sharing the code.

  22. Andrew Fung says:

    Hi,can you explain the mean of the ar_confirg.cfg.
    # Multimarker definition file for ARToolKit (format defined by ARToolKit)
    # The number of patterns to be recognized

    # Marker 0
    0.0 0.0
    1.000000 0.000000 0.000000 0.000000
    0.000000 1.000000 0.000000 0.000000
    0.000000 0.000000 1.000000 0.000000


    And how to translate a pic to the file “”

  23. Henri says:

    @Andrew: I never have used picture pattern with ArToolkit. But the documentation of ArToolkit is available at: The specification of “ar_confirg.cfg” are explained in the link “Tutorial 3: Multi-Marker Tracking”.

  24. Andrew Fung says:

    Henri,Thank you for you respond.

  25. Mathieu says:

    Hi, I like your demo and Im trying to do the same thing using Ogre and Artoolkit (not Artoolkitplus) but i can’t find the signification of several parameters in your demo.
    How do you find your _distanceFromCamera value and how do you initialize your ogre camera (position, FOV, …)? Is there a link with your camera intrinsic parameters?

    The tracking works well but the 3D object seems to fly above the webcam image. Any idea ?

  26. Henri says:

    @Mathieu: the far plane of the camera it has 50000 and so the webcam plane is situated just before (_distanceFromCamera = 45000). The configuration of the plane is described in createWebcamPlane, My webcam has a vertical FOV of 26°. You can send me an email if you want something more specific.

  27. toshi says:

    Hi, nice project.
    I want to cover the entire window to the video plane, How should I change the code?

  28. Henri says:

    @toshi: you have 2 options: the easy one is to use a 2D rectangle instead of a background plane (but the video will be on top: I’m not sure if you can adjust the rendering order to prevent this). The other option is to set the Ogre3D camera Fov to the one of your webcam.

  29. toshi says:

    I changed Ogre camera Fov to 26 (same as intrinsic param) and video plane to background.
    It works fine. Thank you.

  30. addrian says:

    thankyou very much…..

  31. addrian says:

    how if i want to render all the environment, not only the object.

  32. gembel says:

    hi mr maylson i tried your trick but when i compiled it it was show another error like “1>LINK : fatal error LNK1104: cannot open file ‘atlthunk.lib’” what is that means… and how to solve it??

  33. bill says:


    is the source code still available for this project?

  34. Henri says:

    @bill: yes, you just need to click on the “svn on” link ;-)

  35. Zeka says:

    Finally, it works great!!!! Very nice job!!!! Thank you Henri!!!! I’ll recommend it to others!!!!

Leave a Reply