what is the best way to process videos in matlab?

3 Comments

from my experience video processing demands a big memory allocation. you could just use single a frame at a time and process by each image, depends on what you need.
Thank you for your time. My purpose is to make a sort of motion sensor, based on image comparing, is it possible (and effective) to compare frames from a given video?
i would use a simple camera, taking pictures in a measured time and compare each image to the one that was taken before. that way you can discard images if they are identical. i recommend a simple comparison between to images. you can also use a for loop, although it might take a while.

Sign in to comment.

 Accepted Answer

Image Analyst
Image Analyst on 12 Jun 2017
I use the Image Processing Toolbox and MATLAB. I read in a frame at a time with the VideoReader class, then do something with that frame. You can get more specific advice if you attach a frame from your video and say what you want to measure.
In the meantime, I'm attaching
  1. a demo to do a running background subtraction and plot the RGB means of the frames.
  2. a demo to resize a movie to different number of rows and columns
  3. a demo to convert a movie from avi to mp4 format.

2 Comments

Thank you for your time. My purpose is to make a sort of motion sensor, based on image comparing, is it possible (and effective) to compare frames from a given video?
Yes. Just have two reader objects to read in frames from each video. Now you have the frames from each video and you can compare them, like subtract them or compare their intensities or optical flow or whatever you want.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!