Nyartoolkit- issue when attempting to increase resolution of webcam?
in
Contributed Library Questions
•
5 months ago
Hi,
I am having an issue here that when I am attempting to increase the resolution of the webcam when using the nyartoolkit library which is working fine on processing 1.5, the object does not render the object 'face on' even if
the marker is straight in front of the camera, it will load the object slanted.
It looks fine when opened on the original example resolution (640,480), you can see the object 'face on'
however if the resolution increased to anything higher than that, like
768x576 this is what happens:
this is the current code:
/**
NyARToolkit for proce55ing/1.0.0
(c)2008-2011 nyatla
airmail(at)ebony.plala.or.jp
最も短いARToolKitのコードです。
Hiroマーカを用意してください。
This sample program is most small sample as simpleLite.
The marker is "patt.hiro".
*/
import processing.video.*;
import jp.nyatla.nyar4psg.*;
Capture cam;
MultiMarker nya;
void setup() {
size(768,576,P3D);
colorMode(RGB, 100);
println(MultiMarker.VERSION);
cam=new Capture(this,768,576);
nya=new MultiMarker(this,width,height,"camera_para.dat",NyAR4PsgConfig.CONFIG_PSG);
nya.addARMarker("patt.hiro",90);
}
void draw()
{
if (cam.available() !=true) {
return;
}
cam.read();
nya.detect(cam);
background(0);
nya.drawBackground(cam);//frustumを考慮した背景描画
if((!nya.isExistMarker(0))){
return;
}
nya.beginTransform(0);
fill(0,0,255);
translate(0,0,20);
box(40);
nya.endTransform();
}
Does anyone know why this could be happening? Or provide any suggestions? Am i missing something obvious here, as I am a beginner still.
Thanks
Appreciate any input, it would be greatly helpful for me and I sincerely appreciate it if you do
1