Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

update cursor position

Hello,

I am working on a school project, whereby using the NI SmartCam 1712 to track one's eyes (just one eye may be sufficient), I would be able to derive the position coordinates in pixels and correlate that to a point on the screen.  Then, I would like to update the mouse cursor to this position, to follow the eyes.  Basically,  my group and I are attempting to develop a way to control the mouse using the eyes. Furthermore, we would like the mouse to 'click' once one's gaze is fixed and the cursor hovers over a certain position.  As we have little experience with LabView, can anyone please help to steer us in the right direction?  The Vision Builder steps for detecting the pupil have been developed.  Your help and time is much appreciated!

Thank you.Smiley Happy

0 Kudos
Message 1 of 3
(4,450 Views)

Hello,

 

To help get started with this, you would basically want to call a function in the Windows API called SetCursorPos, which takes in coordinates on your computer screen as inputs. Since this function is in a Windows .dll, and VBAI can't make calls into a .dll, you would want to call a LabVIEW VI that calls this .dll in VBAI. 

 

This community example provides the VI that calls into the Windows dll to move the cursor: https://decibel.ni.com/content/docs/DOC-19273. One thing you will want to consider is that VBAI is built on the previous year's Run-Time engine, so you would need to run LabVIEW 2012 code for VBAI 2013.

 

I hope this helps!

Rahul B.
0 Kudos
Message 2 of 3
(4,414 Views)

You could also use the VBAI API in LabVIEW to call your VBAI script to get the eye position and return it to LabVIEW as a result of the inspection and then call the Windows function to interact with the mouse as mentioned earlier based on the results returned by VBAI. Here's a video to illustrate how ti use the VBAI API:

http://www.ni.com/webcast/2060/en/

 

Hope this helps,

Brad

0 Kudos
Message 3 of 3
(4,408 Views)