Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Load avi files
Date: Thu, 7 Feb 2008 16:48:02 +0000 (UTC)
Organization: Konem Solutions
Lines: 28
Message-ID: <fofco2$gb2$1@fred.mathworks.com>
References: <foepsb$j2o$1@fred.mathworks.com>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202402882 16738 172.30.248.37 (7 Feb 2008 16:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 7 Feb 2008 16:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 413701
Xref: news.mathworks.com comp.soft-sys.matlab:449921


"Torvald Helmer" <torvald.helmer@mathworks.com> wrote in
message <foepsb$j2o$1@fred.mathworks.com>...
> I load an avi-file into matlab and it gets saved, in this
> case, in a 1x170 struct. Each block/cell inside the struct
> contains a cdata-field with 175x260x3 uint8.
> 
> How can I get this in a variable of 175x260x170 double?

You cannot get a RGB image in the above said format. You can
get it in 4-D format

ex:
D(:,:,:,1) = mov(1,1).cdata;
D(:,:,:,2) = mov(1,2).cdata; so on and so forth

If you are going to convert the RGB image into grayscale or
binary then its possibe to have them stored in mxnxp format
as follows

D(:,:,:,1) = rgb2gray(mov(1,1).cdata);
D(:,:,:,2) = rgb2gray(mov(1,2).cdata);

and then use
D1 = squeeze(D); 


HTH
VIhang