Operations on Interlaced Video Frames¶
Operations on Interlaced Videos¶
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.NET Python 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.NET Python extracts the frame of given parity from an image whileEasyImage::SetFrame.NET Python replaces the frame of given parity in an image.EasyImage::MatchFrames.NET Python 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.NET Python rebuilds one frame of the image by interpolation between the lines of the other frame.EasyImage::SwapFrames.NET Python: 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:
Operations on Interlaced Images¶
When the subject being worked on is a single interlaced images and no artifacts should be corrected, EasyImage::Deinterlace() .NET Python can be used. By default, the input interlaced image is expected to have a height two times greater than the height of the two output images. An optional interpolation can be enabled so that the two output images have the same height of the output images. This interpolation is enabled by default and is using the linear interpolation algorithm.
The first output image will contain the even lines.
The second output image will contain the odd lines.
Warning
Output images must not be void when submitted to EasyImage::Deinterlace() .NET Python. They must be initialized using SetSize .NET Python
The inverse function to EasyImage::Deinterlace() .NET Python is EasyImage::Interlace() .NET Python and allows to interlace two images into one.