how to learn about jit.expr, and jit.bfg.

May 6, 2009 at 3:23pm

how to learn about jit.expr, and jit.bfg.

I have tried hard to read the help files of jit.expr and jit.bfg, but cannot understand them at all.

Could anyone let me know how I can understand these parameters and terms?

- cell[0-31] (integer coordinate across dim);
- norm[0-31] (normalized coordinate across dim);
- snorm[0-31] (signed normalized coordinate across dim);
- dim[0-31] (matrix size across dim);
- in[0-31] (input matrix, corresponding plane);
- in[0-31].p[0-31] (input matrix, specific plane);
- matrixname (any named matrix, corresponding plane);
- matrixname.p[0-31] (anynamed matrix, specific plane);
- PI, TWOPI, HALFPI, INVPI, DEGTORAD, RADTODEG, E, LN2, LN10, LOG10E, LOG2E, SQRT2, SQRT1_2;

Does any one have simple patches with better documentation than Jitter help or reference ?

Or should I find some books about image or video processing in order to understand the usage of jit.expr and jit.bfg help files ?

Please help or recommand some books to start.

Thank you so much.

#43698
May 6, 2009 at 6:23pm

jit.print is your friend. just start plugging in values and look at what comes out. no better way to learn imho.

also, search the forum. there are several good examples floating around here.

– Pasted Max Patch, click to expand. –
#156928
May 6, 2009 at 6:29pm

It seems our documentation for jit.expr syntax could be a little better, as I hear this question often. In general, the most helpful thing for understanding is to hook the output to jit.cellblock and watch the numbers. For cell,norm,snorm,dim the number in the brackets should be the dimension that you are querying (x=0,y=1,etc.). Each of these gives different values depending on the cell location.

- cell[0-31] (integer coordinate across dim);
generates an integer coordinate value of the cell location using the dimension specified in brackets.
- norm[0-31] (normalized coordinate across dim);
similar to cell, but gives normalized values (0.-1.)
- snorm[0-31] (signed normalized coordinate across dim);
similar to cell, but gives signed normalized values (-1. – 1.)
- dim[0-31] (matrix size across dim);
gives the size of the matrix (constant for all cells)
- in[0-31] (input matrix, corresponding plane);
specifies one of the inputs as a variable
- in[0-31].p[0-31] (input matrix, specific plane);
used to get aspecific plane of the input matrix
- matrixname (any named matrix, corresponding plane);
specifies a named matrix as a variable
- matrixname.p[0-31] (anynamed matrix, specific plane);
used to get a specific plane of that named matrix
- PI, TWOPI, HALFPI, INVPI, DEGTORAD, RADTODEG, E, LN2, LN10, LOG10E, LOG2E, SQRT2, SQRT1_
These are all common mathematical constants and functions.

Hope that helps…
Best,
Andrew B.

#156929
May 6, 2009 at 7:15pm

Dear Andrew and all

Thanks for this, it was much needed. Another point: is there a way to do translation i.e. to refer to a cell in the input[1] that has not got the same address than the input[0] or does it have to be parallel?

thanks
pa

#156930
May 6, 2009 at 11:24pm

I am still very confused. For example, what and how does “expr cell(0)cell(0)” do to the matrix ? I can see the results from jit.cellblock, but still cannot figure out the rules according to which “expr cell(0)cell(0)” or “expr cell(1)cell(1)” makes the matrix.

Could you explain more by using “expr cell(0)(0)” and “expr cell(1)cell(1)” as an example ?

Thank you so much.

#156931
May 7, 2009 at 8:42pm

Hello,

I don’t know TWOPI as a mathematical operator, is there anyone to help on this?

@Cheng
In my knowledge, If you have for example “cell(1)cell(1)” :
-> the first cell(1) talks to plane 1
-> and the second cell(1) talks to plane 2.

#156932

You must be logged in to reply to this topic.