close

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

image

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??

image

image

C:\Program Files (x86)\OpenCV

image

image

這一步記得勾選

image

image

跳出這個表示安裝OK

image

增加OPENCV_HOME系統變數

image

===========================================================================

下載DSVideoLib解壓縮,

開啟J:\MultiTouch\dsvl-0.0.8c\src目錄下的專案glutSample.dsw

image

開啟專案glutSample.dsw

image

編譯產生glutSample.exe

image

image

執行成功畫面

image

===========================================================================

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

image

Path系統變數加入 %VideoWrapper%

開啟VideoWrapperExample專案

image

測試編譯

image

執行WrapperExample.exe

image

===========================================================================

安裝OSCPACK(Open Sound Control)

===========================================================================

CMU 1394 Digital Camera Driver (download 1394camera644.exe)

image

===========================================================================

DirectX Software Development Kit 572MB

image

image

image

C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)

image

image

===========================================================================

Microsoft Platform SDK(R2)

image

image

image

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\

image

image

========================================================================

Windows SDK

image

image

C:\Program Files\Microsoft SDKs\Windows\v7.1

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples

image

image

image

Visual studio settings

We are almost done with setting up the enviroment, there are just a few steps left before we can compile Touchlib.

  1. Open up “solution.sln” in the “J:\MultiTouch\touchlib\build\VC8″ directory.
  2. Choose Tools > Options
  3. On the left choose Project and Solutions > VC++ Directories
  4. On the right change “Show directories for:” to “Include files
  5. image
  6. Add the directory “C:\_libraries\glut-3.7.6-bin”
  7. Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include”
  8. Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses”
  9. Add the directory “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include”
  10. -------------------------------------------------------------------------------------------------------------
  11. Change “Show directories for:” to “Library files
  12. image
  13. Add the directory “C:\_libraries\glut-3.7.6-bin”
  14. Add the directory “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib”
  15. Add the directory “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86″
  16. Click OK
  17. In the menu choose Build > Build Touchlib
  18. When it has compiled Touchlib, Build > Build solution
  19. image
  20. 歷經千辛萬苦總算編譯成功, 跨出第一步^_^
  21. image
  22. 參考資料:
  23. 1. http://www.cnblogs.com/feisky/archive/2009/01/02/1586397.html
  24. 2. http://www.cnblogs.com/fence/archive/2009/12/22/1629575.html
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 me1237guy 的頭像
    me1237guy

    天天向上

    me1237guy 發表在 痞客邦 留言(0) 人氣()