Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Click/Drag vertical cursor in Image

Hi,

 

I'm new to labVIEW and the vision module. I'm using IMAQ, and I want to be able to create a permanent vertical cursor over the image at a default location, and have the cursor dragable over the x-dimension, and return the x value location of the cursor.

 

Is there any way to accomplish this?

 

Thanks!

Richard C.

0 Kudos
Message 1 of 7
(4,086 Views)

Hey Richard

 

Check out the attached example. The example uses the IMAQ overlay function to place a line on your image. Then, through an event structure architecture, you can then click on your image and set the new position of this line. The example is written in LabVIEW 8.6. Post back if you need further explanation of how the example works or if you have trouble opening it. Cursor

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 7
(4,072 Views)

Hi,

 

Thanks for the quick reply! I'm using LabVIEW 8.5 (I probably should have mentioned this earlier), so I'm unable to open the file, could you post a file that's compatable with 8.5? I would really appreciate it!

 

Thanks,

Richard C.

0 Kudos
Message 3 of 7
(4,065 Views)

Hey Richard,

 

Sorry about that. I should have anticipated that. Please see the attached VI. Post back if you still have trouble opening it and running it.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 4 of 7
(4,062 Views)

I can open this file just fine.

 

It was very helpful, though it only seems to work for still images. What I'm doing is taking the image output from a camera and plotting a cursor in real time. Right now, I can plot the default/starting x coordinate for the cursor, and change it's position by typing in a new coordinate. But I was hoping to introduce a "click to aquire" coordinate method. If you (or anyone else) knows a way to acomplish this, I'd greatly appreciate. But since I got a movable cursor up/running, it's not too high on my priorities.

 

Thanks for all the help so far though!

Richard C.

0 Kudos
Message 5 of 7
(4,054 Views)

Hey Richard,

 

The code that I posted earlier is a good starting point for your application. You can take that routine and add it to your code. I have done this for a simple grab using a Firewire camera using the IMAQdx driver to acquire images. In this example you can see your image and see it update in 'real time.' The cursor will follow your mouse when you have your mouse over the image. If you left click on the mouse you will see the coordinates of where you clicked saved in a numeric indicator.

 

Again, this code could just be a starting point for your application.

Hope this helps.
-Ben

WaterlooLabs
Message 6 of 7
(4,051 Views)
Thanks so much for the help, I can probably roll something out with this.
0 Kudos
Message 7 of 7
(4,045 Views)