My video processing/touch tracking software
Posted: 06 September 2007 05:41 AM   [ Ignore ]
New Member
Rank
Total Posts:  5
Joined  2007-09-06

Hi!

I just want to show my work result. I started playing with multitouch-FTIR before I found this page, but after reading this whole great informations my concept had changed. Thanks to this forum, I managed to achieve quite good effect using literally a few things taped together.

This is provisory rear DI setup, with tracing paper as a diffuser and small desk lamp for illumination.

I wrote whole software in C++, using some ideas from touchlib. I used DirectShow for video capture, and DirectX for visualization. I didn’t use any kind of video library – whole video processing is written by myself, so it is slow because of lack of MMX-like support (~20% CPU usage @ PentiumIV 3GHz HT @ 25fps).

This is all I can manage at this time. Currently I have no possibilities for moving picture from screen under the fingers, but… admiring others ideas and achievements is fun too.

Damian

Ps. I’am sorry for my bad English.

Profile
 
 
Posted: 07 September 2007 03:27 PM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  52
Joined  2007-06-01

Hello Damian!

Very nice video. Two questions.

1. How does your high pass algorithm work?
2. Do you have any drawings on your setup? What’s the distance from the finger touching the surface to the projection screen/diffuser?

Very nice to see people’s progress. We’re gonna make a 4000mm x 500mm table this autumn, so any ideas are very welcome!

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 07 September 2007 04:01 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  116
Joined  2007-06-06

Looking good Damian!  Thanks for posting the high quality video!  Good to see another person writing their own software… it’s a lot of fun smile

 Signature 

- Miketavius
http://mikeytech.blogspot.com/

Profile
 
 
Posted: 07 September 2007 10:57 PM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  21
Joined  2007-08-31

Nice!

Seb - 07 September 2007 03:27 PM

Very nice to see people’s progress. We’re gonna make a 4000mm x 500mm table this autumn, so any ideas are very welcome!

4 metres by 0.5 metres? That’s a weird ratio.

Profile
 
 
Posted: 08 September 2007 04:06 AM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  52
Joined  2007-06-01

sintau.tayua: It’s a nice bar disk surface for a pub. wink

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 08 September 2007 06:01 AM   [ Ignore ]   [ # 5 ]
New Member
Rank
Total Posts:  5
Joined  2007-09-06

Thanks for response!

Seb - 07 September 2007 03:27 PM

1. How does your high pass algorithm work?

I’ve been trying different algorithms, but the best (as for me) is idea from touchlib. Image is blured with simple box blur algorithm (linear average with 22x22 cell – source image is 320x240), then subtracted from original image, but… my image is stored with float values as pixels (1.0=white, 0.0=black), so precision is not loosed so much after filter steps. At the end, threshold is very small, about 0.05.  Program is also changing threshold, by setting it between average and maximum pixels value (maximum from more frames, and a condition to not loose this value when there is no touch). Works, but it is not perfect – to much parameters to set up, blur cell need to be sized to fingers, and it will probably go crazy with different camera.

Seb - 07 September 2007 03:27 PM

2. Do you have any drawings on your setup? What’s the distance from the finger touching the surface to the projection screen/diffuser?!

I used 4mm thin acrylic with two sheets of quite transparent tracing paper taped under it, so this distance is about 4mm (sometimes software catch finger which is very close to the surface, but not touching).

At first I was thinking, that in order to get enough contrast finger need to touch diffuser, but tracing paper can be easily damaged when contact with water, so it have to be at the opposite site.

My setup looks just like the draft in wiki, but it is really provisory – plexi on top of two desks, camera standing on books…

Profile
 
 
Posted: 08 September 2007 06:10 AM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  52
Joined  2007-06-01

Hello again, Damian!

Are you planning on releasing your software any time?

 Signature 

Sebastian Hartman

Profile
 
 
Posted: 08 September 2007 01:39 PM   [ Ignore ]   [ # 7 ]
New Member
Rank
Total Posts:  5
Joined  2007-09-06
Seb - 08 September 2007 06:10 AM

Are you planning on releasing your software any time?

Well… When I was starting this project, I didn’t think about releasing it, so there is a little mess in there. At this stage this software is useless as a tool or stand-alone program, and it will probably not change in upcoming future. So there is no point in creating a whole new project, with web page and so on. But I can tidy up source a bit, write some basic instructions, and maybe later post it here. But just maybe (please forgive me that doubt, but this is my first piece of software with perspective of seeing the world).

Profile
 
 
Posted: 09 September 2007 12:34 PM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  41
Joined  2007-06-08

have you considered not doing any filters, but making a diff between a saved image (when it first started) and the current image?  I always thought this would be a better solution for change of lighting conditions.  Also, if the diff is also absolute valued… it might work the same with DI or FTIR without modification to the filters.

Anyway, very cool to see you guys doing such great work!

Profile
 
 
Posted: 10 September 2007 03:46 AM   [ Ignore ]   [ # 9 ]
New Member
Rank
Total Posts:  5
Joined  2007-09-06

diff?

You mean some sort of “smart” algorithm for finding differences in pictures, not just subtracting pixels values like “background remove” do?
I suspect that “professional” image recognition techniques, applied for image from camera, could produce better result without so much parameters to set up (I believe that MS Surface is not requiring any kinds of calibrations).
But I don’t know anything about image recognition, so this are just my thoughts.

Profile
 
 
Posted: 10 September 2007 04:57 AM   [ Ignore ]   [ # 10 ]
New Member
Rank
Total Posts:  41
Joined  2007-06-08

yeah, in the filter, only output the difference between the original pixel and the new pixel. 

And the original image would come from when you turn the system on.

It seems like this would work better in different rooms with different natural IR room levels.

Profile