Clear Filters
Clear Filters

automatically selecting video and extracting frames?

1 view (last 30 days)
i just have .avi video files from 12 am to 6 pm (day) with 5 min intervals, how can i select automatically videos of 12am, 4pm and 6pm, and extracting frames from each video?I know how to extract frame but can not automatically do for my problem. all video sorted with time sequence.

Accepted Answer

Walter Roberson
Walter Roberson on 1 Feb 2016
  4 Comments
Abo
Abo on 1 Feb 2016
thank you. the first you recommended is the best for me.
Walter Roberson
Walter Roberson on 1 Feb 2016
Correction, you need to multiply by another factor of 60 than what I originally wrote. 3600 seconds times the hour number.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 1 Feb 2016
It seems the gist of your question is "how can i select automatically videos of 12am, 4pm and 6pm, and extracting frames from each video?"
For the first question, how do you select the videos that were made at a specific time, you can use dir(). dir() returns a structure, or structure array if you have a file pattern instead of just one filename passed into it. The structure has as one of its fields the date and time stamp on the file. Now I'm not sure if you start recording a file at 4 p.m. and quit recording and close up the file at 4:30 if the file time is 4:00 or 4:30, so you'll have to check on that.
For the second question about how to open a video file and extract frames from it and do something with them, I ask you to run the demo script I have attached.

Community Treasure Hunt

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

Start Hunting!