DeInterlacer V1.2 – by Daniel Kuhn

This document is available in english and german

Introduction

This is just another one of these programs, born to fulfil a special need of a friend. This time he had grabbed still images from his camcorder, but he had problems with the interlacing. Those camcorders record half pictures (every second scanline) and put two of them together if you want to have a still image. This works quite well, but he discovered several problems:

  1. A constant horizontal offset
    When you were turning yourself while taking the video, the second half might be misplaced

  2. A constant vertical offset
    When you made movements an up or downwards, the lines are shifted between the two pictures

  3. A nonconstant horizontal error
    When you turn the camera, the top might have more or less offset than the bottom.

So I needed to write a program to work on all those. I didn’t find one online, so here it is. Enjoy, and have fun. As always: I don’t take any responsibility for what this software may do with your pictures.

Remember: Nothing is loss-free. Using this program to rework your images will crop some pixels at the borders. Since the image won’t increase in size, you move some pixels outside the viewing area. I decided that doesn’t matter, since the information at the border would not be complete anyway.

How to use it

I will explain on the image I included for testing purposes (Nice figures, huh?). It shows all three errors. In my experience its best to start with the last modification and work yourself up to the first. It might need some finetuning between the first two (or all three) to get the best result.

  1. Preparation
    Click "Load" and load your image. It has to be a Bitmap (BMP) and is limited to some usual color depths. I had no problems with that, if you have just try to convert your image to something standards (supported are 8, 16, 24 or 32 bit)

  2. Correct vertical mistakes
    Try to use negative numbers first. You will see, that the ghost images divert. So it’s the wrong direction. If you turn it up a little, it is getting better. Turn it to the place, where you think the two images fit best.

  3. Different horizontal offset Tip/Bottom
    You notice that there is a offset that’s different from top to bottom? Try to remove it, so the vertical lines that should be identical are parallel to each other.

  4. Global horizontal offset
    Now fix the uppermost value, so that no more offset exists. You should see the lines in order. Of course, this image isn’t sharp –your image would usually not be, too. This may take some modification with the other parameters to get all right.

  5. Final steps
    If you want to know whether you dound the best values for this image, the correct adjustment is –5 / 10 / 2 . You still see some distortion on the vertical line in the background. That shows the limitation of this quite easy approach: It just moves pixels, it does not correct mistakes. Some pixels are always lost using such corrections.

Version history

V1.0 - Initial release
V1.1 - Sorry, but I don’t remember the changes
V1.2 - Bugfix: Some images made the program crash while trying to read them. (Thanks to Michael Protzen for reporting this bug)