Chapter 9. Spatiotemporal Video Processing

By now, you should have been familiar with video acquisition and the basic processing of frames in MATLAB. In this chapter, we will discuss video processing in a little more depth, starting with basic frame manipulations based on the techniques already discussed for still images. Then, we will proceed with describing techniques for intra-frame and inter-frame processing. In this direction, we will demonstrate and analyze some basic methods for video deinterlacing and spatiotemporal filtering. These techniques will be implemented in MATLAB and evaluated with real-life examples. Extra hands-on exercises will be presented so that you can better comprehend the usage of the methods.

In this chapter, we will cover:

  • How to perform some basic video processing tasks in MATLAB, for example, cropping and resizing
  • How to deinterlace our videos in MATLAB using various methods
  • How to apply spatiotemporal filtering to our videos

So, let's start processing!

Basic video processing with MATLAB

In the previous chapter, we were mainly concerned with ways to acquire videos and process them on the fly, using MATLAB. Furthermore, we have already discussed the basic tools and functions for loading existing videos into the MATLAB Workspace window in Chapter 7, Adding Motion – From Static Images to Digital Videos.

Now it is time to revisit the issue of processing existing video files and using MATLAB as a powerful video processing suite. We will start with basic manipulations, such as importing a video to alter its dimensions or crop it, and save it in a new file.

Cropping and resizing our video

A very common task handled efficiently by all video processing suites, is cropping and resizing of our video. Usually, the user has to define the area of the video frame that should be cropped and/or the resizing factor. The video processing software then applies the cropping and/or resizing and saves the new video file. This is a fairly simple process, which consists of loading one frame at a time, transforming it using methods from the earlier chapters of this book, and then saving it in a new video file. Let's see how in our next example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset