borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Creating and editing a Word document) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Visual Basic
Poster Message
Tech33012
Level: Protégé

Registered: 08-06-2008
Posts: 6

icon Visual Basic

My project is almost done but i need help on how to use A laser pointer as a mouse i would very appreaciate this thanks!!

Here's like a overview:

Start => Webcam => take photos (speed is 1/10 of a sec.) => process Image => use a mouse

After this i'm going to ue a better like survellance for Better FPS thanks

^_^
Rock on

08-06-2008 at 10:59 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1644
icon Re: Visual Basic

You'd have to basically scan the entire picture (pixel by pixel) until you found the laser pointer's color -- then scan the areas around it to make sure it's the laser or assumed to be a laser.  It'd be pretty processor intensive I'd think considering it'd have to scan probably 480,000 pixels 10x a second minimum.

Then you'd have to move the mouse with different calls (which may or may not work in vista).  Then you'd have to find a way to actually pass the mouse click to whatever application has the focus (which might not work in vista).  And even if not dealing with vista -- it might not work as expected all the time either.

It'd be easier to use a laser-wireless-mouse.




[Edited by JLRodgers on 09-06-2008 at 01:48 AM GMT]

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

09-06-2008 at 07:44 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Tech33012
Level: Protégé

Registered: 08-06-2008
Posts: 6
icon Re: Visual Basic

The thing is i'm going to use it as a interactive projector and the laser will be the mouse i'm modding the mouse to use the click button

10-06-2008 at 05:32 PM
View Profile Send Email to User Show All Posts | Quote Reply
Tech33012
Level: Protégé

Registered: 08-06-2008
Posts: 6
icon Re: Visual Basic

The thing is i'm going to use it as a interactive projector and the laser will be the mouse i'm modding the mouse to use the click button

10-06-2008 at 05:32 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1644
icon Re: Visual Basic

Well my comments would still be what you'd have to do I believe.  It would probably be pretty choppy-looking compared to using a mouse (unless on a really quick computer); and it'd still be based on permissions/etc.

From what I recall before, sending mouse click commands before was sometimes glitchy (as in, it didn't always work).


____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

11-06-2008 at 02:44 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Tech33012
Level: Protégé

Registered: 08-06-2008
Posts: 6
icon Re: Visual Basic

What aboust just using a laser pointer just to move?

15-06-2008 at 05:05 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1644
icon 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)

16-06-2008 at 06:15 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Visual Basic
Next Topic (Creating and editing a Word document) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder