LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using realtime cursor data for processing

Part of my program needs the cursor data from a image in order to crop them into two equal images. I am having trouble obtaining the realtime cursor data without having to run a second time once the image is already in place to find the cursor data.
Is there a way that I can run the program by entering the image,then use the cursor to find the centres then once that operation has stopped the cursor position are obtained through the cluster indicator before proceding with the cropping or the images?

Please help!
Download All
0 Kudos
Message 1 of 10
(3,008 Views)
Might not interpret your question correctly, but...:

You just have to continously monitor the cursor positions....attached is an edited version of your VI that does just that. You can add a button that let's the user crop the picture when the cursors are in the right position.
Message 2 of 10
(3,008 Views)
please can you save it as a version 6 as i dont have 6.1. thanks
0 Kudos
Message 3 of 10
(3,008 Views)
0 Kudos
Message 4 of 10
(3,008 Views)
Sorry but as I am such a begineer I can seem to wire the cluster outside of the loop to use the values. can you help?
0 Kudos
Message 5 of 10
(3,008 Views)
If you want to finish and have the VI output the last coordinates you just set the loop condition to stop and use the VI as a sub-VI with the coordinate indicators as output terminals...If however this VI is supposed to do a lot of image processing / editing do it all within the loop.

In the case where the coordinates are found you can add a button and a case in which you have code that acts on the coordinates...a "crop" button.

You may want to put the picture or the 2D table in a shift register so that you can crop the data by acting on the data from the shift register.
0 Kudos
Message 6 of 10
(3,008 Views)
i cant seem to do anything. I tried putting my cropping vi within the loop but I am not sure how to as i need the information from the entered images and the cluster data.

My main aim is to enter an image find the centres and then crop according to the centre values. I have tried making it a sub vi but then realise that I need the image data for my cropping vi as well as the cluster data. how can i use both this information.
I have included what i need to use to carry this out....i have made a complete mess of it and cant seem to sort it out. can you tell me where I am going wrong?
0 Kudos
Message 7 of 10
(3,008 Views)
Quite messy yes...;-)

If you wire data out from a case structure there must be valid outputs for all cases. In this case that means that the picture data that is loaded in the file opening case must also be available out from that case when no files i being loaded. To do that you need to create shift registers to hold the picture data and then wire that data from the left shift register terminal to the outputs of the false case.

Haven't got time right now to show you, but I may have a look at it later. Let me know if you figure out how to do it using shift registers though...The idea is the same as already used for the true/false value telling whether a file has been loaded, it too is fed from a shift regi
ster.
0 Kudos
Message 8 of 10
(3,008 Views)
hi there,

Have finally sorted it out i think i have done it correctly. The reason for this program is to make sure that I crop the images exactly the same so that I can process them with each corresponding pixel being of the same point of the picture. Is this the best way of doing it?

I have attached the llb file, youneed to open new cursor as the main vi.

Thanks again for you help
0 Kudos
Message 9 of 10
(3,008 Views)
another question....sorry
how can i make sure the cursor moves only through the actual values of the image, ie every point of the array the values of the co-ordinates are to zero decimal place, as this has an affect on my correlation coefficient.
0 Kudos
Message 10 of 10
(3,008 Views)