Quantcast
Channel: Machine Vision topics
Viewing all articles
Browse latest Browse all 1268

Get Last Event - Click Event returned coordinates incorrect

$
0
0

Hi

I need to get the pixel a user clicks on in my IMAQ image. We are not using an IMAQ camera. Our old method had to do a lot of maths with co-ordinates on mouse click, image position and working out relative positions. 

 

This example is exactly what I want to do, and works on my computer beautifully. 

https://forums.ni.com/t5/Example-Programs/How-to-use-the-IMAQ-quot-Get-Last-Event-quot-property/ta-p/3503816

 

As my image is in a VI in a subpanel I wrapped the above example in a subpanel and it still works. 

 

However when I try to use this in my application it doesn't work with the mouse up event.

My image size is 1280 x 1024.

The point click event returns one of 4 values pairs depending on the quadrant clicked [0,0]  [640,0]  [0,511] or [640,511]. Interesting this is 1/2 image size. 

Mouse location returns corrects co-ordinates. Zoom tool returns correct co-ordinates. So not sure what is wrong. 

Co-ordinates code.pngCoordinates panel.png

Any suggestions?

 I will use mouse location in the meantime as its probably close enough, but it would be nice to know why the coordinates event is not working. 

 

LabVIEW 2018. 

Cheers

 


Viewing all articles
Browse latest Browse all 1268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>