Featured Post

Welcome to the Forensic Multimedia Analysis blog (formerly the Forensic Photoshop blog). With the latest developments in the analysis of m...

Friday, August 10, 2012

Quantization

Folks often refer to digital video as "much better than the old tapes." Somehow, the fact that we've progressed to digital video recorders has translated into people's minds as "better" and "an improvement." But is it?

More often than not, the DVRs that we see at crime scenes are the sub-500 dollar models from the local big box store. The purchasers are also the installers, choosing not to change the default settings. These default settings are usually CIF resolution and very lossy compression. But that's only part of the story.


The simple way of explaining where the problems begin is when the analogue camera signal meets the digital video recorder. If the camera has a type of CVBS connector (on consumer products a yellow RCA connector is typically used for composite video), it's analogue. If it has a network type plug (twisted pair Cat5, Cat5e, or Cat6 cables using 8P8C (RJ-45) modular connectors with T568A or T568B wiring), it's digital.

Quantization, in digital signal processing, is the process of mapping a large set of input values to a smaller set. A device or algorithmic function that performs quantization is called a quantizer. The error introduced by quantization is referred to as quantization error or round-off error. Oops ... error and round-off both imply loss. Loss isn't good. I thought digital was better?!

Look at the graph. In rounding-off, sometimes the grid is above the wave, sometimes it's below. The accuracy depends on the algorithm's parameters. What does this mean in practical terms?

Let's say you bought an expensive dome camera that sends 570TVL (television lines of resolution) of signal down the cable. TVL is also known as horizontal lines of resolution. But, an NTSC analog video picture is composed of 480 active horizontal lines. What gives?! Apples and oranges?


Here's the word from Bosch:

"Digitized NTSC video at CIF resolution is an image that is 352x240. It intentionally matches the NTSC 240 horizontal lines in a field so that there is a one-to-one conversion from analog to digital CIF. However, the 352 only produces a theoretical 264 TVL (remember 75 percent of 352), which does not match the 330, 380, 480 ,or 540 TVL from the cameras – so what happens to the extra vertical lines of resolution? They are lost. At CIF, any camera capable of delivering over 264 TVL will not appear superior: 264 TVL and 1,000 TVL cameras will produce identical images.

When compression solutions use CIF resolution, they typically use every other field and simply discard the others – so a CIF system throws away half the video information from the camera. Because the eye is good at averaging things, it’s not that noticeable, but this cuts the vertical resolution in half, and makes the resulting video “jerky” and less smooth."


Throws away half the video? Keeps every other line? Wow! Remember, CIF is often the default setting in consumer grade DVRs. So, we add round-off error to throwing away every other line? Oops. (Here's a handy resolution chart. Do the math. Divide the source resolutions by CIF. If you get a remainder, there's loss)

At it's essence, quantization is part of the process of getting the signal into the DVR and stored/displayed. It's one step in the process - but an important step. Depending on how its done will dictate how much/little loss occurs.

No comments: