Library for FTIR in XNA (0.6)
Posted: 19 July 2007 04:47 PM   [ Ignore ]
New Member
Rank
Total Posts:  3
Joined  2007-07-19

Home: http://www.cs.queensu.ca/~wolfe/equisftir/

Have posted an updated binary version, and the source for it is coming soon. Would very much appreciate anyone with a spare moment and XNA Game Studio Express giving the binaries a whirl (the FTIR demo game needs a compiled “Space Wars” sample). It appears to work properly on XP, and my Vista-running victim has been otherwise occupied.

Why consider using this:
- Free and open for non-commercial use (CC Attribution Non-Commercial)
- An AMD Turion TL-50 (2x1.6GHz) processes a 640x480@30FPS stream with 20% load*
- Processor usage is independent of smoothing radius and number of blobs**
- No shape preferences: use your finger, or hand, or first, or a paintbrush
- Simple C# API blends with XNA Game Studio Express on Windows
- C++ API based on Direct3D9
- Efficient preview of camera input and changes
- Input from DirectShow-compatible devices
- Identifies position and force of a contact; further shape data coming

*: capturing the stream with a USB-based webcam seems to add 10%-30% additional overhead.
**: actually O(N log N) number of recorded blobs, but this is always dominated by the image processing.

What you need:
- To build applications or run the examples: Microsoft XNA Game Studio Express
- To modify the library: Microsoft Visual Studio 2005 or newer, and have XNA Game Studio installed
- Note that the example applications were created in VS2005, so you will probably want to create new GSE projects.

Major limitations:
- Gradually changes and drags are not recognized as such (only changes between frames)
- Do not yet have the API in place to query the shape mask for a particular blob
- Poorly tested, only partially optimized, and mostly undocumented
- A bug in file handling causes the videos to run as fast as they can be processed
- The FTIR example application is far too complex

Profile
 
 
Posted: 16 August 2007 02:51 PM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  22
Joined  2007-07-19

UPDATE:
The links work fine. Firefox auto download fooled me.
Nice work! Very clean! Lots of potential...this should have a formal thread.

Profile
 
 
Posted: 16 August 2007 06:27 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  3
Joined  2007-07-19

Thanks for the comment; and guess it wasn’t a bad afternoon to be away from e-mail after all. There are a lot of internal things I’m not particularly happy with (inability to force Logitech out of low-light mode, for one), but am finally getting the major bugs shaken out.

My aim for the moment is to get a few interested folks playing with the system. Once I’m convinced that it will work for people out of the box it’ll be time to start publicizing more effectively…

From some testing I did on David Smith’s table, it looks like the API will need support for saving a static background. One (or both) of the Quickcam Fusion and our compliant surface appear to be spreading the change across multiple frames, so it takes a fairly hard poke to get a response. While I’m not a fan of saving a background, it is the easy solution.

Chris

Profile
 
 
Posted: 17 August 2007 02:15 PM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  22
Joined  2007-07-19

I’m trying to compile EquisFTIR.

I get the following errors:
Error 1 error C2146: syntax error : missing ‘;’ before identifier ‘CreateFtirFromCapture’ c:\users\administrator\desktop\equisftir\equisftir-0.6.2\equisftir-core\API\IFtir.h 44

Any help would be appreciated.

Profile
 
 
Posted: 17 August 2007 02:33 PM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  3
Joined  2007-07-19
paulzain - 17 August 2007 02:15 PM

I’m trying to compile EquisFTIR.

I installed DirectX 9 and Windows Media Format 11.

I get the following errors:
Error 1 error C2146: syntax error : missing ‘;’ before identifier ‘CreateFtirFromCapture’ c:\users\administrator\desktop\equisftir\equisftir-0.6.2\equisftir-core\API\IFtir.h 44
...

That looks like it’s choking on the EQUISAPI define (from EquisFTIR-Core.h). The only way I could create that same set of errors was misspelling the DECLSPEC_NOTHROW. As it’s not actually needed with extern “C” (whoops), you can try removing the DECLSPEC_NOTHROW from API\EquisFTIR-Core.h:9.

What version of Visual Studio? I have only tested with 2005 SP1.

Chris

Profile
 
 
Posted: 17 August 2007 03:09 PM   [ Ignore ]   [ # 5 ]
New Member
Rank
Total Posts:  22
Joined  2007-07-19

Removing DECLSPEC_NOTHROW from EquisFTIR-Core.h fixed the problem.

Thanks!

Profile
 
 
Posted: 17 August 2007 03:20 PM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  22
Joined  2007-07-19

EquisFTIR Compiling Tips

================================
Requirements
================================
Platform SDK for Windows Server 2003 R2
DirectX SDK (December)
Windows Media Format SDK 11
XNA Game Studio Express
Visual C# Express

================================
EquisFTIR-Core
================================
Right-click EquisFTIR-Core project:
Properties >> C++ >> General >> Additional Include Directories

Add the following (change for your local system if needed):

C:\WMSDK\WMFSDK11\include
C:\Program Files\Microsoft DirectX SDK (December 2006)\Include
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

================================
EquisFTIR-Xna
================================
Right-click EquisFTIR-Xna project:
Properties >> C++ >> General >> Additional Include Directories

Add the following (change for your local system if needed):

C:\Program Files\Microsoft DirectX SDK (December 2006)\Include
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

================================
Add Platform SDK Libs to EquisFTIR-Core
================================
Right-click EquisFTIR-Core project:
Properties >> Linker >> Additional Library Directories
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

================================
Error 1 error C2146: syntax error : missing ‘;’ before identifier
‘CreateFtirFromCapture’
================================
EquisFTIR-Core.h:9
Change
#define EQUISAPI EXTERN_C DECLSPEC_DLL HRESULT DECLSPEC_NOTHROW
To
#define EQUISAPI EXTERN_C DECLSPEC_DLL HRESULT //DECLSPEC_NOTHROW

Profile