Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
indaeprocessing
indaeprocessing's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
NyArtoolkit with android mode
[3 Replies]
03-Mar-2013 10:39 PM
Forum:
Android Processing
Hi all
Can anyone help me to solve build error when implementing NyARToolkit library in Android mode.
For video I used ketai library. It did not work and give me error message like below
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:881: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:883: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:895: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:290: null returned: 2
Total time: 17 seconds
Can anyone help me?
I tried it with processing 2.0b7 in both Mac and PC.
import ketai.camera.*;
import jp.nyatla.nyar4psg.*;
KetaiCamera cam;
SingleARTKMarker nya;
void setup() {
orientation(LANDSCAPE);
colorMode(RGB, 100);
cam = new KetaiCamera(this, 320, 240, 24);//cam=new Capture(this,width,height);
nya=new SingleARTKMarker(this,640,480,"camera_para.dat");
nya.setARCodes("patt.hiro",80);
cam.start();
}
void onCameraPreviewEvent()
{
cam.read();
}
void draw() {
cam.read();
nya.drawBackground(cam);
switch(nya.detect(cam)){
case SingleARTKMarker.ST_NOMARKER:
return;
case SingleARTKMarker.ST_NEWMARKER:
//println("Marker found.");
return;
case SingleARTKMarker.ST_UPDATEMARKER:
break;
case SingleARTKMarker.ST_REMOVEMARKER:
//println("Marker removed.");
return;
default:
return;
}
nya.beginTransform();
{
setMatrix(nya.getMarkerMatrix());
drawBox();
}
nya.endTransform();
}
void drawBox()
{
pushMatrix();
fill(0);
stroke(255,200,0);
translate(0,0,20);
box(40);
noFill();
translate(0,0,-20);
rect(-40,-40,80,80);
popMatrix();
}
void mousePressed()
{
if (cam.isStarted())
{
cam.stop();
}
else
cam.start();
}
void keyPressed() {
if (key == CODED) {
if (keyCode == MENU) {
if (cam.isFlashEnabled())
cam.disableFlash();
else
cam.enableFlash();
}
}
}
«Prev
Next »
Moderate user : indaeprocessing
Forum