O'Reilly logo

Visual Media Processing Using MATLAB Beginner's Guide by George Siogkas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – detecting motion in a complex scene

The example we saw previously is a very simple one. The background is still, there is no particular fluctuation of the brightness on the scene, and the moving object has a very distinctive color. Let's now see what happens when we have a more complex scene to handle. We will work with the driving video, presented in the previous chapter, which represents one of the most challenging scenarios; a moving camera, with a scene with moving background, and several moving objects. Let's start:

  1. Our first step is, as always, to load the video we will process:
    >> obj = VideoReader('inter.avi'); % Read video file
    >> vid = read(obj); % Load all frames
  2. The montage of our frames looks like this:
    >> montage(vid,'Size',[4 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required