<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328</link>
    <title>MATLAB Central Newsreader - Load avi files</title>
    <description>Feed for thread: Load avi files</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 07 Feb 2008 16:48:02 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413588</link>
      <author>Vihang Patil</author>
      <description>"Torvald Helmer" &amp;lt;torvald.helmer@mathworks.com&amp;gt; wrote in&lt;br&gt;
message &amp;lt;foepsb$j2o$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I load an avi-file into matlab and it gets saved, in this&lt;br&gt;
&amp;gt; case, in a 1x170 struct. Each block/cell inside the struct&lt;br&gt;
&amp;gt; contains a cdata-field with 175x260x3 uint8.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; How can I get this in a variable of 175x260x170 double?&lt;br&gt;
&lt;br&gt;
You cannot get a RGB image in the above said format. You can&lt;br&gt;
get it in 4-D format&lt;br&gt;
&lt;br&gt;
ex:&lt;br&gt;
D(:,:,:,1) = mov(1,1).cdata;&lt;br&gt;
D(:,:,:,2) = mov(1,2).cdata; so on and so forth&lt;br&gt;
&lt;br&gt;
If you are going to convert the RGB image into grayscale or&lt;br&gt;
binary then its possibe to have them stored in mxnxp format&lt;br&gt;
as follows&lt;br&gt;
&lt;br&gt;
D(:,:,:,1) = rgb2gray(mov(1,1).cdata);&lt;br&gt;
D(:,:,:,2) = rgb2gray(mov(1,2).cdata);&lt;br&gt;
&lt;br&gt;
and then use&lt;br&gt;
D1 = squeeze(D); &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
HTH&lt;br&gt;
VIhang&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 14:03:07 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413534</link>
      <author>nor ki</author>
      <description>"Torvald Helmer" &amp;lt;torvald.helmer@mathworks.com&amp;gt; wrote in&lt;br&gt;
message &amp;lt;foeu1e$nir$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Yumnam Kirani Singh &amp;lt;kirani.singh@gmail.com&amp;gt; wrote in&lt;br&gt;
&amp;gt; message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;lt;28418001.1202386452430.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Do you mean you have 170x175x260x3 data, i.e, 170 image&lt;br&gt;
&amp;gt; color frames of size 175x260?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That is correct! I have a true color-video of 170 frames,&lt;br&gt;
&amp;gt; with size 175x260...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This will further on be converted to binary-image...&lt;br&gt;
&lt;br&gt;
avidata = aviread(avifile);&lt;br&gt;
newdatadouble = double(avidata.cdata);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 12:37:02 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413529</link>
      <author>Torvald Helmer</author>
      <description>Yumnam Kirani Singh &amp;lt;kirani.singh@gmail.com&amp;gt; wrote in&lt;br&gt;
message&lt;br&gt;
&amp;lt;28418001.1202386452430.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;...&lt;br&gt;
&amp;gt; Do you mean you have 170x175x260x3 data, i.e, 170 image&lt;br&gt;
color frames of size 175x260?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
That is correct! I have a true color-video of 170 frames,&lt;br&gt;
with size 175x260...&lt;br&gt;
&lt;br&gt;
This will further on be converted to binary-image...&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 12:13:42 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413523</link>
      <author>Yumnam Kirani Singh</author>
      <description>Do you mean you have 170x175x260x3 data, i.e, 170 image color frames of size 175x260?&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 11:50:03 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413516</link>
      <author>Malcolm Lidierth</author>
      <description>That should be&lt;br&gt;
x=double(structname(index).fieldname);&lt;br&gt;
&lt;br&gt;
"Malcolm Lidierth" &amp;lt;ku.ca.lck@htreidil.mloclam&amp;gt; wrote in &lt;br&gt;
message &amp;lt;foeqog$27i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Try&lt;br&gt;
&amp;gt; x=double(structname.fieldname);&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 11:41:04 -0500</pubDate>
      <title>Re: Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413514</link>
      <author>Malcolm Lidierth</author>
      <description>Try&lt;br&gt;
x=double(structname.fieldname);&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 07 Feb 2008 11:26:03 -0500</pubDate>
      <title>Load avi files</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163328#413509</link>
      <author>Torvald Helmer</author>
      <description>I load an avi-file into matlab and it gets saved, in this&lt;br&gt;
case, in a 1x170 struct. Each block/cell inside the struct&lt;br&gt;
contains a cdata-field with 175x260x3 uint8.&lt;br&gt;
&lt;br&gt;
How can I get this in a variable of 175x260x170 double?&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
