Operations on Interlaced Video Frames

When an image is interlaced, the two frames (even and odd lines) are not recorded at the same time. If there is movement in the scene, a visible artifact can result (the edges of objects exhibit a "comb" effect).

EasyImage::.RealignFrame cures this problem if the movement is uniform and horizontal (objects on a conveyor belt), by shifting one of the frames horizontally. The amplitude of the shift can be estimated automatically.

EasyImage::.GetFrame extracts the frame of given parity from an image while EasyImage::.SetFrame replaces the frame of given parity in an image.

EasyImage::.MatchFrames determines the optimal shift amplitude by comparing two successive lines of the image. These lines should be chosen such that they cross some edges or non-uniform areas.

EasyImage::.RebuildFrame rebuilds one frame of the image by interpolation between the lines of the other frame.

EasyImage::.SwapFrames: interchanges the even and odd rows of an image. This is helpful when acquisition of an interlaced image has confused even and odd frames.

The same image should be used as source and destination because only the shifted rows are copied. To use a different destination image, the source image must be copied first in the destination image object.

The size of the destination image is determined as follows:

dstImage_Width = srcImage_Width
dstImage_Height = (srcImage_Height + 1 - odd ) / 2