취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Insert 2D arrays into 3D array

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......

0 포인트
1/9 메시지
6,659 조회수

Build Array

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

2/9 메시지
6,656 조회수

You also should learn the basics of "autoindexing"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 포인트
3/9 메시지
6,649 조회수

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.

 

Code.png


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 포인트
4/9 메시지
6,648 조회수

Thank you, but i cant keep my camera VI in for loop to generate 3D array.

Output array is 2D array.

0 포인트
5/9 메시지
6,607 조회수

@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).


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


6/9 메시지
6,593 조회수

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.

0 포인트
7/9 메시지
6,576 조회수

@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...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 포인트
8/9 메시지
6,573 조회수

data value reference (see e.g. here)

9/9 메시지
6,566 조회수