As of the current version, touchlib now can broadcast events in the TUIO
protocol (which uses OSC).This makes touchlib compatible with several other applications that support this protocol,
such as vvvv, Processing, PureData, etc.. This also makes it possible to use touchlib for blob detection / tracking
and something like vvvv or Processing to write appliactions. Of course the other option is to do all your blob detection
and processing in vvvv or processing. It's up to you. Supporting the TUIO protocol also enables a distributed architecture
where one machine can be devoted to detection and tracking and another machine can handle the application
Touchlib is written in C++ (the BlobTracking / Analysis is all written by yours truly) and has a Visual Studio 2005 Solution
ready to compile. No docs are available right now and it's windows only (though it should be possible to make everything
compile under other OS's with a little work). It currently depends on OpenCV, DirectShow (you'll need the Microsoft
Platform SDK), VideoWrapper and the DSVideoLib. The source code includes our main library which you can link into
your application to start capturing touch events. It has support for most major camera/webcam types.
It also includes a basic config app which will need to be run in order to calibrate your camera, and has a couple
example apps. Alternately, I've heard other people have used things like vvvv, EyesWeb, processing and Max/MSP
in order to do blob tracking / processing and make applications. You can check out some of the demo apps
if you want to see how it works. Pong or the config app should be fairly easy to follow.
Setting up a bare minimum multitouch app should only take a dozen lines of code or less.
===========================================================================
準備安裝下列這一堆東西@@
1. OpenCV (download OpenCV_1.0.exe)
2. DSVideoLib (download dsvideolib-0.0.8c)
3. VideoWrapper (download VideoWrapper_0_1_1.zip)
4. GLUT (download glut-3.7.6-bin.zip)
5. OSCpack (download oscpack_1_0_2.zip)
6. CMU 1394 Digital Camera Driver (download 1394camera644.exe)
7. Windows Server 2003 R2 SDK (aka Platform SDK) ISO 410MB
8. DirectX SDK (download August 2007) 572MB
9. Windows SDK
============================================================================
先安裝OpenCV_1.0
現在看以前的東西很有復古的感覺…In the picture shown below, what are these three guys looking at??
C:\Program Files (x86)\OpenCV
這一步記得勾選
跳出這個表示安裝OK
增加OPENCV_HOME系統變數
===========================================================================
下載DSVideoLib並解壓縮,
開啟J:\MultiTouch\dsvl-0.0.8c\src目錄下的專案glutSample.dsw
開啟專案glutSample.dsw
編譯產生glutSample.exe
執行成功畫面
===========================================================================
OpenGL的環境設置 glut-3.7.6-bin.zip (117 KB)
OpenGL的環境設置需要四個檔案glut32.dll、glut.h、glut32.lib、opengl32.lib,
將glut32.dll放到C:\WINDOWS\system32目錄下,
將glut32.lib和放到C: \Program Files\Microsoft Visual Studio 9.0\VC\Lib目錄下,
將glut.h放到C:\Program Files\Microsoft Visual Studio 9.0\VC\ Include\gl\目錄下,這樣就完成了OpenGL環境的設置。
===========================================================================
VideoWrapper-0.2.6.1-windows-installer
Path系統變數加入 %VideoWrapper%
開啟VideoWrapperExample專案
測試編譯
執行WrapperExample.exe
===========================================================================
安裝OSCPACK(Open Sound Control)
===========================================================================
CMU 1394 Digital Camera Driver (download 1394camera644.exe)
===========================================================================
DirectX Software Development Kit 572MB
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
===========================================================================
Microsoft Platform SDK(R2)
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\
========================================================================
Windows SDK
C:\Program Files\Microsoft SDKs\Windows\v7.1
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples
Visual studio settings
We are almost done with setting up the enviroment, there are just a few steps left before we can compile Touchlib.
- Open up “solution.sln” in the “J:\MultiTouch\touchlib\build\VC8″ directory.
- Choose Tools > Options
- On the left choose Project and Solutions > VC++ Directories
- On the right change “Show directories for:” to “Include files”
- Add the directory “C:\_libraries\glut-3.7.6-bin”
- Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include”
- Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses”
- Add the directory “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include”
- -------------------------------------------------------------------------------------------------------------
- Change “Show directories for:” to “Library files”
- Add the directory “C:\_libraries\glut-3.7.6-bin”
- Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib”
- Add the directory “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86″
- Click OK
- In the menu choose Build > Build Touchlib
- When it has compiled Touchlib, Build > Build solution
- 歷經千辛萬苦總算編譯成功, 跨出第一步^_^
- 參考資料:
- 1. http://www.cnblogs.com/feisky/archive/2009/01/02/1586397.html
- 2. http://www.cnblogs.com/fence/archive/2009/12/22/1629575.html
留言列表