MultiTouch Cornerstone can output tracking information using different protocols, like TUIO and XML.
Using these protocols, it is possible to interface with external software.
Any Cornerstone application can be configured to send computer vision results as a TUIO stream over a UDP socket. The stream includes finger tips and marker information as standard TUIO messages. Additionally hands can be encoded using custom extension (see tphw_tuio_forward_hand_extension).
To enable TUIO forwarding, you must add the following block to your application config.txt file:
In addition you the block above, you need to configure your sources normally, e.g. using one or more NetBridge blocks.
In addition to just finger tips, Cornerstone has the ability to track whole hands with finger connectivity information. By default, TUIO does not support this feature. However, it is possible to use a custom extension with TUIO that allows hand information to be transmitted with TUIO protocol.
The event format is as follows:
To enable the hand extension, you must add the hands to the features parameter of tphw_tuio_forward TUIOSender:
It is possible to merge the output of multiple MultiTaction Cells into a single TUIO stream. Cornerstone will handle the ID conflicts for tracked objects and output a single normalized TUIO stream that can be used directly. The application using the TUIO stream does not need to know that the TUIO stream is coming from multiple sources.
To use this feature, just define multiple NetBridge blocks inside your config.txt that describe the sources with correct input transformation parameters. Then define a single TUIOSender block normally. Cornerstone will then automatically combine the input from all NetBridge blocks and merge it into a single TUIO stream. The combined resolution is automatically calculated by using the bounding box of all input sources.
An example of merging the output of two MultiTaction Cells in landscape mode into a single TUIO stream is shown below. You can use eg. MTServer with this config file.
MultiTouch Cornerstone can output tracking information as XML using TCP. The XML stream is meant to be easy to parse with practically any programming language. Please be aware that since XML is text-based protocol and rather verbose, parsing it may add some overhead.
To enable the XML stream server, define the xml-server-host and xml-server-port variables in the Globals section of your config.txt:
When you start any MultiTouch Cornerstone application, the XML server is started automatically. It will listen for connections on the defined TCP port. Connecting to the port will automatically start data transmission.
The XML stream is human-readable and should be easy to parse. The data will look like this: