Deinterlacing videos in MATLAB

Now, it is time to visit a very common topic in video processing; video deinterlacing. As you might recall, videos can be split into two categories: interlaced and progressive. The former contain frames with either odd or even rows present, while the latter contain frames with all the rows present. The frame rates of videos do not let the human eye easily distinguish the difference, making interlaced videos a compelling choice when we want to save space.

However, there are cases in which interlacing is visible to the human eye. A common example is still frames from videos that include motion, which exhibit interlacing artifacts. An example of such artifacts is shown in the following example, which is a frame extracted from a driving video (shot from inside a moving vehicle). We have also cropped an area of the image where the interlacing artifacts are more intense, so that you understand the problem even better.

>> A = imread('interlaced.bmp'),	   % Load interlaced image
>> B = imcrop(A,[480 400 200 100]); % Crop detail of interlaced frame
>> subplot(1,2,1),imshow(A);title('Entire Interlaced Frame')
>> subplot(1,2,2),imshow(B);title('Cropped Area of Interlaced Frame')
Deinterlacing videos in MATLAB

Intra-frame filtering for deinterlacing tasks

You can now see clearly that the interlaced frame appears distorted especially on the edges of the cars. To reduce the artifacts, we will have to filter the image. Till now, we have only worked on methods for filtering a single image (or video frame), commonly known as intra-frame filtering. Therefore, we will start by using such methods for our first deinterlacing tasks.

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

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