フィルターのクリア

How replace open by another function?

1 回表示 (過去 30 日間)
Aubry
Aubry 2012 年 11 月 27 日
Hello,
I am working on a project, on Matlab 2009. I had some problems. Here a part from my code:
vidOut = avifile(outName);
vidOut.fps = fr;
open(vidOut)
open doesn't work here because of the format .avi
I need the video for manipulating this video (I want to apply filters on each frame of the video) What is the alternative to open (for opening avi)?
The same for close(vidOut);
Hope being clear
  3 件のコメント
Aubry
Aubry 2012 年 11 月 28 日
I mean open doesn't work on .avi (it work only on .m or specific formats) (<http://www.mathworks.fr/fr/help/matlab/ref/open.html>)
What I search for is an alternative function..
Moreover, I think avifile works.. I am using 32 bit Matlab and I am using 32 bit Windows XP...
Jan
Jan 2012 年 11 月 28 日
編集済み: Jan 2012 年 11 月 28 日
"Doesn't work" is a bad description of the occurring problems. We cannot guess, what happens and if you get an error message (which one) or the results differ from your expectations.
If e.g. the error message is "You do not have read permissions to this file", it would be hilarious to invest time to find different AVI-file readers. Such things happen frequently in a forum.
Therefore something like this avoid misunderstandings: "OPEN does not support AVI files. Which command allows to open AVIs instead?"
Please add the needed information be editing the original question. Such important information must be found at a prominent location and readers of the question should not be forced to read a bunch of comments and answers before they find out, what the actual question is. Thanks.

サインインしてコメントする。

回答 (3 件)

Babak
Babak 2012 年 11 月 27 日
make sure, close(vidOut), the file is already closed and not corrupted. restart MATLAB then do it in command window to make sure it works.
  1 件のコメント
Aubry
Aubry 2012 年 11 月 28 日
Already, open doesn't work...(When I ran it, close was 'commented'). I look for an alternative...

サインインしてコメントする。


Jan
Jan 2012 年 11 月 28 日
Did you ask your favorite search engine already?
Looking in the FileExchange is a good idea also:
It is much better to use existing solutions than reinventing the wheel. And searching the internet does help usually to solve standard problems.

Walter Roberson
Walter Roberson 2012 年 11 月 28 日
avifile is for creating AVI files. You addframe() to the avifile object and eventually you close it using the avifile method http://www.mathworks.com/help/matlab/ref/avifile.close.html. You never open() an avifile that you are creating.
If you are attempting to read a .avi file, use aviread

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by