News Archive

Compression Introduction

by msecadm4921

Mark Bouldin of systems integrator Telindus on the issues surrounding compression of CCTV data, and what is best for your application.

Compression: Introduction
<br><br>
It is often the case when making the transition from purchasing composite transmission systems that the shift to digital and then need for compressions is a complex area that needs further investigation. Lots of manufacturers purport to sell standardised compressions systems but these systems can vary enormously within the standard. Before purchasing compression products it is important to gain a deeper understanding of encoding and compression so that the purchasing decisions made are informed ones. An analogue signal is a continuous waveform and a digital signal is a series of numbers that represent that waveform. To convert the original signal to digital then compress it, we must go through a series of processes. Sampling and Quantization forms an array of picture cells (pixels) that represent the image in a pure digital format. Although there are several formats and methods that reduce the bit stream produced by an encoder, the resultant bit rates are still large. Digital compression reduces theses data-rates in an intelligent way.
<br><br>
Sampling
<br><br>
Sampling is the frequency used to convert an analogue signal to digital, the more samples taken the more information is gathered, therefore, sampling has a direct effect on the eventual data rate streamed from the encoder. Sampling theory states that to achieve a good representation of the original signal the encoder needs to sample at least twice the highest frequency present in the original analogue signal. For example, CCTV signals operate at around 6.5Mhz and the sampling frequency for the luminance is normally 13.5Mhz. If the signal is sampled at lower frequency than twice that in the original waveform the data-stream produced will be shorter. However, this lower sampling rate without the correct filtering can cause an effect called aliasing.
<br><br>
Quantization
<br><br>
The encoder also needs to quantify the signal into a binary number. The voltage range of the analogue signal must be broken up into equal-sized breaks. In an 8 bit video converter there are 28 levels, or 256 discrete voltages. If the analogue waveform falls in between the discrete value then it is resolved as the nearest voltage, this difference is referred to the quantizing error.
<br><br>
Pixel array
<br><br>
Video or images are a representation of light. To represent all of the colours of the spectrum component video is used, Red Green and Blue levels are contained in all component video signals (signals sent separately RGB). CCTV systems predominately use composite transmission systems, which effectively allows colour information to use the same bandwidth as the monochrome. Composite can be thought of as already compressed in the analogue form. To compress into digital we must separate three components then sampling for each of these three components may be different, dependant upon which encoder and compression system chosen. The eye is most responsive in the centre of the visible spectrum; the majority of the high frequencies and useful information is contained in the green component. To make the best use of the three components from the RGB; a luma and two chroma signals are generated. The calculation to show how the three components are resolved is shown below;<br>
Luma (Y) = 0.299R + 0.587G +0.114B<br>
Chroma1 Cb = B’-Y = 0.299R + 0.587G +0.866B<br>
Chroma2 Cr = R’-Y = 0.701R + 0.587G +0.114B<br>
This gives a component video system denoted as YCbCr.<br>
The components YCbCr are sampled in several formats denoted by a three number system known as ABC notation and their component type RGB or YCbCr. Sampling standards can be applied in several ways, lower bit rates are achieved by taking advantage that lower frequencies exist within the chroma areas so the sampling frequencies can be reduced, which in turn reduces the bit rate that needs to be compressed.
No choice
<br><br>
Analogue CCTV systems offered no choice in the format PAL or CCIR are standardised, resolution was the only element of choice, digital compression has just widened the goal posts.
<br><br>
Table 1 shows the bit rate per second of the uncompressed data stream, using 4CIF resolution and 8-bit quantization, it is a simple calculation shown below; <br>
Bits per pixel x picture height x picture width x pictures per second=bit rate per second<br>
Table 1<br>
RatioBits/PixelImage size<br>Picture/secData Rate/Sec<br>
4:4:424bits/Pixel720 x 57625<br>250Mbits<br>
4:2:216bits/pixel720 x 57625<br>166Mbits<br>
4:1:112bits/pixel720 x 57625<br>125Mbits<br>
4:2:012bits/pixel720 x 57625<br>125Mbits<br>
(Note: image format is cut to visible area to save bit rate)<br><br>

