| ImageEn, unit imageenproc |
|
TImageEnProc.Deinterlace
Declaration
procedure Deinterlace(mode: TIEDeinterlaceMode);
Description
Removes interlacing (horizontal combing) from a video frame or a still captured from interlaced video.
Interlaced sources store each frame as two fields: even and odd scan lines, often captured at slightly different times. Shown as a single image, motion between those fields appears as a comb-like artifact.
mode selects the algorithm (see
TIEDeinterlaceMode):
◼iedDiscard: Overwrites each even scan line with the following odd line, keeping the original width and height. Fast, but vertical detail from one field is lost.
◼iedIntelliMerge: Measures the average luminance difference between paired even/odd lines. If they differ enough to indicate combing,
iedDiscard is applied; if they are similar (little motion), the image is left unchanged.
Note:
◼Operates on the entire image (the selection is ignored)
◼Image size is unchanged
◼If the image
PixelFormat is not ie24RGB, it will be
converted
Examples
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

// Always discard one field (duplicate the remaining lines)
ImageEnView1.Proc.Deinterlace( iedDiscard );

// Discard a field only when combing is detected
ImageEnView1.Proc.Deinterlace( iedIntelliMerge );