Szymon Kobalczyk's Blog

A Developer's Notebook

  Home  |   Contact  |   Syndication    |   Login
  106 Posts | 6 Stories | 584 Comments | 365 Trackbacks


View Szymon Kobalczyk's profile on LinkedIn

Tag Cloud


Blogs I Read

Tools I Use

4DevelopersShort while after I wrote about resources for multi-touch on Windows 7 Daniel D left a comment that got me very excited:

MultiTouchVista now has a driver that emulates multitouch hardware for Windows 7

I got to try it out myself! Bit later I got everything up and running and I’m happy to report that it’s all true: you can now effectively emulate multi-touch devices under Windows 7. You can see it yourself on this video. In fact it works so well that I was able to demonstrate it last Saturday at 4Developers conference.

That being said, the process to get it running involves few steps so I thought it would help to have a walkthrough to follow for anyone who would like to try it. So here it goes.


Of course you need a PC. Note that computer vision puts CPU to heavy use, and I was able to get barely 15 FPS on my laptop with 1.6Ghz, and thus the interaction wasn’t very smooth. In fact Windows 7 specification requires multi-touch devices to report at least 50hz per finger.

The software that we are going to use allows to work with number of protocols. One option is to simply connect multiple USB mice to emulate multi-touch. But it is much more fun to build your own surface-like table. For start you can built a MTmini table designed by Seth Sanders – it takes about 20 minutes to build and all you will need is:

  • Webcam – people try different kinds of webcams for this, but I think even something simple with decent video should work. I have great results using Logitech QuickCam Pro 9000 because it has excellent video quality in 640x480 and most important you can set the focus and other parameters manually.
  • Tracing paper – it’s purpose is to diffuse the light coming to the camera so only objects very close to the surface (i.e. your fingers) look sharp. Initially I used just ordinary printer paper, but tracing paper gives more even image.
  • Photo frame – no, I’m not talking about any fancy LCD frames. It’s just plain wood frame (word of advice: bad things will happen if you try to repurpose frame from your wedding photo). Frame I use has A4 paper format (210mm × 297mm) and fits nicely on top of the carton box from the packs of A4 office paper.
  • Cardboard box, duck tape, and scissors.

When you have all the materials here is what you do:

  1. Put the camera at the bottom of the box facing up, and glue it with the duck tape. You might need to cut out the hole for the camera’s USB cord.
  2. Remove the back board from the photo frame and put only the tracing paper on the glass.
  3. Put the frame on top of the box.

You can also watch this video for step by step instructions.

Here is my completed setup:

My MTmini setup


Obviously you need to have Windows 7 Beta installed. So hopefully you was able to download it while it lasted.

Next thing to download and configure is tBeta. Here is description of it from official website:

The Beta, tbeta for short, is a open source/cross-platform solution for computer vision and multi-touch sensing. It takes an video input stream and outputs tracking data (e.g. coordinates and blob size) and touch events (e.g. finger down, moved and released) that are used in building multi-touch applications. tbeta can interface with various web cameras and video devices as well as connect to various TUIO/OSC enabled applications and supports many multi-touch lighting techniques including: FTIR, DI, DSI, and LLP with expansion planned for the future (custom modules/filters).

Download the software from the above website and unzip to folder you choose. Before you run it you might want to change configuration to use higher resolution if your webcam supports it. Go to \tbeta\data folder and open config.xml file. Specify the correct values for  WIDTH and HEIGHT in CAMERA_0 node.

One more thing I did to get more predictable results was to turn off all automatic adjustments in camera software. For Logitech QuickCam this includes switching to manual focus, and turning off Automatic settings for RightLight, exposure and gain. We are not going to move the camera around or dramatically change the lightning conditions so it will be best to make all settings constant.

When you run tbeta.exe you should see something like this:


The tricky part is calibration, which means adjusting the sliders for all filters at the bottom so that you get best recognition accuracy. Unfortunately I don’t know any rules that would help you with this. You would have to play with the settings a bit to get a feeling how it works. If you make it right you should see an outline and unique id associated with each of your fingers as seen on the above screenshot. When all works well you can minimize this window (press spacebar) so it won’t consume CPU for rendering.

The last piece of this puzzle is MultiTouchVista project that I mentioned in previous post as well. This framework, which actively developed by Daniel D himself (aka nesher), adds support of multi-touch to the current version of WPF. But for purpose of this article the important thing is the recently added Windows 7 multi-touch driver. It’s not even officially released yet, so you would need to go directly to Source Code tab and download latest bits (I run it on changeset 18685).

