Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I need program (codes) which take a video directly and extract frames in multiple defined times ??

1 回表示 (過去 30 日間)
Akshit
Akshit 2014 年 7 月 14 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I need program (codes) which take a video directly and extract frames in multiple defined times ??
  2 件のコメント
Ben11
Ben11 2014 年 7 月 14 日
what have you done so far?
Akshit
Akshit 2014 年 7 月 14 日
I can read movie but i do not know how can i defined some times for extract specified frames?

回答 (1 件)

Ben11
Ben11 2014 年 7 月 14 日
If you know beforehand which frames you want to keep then store them in a vector. Let's say your movie is in a cell array, then you can access every frame of interest by referencing to the vector directly.
Simple example:
1) YourMovie is a cell array containing 20 frames. 2) You want to extract frames 2,5,7,8,10 and 15. (arbitrary frames).
Create the vector for the frames you want to keep:
FramesVector = [2 5 7 8 10 15];
Extract frames:
ExtractedFrames = YourMovie(FramesVector);
ExtractedFrames will give you every corresponding frames in a cell, which you can then access individually like you would any cell array:
ExtractedFrames{n} ... do whatever you want

Community Treasure Hunt

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

Start Hunting!

Translated by