Git Product home page Git Product logo

tuio11_net's Introduction

TUIO C# LIBRARY AND EXAMPLES
----------------------------
Copyright (c) 2005-2016 Martin Kaltenbrunner <[email protected]>
This software is part of reacTIVision, an open source fiducial
tracking and multi-touch framework based on computer vision. 
http://reactivision.sourceforge.net/

Many thanks to Andrew Jones <[email protected]> for his 
improvements of the C# properties and documentation style.

Demo Applications:
------------------
This package contains two demo applications which are able
to receive TUIO messages from any TUIO enable tracker.

* TuioDump prints the TUIO events directly to the concole
* TuioDemo draws the object and cursor state on the screen

You can use these demo applications for debugging purposes, 
or use them as a starting point for the development of your own
C# applications implementing the TUIO protocol. Please refer to
the source code of the both examples and the following section.

Pressing F1 will toggle FullScreen mode with the TuioDemo,
pressing ESC or closing the Window will end the application.
Hitting the V key will print the TUIO events to the console.

Keep in mind to make your graphics scalable for the varying
screen and window resolutions. A reasonable TUIO application
will run in fullscreen mode, although the windowed mode might
be useful for debugging purposes or working with the Simulator.

For your convenience this example contains a monodevelop project.

Application Programming Interface:
----------------------------------
First you  need to create an instance of TuioClient. This class 
is listening to TUIO messages on the specified port and generates
higher level messages based on the object events.

Your application needs to implement the TuioListener interface,
and has to be added to the TuioClient in order to receive messages.

	"public class MyApplication : TuioListener"

A simple code snippet for setting up a TUIO session:

	MyApplication app = new MyApplication();
	TuioClient client = new TuioClient();
	client.addTuioListener(app);
	client.start();

A TuioListener needs to implement the following methods:

* addTuioObject(TuioObject tobj):
  this is called when an object becomes visible
* updateTuioObject(TuioObject tobj):
  and object was moved on the table surface
* removeTuioObject(TuioObject tobj):
  an object was removed from the table

* addTuioCursor(TuioCursor tcur):
  this is called when a new cursor is detected
* updateTuioCursor(TuioCursor tcur):
  a cursor is moving on the table surface
* removeTuioCursor(TuioCursor tcur):
  a cursor was removed from the table

* addTuioBlob(TuioBlob tblob):
  this is called when a new blob is detected
* updateTuiooBlob(TuioBlob tblob):
  a blob is moving on the table surface
* removeTuiooBlob(TuioBlob tblob):
  a blob was removed from the table

* refresh(TuioTime bundleTime):
  this method is called after each bundle,
  use it to repaint your screen for example

Each object or cursor is identified with a unique session ID that is maintained
over its lifetime. Additionally each object carries symbol ID that corresponds
to its attached fiducial marker number. The cursor ID of the cursor object is always
a number in the range of all currently detected cursor blobs.

The TuioObject and TuioCursor references are updated automatically by the TuioClient
and are always referencing to the same instance over the object lifetime.
All the TuioObject and TuioCursor attributes are encapsulated and can be
accessed with methods such as getX(), getY() and getAngle() and so on.
TuioObject and TuioCursor also have some additional convenience methods
for the calculation of distances and angles between objects. The getPath()
method returns a Vector of TuioPoints representing the movement path of the object.

Alternatively the TuioClient class contains some methods for the polling
of the currently visible objects and cursors. There are methods which return
either a list or individual object and cursor objects. The TuioObject and
TuioCursor classes have been added as a container which also can be used
by external classes.

* getTuioObjects() returns a Vector of all currently present TuioObjects
* getTuioCursors() returns a Vector of all currently present TuioCursors
* getTuioBlobs() returns a Vector of all currently present TuioBlobs
* getTuioObject(long s_id) returns a TuioObject (or NULL if not present)
* getTuioCursor(long s_id) returns a TuioCursor (or NULL if not present)
* getTuioBlob(long s_id) returns a TuioBlob (or NULL if not present)

License:
--------
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
 
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
 
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