You can follow instruction in this video on how to install the driver and run the services. Here is a short summary of the same:

  1. Compile all projects for MultiTouchVista. Follow instructions on this page.
  2. From Windows Explorer go to MultiTouchVista\Main Source folder, and while holding down Shift right click on Multitouch.Diver folder and select “Open Command Window Here”.
  3. In this window type: install driver.cmd, press Enter and ignore all warnings about not certified drivers.
  4. Open Device Manager and confirm that new driver called “Universal Software HID device” is installed under “Human Interface Devices”. Video suggests to disable and then enable the driver to ensure it is working correctly.
  5. To verify the driver is installed you can open “Pen and Touch” applet from Control Panel. It should now contain the Panning tab.
  6. Back in Explorer go to MultiTouchVista\Main Source\Output folder and run  Multitouch.Service.Consol.exe. By default it loads the MultipleMiceInputProvider so if you should see red dots indicating “virtual cursor” for each USB mouse you have attached. But to use your MTmini table you would need to change configuration so it connects to tBeta through TUIO interface.
  7. From MultiTouchVista\Main Source\Output run Multitouch.Configuration.WPF.exe. From list of Available devices select Tuio and click the arrow button in middle to make it Active device. Then click “Restart service” button to apply the new configuration.
  8. Finally go to MultiTouchVista\Main Source\Multitouch.Driver.Console\bin\debug and run Multitouch.Driver.Console.exe.
  9. Now if you put finger on surface, you should see the input messages coming to the console window. And of course now you should be read to use it as input device for Windows.

Try it on several touch enable applications that I listed in my last post (XPS Viewer and Paint are great for quick demo). You can also find some C++/C# examples on MSDN Code Galery.

Great thanks for Daniel D for leaving this inspiring comment, and even bigger compliments for developing such great library. Please don’t hesitate to let me know if I can help with anything.

posted on Tuesday, March 10, 2009 10:35 PM


# re: Emulating multi-touch device for Windows 7 3/11/2009 3:14 PM Jacek Ciereszko
Very Nice :) I have to find my camera :D


# re: Emulating multi-touch device for Windows 7 3/14/2009 4:07 PM Nesher aka Daniel D
Actualy nesher and Daniel D are the same person :)
Great post!!!!! Thank you for demonstraiting it at the conference.

# re: Emulating multi-touch device for Windows 7 3/15/2009 9:38 AM Szymon
Hey Daniel,
Somehow I suspected you are behind this. Great work!
Thanks for kind comment, and please keep the good stuff coming :-)

# re: Emulating multi-touch device for Windows 7 3/17/2009 10:27 PM Chris G. Williams
GREAT article!

# re: Emulating multi-touch device for Windows 7 3/18/2009 12:30 PM Vic
Great, i will try this one and let everyone know...


# re: Emulating multi-touch device for Windows 7 5/18/2009 10:13 PM delorian
You may want take a look at my friend's work with multi-touch devices

# re: Emulating multi-touch device for Windows 7 8/11/2009 10:53 AM David
nice article. help me a lot. thanks..

# re: Emulating multi-touch device for Windows 7 5/7/2010 6:27 AM British Gas Homecare
Multi-touch for Windows 7? That's really really cool!

# re: Emulating multi-touch device for Windows 7 8/12/2010 5:24 PM Manuel Herrera
Great sutff! Thanx for your effort in puttinh together all this info

# re: Emulating multi-touch device for Windows 7 12/15/2010 5:09 AM toucheer
Great article, it was very helpufl! I just started in this and I'm getting to know it better! Cheers, keep up the good work!

# re: Emulating multi-touch device for Windows 7 12/15/2010 11:39 AM Dilan
Very Interesting article, my friend! I tried this with my MTmini. But I was able to enable only single touch input in my laptop. Can you please give me some advise on this? (I am not using any multi-touch enabled laptop or monitor)

# re: Emulating multi-touch device for Windows 7 12/16/2010 1:59 AM Dilan
Very Interesting article, my friend! I tried this with my MTmini. But I was able to enable only single touch input in my laptop.
When I went to system panel in control panel
it only says "Pen and Touch: Single Touch Input Available".

*I installed the HID driver from multitouch Vista changeset 30935.
*I have visual studio 2008 full version installed.

I am not using any multi-touch enabled laptop or monitor.
Can you please give me some advise on this?

# re: Emulating multi-touch device for Windows 7 4/4/2011 11:50 PM Robert
Make sure you are only using one display device when using the MultiTouch simulator project; you will not receive touch events if you have multiple displays.

# re: Emulating multi-touch device for Windows 7 4/10/2011 6:15 AM Web Directory
Very interesting. I never seen somethink like that this in my live. Good Job

# re: Emulating multi-touch device for Windows 7 5/18/2011 3:50 PM Jaspreet Singh
it`s workingggggggggggggg........... wOOohoOOo
THANX VERY MUCH for the support.

Jaspreet Singh

# re: Emulating multi-touch device for Windows 7 5/18/2011 3:51 PM Jaspreet Singh
ITS workingggggggggggg.

thanx very much buddy for support.....

# re: Emulating multi-touch device for Windows 7 6/8/2012 2:31 PM fabric store
windows touch device is best for touch 7

# re: Emulating multi-touch device for Windows 7 3/17/2013 8:54 PM touch detection through camera
I got the multi-mice working with this article but the CCV is not able to detect the blobs. How to do overcome this problem?

Secondly, how to I get the system working with "touch"? It's working when I connect 2 or 3 mice to my system , it's able to detect the mouse but not the "touch". How can I get this? Is there any video or step by step procedure?
I dont have a touch monitor or anything related to touch in my laptop.

Please do reply

# re: Emulating multi-touch device for Windows 7 help 8/14/2013 1:34 PM ja
PLEASE i cant start ccv error 0x0150002 how to fix ?

Post A Comment