This project is read-only.

Multi-Camera touchless

Oct 28, 2008 at 3:35 AM
Hi Mike

Thank you sound for you willingness to help
In my project I wanna use the touchless library to trace a marker location in two cameras
 I thought about using two TouchlessMgr objects each for one camera. Each camera should 
have its own window and marker

lets say if I have the selected camera from the comboBox  is linked to _touchlesssMgrCam1
_touchlessMgrCam1.CurrentCamera == (Camera)comboBoxCameras.SelectedItem;

how can I link the other camera to anthor touchlessMgr object let say _touchlesssMgrCam2
and process it the same way like the first object.


Oct 31, 2008 at 7:31 PM
Edited Oct 31, 2008 at 7:35 PM
Hi Yasir, Sorry for my delayed response. Hang tight and I'll investigate this over the weekend.
Can you share your project (send a link or files;, to save me the trouble of making something similar from scratch?
- Mike
Nov 4, 2008 at 1:16 AM
Hey Yasir,
I tried using two TouchlessMgr objects for simultaneous multiple camera support. You are right; it doesn’t work.
I’m not sure exactly what prevents this, but we will investigate and hopefully make a fix soon.
We’re in the midst of many changes in WebCamLib and our camera support.
I will post progress here. Sorry for the inconvenience, let me know if you find anything else.
- Mike

Nov 4, 2008 at 8:13 AM
Thanks Mike,

I hope I didn't bother you with my dilemmas. 

yes sure I'll try to investigate it also and I'll post here whatever results I get.

Nov 4, 2008 at 7:31 PM
It's no bother; that's why I'm here. And your involvement makes it worthwhile!
Nov 12, 2008 at 6:55 AM
Hi Mike

I managed to use multiple camera but I can't add a marker to it and more over the program crashes 
if I move the window.
I'm not using the Webcamlib.dll any more and I also remove the Nativemethod.cs fellow I have changed
the camera.cs also.
actually I did many  modifications and I think it's not suitable to post all the files her. I wonder if I can mail 
the program to you to see where the problem is.

Nov 13, 2008 at 4:40 AM
Hi everyone

Thanks I managed to solve the previous post problem but now I have anther problem which is the marker.EventData.Present doesn't
become true at all I found that it become true in markeerUpdate() method only when the (marker.EventData.Area > 0 ) even when 
I tried to the sample program work throw "WalkthroughSample" most of the time marker.EventData.Present which means the image is
not overlayed. I wonder if there are any condition in the selection of the marker or anything I can change to make become true most 
of the time.

I would also ask if there are any documentation about the marker functions because the code is quite long and it a bit harder for me to
understand the marker scanning algorithm.

Nov 14, 2008 at 4:28 AM
Hi Yasir,

You're right that currently EventData.Present is set true only when EventData.Area > 0.
This just means that if we found at least one matching pixel, the marker is present.
If the marker has no matched area then it's not present.

Perhaps your marker isn't very good or was trained/added poorly.
Read my tips in TouchlessDemo on the markers tab when you click "Help!"
AddMarker takes an image and the center & radius of the cirlce to scan for the marker.
WalkthroughSample just assumes some small radius around the point of a mouse click.
To get the best result, send a center AND radius that closely match the bounds of the marker in the image.
Try adding markers like I've done in TouchlessDemo, by selecting the circle that closely fits your marker.

Documentation is distributed with the release as "Touchless.chm" (it's also in the source code Documentation folder).
If you need clarification on the public functions, or have questions about internal workings, I can help with that.

- Mike