Silly question about output a jitter matrix

Feb 5, 2010 at 6:24pm

Silly question about output a jitter matrix

My first lesson of JS is to make jit.grab component and to output this through a js object.

The output matrix is pretty weird; it seems like it would be a 4 char @dim 1 1, although the jit.fpsgui tells me that it’s a 320 240 matrix…
I don’t understand…
here’s my js script:

var cam = new JitterObject(“jit.qt.grab”);
cam.dim = [320,240];
cam.type = “char”;
var output = new JitterMatrix(4,”char”,320,240);
output.dim =[320,240];
var a = 0
function msg_int(a)
{
if (a==1) {
cam.open();
}
else
{
cam.close();
}
}

function bang()
{
cam.matrixcalc(output/*null*/,output);
outlet(0,”jit_matrix”,output.name);
}

THX

#48260
Feb 5, 2010 at 7:08pm

you’ve set both cam.dim and output.dim to 320,240 . why would you assume the outputdim is 1,1?

#173567
Feb 6, 2010 at 6:27am

Because that’s the content of my pwindow…one single cell…

Ad;

#173568

You must be logged in to reply to this topic.