Digital Technology and Recording
Recent developments have made it possible to store video images on magnetic discs, as on a computer hard disc. This is done by converting the image to a digital form to store it. The early problem was that to obtain reasonable resolution required storing a massive amount of data. The result is that only a limited number of images could be stored. A reasonable quality colour picture with a resolution of 681 x 582 pixels has 396,000 picture elements. This would need about 1/3 megabyte (Mb) of disc storage.
Modern digital compression technology now means that many more images can be stored. There are now systems that can store thousands of images. Even this must be considered in the light of the quality of image and the amount that can be stored. For instance, real time video is presented at the rate of 25 frames per second, i.e. 90,000 frames per hour. A 100-Mb hard disc would store 330 frames, which is only 13 seconds of video at normal density. A compression of 2:1 still only stores about 26 seconds of live video. Sampling every other frame would double this again but it can be seen that digital storage has a long way to go before replacing the video recorder. Having said this, technology in this field is advancing at a very fast rate and is the obvious way forward.
Digital recorders are available but their use is a tiny fraction of that of analogue video recorders. This is no surprise as a videotape costing a few pounds can store over 432,000 high quality colour images, using a recorder costing a few hundred pounds. To store the same number of pictures digitally is very costly both in storage media and hardware required to write to it.
The primary successes of digital recorders have been in event recording, where fast recording and search makes digital recorders most attractive. Many digital recorders include multiplexers as the timebase corrector required for digitising means that comparatively little extra circuitry is needed to add this feature, which helps to make them cost effective.
This was the original introduction to digital recording in the second edition published in 2000 and would have been written in about 1999. Technology has moved on at a fast pace since then. In fact it is now at the stage where digital recording is virtually the norm with the use of analogue VCRs declining rapidly.
Along side this massive development is the growth of IP technology, which now has the following complete chapter (9) devoted to this latest trend.
The Digital Video Recorder (DVR)
The essential elements of any digital video recorder are shown in the simplified block diagram 8.1. Many DVRs have more components to add additional features like motion detection or video transmission. The switcher selects which camera is to be recorded at any moment and routes it to a timebase corrector. The timebase corrector ensures that pictures can be recorded rapidly in sequence without having to synchronise the cameras by gen lock or other means.
The analogue to digital converter (ADC) turns the voltages representing luminance and into an array of binary digital numbers which represent the brightness and colour at every point on the video picture. A digital signal processor takes this huge amount of raw data and compresses it so that an acceptable number of pictures can be stored on the limited space available in the digital store. The store takes this information and holds it, usually under a reference related to the time and date of recording.
At any time this archived information can be retrieved and routed via a digital to analogue converter to re-create the video signal required to play back the recording on a conventional video monitor. Alternatively, if a Personal Computer is being used as a digital recorder the playback pictures may stay in digital form for display on the PC monitor.
Units of measure for digital storage
Storage and file sizes are measured in bytes where one byte is the basic unit of storage that would represent a single letter or number. A byte comprises eight bits. One bit is a single binary number either 1 or 0.
One Kilobyte = 1,024 bytes, (210 ) not 1,000 as is commonly used.
One Megabyte = 1,024 Kilobytes = 1,048,576 bytes (220).
One Gigabyte = 1,024 Megabytes = 1,048,576 Kilobytes = 1,073,741,824 bytes (230)
On Terabyte = 1,024 Gigabytes, (240 bytes).
The above relationships between units are strictly correct, however it is common practice to use a factor of 1,000 as the ratio between units.
Principles of Digital Video Recording
In digital recording each field is divided in to an array of individual points or pixels. At each one of these points, analogue to digital converters convert voltages representing the colour and brightness at that point to a binary digital number. This array of binary digital numbers can then be stored digitally in a file with a name cross referenced against time and date. A single frame of monochrome video needs about 450kb (Kilobytes) of space for storage and single frame of colour needs about 650kb. This is the uncompressed size that would be needed for storage on hard disc or other storage medium.
Consequently to store the same number of images as a video tape a total storage capacity of about 121.5Gb (Gigabytes) would be needed for monochrome and 175.5Gb for colour. This is considerably larger than hard discs and other media generally available and would also be very expensive. Consequently some means is required of reducing the amount of space required without adversely affecting picture quality. The technique of reducing the amount of space required is generally referred to as compression.
The video frame contains a large amount of redundant information that can be eliminated without a great loss in perceived picture quality. Consequently, common types of compression used are known as “lossy compression” because the redundant information is discarded. Most compression methods are effective up to a certain point, or “Knee”, beyond which the image quality quickly degrades.
To assist in reducing the amount of size required for storage the video signal can be represented in a form known as YUV. The YUV format consists of the Y (luminance) and UV (colour difference) signals (for further descriptions of luminance and video signal components see chapter 2). The advantage of using YUV format is that fewer bytes are needed to digitise the video. Normally, recording all of the colour components; red, green, blue (RGB recording) would need three bytes, one byte for each colour. By using YUV format the luminance can be digitised as one byte and the colour difference signal as one byte. Consequently only two bytes are needed rather than three, a saving of one third of the storage space required. This technique can be used together with compression to minimise the amount of space required for storage.
Types of Compression
The technology for compressing video pictures originated in the storage of still photographs on computers. The most commonly used standard, JPEG, takes it’s name from the Joint Photographic Expert Group by whom it was developed. Using JPEG compression, the knee occurs at about 8:1 compression. The most commonly used standard is Motion JPEG for which the knee occurs at about 15:1 compression. Consequently, M-JPEG reduces a 450kb file to only 30kb. While this is still too large to fit the same number of images as a video tape on to a hard disk it is small enough to permit, say, 2 images per second to be recorded for 24 hours on to a 6Gb hard disk, which is a size generally available, costing a few hundred pounds.
Another more recent compression standard was devised by the Motion Picture Expert Group specifically for the digitisation of moving images. This standard is given the name MPEG. This standard makes use of the redundancy between adjacent frames.
MPEG-1 contains three types of encoded frames. Intracoded frames (I-frames) contain all of the video information required to make a complete picture. Predicted frames (P-frames) are generated by previous I-frames or P-frames and are used to generate future P-frames. Bi-directional Predicted frames (B-frames) are generated using both previous and future frames. A complete sequence of frames is made up of a series of these different frame types with more than one I-frame for every 10 P- or B-frames. This process is known as inter-frame correlation and allows compression ratios of 100:1 to be achieved.
MPEG-2 is the format used in the latest Digital VideoDisk (DVD) technology, which can store about 90 minutes of VHS quality video and audio on to only 650Mb of storage space, such as a CD-ROM. However there are a number of disadvantages to MPEG compression. Firstly, in order for MPEG to achieve high compression it needs the video signal not to change abruptly from frame to frame. Since many video recording applications require multiplexing because more than one camera must be recorded, the rapid change from frame to frame as cameras are switched defeats the inter-frame correlation technique used in MPEG. Secondly, MPEG requires much more electronics than JPEG making it more more expensive for security applications.
MPEG-4 is the latest development in the MPEG series and is mainly used in video films. Note, there was no MPEG-3.
|FORMAT||KNEE||WITH INTER-FRAME CORRELATION|
|JPEG||4 - 8 : 1||Not Available|
|M-JPEG||10 - 15 : 1||Not Available|
|MPEG||10 - 15 : 1||100 : 1|
|FRACTAL||20 - 30 : 1||> 100 : 1|
|WAVELET||30 : 1||> 100 : 1|
There are two other methods of compression worthy of mention.
H.264 standard based video compression core technology with substantially increased coding efficiency and enhanced robustness to network environments in cost effective embedded platform. This technology will support TV broadcast, digital entertainment, internet streaming and visual communications over broadband and wireless networks.
WAVELET', is also seen as offering superior development potential to current MPEG compression, giving a greater amount of compression with equivalent quality. It transforms the whole image and not just blocks of the image, so as the compression rates increase, the image degrades gracefully, rather than into the ‘blocky’ artefacts seen with some other compression methods. Wavelet™ applications can have their preferred level of compression selected by the user – higher or lower.
Thus, although Wavelet is not as established as some other compression techniques, it is growing in popularity.
Compression technology is development rapidly, which makes it very dificult to assess the true benefits of any particular method used in security applications. Each manufacturer, naturally, pushes their own preference but it still leaves a jungle for the end user to find their way through.
Fractal compression is not found very often in CCTV applications but is mentioned here for completeness. It is a mathematical method of encoding that requires a great deal of computing power to encode the images. It is not a ‘lossy’ compression as in JPEG or MPEG. One advantage is that the image can be enlarged or reduced without the ‘blocky’ appearance of other forms of lossy compression.
Another factor involved in digital recording is that of storage rate. Working at the full 25 frames per second of real time video would not only require vast amounts of storage (4.5Gb for just one hour @ 30kb per frame) but also very fast processing and storage media capable of digitising and storing a each frame (even at 30kb) in under 0.04 seconds; 40 milliseconds.
Many DVRs currently available, particularly those based on hard disc storage get round this problem by sampling and recording frames at lower than the full 25 frame per second rate. This is expressed in a number of ways. For example, a DVR may record every 12th frame, 2 frames per second or ½ a second per frame. All of these are the same value.
The combination of file size and storage rate will give a figure for storage capacity per second. For example, to store a 30kb file at 3.13 frames per second requires 30 x 3.13 = 93.9kb per second, or 0.34Gb per hour. However, this is just for one camera and most systems have more than one camera that must be recorded. For 8 cameras the figure above would need to be multiplied by 8 which is 2.72Gb. To record these 8 cameras for 8 hours would need 8 times the storage space again, 21.76Gb. There are currently 23Gb hard discs that would accommodate such storage.
A technique is now being used by which the first frame of a scene is captured and stored at the highest possible resolution. Subsequent frames are scanned and only those parts of the scene that have changed are stored, These refreshed scenes are superimposed onto the original frame and the changed parts updated. The refreshed scenes use only a tiny amount of data storage compared to the original scene. In this way, the storage capacity can be increased by one hundred or one thousand times according to the amount of movement in the scene.
This article is an extract from chapter 8 of 'The Principles & Practice of CCTV' which is recognised as the benchmark for CCTV installation in the UK.