5 of 9
5
CsTI - CSharp Touchlib Interface
Posted: 22 April 2008 08:27 AM   [ Ignore ]   [ # 61 ]
New Member
Rank
Total Posts:  9
Joined  2008-03-25

Thanks donovan, will give them a try now…

Profile
 
 
Posted: 22 April 2008 06:32 PM   [ Ignore ]   [ # 62 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

owenhindley:

rather download the newer source-> http://www.whitespaced.co.za/ftir/CsTI08_newsrc.zip
here are bins but I doubt if they will work on vista (can’t test on vista because I don’t have it) http://www.whitespaced.co.za/ftir/CsTI08_newbins.zip

you can now do CsTI.RecaptureBackground() which I believe is what you need.
also has an event that gets raised for every frame.
and it no longer gives me any problems (like AccessViolation when shutting down).

so let me know if these bins work. and if the source still gives problems

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 23 April 2008 12:15 AM   [ Ignore ]   [ # 63 ]
Sr. Member
RankRankRank
Total Posts:  286
Joined  2007-07-14

donovan:
Could you please add StopScreen() method? Is it also possible to have a parameter of starting without configuration windows?

Profile
 
 
Posted: 23 April 2008 03:25 AM   [ Ignore ]   [ # 64 ]
New Member
Rank
Total Posts:  85
Joined  2008-02-11

Is’nt that the SetDebugState=false; or something like it somewhere?

Profile
 
 
Posted: 23 April 2008 04:05 AM   [ Ignore ]   [ # 65 ]
New Member
Rank
Total Posts:  9
Joined  2008-03-25

donovan: Thanks for your efforts on this - the new bins work well in Vista, including the RecaptureBackground(). Haven’t had a chance to properly look at the source yet, will try that now.

One problem though - if the camera is pointing at something that provides an input (at the moment it’s pointing at the flourescent light above my desk), Touchlib freezes immediately after performing a recaptureBackground(). If the camera’s lens is covered, the recapture works fine.

Could this be due to a large number of touch Up(/Down?) events being fired by Touchlib after a recapture, and something along the chain not being able to handle it?

EDIT:
setting up configapp properly (increasing Rectify value in particular) reduces number of false inputs, touchlib much more stable now.

Tried to use source, initial build compiled OK but still produces AccessViolation error in the same place on excecution :( Will try rebuilding Touchlib & re-compiling CsTI using that..

Profile
 
 
Posted: 23 April 2008 08:51 AM   [ Ignore ]   [ # 66 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

i also found it freezing when pointing at a fluorescent light without any calibration. but after calibrating it, it works fine.

the new bins/src include the following:

CsTI.stopScreen() will stop touclib
CsTI.startScreen now takes a parameter, false starts without video output windows and true starts with.

The bins also work with touchlib beta 2. I’ll update the svn once I verify it includes all the new stuff for beta 2.

bins: http://www.whitespaced.co.za/csti/CSTItouchlib_beta2bins.zip
source: http://www.whitespaced.co.za/csti/CSTItouchlib_beta2src.zip

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 28 April 2008 09:01 AM   [ Ignore ]   [ # 67 ]
New Member
Rank
Total Posts:  9
Joined  2008-03-25

donovan, again many many thanks for the work you’ve put in on CsTI! It’s been a massive help.

Profile
 
 
Posted: 28 April 2008 01:35 PM   [ Ignore ]   [ # 68 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

only a pleasure sir! glad that you find it useful!

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 30 April 2008 08:32 AM   [ Ignore ]   [ # 69 ]
New Member
Rank
Total Posts:  5
Joined  2008-04-18

I didn’t have the time, but is a mouse emulator included in this version? Because if it isnt, this could be done by combinating these two methods, I will post an example on how to use them if someone needs further explanation…

[DllImport("user32.dll")]
static extern void mouse_event(uint dwFlagsuint dxuint dyuint dwData,  UIntPtr dwExtraInfo);

With:

  public 
enum MouseEventFlags
  {
    LEFTDOWN   
0x00000002,
    
LEFTUP     0x00000004,
    
MIDDLEDOWN 0x00000020,
    
MIDDLEUP   0x00000040,
    
MOVE       0x00000001,
    
ABSOLUTE   0x00008000,
    
RIGHTDOWN  0x00000008,
    
RIGHTUP    0x00000010
  }

and

[DllImport("user32.dll")]
static extern bool SetCursorPos(int Xint Y);

 Signature 

Moulti Touch Blog Belgium

Profile
 
 
Posted: 01 May 2008 08:18 AM   [ Ignore ]   [ # 70 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

I seriously doubt if I will add mouse emulation to the wrapper because mouse emulation is application specific. So for those that need to emulate the mouse you’ll have to do that via your own application.

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 01 May 2008 08:23 AM   [ Ignore ]   [ # 71 ]
New Member
Rank
Total Posts:  5
Joined  2008-04-18

Seems fair to me, I’ll Write an .NET Wrapper that enables mouse emulation from X,Y Coordinates en the Touchdownevent

 Signature 

Moulti Touch Blog Belgium

Profile
 
 
Posted: 01 May 2008 08:58 AM   [ Ignore ]   [ # 72 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

Why would you do mouse emulation through .NET? I think it would be better to just run a c++ mouse emulation app and then start the .NET app as normal. Mouse emulation doesn’t need to go through .NET.

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 01 May 2008 09:30 PM   [ Ignore ]   [ # 73 ]
Jr. Member
RankRank
Total Posts:  110
Joined  2007-06-06

If mouse emulation is really important, you can check out my framework that I posted in this forum that includes single touch mouse emulation...not sure how you would emulate multitouch with a mouse heh.

Profile
 
 
Posted: 03 May 2008 07:12 AM   [ Ignore ]   [ # 74 ]
Sr. Member
RankRankRank
Total Posts:  317
Joined  2007-03-13

nice work admiral!

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 14 May 2008 06:17 AM   [ Ignore ]   [ # 75 ]
New Member
Rank
Total Posts:  25
Joined  2008-05-14

hi there, donovan i wonder if you could help me

I am trying to use your CSti Wrapper for the TouchLib but i am just wondering how do i implement it and what files do i need in the bin directory of my application?

I have reference the CsTI.dll, but the TouclibWrapper.dll won’t allow me to reference it and so when i do this..

CsTI oCsTI = new CsTI();

oCsTI.startScreen(true);

I get an error saying Error
1 ‘TouchlibWrapper.CsTI.CsTI()’ is inaccessible due to its protection level C:\Documents and Settings\Calvin Muller\Local Settings\Application Data\Temporary Projects\TouchMeMulti\Form1.cs 21 26 TouchMeMulti

I have managed to get the application running by copying like alot of files into the bin directory.. I was wondering how it is possible to use this in a windows forms application and when i load the form up and startScreen and add a few event handlers the form just never appears…

Thanks

Profile
 
 
   
5 of 9
5