LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How , from an IMAQ image turned into Array, split it in two pieces , and show them as IMAQ image after ?

Solved!
Go to solution

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 !

 

0 Kudos
Message 1 of 9
(3,858 Views)

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 9
(3,848 Views)

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 ? 

0 Kudos
Message 3 of 9
(3,838 Views)

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 9
(3,834 Views)

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 !

0 Kudos
Message 5 of 9
(3,821 Views)

I have the following in LabVIEW 2013:

2015-12-17_13-23-56.png

 

(Unfortunately I don't have LabVIEW 8.5 to see if it is there)


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 9
(3,810 Views)

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 !

0 Kudos
Message 7 of 9
(3,805 Views)

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 ?

0 Kudos
Message 8 of 9
(3,791 Views)
Solution
Accepted by topic author Magea

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 9
(3,788 Views)