References:
-----------
This example is using the OSC.NET OpenSound Control library for C#
along with a lot of changes and improvements by the author.
http://luvtechno.net/d/1980/02/open_sound_control_for_net_2.html

tuio11_net's People

Contributors

mauriciocirelli avatar mkalten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tuio11_net's Issues

Ractiv's TouchPlus 3D Stereo Camera software using TUIO cursor

Hi Martin,

First a big thank you for your fast response.

It's nice of you to be ok having a closer look on code with a unit we would send you.

I've sent an email to backer Robert Sweetman 3 days ago, who was ok to send his unit to Dr Tagliasacchi before he doubt on if it worth his time.

No answer yet, but with that famous Brexit, as a citizen of Her Majesty The Queen of (Un?)United Kingdom, he must be so sad or so happy, depending on his vote !

Other people were ready to send their (or one of their) unit(s) : 10000 units were manufactured as we can read on Lai's career resume !

I don't know exactly the function of the win_cursor_plus component, but there's a win_cursor_plus_fallback which is launched if :

"if (IsWindows8OrGreater())

    child_module_path = executable_path + slash + "win_cursor_plus" + slash + "win_cursor_plus" + extension0;

else

    child_module_path = executable_path + slash + "win_cursor_plus_fallback" + slash + "win_cursor_plus" + extension0;"

It seems it must receive udp messages of tracking data coming from track_plus process.

I wonder why they choose TUIO csharp cursor instead of TUIO c++ cursor ? Wouldn't it be easier to code everything in c++ to avoid the use of .net framework ?

It seems they've coded win_cursor_plus in csharp to be compliant with csharp TUIO. Maybe at first, c++ TUIO wasn't available to do what they want with cursor ?

All we know is that v0.55b was running a functionnal cursor as seen on Alexandru Bauer's youtube video : https://www.youtube.com/watch?v=ulFTmjiwmAA but noone has the source code for that build.

MJ made a Google drive of the only buggy installer, here : https://drive.google.com/folderview?id=0B06wt0SuwL2PSDFBUk01U1ZWUkk&usp=sharing

So, now talking about the software path, here the escaping characters problem that I diagnostic here on the very last commit in Dec 2015 : Ractiv/touch_plus_source_code#36

Would you have a solution to allow running that "tasklist" command in software path with blank spaces, as it's running directly from build folder without any blank spaces ?

I remember, while testing that last commit, having maybe a TUIO cursor launched from win_cursor_plus process, but obtaining a blue message from windows 10 saying this software couldn't be run in that version of windows and that the manufacturer have had to be contacted. Maybe a manifest file problem ?

And what about hardware z-mapping (https://en.wikipedia.org/wiki/Texture_mapping) ? Maybe Edwin Catmull the pioneer at Pixar could help us ? Maybe Ractiv has lied to us from the moment they've tested the first manufactured units with the software and saw that Etron chipset would never be accessible to any optimisation due to wrong electronic design ?

Is a full software solution possible without full hardware access ?

Is a chessboard image disparity z-mapping system a good option ?

Am I mad of still hoping to at least get a minimal working cursor as seen on Youtube ?

Well it's funny to test all their attempts on funtionnalities through the differents commits, like commit 8b60c27 on 1 Sep 2015 I've just been testing : a medium window showing a moving cloud of points and lines which look like malaxing a spagghetti mass !

What a pity Umar Nizamani's windows home pc as died because he seemed to be confident in solving the csharp process problem : "This part of the code is commented in the code which I was able to run but still wouldn't move the cursor based on my movements. I will see if I can get this working over the weekend so that even with buggy movement end users can have a controllable cursor."

I have desperately tried to recompile the very earlier commit 65abaf6 on 8 Jul 2015 : Ractiv/touch_plus_source_code#39 to maybe help someone solving the cursor problem.

And after all, a good big trackpad would be a good option but autralian backer Lachlan Pollock said : "But having briefly used the Touch+ I've got to say I enjoyed the experience and found it a lot more natural than the leap ever was on a flat surface."

It's good to be a "geek" on technology innovations !

Let's dream on what we can do sharing knowledge !

Cheers,

Christian or Touchhope at http://gharbi.me/ractiv/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.