Jump to content
Andersen Chen

3D array convert ten page 2D array

Recommended Posts

hello everybody, 

i have a VI, input a video and get its each frame grayscale, but now it is 3D array(10x240x132),
how can i get 10 page 2D array total (240x132), and per second display one array ,total is ten seconds

Many Thanks,

array.PNG

array.vi

Share this post


Link to post
Share on other sites

From my understanding, your 3D array (10x240x132) is in face a 10 page 2D array (240x132). The dimensions of the 3D array are row, column, and page. So each page (3rd dimension of your array) includes one second of data in a 2D array (240x132).

Is there a specific way you are wanting to display the frame grayscale data? Do you want to see 10 separate 2D array's, each containing one second worth of data (240x132)?

Share this post


Link to post
Share on other sites

You can use the Index Array primitive function and use the 'index (page)' input to specify which page you want to extract from the 3D array. The example below is by no means efficient because it is not scalable, but it should help illustrate what to do:

1636475177_Extractfrom3DArray.png.1f636b6108e587116f5d8afff3baaf74.png

Extract from 3D Array.vi

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.