NyARToolkit for Processing 3.0.2

[Japanese] [Spanish(Emiliusvgs)]

NyARToolkit for Processing 3.0.2 is released.

n5psg3

New library can handle Neture Feature Tracking easily.

https://github.com/nyatla/NyARToolkit-for-Processing

NFT Sample Sketch

NFT sketch is very simple.

// examples/Simplenft.pde
import processing.video.*;
import jp.nyatla.nyar4psg.*;

Capture cam;
MultiNft nya;

void setup() {
  size(640,480,P3D);
  colorMode(RGB, 100);
  println(MultiMarker.VERSION);
  cam=new Capture(this,640,480);
  nya=new MultiNft(this,width,height,"camera_para5.dat",NyAR4PsgConfig.CONFIG_PSG);
  nya.addNftTarget("infinitycat",160);//id=0
  cam.start();
}

void draw()
{
  if (cam.available() !=true) {
      return;
  }
  cam.read();
  nya.detect(cam);
  background(0);
  nya.drawBackground(cam);//frustumを考慮した背景描画
    if(!nya.isExist(0)){
      return;
    }
    nya.beginTransform(0);
    fill(255,0,0);
    translate(-80,55,20);
    box(40);
    nya.endTransform(); 
}

The program sequence are same as marker sketch.
The only difference is that are using the MultiNft instead of MultiMarker.

How to change NFT target

In order to make the NFT target fileset to use the nftFilesGen sketch.
Sketch will launch the file generator.