Deinterlacing - Remove motion artifacts by deinterlacing input video signal

Library

Analysis & Enhancement

Description

The Deinterlacing block takes the input signal, which is the combination of the top and bottom fields of the interlaced video, and converts it into deinterlaced video using line repetition, linear interpolation, or vertical temporal median filtering.

PortInput/OutputSupported Data TypesComplex Values Supported

Input

Combination of top and bottom fields of interlaced video

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point

  • 8-, 16-, and 32-bit signed integer

  • 8-, 16-, and 32-bit unsigned integer

No

Output

Frames of deinterlaced video

Same as Input port

No

Use the Deinterlacing method parameter to specify how the block deinterlaces the video.

The following figure illustrates the block's behavior if you select Line repetition.

The following figure illustrates the block's behavior if you select Linear interpolation.

The following figure illustrates the block's behavior if you select Vertical temporal median filtering.

Row-Major Data Format

The MATLAB® enviroment and the Video and Image Processing Blockset™ use column-major data organization. However, the Deinterlacing block gives you the option to process data that is stored in row-major format. When you select the Input image is transposed (data order is row major) check box, the block assumes that the input buffer contains contiguous data elements from the first row first, then data elements from the second row second, and so on through the last row. Use this functionality only when you meet all the following criteria:

When you use the row-major functionality, you must consider the following issues:

Use the following two-step workflow to develop algorithms in row-major format to run on an embedded target.

See the DM642 EVM Video ADC and DM642 EVM Video DAC reference pages in the Target Support Package™ TC6 User's Guide for more information about data order in embedded targets.

Example

The following example shows you how to use the Deinterlacing block to remove motion artifacts from an image.

  1. Open the example model by typing

    doc_deinterlace

    at the MATLAB command prompt.

  2. Double-click the Deinterlacing block. The model uses this block to remove the motion artifacts from the input image. The Deinterlacing method parameter is set to Vertical temporal median filtering.

  3. Run the model.

    The original image that contains the motion artifacts appears in the Input Image window.

    The clearer output image appears in the Output Image window.

Fixed-Point Data Types

The following diagram shows the data types used in the Deinterlacing block for fixed-point signals.

You can set the product output, accumulator, and output data types in the block mask as discussed in the next section.

Dialog Box

The Main pane of the Deinterlacing dialog box appears as shown in the following figure.

Deinterlacing method

Specify how the block deinterlaces the video. Your choices are Line repetition, Linear interpolation, or Vertical temporal median filtering.

Input image is transposed (data order is row major)

When you select this check box, the block assumes that the input buffer contains data elements from the first row first, then data elements from the second row second, and so on through the last row.

The Fixed-point pane of the Deinterlacing dialog box appears as shown in the following figure.

Rounding mode

Select the rounding mode for fixed-point operations.

Overflow mode

Select the overflow mode for fixed-point operations.

Accumulator

As depicted in the previous figure, inputs to the accumulator are cast to the accumulator data type. The output of the adder remains in the accumulator data type as each element of the input is added to it. Use this parameter to specify how to designate this accumulator word and fraction lengths:

Output

Choose how to specify the output word length and fraction length:

Lock scaling against changes by the autoscaling tool

Select this parameter to prevent any fixed-point scaling you specify in this block mask from being overridden by the autoscaling tool in the Fixed-Point Tool. For more information, see fxptdlg, a reference page on the Fixed-Point Tool in the Simulink® documentation.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS