float video

Sep 30, 2010 at 1:23am

float video

hi,

is it possible to process video in float?

since movie files are never float, how can i convert a char matrix into a float one? and will i have to convert the result back into char in order to view in a window?

thanks,

Alex

#52527
Sep 30, 2010 at 3:31am

Just make a jit.matrix that is of type float32. Connect that matrix to a jit.pwindow or jitwindow. easy as that. of course all values will be from 0 to 1 instead of 0 to 255.

why do you want float values?

Here is a quick example…cellblock is being used to display the values of each cell for each plane.

– Pasted Max Patch, click to expand. –
#188917
Sep 30, 2010 at 12:09pm

thanks thats perfect

so the pwindow / window automatically interprets 1 as white instead of 255, thats useful.

i want float because it makes the maths easier when using simple + and * operators to mix images together. also, i want to be able to use negative values in the matrices.

im a compositor by day and float makes more sense to me…

anyway thanks!

#188918
Sep 30, 2010 at 5:08pm

when doing operations…jit.op makes life much better and is less processor intense as the normal max operations. You can also use jit.expr instead of stringing a bunch of jit.op together. There is a good tutorial on jit.expr by andrew benson on the cycling website.

#188919

You must be logged in to reply to this topic.