NTSC Image Filter

by Hung Chen and Shiou-Je Lin, Dept. of Computer Science, Cornell University

Table of Contents

Introduction
Goals
NTSC Approach
Design
Color Space Transform
Lowpass Filters
Results
Getting the Modules
Using the Modules & Examples
Conclusions
Acknowledgment
References

Figures

Input Image
Output Image
Original RGB components
FIR filter without interpolation
FIR filter with interpolation
IIR filter

INTRODUCTION

Visualization is often used to create animation for video recording. Unfortunately, high-definition digital television is not widely available yet. It is very important to be aware of the technical limitations of standard analog television, especially as it differs from workstation monitors.

NTSC system does reduce the resolution of an image, so that, computer-generated images often look messy when converted to NTSC video. In this project, we simulate the NTSC image on a RGB monitor to verify appearance on viedotype.


GOALS

The goal is to preview the effects of the NTSC system for a computer-generated image . After using this module, we don't have to record the image from workstation then display it on TV to see the final effect.

This project creates a C module for Data Explorer 2.0[3] This module takes an image as input, extract its RGB value of each pixel then put those data through a lowpass filter. It outputs a new image which contains modified color values. Existing Data Explorer modules can then use this output to display on the screen.


NTSC APPROACH

A color image has separate red(R), green(G), and blue(B) components. For NTSC system, the first step is to convert RGB to a color space that is based on human perception and requires less bandwidth. The human eye can perceive abrupt transitions in brightness much more readily than in hue. Furthermore, the eye is more sensitive to transitions in the orange-blue color range than the purple-green range. Since NTSC is based on this acknowledgment, we then transform RGB into a new color space --- YIQ, whose axes align with these virtual ranges: Y, yluminance, is the brightness axes; I, intermodulation, is the orange-blue axis and Q, quadrature, is the purple-green axis.


Table 1. Band width limitations of YIQ for NTSC system[1]

In order to fit into the same band-width that the original black and white signal took up and to make the monochromatic TV work under color signals, we modulate I and Q to a higher frequency band. The modulated I and Q signal is called chroma, C. A full NTSC signal is the addition of Y and C. Because of the nature of monochromatic TV, C will be filtered out and only Y left. Band width limitations of YIQ for NTSC system are shown in Table 1.

NTSC signal received by a TV receiver then must go into a decoder to pull the Y and C signal apart. When the decoder separate Y and C signal, errors will consist of some of the C signal remaining in the separate Y signal and/or Y signal remaining in the C signal. C signal remaining in Y signal will have "chroma crawl" which looks like dots crawling up vertical edges in the image. Y signal remaining in C signal will look like rainbows superimposed on what should be a monochromatic image. A recent invention called S-Video provides the two signals Y and C on two separate wire. Our module then can filter the YIQ signal to obtain the same effect as NTSC decoder.


MODULE DESIGN

This module written for IBM Data Explorer 2.0 including color space transform and lowpass filters. It takes an image as input and output a modified image. This module include two major parts:

1. Color Space Transform:

Transform RGB to YIQ:


Y = 0.299 * R + 0.587 * G + 0.114 * B
I = 0.596 * R - 0.275 * G - 0.321 * B
Q = 0.212 * R - 0.523 * G + 0.311 * B

Transform YIQ to RGB:


R = Y + 0.956 * I + 0.620 * Q
G = Y - 0.272 * I - 0.647 * Q
B = Y - 1.108 * I + 1.705 * Q

2. Filters:

This module include two lowpass filters: Finite impulse response (FIR) digital filter and Infinite impulse response (IIR) digital filter. These two filters deal with signal process on time domain instead of frequency domain, that is, we do not have to involve Fourier transformation in our module.

FIR filter:


Function:

We use 9-pixel-wide FIR filter for Y component with weights:
(0.0295, -0.0524, -0.118, 0.472, 1, 0.472, -0.118, -0.524, 0.0295)
and 29-pixel-wide FIR filter for IQ component. It is symmetric and the first half has weights
(.00474, 0.01739, 0.0295, 0.02943, 0, -0.0524, -0.1123, -0.1467, -0.118, 0, 0.20746, 0.472, 0.73489, 0.92867, 1...)[1].

Because these weights assume a 910-pixel scan line[1], we need to scale any image to 910 pixel wide by linear interpolation first. Then we also have to convert it back to the original size after FIR filtering.

IIR filter:


