hello,
I tried to import avi-files from a folder, using the following code
addpath(genpath('C:\Desktop\Thesis_Code'));
bending=dir('bend');
no_files_bend = size(bending,1);
for i=3:no_files_bend
bend =bending(i).name;
Vid = mmreader('bend')
for j=1:length(Vid)
imwrite(Vid(i).cdata,[num2str(i) '.jpeg']);
end
end
but i got this error message,
??? Error using ==> aviinfo at 85
Unable to open bend.avi for reading.
Error in ==> aviread at 49
info = aviinfo(filename,'Robust');
Does anyone has any idea on how to solve it?
Thank you in advance!!
Kaoutar
|
|
0
|
|
|
|
Reply
|
kaoutar
|
8/5/2010 8:49:04 PM |
|
kaoutar wrote:
> hello,
> I tried to import avi-files from a folder, using the following code
> addpath(genpath('C:\Desktop\Thesis_Code'));
> bending=dir('bend'); no_files_bend = size(bending,1);
> for i=3:no_files_bend
> bend =bending(i).name;
> Vid = mmreader('bend')
Vid = mmread(bend);
with no quotes around bend. 'bend' is a literal string with four characters;
without the quotes it designates the contents of the variable with that name.
> for j=1:length(Vid)
> imwrite(Vid(i).cdata,[num2str(i) '.jpeg']);
> end
> end
>
> but i got this error message,
> ??? Error using ==> aviinfo at 85
> Unable to open bend.avi for reading.
|
|
0
|
|
|
|
Reply
|
Walter
|
8/5/2010 8:58:32 PM
|
|
Walter Roberson <roberson@hushmail.com> wrote in message <i3f8lt$4if$1@canopus.cc.umanitoba.ca>...
> kaoutar wrote:
> > hello,
> > I tried to import avi-files from a folder, using the following code
> > addpath(genpath('C:\Desktop\Thesis_Code'));
> > bending=dir('bend'); no_files_bend = size(bending,1);
> > for i=3:no_files_bend
> > bend =bending(i).name;
> > Vid = mmreader('bend')
>
> Vid = mmread(bend);
>
> with no quotes around bend. 'bend' is a literal string with four characters;
> without the quotes it designates the contents of the variable with that name.
>
> > for j=1:length(Vid)
> > imwrite(Vid(i).cdata,[num2str(i) '.jpeg']);
> > end
> > end
> >
> > but i got this error message,
> > ??? Error using ==> aviinfo at 85
> > Unable to open bend.avi for reading.
Dear Walter,
Thanks a lot for your reply, I have used the mmread with no quotes around bend, but I am getting another error message which i couldn't solve, it states that:
??? Error using ==> FFGrab
Unable to open file
Error in ==> mmread at 146
FFGrab('build',filename,fmt,double(disableVideo),double(disableAudio),double(trySeeking));
Please let me know if you have any idea on how to solve it...
thank you in advance
|
|
0
|
|
|
|
Reply
|
azimane_k (2)
|
8/6/2010 10:29:04 AM
|
|
"Kaoutar " <azimane_k@hotmail.com> wrote in message <i3go5g$cku$1@fred.mathworks.com>...
> Walter Roberson <roberson@hushmail.com> wrote in message <i3f8lt$4if$1@canopus.cc.umanitoba.ca>...
> > kaoutar wrote:
> > > hello,
> > > I tried to import avi-files from a folder, using the following code
> > > addpath(genpath('C:\Desktop\Thesis_Code'));
> > > bending=dir('bend'); no_files_bend = size(bending,1);
> > > for i=3:no_files_bend
> > > bend =bending(i).name;
> > > Vid = mmreader('bend')
> >
> > Vid = mmread(bend);
> >
> > with no quotes around bend. 'bend' is a literal string with four characters;
> > without the quotes it designates the contents of the variable with that name.
> >
> > > for j=1:length(Vid)
> > > imwrite(Vid(i).cdata,[num2str(i) '.jpeg']);
> > > end
> > > end
> > >
> > > but i got this error message,
> > > ??? Error using ==> aviinfo at 85
> > > Unable to open bend.avi for reading.
>
> Dear Walter,
>
> Thanks a lot for your reply, I have used the mmread with no quotes around bend, but I am getting another error message which i couldn't solve, it states that:
>
> ??? Error using ==> FFGrab
> Unable to open file
>
> Error in ==> mmread at 146
> FFGrab('build',filename,fmt,double(disableVideo),double(disableAudio),double(trySeeking));
>
> Please let me know if you have any idea on how to solve it...
> thank you in advance
Hello Walter,
I could solve the problem, instead of mmread i used aviread and with no quotes.
Thanks a lot !!
Kaoutar
|
|
0
|
|
|
|
Reply
|
azimane_k (2)
|
8/6/2010 3:46:05 PM
|
|
|
3 Replies
382 Views
(page loaded in 0.059 seconds)
|