12-17-2015 03:33 AM
Hi
I am currently using the IMAQ vi's to get an image in real time out of a camera with 1024*1024 pixels.
What I am trying to do is :
1) Get the IMAQ image ( OK )
2) turn it into Array ( OK )
3) Get 2 smaller arrays ,each containing half the rows, one the top rows, the other one the bottom rows (not OK )
4) Do some calculations with those arrays ( multiplicate / divide them ) ( not OK )
5) Show the array resulting of the calculations as an XY pixels map just like the first IMAQ image i had ( not OK )
Could you please guide in the resolution of this ? I am litle confused ...
Step 3), I figured out that using the "Delete from Array" VI could be the right one, but I do not understand how to select half the rows ( top or bottom )
Step 4), I think I will not have problem to do this.
Step 5) this one I am lost, I can only plot some waveform out of this, but never a XY pixel map like the IMAQ
Thak you !
Solved! Go to Solution.
12-17-2015 04:22 AM
The array size function will give you the dimensions of the array (in your case - 1024 by 1024). The first element in the array returned is the number of rows.
You can then use either the Delete from Array to delete half the rows - it will return the deleted portion as well as the array with the items deleted (essentially splitting the array). You can also use Array Subset, which just returns a section from the array without modifying the original array.
12-17-2015 05:56 AM
Alright, thank you for this addition.
To be able to graph an image again after my analysis, just like if I would use an "Array to IMAQ" vi, can you giv me a hint ?
12-17-2015 06:08 AM
Use the 'Array to IMAQ' VI! You've already found the IMAQ Image to Pixel array function, so just use the reverse operation VI. There is 'IMAQ ArrayToImage' and 'IMAQ ArrayToColorImage' - depending on the type of image you have. You can then wire the output of that to an IMAQ Image control on your front panel.
12-17-2015 06:55 AM
Hi again Sam,
I must say I feel confused, but I can not found in my library the "IMAQ toimage" Vi !
To be more specific, I have no VI starting by "IMAQ array ..."
I am using Labview 8.5
Is it me not seeing the giant elephant under my noze, or ?
Thank you !
12-17-2015 07:24 AM
I have the following in LabVIEW 2013:
(Unfortunately I don't have LabVIEW 8.5 to see if it is there)
12-17-2015 07:57 AM
Alright, I see.
the only VI I have in "Pixel manipulation" is "IMAQ imagetoarray " ....
I must say that the computer I am using is not mine, and on top of that is really old, so I might be missing some VI, or updates ...
I ll refer to my administrator, but now I am sure that my trouble was not really from me but more from a "logistic approach".
Thank you !
12-17-2015 10:22 AM - edited 12-17-2015 10:25 AM
I am back !
I installed the full version of Vision control for my computer.
I now have the VI you were talking about.
I must say that I am surprised, beacuse it ask a mandatory "image input", and not only the array input.
WHat is it for ? I do not understand why it requieres an image, as I am providing one from my array's data.
Should I use the "IMAQ create" VI ?
12-17-2015 10:25 AM - edited 12-17-2015 10:26 AM
I think it is just a reference to the image (i.e. like passing in a blank canvas). For example, I think you could re-use your IMAQ image coming in - it might be done like that for performance reasons, or because it sets up things like the image size / canvas. It isn't explained very well in the documentation but if you look at some of the built-in IMAQ examples it might help.