JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1644
|
Re: Visual Basic
The other part of my reply would apply to moving -- you'd have to scan every single pixel-by-pixel and look for the color of the laser pointer, then once you find it (really, the color red or such) you'd have to check to make sure it's actually the pointer so you'd have to continue scanning to the right and down (a box) to see if it's a round-like point of the proper size (as you can tell from even posting here -- there's red circles in the form of smilies).
Even if the image was only 800x600, you'd have to scan 480,000 pixels 10x a second. "fortunately" many webcams are a lot less than that resolution wise -- of course that means you'd have less precision. You could do it, but it all depends on what control you store the picture in, if you use a control, and how you can access the image stored in it.
You could potentially take one image, then a second, subtract the first from the second and be (mostly) left with just the pointer assuming nothing in the application was left -- but you'd still have to figure out how to find the pointer. It'd just require a fairly quick computer to work "smoothly".
Which is why I said it'd be easier to just use a mouse (since you said you were anyway I believe), make it wireless, etc. Since the hardest part won't be the software part -- but keeping your hand steady, especially while going for the clicking device.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|