Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get pixel-coordinates from image control on mouse-move-event?

Hi,
I'am using LabVIEW 7.0 with Imaq Vision 2.6. And I would like to know, if there is a way to get the pixelcoordinates from an image control when a mouse move occurs. The coordinates I want, are displayed in the "image information"-bar at the bottom of an image control. Is there a way to read it out?
It's also possible to read this coordinates with an InvokeNode -> Get Last Event , but it seems this is not working for mousemove events.
I appreciate any help you can give,
Oliver
Message 1 of 9
(7,709 Views)
Hi
You can get the co-ordinates as a property node of the image. It is the 'Last Mouse X Position' and 'Last Mouse Y Position'. I have included an example.
0 Kudos
Message 2 of 9
(7,711 Views)
Thanks for this fast answer!
I'm sorry, but i can't find 'Last Mouse X Position' and 'Last Mouse Y Position' at the property node. And this VI you send me is not working. It is possible that I have a different version of Imaq Vision?
Could there be another solution for my problem?

thanks in advance,
Oliver
0 Kudos
Message 3 of 9
(7,709 Views)
Oliver
What version of the Vision Development Module are you running, the IMAQ Vision 2.6 is the Driver version.

Mike
0 Kudos
Message 4 of 9
(7,709 Views)
Hi Mike,
i'm sorry. I mixed some things up. It's Vision 7 Development Module.

Oliver
0 Kudos
Message 5 of 9
(7,709 Views)
Hi Oliver
The version I am running is 7.1 which has just been released. I have checked back and these values are not available in 7.0. I would contact your local office.

Mike
0 Kudos
Message 6 of 9
(7,709 Views)
You can still do it with Vision 7.0. You just use the same VI that was used with image windows. I have attached an example.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 7 of 9
(7,709 Views)
hi,
  I want to shift the origin to left  most edge of the image everytime an image is loaded.pls tell me how to do this..
0 Kudos
Message 8 of 9
(7,011 Views)
BHARATHINDIAN,

Is this thread related to this one: http://forums.ni.com/ni/board/message?board.id=200&message.id=18322&jump=true#M18322 ?

If not, take a look at an example called Simple Calibration Example VI. This moves the origin based on a pattern found but you could change the calibration to set the origin in the top left corner of each image, instead.

Please post back if you have any more questions.


--Michelle

National Instruments
0 Kudos
Message 9 of 9
(6,958 Views)