My blobs aren’t stable. Resulting in a shaky interface. 
Posted: 05 October 2007 02:09 AM   [ Ignore ]
Rank
Joined  2007-09-08
Total Posts:  30
New Member

Im working on my multitouch for over a month now.
From the start of i had a problem that my blobs tend to shake a little, i didn’t bother to much about it but now i am trying to write a flash interface it gets annoying.
When i pick a picture with two fingers the shaking in the two finger blobs causes the picture to rotate and shift like the picture is freeeezing cold.

I’ve include a capture of it, its 28mb and bad quality but you see the dots shake in the flash application.

http://www.muhneer.nl/multitouch/mt_unstable_blob.mov

Maybe it’s because my setup is only 50 cm high right now and my fingers are to big for the camera ?

Does anybody else has this problem ?

 Signature 

Multitouch project : http://www.muhneer.nl/blog/

Profile
 
 
Posted: 05 October 2007 02:35 PM   [ Ignore ]   [ # 1 ]
Rank
Joined  2007-06-01
Total Posts:  54
New Member

Just make a map in which you store key->value as TouchData.id->[TouchData,movement] and in each fingerUpdate replace the current TouchData.id’s movement with the old movement+deltaMovement.
Then use a threshold for minimumMovement for actually interpreting as an update.

(I will add this to Touchlib as soon as I need it, by the way.)

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 06 October 2007 02:32 AM   [ Ignore ]   [ # 2 ]
Rank
Joined  2007-09-08
Total Posts:  30
New Member

Thanks for the reply!

I will try if i can fix that, not that good c++ skills.

But is this skaky behaviour normal ? I can imagine that it has something to do with the size of my fingers because my setup is only 40 cm high.
Are the blobs in your setup stable Seb ?

Thanks.

 Signature 

Multitouch project : http://www.muhneer.nl/blog/

Profile
 
 
Posted: 07 October 2007 12:03 PM   [ Ignore ]   [ # 3 ]
Rank
Joined  2007-05-20
Total Posts:  45
New Member

i have some experience ! Experience for DI Rear Illumination
If your blobs stable !, you can config HighPassFilter :

<highpass label="highpass">
        <
filter value="10" />
        <
scale value="4" />
    </
highpass>

Mean : Scale very slow and filter high ! You can see result !
Thank !

 Signature 

vFinger’s blog : http://vfinger-vn.blogspot.com <-- for Vietnamese
vFinger’s blog : http://vfinger-en.blogspot.com <-- for International !!!!!

Profile
 
 
Posted: 07 October 2007 12:06 PM   [ Ignore ]   [ # 4 ]
Rank
Joined  2007-05-20
Total Posts:  45
New Member

And Final word ! You ought tọ see the camera FPS !! Very Important !

 Signature 

vFinger’s blog : http://vfinger-vn.blogspot.com <-- for Vietnamese
vFinger’s blog : http://vfinger-en.blogspot.com <-- for International !!!!!

Profile
 
 
Posted: 19 October 2007 05:10 AM   [ Ignore ]   [ # 5 ]
Rank
Joined  2007-09-08
Total Posts:  30
New Member
Seb - 05 October 2007 02:35 PM

Just make a map in which you store key->value as TouchData.id->[TouchData,movement] and in each fingerUpdate replace the current TouchData.id’s movement with the old movement+deltaMovement.
Then use a threshold for minimumMovement for actually interpreting as an update.

(I will add this to Touchlib as soon as I need it, by the way.)

I tried this, not exactly how you typed it because i dont understand this part : “replace the current TouchData.id’s movement with the old movement+deltaMovement.”.
I’ve never programmed in C++ but after a bit of experimentation i learned a bit.

I did this :

//! Notify that a finger has moved 
    virtual void fingerUpdate(TouchData data)
    
{

        
        
// NO MORE SHAKY BLOBS
        
float shakeTreshold=0.0035;
        
fingerDeltaList[data.ID] data;

        
// CHECK IF THE MOVEMENT IS BIGGER THEN THE TRESHOLD
        
if (abs(fingerDeltaList[data.ID].dX) >= shakeTreshold || abs(fingerDeltaList[data.ID].dY) >= shakeTreshold{
            fingerList[data
.ID] data;
            
printf("OSC FingerUpdate detected: %i, %f, - %f, %f - %f, %f\n",data.IDshakeTresholddata.Xdata.Yabs(data.dX), abs(data.dY));
        
}

    }

This works as far as i can see, but sometimes i completely lose my tracking but i can fix that. But another problem is a result of this method i guess.
If i move my finger very slow, it doesn’t detect movement because the movement is less than the treshold.

So maybe i didn’t code this right and is “replace the current TouchData.id’s movement with the old movement+deltaMovement.” the solution.

 Signature 

Multitouch project : http://www.muhneer.nl/blog/

Profile
 
 
Posted: 19 October 2007 05:21 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2007-06-01
Total Posts:  54
New Member

Hey muhneer. I added this to the blob tracker and it will be implemented next time I commit something. It’s easier working with vectors to establish what we want. What you want to do is

currentDisplacement = oldDisplacement + currentDelta

Then check |currentDisplacement| >= displacementThreshold

where all of these operands are vectors. I hope this helps!

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 19 October 2007 05:57 AM   [ Ignore ]   [ # 7 ]
Rank
Joined  2007-09-08
Total Posts:  30
New Member

Thanks Seb!

I noticed that Delta values are the dX and dY values of Touchdata, but the Displacement (oldDIsplacement) value is that the X and Y value of the previous touch ? or am i wrong.
I’m glad i learned AS3.0, its a lot like C++

Thanks for your time.

 Signature 

Multitouch project : http://www.muhneer.nl/blog/

Profile
 
 
Posted: 19 October 2007 07:52 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2007-06-01
Total Posts:  54
New Member

This is a solution:

struct Point { float xfloat y};
map<intPointdisplacementMap;

...

fingerDown(TouchData data{
...
  
Point delta;
  
p.p.0.0f;
  
displacementMap[data.ID] delta;
...
}

fingerUpdate
(TouchData data{
...
  
Point &delta displacementMap[data.ID];
  
delta.+= data.dX;
  
delta.+= data.dY;
  if (
sqrt(delta.x*delta.delta.y*delta.y) >= displacementThreshold{
    delta
.delta.0.0f;
    
fingerList[data.ID] data;
    
printf("OSC FingerUpdate detected...", ...);
  
}
...
}

Good luck.

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 19 October 2007 10:42 AM   [ Ignore ]   [ # 9 ]
Rank
Joined  2007-09-08
Total Posts:  30
New Member

Thanks!

I got it working, now im gonna try to get the treshold from the xml.
Thanks for your effort and time.

 Signature 

Multitouch project : http://www.muhneer.nl/blog/

Profile