From ftm
Revision as of 13:45, 9 May 2007 by Bevilacq (talk | contribs) (Test)
Jump to: navigation, search

Gesture Follower tutorial

The gesture follower is a set of Max/MSP modules integrated in the toolbox MnM of the library FTM. The development of the gesture follower is pursued with the general goal to compare in realtime a gesture with prerecorded examples. The comparison mechanisms we implemented, following and recognition are further explained in the next subsections.

Workspace : overview

Get an overview of the interface functions. Example.jpg


1st STEP : Record gestures

Let’s start with two simple drawings : a triangle and a circle. Example2.jpg


2nd STEP : Compare

Draw a figure and then see how similar it is with your two referent drawings. Example3.jpg


3rd STEP : Observe

Pay attention to the curves below. They represent the velocity in X and Y axis of the mouse trajectories. That give a useful temporal information on how you realize your drawing. Example4.jpg


Connection Avec EyesWeb XMI

EyesWeb XMI, the open platform for real-time analysis of multimodal interaction, can be connected to Max/Msp throughout the OSC protocol (Open Sound Control). OSC is open, message-based protocol which was originally developed for communication between computers and sythesizers (cf. wiki).

Test

<html> <head> <title>jit.matrix</title> </head> <body bgcolor=#F7F7F7 link=#000000 vlink=#000000>

<a href="index.html"><img src="images/jitter_smallest.gif" border=0></a>

jit.matrix

The Jitter Matrix!

</p>

The jit.matrix object is a named matrix which may be used to matrix data storage and retrieval, resampling, and matrix type and planecount conversion operations.

<a href="group-attributes.html">Attributes:</a>
Name Type Description
adapt int

Matrix adaptation flag (default = 0 if matrix arguments are present, otherwise 1) When the flag is set, the jit.matrix object will adapt to the incoming matrix planecount, type, and dimensions.

dimstride (get) int list[32]

The byte stride per dimension

dim int list[32]

The dimensions of matrix data (default = 1 1)

dstdimend int list[32]

The destination dimension end position (default = all dim values minus 1)

dstdimstart int list[32]

The source dimension start position (default = all 0)

interp int

Matrix interpolation flag (default = 0) When the flag is set, the input matrix will be interpolated when copied to the internal matrix.

name symbol

The name of the matrix (default = UID)

planecount int

The number of planes in matrix data (default = 4)

planemap int list[32]

Maps input places to output planes (default = 0 1 2 3 ...)

size (get) int

Total byte size of matrix

srcdimend int list[32]

The source dimension end position (default = all dim values minus 1)

srcdimstart int list[32]

The source dimension start position (default = all 0)

thru int

Thru mode flag (default = 1) When the flag is set, a matrix is output when another one is received.

type int

The matrix data type (default = char
Supported data types are char, long, float32, or float64.

usedstdim int

Destdim use flag (default = 0) When the flag is set, the destination dimension's attributes are used when copying an input matrix to an internal matrix.

usesrcdim int

Srcdim use flag (default = 0) When the flag is set, the source dimension's attributes are used when copying an input matrix to an internal matrix.

<p> <p>

Messages:
bang

Equivalent to the outputmatrix message.


clear

Sets all matrix values to zero.


exportimage [filename (symbol)] { [file-type (symbol)] } { [use-dialog (int)] }

Export the current frame as an image file with the name specified by the first argument. The optional second argument sets the file type (default = png). Available file types are png, bmp, jpeg, macpaint, photoshop, pict, qtimage, sgi, tga and tiff. An optional use-dialog argument of 1 will open a file dialog to allow you to enter the image file settings.


exportmovie { [filename (symbol)] } [FPS (float)] [codec (symbol)] [quality (symbol)] [timescale (int)]

Exports a matrix as a QuickTime movie. The exportmovie message takes an optional argument to specify a file name. If no filename is specified, a file dialog will open to let you choose a file.

The default FPS is 30. frames per second

The default codec is raw. Supported codecs are raw, cinepak, graphics, animation, video, componentvideo, jpeg, mjpega, mjpegb, sgi, planarrgb, macpaint, gif, photocd, qdgx, avrjpeg, opendmljpeg, bmp, winraw, vector, qd, h261, h263, dvntsc, dvpal, dvprontsc, dvpropal, flc, targa, png, tiff, componentvideosigned, componentvideounsigned, cmyk, microsoft, sorenson, indeo4, argb64, rgb48, alphagrey32, grey16, mpegyuv420, yuv420, and sorensonyuv9.

The default quality is max. Supported quality settings are lossless, max, min, low, normal, and high.

Note that minimum quality is, in many cases, the codec's default quality. Use "low" quality for consistent results.

The default timescale is 600 units per second.


float

Equivalent to the setall [float] message, followed by the bang message.


getcell [position (list)]

Sends the value(s) in the cell specified by position out the right outlet of the object as a list in the form cell cell-position0 ... cell-positionN val plane0-value ... planeN-value.


importmovie { [filename (symbol)] } [time-offset (int)]

Imports a QuickTime movie into the matrix. If no filename is specified, a file dialog will open to let you choose a file. The time-offset argument may be used to set a time offset for the QuickTime movie being imported (the default is 0).


int

Equivalent to the setall [int] message, followed by the bang message.


exprfill [expression (symbol)]

Evlauates expression to fill the matrix. See <a href="jit.expr.html">jit.expr</a> for more information on expressions.


jit_gl_texture [texture-name (symbol)]

Copies the texture specified by texture-name to the matrix.


jit_matrix [matrix-name (symbol)]

Copies a matrix specified by matrix-name to the matrix.


list

Equivalent to the setall [list] message, followed by the bang message.


outputmatrix

Sends the matrix out the left outlet.


read { [filename (symbol)] }

Reads Jitter binary data files (.jxf) into a matrix set. If no filename is specified, a file dialog will open to let you choose a file.


register

Equivalent to setting the name attribute.


setall [value (list)]

Sets all cells to the value specified by value(s). Position is specified of a list whose length is equal to the number of dimensions (dimcount).


setcell [position (list)] { plane [plane-number (int)] } val [value (list)]

Sets the cell specified by position to the value specified by value. Position is specified of a list whose length is equal to the number of dimensions (dimcount). The optional arguments plane plane-number can be used to specify a plane. If a plane is specified, value should be a single number, otherwise it should be a list of numbers of size planecount - 1.


val [value (list)]

Equivalent to the setall message, followed by the bang message.


write { [filename (symbol)] }

Writes matrix set as a Jitter binary data file (.jxf). If no filename is specified, a file dialog will open to let you choose a file.


<p>

Example:</a></td>

</tr> </table>

<img src="images/jit.matrix.gif" border=0>

<p>

See Also:</a></td>

</tr>

<a href="jit.coerce.html">jit.coerce</a>, <a href="jit.fill.html">jit.fill</a>, <a href="jit.matrixset.html">jit.matrixset</a>, <a href="jit.matrixinfo.html">jit.matrixinfo</a>, <a href="jit.peek~.html">jit.peek~</a>, <a href="jit.poke~.html">jit.poke~</a>, <a href="jit.spill.html">jit.spill</a>, <a href="jit.submatrix.html">jit.submatrix</a></td> </tr> </table>


</body> </html>