0

I have a 128x32 video that I'm reading in frame by frame, doing whatever I need to do to each frame and I want to make the resulting images into another video but I'm having trouble preallocating space for and saving the processed images.

I estimated the number of frames the video contains so I want to create an array of length n that will store n AxB images. In C I would just put a pointer to the AxB array in n-length array but I'm not sure if there is a similar thing in matlab.

smmr
  • 31
  • 6
  • Can you show your code? This will help us a lot. – TwistedSim May 03 '18 at 18:33
  • To preallocate an array, you can always do: `array = zeros(A, B, nFrame)`. – TwistedSim May 03 '18 at 18:35
  • I would take a look at the following link: https://stackoverflow.com/a/467199/8634987. Additionally you can look at structures or cell arrays in the matlab documentation to see if that would be better suited for your needs. https://www.mathworks.com/help/matlab/ref/struct.html, https://www.mathworks.com/help/matlab/cell-arrays.html – Kunal Shah May 03 '18 at 20:01
  • @TwistedSim I'm not sure what code you mean. All I have right now is code for processing my images and concatenating them into a new image that I want to store into an new array. – smmr May 03 '18 at 20:44

0 Answers0