Function:

The time constant T is computed by (pixel rate)*(image width)/910. In our module, the pixel rates of Y, I and Q are user inputs. The default values are defined in Table 1.


RESULTS


Figure 1. Original color bars on an RGB monitor


Figure 2. Simulated color bars for NTSC system on an RGB monitor

In Figure 2. we can see that fully saturated colors will pulse and "bleed", that is, they will smear to the right(due to the direction the TV raster scan is moving).


Figure 3. Original RGB components


Figure 4. FIR filter without interpolation


Figure 5. FIR filter with interpolation

Compared to Figure 3., the RGB curves in Figure 4. after FIR filtering without interpolation swing around the corners. Therefore, there are transient colors on the boundaries between the color bars. The image becomes more fuzzy as shown in Figure 2.. That is what a color TV looks like. If we introduce interpolation in Figure 5, the effect of interpolation is the same as a lowpass filter. Therefore, the swing on the corners won't so strong as in Figure 4.


Figure 6. IIR filter

Compared to Figure 3., the RGB curves in Figure 6. after IIR filtering become more smooth on the corners. It will make the same effect on the image as FIR filter. We can find there is a negative peak on B curve which might generate a black color mathematically, yet Data Explorer will clamp it to zero.

We have tried to filter the YIQ signals on frequency domain by Fast Fourier Transformation(FFT). But FFT is too time-consuming and needs much more memory than FIR and IIR. We gave it up though it can fulfill whatever filters we want.


GETTING THE MODULES

To use this module, it will be necessary to edit the Makefile to reflect the locations of libraries on your system. For example, to use this module in HP Series 700, you must rename the Makefile_hp700 to Makefile or use -f flag for make. The required files are:

USING THE MODULES & EXAMPLES

The way to use this module is to put this module between your original input and Image or Display module. It will filter these input data then output the modified data to Image module or Display module.
Figure 7.

There is a simple demo program demo.net of IBM Data Explorer 2.0. You can execute this example program and see how this module works.

In FIR lowpass filter module, you can also select the filter to do interpolation or not to do interpolation by using input 0 or 1.

In IIR lowpass filter module, you must specify the how many pixels per cycle of Y, I and Q signal to simulate the NTSC output. If you didn't specify these values, the default value is:


Y : 3.4 Pixels/Cycle
I : 9.5 Pixels/Cycle
Q : 26 Pixels/Cycle

There is another demo program plot.net of IBM Data Explorer 2.0. This demo program shows you how to draw a plot to see how this filter works. It display red, green and blue signals in different curves. All the magnitude in this plot have been multiplied by 100. Figure 8.


CONCLUSIONS

When we are simulating NTSC signals, we found that generating a proper NTSC signal has a lot in common with the aliasing problem in computer graphics. High frequencies that the system was not designed to handle can show up as undesirable artifacts in this image.

The two biggest problems encountered in moving images created on a high resolution workstation to a television (monitor or VCR) are the loss of resolution and the inability of TV to accurately render color. These remarks are basically true for the American NTSC TV system.

There are several ways to solve these problems:
1. Do not use saturated colors. Standard TV is simply not capable of correctly rendering fully saturated colors, like red(in particular) or blue. Large areas of fully saturated colors will pulse and "bleed", that is, they will smear to the right(due to the direction the TV raster scan is moving). This smears any sharp edges on your objects and will severely degrade the quality of your visualization.

2. Do not use single width vertical lines in DataExplorer. Because when you translate this line to NTSC signal, it will not have the same color. The method to solved this problem is to use wider lines, or use the Tube module to build thin cylinders instead of lines.

3. When you use Text or Captions module, You must careful to keep text large. Because small and detailed text maybe look good on the workstation, but will become blurry little blobs on TV., defeating the whole purpose of annotating your video for your viewers. Next time when you try to use our module to simulate the output, try making some text in different size, then choose the best one.


ACKNOWLEDGMENT

This Project is written under the instruction of Prof.
Bruce Land. He gave us some ideas to do this project and taught us how to use some NTSC hardware and helped us do some experiments.

REFERENCES

[1] James F. Blinn "NTSC: Nice Technology, Super Color", IEEE Computer Graphics & Applications, March 1993. pp. 17-23

[2] James F. Blinn "The World of Digital Video", IEEE Computer Graphics & Applications, September 1992. pp. 106-112

[3] IBM Data Explorer 2.0. For more information, click here