Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

storing a variable

Asked by James

James (view profile)

on 6 Aug 2011

Hi

At the moment I am storing 59 images that i have read into matlab in a variable called 'mymovie'. Each image is represented by an array 240x352 double.

mymovie is a 1x59 struct array with fields: cdata

Is this the best way to store an image? I have confused myself slightly as to the different ways of storing data in a variable. Please help.

0 Comments

James

James (view profile)

Products

No products are associated with this question.

2 Answers

Answer by Walter Roberson

Walter Roberson (view profile)

on 6 Aug 2011

There is no one "best" way to store a series of images. The "best" way depends upon the kind of processing you need to do and upon how quickly the stored images change.

0 Comments

Walter Roberson

Walter Roberson (view profile)

Answer by Image Analyst

Image Analyst (view profile)

on 6 Aug 2011

It's likely that the images could be stored as uint8 at 1/8th the space. Now after you start to do something to the images it may well happen that you have double images during your processing. To save memory, try to analyze just one image at a time from the movie, or a few at most, or you may well run out of memory. You won't have enough memory to store a uint8 original image and a handful of double intermediate images for an entire movie of several thousand frames, so that's why you should just process one or a few frames at a time.

0 Comments

Image Analyst

Image Analyst (view profile)

Contact us