We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello everyone. i m new to processing. i need help with below code.
import jp.nyatla.nyar4psg.*; // NyAR2 library from cpbotha.net for multi markers
import processing.opengl.*;
import processing.video.*;
Capture vid;
NyARMultiBoard nya;
void setup(){
size(640,480,P3D);
vid= new Capture(this, 640,480, 30);
String[] patts= {"patt.kanji"};
double[] widths= {80};
nya= new NyARMultiBoard(this, width, height, "camera_para.dat", patts, widths);
vid.start();
}
void draw(){
background(200);
vid.read();
image(vid,0,0);
if(nya.detect(vid)) // marker detection code starts here
{
nya.markers[0].beginTransform();
box(40);
nya.markers[0].endTransform();
}
}
Answers
Hi, as far as I know, that's a problem with GSLibrary. NYar2 lib needs to work with GSVideo, but GSvideo is not update for processing 3. Try with processing 1.5 and GSvideo. Here you have an example:
cheers.
By the way, I'm trying to find a solution for GSvideo to work in processing 3. Anyone knows?