File Exchange

image thumbnail

Video Processing Tutorial

version (9.37 KB) by Image Analyst
Tutorial to read, process, and create video files.


Updated 02 Sep 2014

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Demo to extract frames and get frame means from a movie and (optionally) save individual frames to separate image files. Then rebuilds a new movie by recalling the saved images from disk. Also computes the mean gray value of the color channels and detects the difference between a frame and the previous frame. Illustrates the use of the VideoReader and VideoWriter classes.

Cite As

Image Analyst (2021). Video Processing Tutorial (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (22)

Piyawat Tilakul

Martín Morales

I'm using matlab R2019a. Demo works great for extracting images from video, work with them and then saving them. The problem I have is that when I try to create a movie with the images matlab shows this error:

"Error: Frame mus be 451 by 231"

This is really strange because I hadn't change anything in the code.
Any help would be greatly appreciated.

Shaun Roberts

I have struggled for a long time to find something that looks at video features at a low level. Thanks

Mohamed Amine

Zhigang Jia


Mahmoud Elmallah

I was wondering if it would be possible to adapt your function to read out Facial regions of interest from a video, save them into a folder and then load them back into a Matlab as a video?

geo marian

It would be easier if it had a .fig file (GUI) is there any available?

Dani Jermisha

GeonWoo Jeon

Kyle Schwab

Thuong Nguyen

saba sabu

Atif Rafiq

Ganesh K Davanagege

Thank you for the basic framework for video processing. One of the best works by Image Analyst.

Alfred Kalyanapu

Thank you for this tool. This is very interesting and useful!


Stefan Karlsson

A nice starting place for video processing. Shows how easy it is for beginners to get into. Great job!

Ashni Damaria

Mustafa DOGRU


alex yang

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!