We can see that the data rates for uncompressed video are very large and this is the reason we need to compress.
<br><br>
Compression Theory
<br><br>
Any signal that is predictable contains no information, if we look at mains electricity, which is a 50Hz 240V system, this sine wave contains no information. The purpose of a compressor is to recognize and send the useful part of the video, which is identified as the entropy; the residual part of the signal is called redundancy. It is redundant because it can be predicted and rebuilt from what has already been sent to the decoder. There are lots of compression algorithms, each born from differing market requirements and many standards have been ratified by organisations such as the ISO. Predominantly all of the compression systems used for video are lossy meaning to obtain a reduced bit rate they sacrifice some of the entropy, the decompressed images are not quite the same as you put in. However, this is achieved in a way that works best with the human eye.
<br><br>
About the eye
<br><br>
The eye has much more detailed response to luminance than to chrominance therefore, practical compression engines remove the data that is unnoticeable to the human eye by allotting more bits to luminance than to chrominance and removing the high frequencies more from within the signal chroma than luma.
<br><br>
Spatial and temporal redundancy
<br><br>
Video compression requires the identification of redundancy in the source material. There are two fundamental types of redundancy that can be used. The first of these is spatial or intra-frame redundancy, which is redundancy that can be identified in a single image without reference to any other. The second is inter-frame or temporal redundancy that can be identified from one image to the next.
<br><br>
Some Compression types: M-JPEG
<br><br>
JPEG stands for Joint Photographic Experts Group, pronounced "jay-peg" it was a standard developed by a group of that name in the CCITT (Comit‚ Consultatif International T‚l‚phonique et T‚l‚graphique), which is an organisation that sets international communications standards. CCITT, is now known as ITU (the parent organisation) and has defined many important standards for data communications. JPEG was designed for compressing either full-colour or grey-scale images of natural, real-world scenes. JPEG handles only still images, so its does not cover a moving image. M-JPEG is not standardised, it is en extension of the JPEG standard. In essence M-JPEG is a series of JPEG still images. Some systems using M-JPEG send a full image each time which utilises intra- frame compression these tend to be very bandwidth intensive, other manufactures use conditional refresh which is both intra and inter frame compressed, meaning they send a full image then only the changes that occur this can drastically reduce the amount of bandwidth required. The format or size of the image in pixels is not standardised to comparisons of format need verified when judging a products features. The JPEG uses a Discrete Cosine Transform DCT. The image is broken up into 8 x 8 blocks and then analysed into the various discrete frequencies that exist in the block higher compression involves discarding the higher frequencies. JPEG is "lossy," it is designed to take advantage of known limitations of the human eye, notably the fact that small colour changes are perceived less accurately than small changes in brightness. The JPEG therefore is intended for compressing images that will be reviewed by humans.
<br><br>
Trade-off
<br><br>
A key aspect of JPEG is that decoders can trade off decoding speed against image quality, by using fast but inaccurate approximations to the required calculations. This can be very important where manual control on a cameras movement is required and latency needs to be as low as possible.
<br><br>
MPEG
<br><br>
Pronounced m-peg, it is short for Moving Picture Experts Group, which is a working group of ISO. The term now refers to the set of digital video compression standards and file formats developed by the group. MPEG is also lossy, it achieves high compression rate by storing only the changes from one frame to another (inter-frame). There are three main MPEG standards: MPEG-1, 2 and 4, however each standard has several profiles and levels which have effects on bit rate and quality. The most common implementations of the MPEG-1 standard provide a video resolution of 352 x 240 pixels at 25 frames per second (fps). This produces video quality slightly below the quality of conventional VCR videos.
<br><br>
MPEG-2, 4
<br><br>
MPEG-2 offers four levels or formats and five profiles although not all of them have been defined. This means there are twelve ratified profiles and levels. CCTV will only require the two lower levels "main" and "low" which offer formats from 352 x 288 up to 720 x 608 and require a bandwidth from 4Mbit/Sec to 50Mbit/Sec. MPEG-4 is a graphics and video compression algorithm standard that is based on MPEG-1 and MPEG-2 and Apple QuickTime technology. MPEG-4 is Wavelet-based and bit rates are smaller than JPEG or QuickTime files, so they are designed to transmit video and images over a narrower bandwidth and can mix video with text, graphics and 2-D and 3-D animation layers. MPEG-4 was standardised in October 1998.
<br><br>
H.261/3
<br><br>
H.261 is the video-encoding standard used by the H.320 video conferencing standard, it has been optimised for ISDN connections and supports a bit-rate of p x 64 Kbps up to 2048 Kbps. H261 supports CIF and QCIF pixel array formats and H263 can also support 4CIF. It operates on a similar methodology to the MPEG standard and is optimised for low movement scenes where talking heads exchanging picture quality for motion quality It is Specified as a constant bit-rate /variable quality compressor rather than a constant quality/variable bit rate encoder. H.261 benefits the network design as traffic flow can be accommodated with little flux.
<br><br>
Digital Images as Evidence
<br><br>
Let us dispel a rumour- here is a quote: ‘Images should not be excluded because they have been compressed and whilst there maybe reasons to prefer some algorithms for reasons of quality, there is no reason to exclude any from evidential material. The closed circuit television (CCTV) video recorder manufacturers are using a multitude of open, proprietary and mixed compression formats to meet the needs of massive amounts of information versus the cost of storage. Again the format is not relevant to the admission of the evidence, only to the quality.’
<br><br>
PSDB – digital imaging procedure document Version 1.0 2002
<br><br>
From this we can see that we need only gain an understanding of the quality of the compression algorithm and its quality relative to the source it is recording. Measurements on the quality of digital video are, now, all subjective due to the large number of variables. This is an area where research is being undertaken.

Related News

  • News Archive

    Travel Tracker

    by msecadm4921

    Control Risks Group, the international business risk consultancy, is to launch a new travel product, CRTravelTracker. The on-line product will allow companies…

  • News Archive

    Franchise On High Street

    by msecadm4921

    One of Dyno-Secure’s most active franchisees has opened the first high street store to showcase the security systems available. Home Solutions Services…

  • News Archive

    ASCs Consec

    by msecadm4921

    Security for the Nation is the theme of the Assocation of Security Consultants’ 14th Annual Conference and Exhibition, on November 6. It’s…

Newsletter

Subscribe to our weekly newsletter to stay on top of security news and events.

© 2024 Professional Security Magazine. All rights reserved.

Website by MSEC Marketing