Digital Pixels
How Many Fit On Your TV Screen?
By Trevor Marshall
October 16, 2000
I recently received e-mail from Len Bates. "I'm trying to get straight on something about capture frame size/resolution," he wrote. "I keep reading discussions that insist that 352x240 is all that's needed to capture normal VHS (VHS-C Camcorder in my case), because that medium only has about 220 horizontal lines resolution. But when I capture at larger frame sizes like 640x480 I get significantly better looking, more detailed video on the computer screen. And of course the SVCD format looks better on my TV!"
And of course there is no easy answer.
Analog To Digital Conversion
The CCD sensor in a camcorder is an analog device. Each pixel puts out a signal that contains many discrete voltage levels, depending on the intensity and color of the light falling on that CCD pixel, not just 0 or 1. In order to store the TV signal in a computer, we have to convert the analog signal to a digital format.
In the process of conversion we strip information from the original data, reducing the amount of disk storage which is needed. Video compressors are used to make the digitized video signal which looks close enough to the original analog TV signal so that a human observer, using a "typical" TV set, cannot tell the difference.
Audio Conversion, The Nyquist Theorem
Digital conversion of audio is similar to conversion of video, but significantly more complex. Syntrillium, the author of CoolEdit, have placed a good tutorial on the Web, which covers the basic theory of how audible sound is converted to a digital data stream. It explains how the digital sampling of the blue analog waveform (in the diagram below) produces a set of discrete data points (the black points). When the black points are interpolated during playback the resulting (red) waveform does not exactly match the original analog (blue) waveform.
Obviously, the more samples you take, the less is the sampling error, but the larger the file. The point of diminishing returns is when the sampling frequency is twice the highest frequency component in the input audio signal. This is called the Nyquist frequency. DV camcorders sample their audio channels at 48 KHz, 16 bits per sample, and audio compact disks use 44.1 KHz, also with 16-bit accuracy. This type of sampling is called PCM. The processing of compressed formats, such as MP3, is immeasurably more complex.
Sampling a video signal is conceptually not much different from sampling an audio signal.
There are basically two parts to the video signal coming from the CCD. There is the luminance(or brightness), which is termed the "Y" component, and the color information (the chrominance) denoted in digital notation by the "U" and "V" components.
Most of us that were around in the days before television was broadcast 24 hours a day remember the "Test Patterns" that appeared on our TV screens in the early morning and again around midnight, before and after the day's programming. These test patterns typically carried color-bar and resolution information.
John Beale and George Ou have reconstructed one of these test charts, and it can be downloaded from this link.
When you print this resolution chart on your printer you will find it has a number of regions where the geometry changes in a deterministic way. I photographed the printout with my DV camera and got the following two images in the areas of converging horizontal and vertical lines.
A quick inspection shows that my DV camera and capture system can distinguish black lines from a white background to a resolution limit of about 500 lines when the lines are vertical, and to a limit of about 380 lines when the lines are horizontal. The sampling rate, or pixel count, is 720 x 480, the native format for an NTSC DV camera.
When you replicate this test with your own camcorder you will find that if you shift the printed target interactively while watching the result in your viewfinder, you can achieve an even higher apparent resolution figure.
You see, if you adjust the position of the lines on the paper so that they exactly fall into the middle of a CCD pixel then the lines will become a lot clearer. I actually did the opposite when I took my test photograph, which is why the apparent resolution is less than the "nominal" 540 lines of which my camera, a Sony TRV900, is capable.
Just as in the case of sampling audio, the more samples we take the closer our reconstructed digital output will match our original waveform. In the case of DV camcorders a resolution of 720x480 (720x576 PAL), with 29.97 frames per second, interlaced fields, is squeezed into an output data stream at about 3.5 megabytes per second. One hour of DV video takes around 13 gigabytes of disk space. Those mini-DV tapes store one whole hour of data, the whole 13 gigabytes!
I Have Bad News
So far, we have only been considering the sampling of the luminance (Y) component of the video, the contrast between dark and light areas of an image. If you look at the output of a VHS cassette recorder you will see that the color components tend to "smear." This is because there is less bandwidth used to store color (chrominance) information than is used for the luminance. A typical VHS recorder might resolve 300 lines of luminance, but only 150 lines of chrominance. This causes colors that are on a background of a different color, but which has similar luminance to have blurred, or smeared, edges. But at least the output of your VHS recorder is analog, and the eye tends to be less critical of analog artifacts than digital (quantized) imperfections.
Digital sampling of video also pays less attention to chrominance data than it does to the luminance samples. When you use the YUV9 mode of an "All in Wonder," like Len's, you are sampling in the YUV space and not the RGB space.
This gives better color rendition, particularly in the blues and reds. You should always try to use a YUV capture mode, edit in YUV and export to tape again in YUV. I capture, edit, and export with my Canopus DV tools in YUV (if you use Premiere for editing you will find it hard to avoid converting to RGB). Ben Rudiak-Gould's Open Source HuffYUV codec is a lossless YUV codec, and will use about 10 megabytes of space per second. I use this a lot when editing and processing video. The free evaluation PICvideo codec will sample video to "lossy" MJPEG in YUV format, and use a lot less diskspace. Both work well with Avery Lee's VirtualDub video-capture module.
The number sequence 4:2:2 is used to denote the manner in which the YUV color pixels are subsampled into their final storage format. 4:2:2 is maximum quality, 4:2:0 is the format used by PAL camcorders (and is also the default standard for DVD films), and 4:1:1 is used by NTSC DV camcorders. If you are interested in what those numbers really mean please drop me an e-mail and I will put a more detailed description of YUV formats into my next column.
Your Television Or Your Computer?
Many television sets are not capable of displaying more than about 400 lines. Computer screens, however, can display much higher resolutions. This explains why DVDs generally look much sharper when played in a computer's driver rather than in a stand-alone player.
Some Recommendations
If you are going to watch the video, full screen, on your computer, you will generally need resolutions in excess of 512x384 (NTSC) to reduce the digitization artifacts. I recommend the DV format of 720x480 for best results. Sample as fast as you can, and then compress the data to MPEG for storage. Use the 480x480 SCVD format for data destined for replay on a TV set.
Many DV cameras (for example Sony's Digital-8) have the ability to convert analog to DV, and this will save you buying another high-res analog input card for your PC.
Thanks to John Beale for the resolution chart. John has a more detailed resolution tutorial than mine on his website.