This project is read-only.

Increase markers sensitivity

Jun 30, 2009 at 2:43 AM

Hi. I am using Touchless for my project.

I have 'hardcoded' the markers in the program by add the bitmap image of the markers. This allows me to use the demos without calibrating the marker everytime I restart the program.

But the program do not detect the hardcoded markers in different lighting well. Are there any ways to increase the sensitivity or are there any ways to save the marker's image?

Thanks in advance.

Jun 30, 2009 at 2:55 AM

Hey, that's cool if you've got it loading markers from file. Could you extend that to add marker save and load functionality? I'd be willing to help out if you upload a patch or send me code.

To answer your question, the best thing to do would be to re-add the marker in very different lighting conditions, but you might be able to tweak the marker threshold sufficiently to make it work (a lower thresh will match more pixels). Otherwise, you might be able to adjust your webcam settings to compensate for limited lighting differences by using/tweaking automatic gain / night mode / exposure settings, depending on your camera's software. It might also be possible to add some controls that would offset Touchless's detected colors to compensate for lighting differences, but you'd have to perform some brightness sampling or add manual user controls to make that work, and I'm not sure how well it'd play out.

If you're able to contribute, you'll be helping other people with the same requests!

- Mike

Jun 30, 2009 at 9:29 AM
Edited Jun 30, 2009 at 9:32 AM

Is it possible to save the bitmap image when we add a new marker using


image.Save("c:\\button.bmp", System.Drawing.Imaging.ImageFormat.Bmp);

I placed this code in addMarker(), but the image saved is whole image captured from the webcam. I am not sure not how the image is processed when we are adding the marker though.

Jun 30, 2009 at 7:29 PM

Hey Mike,

I am a bit silent in the last time because I am writing on my master thesis (about rule engines, in case someone asks), but I still have the Load/Save marker code in my hands.

I thought I had commited a patch containing it but I could double check if it still applies with the current release or else recommit an updated version, are you (and YOU, YOU, and You over there ;) interested?

Jul 1, 2009 at 3:36 AM
Edited Jul 1, 2009 at 4:48 AM

Hi eFloh,

I am interested in the save and load patch. I did try your patch and I have 1.

1. 'TouchlessLib.Marker.SetMarkerAppearance(int[*,*,*])': not all code paths return a value


Hope you can help.




I managed to get the program running. But the markers don't seem to be saved.

Jul 1, 2009 at 2:27 PM

Hi happyrasins,

I am happy to annouce that I just uploaded a new patch for marker saving and loading.

The demo app is also updated in this version and shows sample  code for marker saving and loading.

The marker data is not processed, so changing light conditions will affect your success with my code, too.

direct download: 

Jul 2, 2009 at 3:55 AM

Hi eFloh,

Thanks for the reply. I tried the new patch and I have errors 'ExportedMarker' could not be found in TouchlessDemo.cs

Hope you can help.

Jul 2, 2009 at 12:30 PM

sorry to hear this.

How did you apply the patch? When I get a clean checkout using subversion and then patching the sources (using TortoiseSVN "apply patch" function),
my code cleanlycompiles. Please ensure that all 4 files were patched:


  • Marker.cs
  • TouchlessMgr.cs 


  •  TouchlessDemo.cs
  • TouchlessDemo.Designer.cs


You may check the file Marker.cs if it contains the class ExportedMarker, else you had problems applying the patch.

Jul 3, 2009 at 7:34 AM

Thanks, I managed to solved the problem.