240 likes | 422 Views
Introduction to Jitter & Eyesweb. Volker Krüger Aalborg Media Lab Aalborg University Copenhagen vok@media.aau.dk. Introduction to Jitter & Eyesweb. What are Jitter and Eyesweb good for? Intuitive programming without programming!
E N D
Introduction to Jitter & Eyesweb Volker Krüger Aalborg Media Lab Aalborg University Copenhagen vok@media.aau.dk
Introduction to Jitter & Eyesweb What are Jitter and Eyesweb good for? • Intuitive programming without programming! • Big variety of functionality, incl. those that you have learned about • Easy to use: Simply connect the function boxes • Fast prototyping of ideas • Jitter: Enhancement to Max/MSP Agenda • Intro to the Jitter specific issues • Walk-through through some simple key-examples of Jitter and Eyesweb
Matrices – Coordinates and Dimensions Main important data type in Jitter: Matrices! • Like images: they have coordinates (x,y) and a size! • Matrices can have several dimensions: (x,y,z), (x,y,t)
Matrices -- Planes • When displaying, e.g., color images, each pixel is represented with 3 values: R, G, B! • This is handled in Jitter with Planes. • The A plane can be used for alpha blending.
Allowed Datatypes • Available datatypes are: • char(8 bit), long(32 bit) • float32(32 bit) , float64(64 bit) • Functions usually adapt to input, no conversions needed! • Parameter can be casted!
Attributes and Arguments! • Like in Max/MSP, Jitter functions can have • Parameters • Attributes • Can be given as default values (order matters!) • Attributes can be given explicitly (no blank after “@”): • Can be changes during program execution
Arguments or Attributes? • Parameters can be passed as arguments to the functions: • Arguments have to be passed before attributes are set. • The following are equivalent:
Getting Attribute Information • In order to read out the attribute setting: • To read out the value of a particular attribute:
First Example: Playing a video • read reads the name and passes it on. • jit.qt.movie reads video into memory: Parameters: size • jit.window opens a window and attempts to display the movie. Parameters: window name, corner position of the window. • No data is being copied, except for references!! • And not data is being displayed either!!!
The output has to be triggered! • jit.window needs to be triggered! • The example sends a bang every 40 ms. • To restart the movie, set the attribute time to zero!
Working with Matrices • How to generate a matrix of a particular type: • This reserves a region inside the computer memory for the data • Parameters are planecount, type and dim.
Printing matrix data • To print the matrix data a special function exists:jit.print • print left prints the reference to the matrix. It is a random name!
Setting and reading values • setcell • getcell • setall • clear
Window object • Having set the matrix values we can output the values visually using jit.pwindow • It can be found in the task bar
Setting the values of the entire matrix • Setting each single matrix value separately is tedious. • Alternative: Use loops and functions: • Uzi <val> sends numbers 1 … <val>
Matrices in Eyesweb • Hardly ever used explicitly! • Matrices are used • in replacement of images • as filter matrices
Jitter Operators • In Jitter, mathematical operators can be applied to matrices: • This allows to generate important functions like thresholding!
Jitter Operators • For multi-band images, the operator can be applied to each image band separately:
Connection to the outside world • Additional programs can be developped for Jitter and Eyesweb. • Possible in Java and C/C++ • Eyesweb allows TCP/IP interfacing (e.g. network cameras, process communication)
Things to remember: Why you were here today! • Jitter and Eyesweb base everything on Matrices • Intuitive to use • They process video data • Jitter and Eyesweb are easy to use and are the basic systems to use for your project. Info for Jitter: www.cycling74.com Info for Eyesweb: www.eyesweb.org www.media.aau.dk/~vok/lectures/ap1_11_05/ap11.html
Finally: • Questions? • Exercises under http://media.aau.dk/~vok/lectures/ap1_11_05/ex11.pdf