Библиотека дополненной реальности для processing
Posted by Den Ivanov on 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);
}
35
Posted by Den Ivanov on November 23rd, 200935 year old! Lets party!!!
- No related posts
Processing библиотека для PS3 Eye
Posted by Den Ivanov on November 23rd, 2009After lots of unsuccesful test with PS3 Eye camera and JMyron, i decided to wrote my own library for processing for PS3 Eye. And now after 2 days of learning and hard coding my first DLL in C++, exploring JNI i finally releasing version 0.0.1 of PS3Eye Processing Library
How to install:
1. First install Win32 drivers for PS3 Eye camera. You can get latest version from AlexP blog - http://www.alexpopovich.com/blog/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/
2. Copy PS3EyeLib.dll from you /Program Files/AlexP/ folder to /windows/system32/ or any other folder listed in you %PATH%.
3. Extract zip to libraries folder.
Sample code:
import ru.cleoag.;
PS3Eye p;
PImage img;
int cameraWidth = 640;
int cameraHeight = 480;
int cameraRate = 60;
void setup(){
size(640,480);
p = new PS3Eye(this);
p.start(cameraWidth,cameraHeight,cameraRate);
img = createImage(cameraWidth,cameraHeight,RGB);
}
void draw(){
background(0);
p.update();
p.imageCopy(img.pixels);
img.updatePixels();
image(img,0,0,width,height);
}
void stop(){
p.stop();
}
Еще один Augmented Reality проект Winston XS
Posted by Den Ivanov on November 19th, 2009First test video for AR Winston XS project. Still need some improvements on speed and background removal.

Follow me!