05-17-2013 09:35 AM
My camera is capturing images (2D array of numbers ranging 0 - 255), now how i can Insert some (say 20) 2D arrays into 3D array in different pages ?
I mean 1st 2d array (image) ----> page 0 of 3D array,
2nd 2D array ----> page 1 of 3D,
3rd 2D array ----> page 2 of 3D and so on......
05-17-2013 09:39 AM
Build Array
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
05-17-2013 09:49 AM
05-17-2013 09:49 AM - edited 05-17-2013 10:05 AM
You can keep your code inside a For Loop (While Loop will also do) and use 'Auto-index Enabled' and thats it....
At the output of Loop, LabVIEW will create a 3D data exactly as your requirement.
05-20-2013 07:10 AM
Thank you, but i cant keep my camera VI in for loop to generate 3D array.
Output array is 2D array.
05-20-2013
08:10 AM
- last edited on
04-28-2025
06:15 PM
by
Content Cleaner
@megastar wrote:
Thank you, but i cant keep my camera VI in for loop to generate 3D array.
Output array is 2D array.
To get multiple images, you must run your 'Image acquisition' code multiple times and definitely in a loop. In your existing code also you're using a loop (I'm talking about the 'While Loop', inside the 'Case Structure' which is immediately nested within a 'Giant Flat Sequence Structure').
Now if you dont like the idea to keep a while loop, you may also use a 'Functional Global Variable' (so 'Action Engine', whatever you like to call it).
05-20-2013 10:49 AM - edited 05-20-2013 10:49 AM
Do you know from the beginning how may images there will be? Are all images the same size?
It will be most memory efficient to allocate the full size 3D array once and keep it in a shift register or DVR, for example. Then simply replace slices with new image data using replace array subset with the index based on the sequence number of the image.
05-20-2013 11:04 AM
@altenbach wrote:
Do you know from the beginning how may images there will be? Are all images the same size?
It will be most memory efficient to allocate the full size 3D array once and keep it in a shift register or DVR, for example. Then simply replace slices with new image data using replace array subset with the index based on the sequence number of the image.
BTW what is DVR...
sounds like 'Digital Video Recorder'......!! but dosen't go well with the discussion...!!
05-20-2013
11:36 AM
- last edited on
04-28-2025
06:16 PM
by
Content Cleaner
data value reference (see e.g. here)