What is Touchlib?
Touchlib is a library for creating multi-touch interaction surfaces. It handles tracking blobs of infrared light, and sends your programs these multi-touch events, such as 'finger down', 'finger moved', and 'finger released'. It includes a configuration app and a few demos to get you started, and will interace with most types of webcams and video capture devices. It currently works only under Windows but efforts are being made to port it to other platforms.
Who Should Use Touchlib?
Touchlib only comes with simple demo applications. If you want to use Touchlib you must be prepared to make your own apps. There are a few ways to do this. You can build applications in C++ and take advantage of Touchlib's simple programming interface. Touchlib does not provide you with any graphical or front end abilities - it simply passes you touch events. The graphics are up to you. If you like, take a look at the example apps which use OpenGL GLUT.
If you don't like Touchlib and want to program your own system, the latest version of OpenCV now has support for blob detection and tracking. This might be a good starting point.
Wiki Home
Recent Changes
Categories
Title List
Upload a File
File Archive
View touchlib
Touchlib is comprehensive library and software solution for doing multitouch applications using FTIR or the Diffused Illumination technique. It does also offer some limited support for Fiducial identification and tracking.
Touchlib handles acquiring images from your webcam or other video capture hardware using several well known libraries (which library you want to use is up to you). Touchlib also handles processing these images, performs Blob Detection and Blob Tracking. Touchlib also sends touch events to your C++ programs, via a very simple interface. To see how simple it is to write a C++ application using touchlib, here is a Basic Touchlib Application.
In addition touchlib provides the OSC.exe app which sends events in the OSC TUIO format used by the Reactivision library. Some example apps written in Flash are available which use this protocol.
Touchlib also uses OpenCV for many things.
A simple Touchlib application.
ITouchScreen *screen;class MyApp : public ITouchListener{public: MyApp () { } // Just implement these 3 functions to recieve touch events. //! Notify that a finger has just been made active. virtual void fingerDown(TouchData data) { printf("Press detected: %f, %f\n", data.X, data.Y); } //! Notify that a finger has moved virtual void fingerUpdate(TouchData data) { } //! A finger is no longer active.. virtual void fingerUp(TouchData data) { } void frame() { }}main(){ OSCApp app; screen = TouchScreenDevice::getTouchScreen(); if(!screen->loadConfig("config.xml")) exit(0); // error screen->registerListener((ITouchListener *)&app); // Note: Begin processing should only be called after the screen is set up screen->beginProcessing(); screen->beginTracking(); do { // main loop.. do any graphics or sound updates // .... screen->getEvents(); app.frame(); } while( stillrunning ); TouchScreenDevice::destroy(); return 0;}
15 Mart 2008 Cumartesi
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder