Multiple AR Markers library for processing
Augment Reality, Processing December 4th, 2009Finally i put online MultiARToolKit Processing library for working with multiple AR markers in one scene. Based on SimpleARToolKit library from Brian Chung
How it work (demo video)
Sample sketch (also included in zip file)
import ru.cleoag.MultiARToolKit.*;
import net.sourceforge.jartoolkit.core.*;
import JMyron.*;
import processing.opengl.*;
JMyron m;
PImage img;
MultiARToolKit ar;
int capWidth, capHeight;
void setup() {
size(800, 600, OPENGL);
capWidth = 640;
capHeight = 480;
m = new JMyron();
m.start(capWidth, capHeight);
m.findGlobs(0);
img = createImage(capWidth, capHeight, ARGB);
ar = new MultiARToolKit(this, capWidth, capHeight);
ar.addPattern("patt.hiro", 80, 0.0f, 0.0f,"displayCube");
ar.addPattern("patt.kanji", 80, 0.0f, 0.0f,"displaySphere");
lights();
stroke(0);
}
void draw() {
background(0);
m.update();
System.arraycopy(m.image(),0,img.pixels,0,capWidth*capHeight);
img.updatePixels();
hint(DISABLE_DEPTH_TEST);
image(img,0,0,width,height);
hint(ENABLE_DEPTH_TEST);
ar.showObjects(img,100);
}
void displayCube(MultiARToolKit _a) {
fill(0,255,0);
translate(0,0,40);
box(80,80,80);
}
void displaySphere(MultiARToolKit _a) {
fill(0,0,255);
translate(0,0,40);
sphere(40);
}
Ready to receive fresh news from my site? Subscribe to my RSS.
I am Multitouch and Augmented Reality developer from Moscow, RUSSIA. 13 years expierence in Flash, 7 years in Lingo, 5 years in Processing and lots more!









2009-12-24 at 11.09 am
а где можно увидеть подобную библиотеку но для as3 ?
2009-12-24 at 9.46 pm
О, круто. Гляну обязательно. Интересна реализация.
2010-01-12 at 3.55 pm
[...] 如果搞定了上一节的设置,这节就简单了,这里有现成的几个实现artoolkit功能的库,下载解压放到文档-Processing-libraries文件夹里运行其中的例子就是了。可以用SimpleArtoolkit,或者 NyARToolkit,还有基于SimpleArtoolkit但是可以支持多个ar成像的MultiARToolKit。 [...]
2010-02-27 at 12.03 pm
Nice work
Are you willing to share the source code, too?
Kind regards,
Justis
2010-03-01 at 12.06 pm
Is it supposed to work on osx ? I’ve already found an intel compiled version of JMyron ( that didn’t work before ).
I get this error :
java(17970,0xb1636000) malloc: *** error for object 0×5: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Exception in thread “Animation Thread” java.lang.UnsatisfiedLinkError: no JARToolKit in java.library.path
Do I need to download something else next to it ?
2010-03-09 at 10.07 pm
Hi guys, it will be great if you can throw some idea. Thank you:
How can we get the coordinates of one marker with respect to the main coordinate system?
For example how can we get the draw a line in processing between the two markers.
2010-04-15 at 1.35 pm
Hi, I wonder why it does not execute properly. Only empty white window pops up and disappears quickly. That’s all and nothing’s drawn.
I inserted some printing code for test, and I found the problem occurs at the statement “ar = new MultiARToolKit(..)”.
Anyone can tell me what version of processing and JMyron make this runs properly. Will the version be a problem?
2010-04-19 at 8.59 am
Hello, thanks for the demo. I’m doing a presentation next Wednesday called “beyond markers” to get people ready for our Global AR Hackathon Open Trials this weekend 4/24. I want to include your library in the list of admissible libraries. Is this kit released under an open source license? Can I teach people how to use it? If they do, what kind of attribution does your library require?
2010-06-18 at 8.45 pm
I have the same question!
modelX and screenX dont work…
Otherwise the library work fine, thank you!
2010-06-27 at 8.40 pm
Hi,
This is what I do with your library, thank a lot!
Its a pedagogical application to describe the story of solar systeme comprehension.
http://www.vimeo.com/12851640