We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › simple ARToolkit
Page Index Toggle Pages: 1
simple ARToolkit (Read 5226 times)
simple ARToolkit
Nov 18th, 2008, 9:24am
 
I am trying the simpleARToolkit by Bryan Chung:

http://www.bryanchung.net/?p=227

And i have everything work very good. Except it has problem of "out of memory" with the highlighted code "ar01.showImage()".

I have checked the source of the library and found that it is using the Capture class of the video library. Pixel by pixel display.

My code is here:
http://www.the-demos.com/artoolkits_try1.zip
which is super sample by just show the camera image. It has the error "out of memory" after running around 1 minute. Does anyone come across this problem as well? And do anyone know the solution? I am using 0135, 0142 and 0156 and got the same error.

import processing.video.*;
import processing.opengl.*;
import saito.objloader.*;
import javax.media.opengl.*;
PGraphicsOpenGL pgl;
GL gl;

import pARToolKit.*;
SimpleARToolKit ar01;



void setup()
{
 size(320, 240, OPENGL);
 //hint(ENABLE_OPENGL_2X_SMOOTH);
 hint(DISABLE_DEPTH_TEST);
 frameRate(24);
 pgl = (PGraphicsOpenGL) g;
 gl = pgl.gl;

 //ARToolKit=====================================================
 ar01 = new SimpleARToolKit(this,"patt.sample1");
}

void draw()
{
 pgl.beginGL();
 background(255);
 ar01.showImage();


   pgl.endGL();
 gl.glFlush();

}

Re: simple ARToolkit
Reply #1 - Jan 3rd, 2009, 6:26pm
 
I'm using OS X and I have trouble just running the examples. It says the video capture library is missing.
Code:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: processing/video/Capture
at demo01.setup(demo01.java:30)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Thread.java:613)

I looked at the library's source code and there's an include function that says Code:
import net.sourceforge.jartoolkit.core.JARToolKit; 

so I wondered if I needed to install the actual toolkit. Now I can't figure out how to install the Xcode library... Part of the reason I was attracted to processing in the first place. I hate irony.


Anyhow... A little help? By the end of today I'd like to say I've gotten the kinks out so others wont feel my pain.
Re: simple ARToolkit
Reply #2 - Feb 22nd, 2009, 2:24pm
 
It is based on jartoolkit which doesn't seem to support Mac OS Sad
Re: simple ARToolkit
Reply #3 - Feb 22nd, 2009, 10:24pm
 
I am having grief running this too. I keep getting an error message  - The package "pARToolKit" does not exist. You might be missing a library.

I have created a libraries dir in the sketchbook. I just can't get it to run. On vista here.
Re: simple ARToolkit
Reply #4 - Feb 22nd, 2009, 11:30pm
 
I had to add the following import to get the demo01 script to work:

Code:

import processing.video.*;


I hope that this helps.
Re: simple ARToolkit
Reply #5 - Mar 3rd, 2009, 1:39pm
 
Quote:
I am having grief running this too. I keep getting an error message  - The package "pARToolKit" does not exist. You might be missing a library.

I have created a libraries dir in the sketchbook. I just can't get it to run. On vista here.


Hello, I have this problem. Please help! Who import the pARToolKit for I can run this example?
Thanks.
Re: simple ARToolkit
Reply #6 - Nov 11th, 2009, 7:33pm
 
I wish we had this lib for OsX
Page Index Toggle Pages: 1