Modifying frames of a ".avi" file one by one

8 views (last 30 days)
Hello, I'm quite new to MATLAB and already have troubles. I'm recording a series of images with my webcam and exporting them as a video file (avi). The goal is to separate the video in frames and adjust the contrast of each frame individually. I understood how to modify the contrast of a single image but I have no idea how to deal with a video file. Give me any instructions or examples how to do it please.

Accepted Answer

Image Analyst
Image Analyst on 7 Jan 2014
Edited: Image Analyst on 7 Jan 2014
Attached below (in blue text) is an example of where I read in the standard rhinos.avi demo video and do something on each frame and create a new movie. Feel free to adapt it as needed.

More Answers (1)

Piere
Piere on 7 Jan 2014
Thanks for the fast replay, but again I have a problem. In the beggining when I try to count the number of frames with:
numberOfFrames = videoObject.NumberOfFrames;
It says:
Warning: Unable to determine the number of frames in this file.
  1 Comment
Image Analyst
Image Analyst on 7 Jan 2014
That happens sometimes. I'm not sure when. I think Walter said something about some video files not having that info or not having a uniform frame time, or something. Can you convert it with some other program into a "standard" avi file?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!