Sie sind auf Seite 1von 12

White Paper

Video Compression for the Digital


Video Surveillance Market:
A Comparison of MPEG, Wavelet and JPEG
Formats

Array Microsystems, Inc.


987 University Avenue, Suite 6
Los Gatos, CA 95032
Phone: (408) 399-1505
Fax: (408) 399-1506
http://www.array.com
White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

Video Compression for the Digital Video Surveillance Market:


A Comparison of MPEG, Wavelet and JPEG Formats

Executive Summary
Modern digital video surveillance systems are able to store higher-quality video data than their analog tape
predecessors in an efficient manner on a computer hard drive via a process called video compression. This white
paper discusses the three different video image compression formats in use in the digital video surveillance (CCTV)
market today (MPEG, Wavelet and JPEG), with the objective of clearly delineating their differences for the digital
CCTV market.

MPEG-1
Industry-standard compression format utilizing inter-frame method that stores only the differences between
successive video frames. High compression ratios (30:1 to 100:1) and low storage cost.

Wavelet
Proprietary compression format utilizing intra-frame method that compresses each video frame separately. Moderate
compression ratios (15:1 to 25:1) and higher storage cost.

JPEG
Industry-standard compression format utilizing intra-frame method that compresses each video frame separately.
Moderate compression ratios (15:1 to 25:1) and higher storage cost.

Summary of Conclusions

• At equal quality levels, MPEG-1 is capable of achieving much higher compression ratios (as high as
100:1), which is directly proportional to lower requirements for storage space, and thus, significant cost
savings can be attained by implementing MPEG-1 compression.

• Conversely, MPEG-1 will show significantly less image quality degradation at comparable compression
ratios. As compression ratios increase, Wavelet and JPEG compressed images will display significantly
greater degradation than MPEG-1.

The examples in this document will show that, in the most common video surveillance environments, the MPEG-
1 compression format commands a clear advantage over the Wavelet and JPEG formats in terms of image
quality, compression ratio, storage savings, and resultant lower cost.

Array Microsystems, Inc. 2 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

The Transition from Analog to Digital


The CCTV market is one of the strongest growth markets in the overall security industry. The market is forecast to
grow at 9% for 2002, 14% for 2003, 13% for 2004 and 12% for 2005. (Source: J.P. Freeman and Co. Inc.) For
much of the last 20 years, the most common CCTV systems were analog, and included the use of videocassette
recorders to record video sequences onto videotape. However, the CCTV industry is in the process of steadily
converting from analog to digital. Security integrators claim to have sold digital and analog recorders in a mix of
15%/85% respectively during 2000. The 2001 prediction was a healthy 33%/67% ratio. And they predict a stunning
reversal by 2005, with the mix changing all the way to 82%/18% in the favor of digital. (Source: J.P. Freeman and
Co. Inc.) This digital transition is substantially expanding the versatility of CCTV applications. CCTV is even being
used as a replacement for access control systems in some cases. And the introduction of new digital products makes
systems integration work more true integration and less interfacing.

Whereas in the past, the CCTV user might have recorded video sequences onto a videotape in analog format (with
relatively poor video quality and limited flexibility), the same user in 2001 is more likely to use a computer-based
system to record these same video sequences digitally, with advantages that include, among other traits, much higher
video clarity, motion detection capability, and the ability to store this higher-quality video data in an efficient
manner on the computer’s hard drive. This is possible due to compression technology, which processes the data in
an image to squeeze that image into a smaller space. There are three types of compression formats used in the digital
CCTV market today: MPEG, Wavelet, and JPEG (sometimes termed MJPEG, or Motion JPEG).

Summary of Compression Formats


Following are the most significant points to consider when comparing MPEG, Wavelet, and JPEG compression
formats:

• MPEG-1 and JPEG are industry-standard formats, while Wavelet is a proprietary format, and
requires specialized hardware or software for playback;

• Assuming equal quality levels, MPEG-1 is capable of achieving much higher compression ratios (as
high as 100:1), which is directly proportional to lower requirements for storage space, and thus,
significant cost savings can be attained by implementing MPEG-1 compression;

• Conversely, MPEG-1 will show significantly less image degradation at comparable compression
ratios. As compression ratios increase, Wavelet and JPEG compressed images will display
significantly greater degradation than MPEG-1.

The examples in this document will show that, in the most common video surveillance environments, the
MPEG-1 compression format commands a clear advantage over the Wavelet and JPEG formats in terms
of image quality, compression ratio, storage savings, and resultant lower cost.

Array Microsystems, Inc. 3 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

MPEG-1 Wavelet JPEG (Motion JPEG)


Industry standard or
Industry standard Proprietary format Industry standard
proprietary format?
Inter-frame (stores only
Intra-frame (each frame Intra-frame (each frame
Compression method differences between
compressed separately) compressed separately)
frames)
Typical compression
30:1 to 100:1 1 15:1 to 25:1 1 15:1 to 25:1 1
ratio (for same quality)
Relatively low Relatively high Relatively high
Storage cost
storage cost 2 storage cost 2 storage cost 2

1
For typical video surveillance environments where the motion is moderate, the MPEG-1 files will have the highest compression ratio. This is
due to MPEG’s advanced temporal compression algorithm, which looks at the similarities between successive frames and stores only the
information that differs between frames. In minimal-motion situations, MPEG-1 files can obtain 100:1 compression ratios.
2
Higher compression ratios are directly proportional to lower requirements for storage space, and thus, significant cost savings can be attained.
“Systems employing JPEG and Wavelet compression will tend to have higher storage costs than systems using conditional refresh compression
technologies such as H.263, MPEG or a Wavelet/MPEG hybrid.” (excerpted from Spotlight CCTV: Caveat Emptor/Digital Video Recording-
Buyer’s Guidelines; by Kevin Burleson-Webb, Security Products, July 2001.)

The two most important elements in this comparison are storage costs and image degradation. It is clear that the
MPEG-1 compression format enables much greater savings in disk storage, due to its higher compression ratios in
the most common video surveillance environments. However, the pursuant test examples will show that Wavelet and
JPEG formats can attempt to approach MPEG-1’s compression ratios, but image quality will suffer greatly.

Image Compression Technology in Depth

The three compression technologies differ in their mathematical roots and produce varying compression ratios,
image quality and expansion capabilities.

Uncompressed pixel format files are always NxMxB bytes in size, regardless of the complexity of the image, where
N and M are the number of rows and columns, and B is the number of bytes per pixel. For a 1024x768 image we get
about 800 Kbytes for 1 byte/pixel and ~2.4 Mbytes for 3 bytes/pixel (16.7 million colors). At 56 K baud transfer,
that gives ~ 5.5K bytes/sec, or 145 seconds to load 256 color image and 435 seconds - more than 7 minutes - to load
a single full color image. For animation, at 30 frames/sec, it would take 3 ½ hours to load one second worth of
animation. Network performance pressures are demanding more efficient compression techniques. The higher the
compression ratio, the smaller the video file size and the less bandwidth required.

The goal of compression is to reduce the data rate while keeping the image quality high. There are numerous ways
to compress video. One method would be to simply reduce the size of each video frame. A 320x240 image is ¼ the
size of a 640x480 image when it is digitized. A 15 frame-per-second video is half the size of a 30 frame-per-second
video. However, this simple compression scheme alone will not provide the amount compression required for high
quality video, low storage requirements and lower bandwidth transmission overhead.

It turns out the human eye is much more sensitive to changes in the luminance of an image than to changes in color.
Most of the compression techniques take advantage of this characteristic of human perception. These schemes work
by discarding much of the color information in the picture. When each frame is compressed separately, it is known
as “spatial” or intra-frame compression. JPEG and Wavelet use intra-frame compression. Some video
compression schemes utilize what is known as “temporal” or inter-frame compression. Inter-frame compression
takes advantage of the fact that any given frame of video is probably very similar to the frames around it. Therefore,
instead of storing the entire frame, we can store just the differences between the current frame and the frame that
came before it. The MPEG compression scheme utilizes inter-frame or “temporal” compression.

Array Microsystems, Inc. 4 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

The compression and decompression of video is handled by a codec. Codecs may be found in hardware or in
software. Some codecs have a fixed compression ratio and therefore a fixed data rate. Others can compress each
frame a different amount depending on its content, resulting in a data rate that can vary over time. Some codecs
allow you to choose the quality setting that controls the data rate. Such settings can be useful for storing/transmitting
less data when high quality video is not required. The following diagram depicts a basic block diagram of the steps
required during the encoding and decoding process of the video.

Discrete Cosine
Transform
Quantizer Encoder
or
Wavelet Transform
Video

Television Inverse Transform DeQuantizer Decoder

IBM PS/2

The JPEG (Joint Photographic Experts group) compression technique is performed by applying a Cosine Transform
to 8x8 blocks of pixels. This generates a color frequency map. The first element in the map is the average color, and
the other elements represent less important details. By throwing away those details in the frequency map (which are
barely detectable by the human eye), the data is compressed. Compression ratios of 15:1 are common. JPEG is
especially well suited to 24-bit photorealistic images. MJPEG is a moving image, which is made by storing each
frame of a moving picture sequence in JPEG compression, then decompressing and displaying each frame at rapid
speed to show the moving picture. M-JPEG does not use inter-frame coding as MPEG does. M-JPEG is sometimes
referred to as Motion JPEG.

The MPEG (Motion Picture Experts Group) format utilizes the same mathematical technique as JPEG with
additional compression applied by using intra-frame coding. The first frame is an “I” (intra-frame) frame and the
subsequent B and P frames represent just the “deltas” or differences between the images. (The P is the difference
between the current frame and previous, whereas the B is the bi-directional differences between previous-current-
next frame.) Since each P or B represents just the differences between very similar frames, rather than all the pixels
in each frame, they are much smaller than the corresponding F frames. Then the entire subsets of encoded frames are
subject to JPEG encoding. Compression ratios of 30:1 are common.

Array Microsystems, Inc. 5 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

MPEG Video Stream (Typical Pattern)

1 2 3 4 5 6 7 8 9 10
r a me rame rame rame rame rame rame rame rame rame
F F F F F F F F F F
I B B P B B P B B P

• Three frame types: Intra-frames (I-frames) , Inter-frames (P-frames) and bi-directional frame, or B-frame
• I-frames use basically JPEG compression algorithm
• P-frames use “pseudo-differences” from previous frame (“predicted”), so frames depend on each other
• B-frames search for macroblock in past and future frames.

Compression standards such as JPEG, MPEG-1, and MPEG-2 are optimized to minimize the signal-to-noise ratio of
the error between the original and the reconstructed image. Due to this optimization, these methods are very
complex. These methods only partially take advantage of the fact that the human visual system is quite insensitive to
signal-to-noise ratio. Accordingly, some of the complexity inherent in these standards is wasted on the human eye.
Moreover, because these standards encode areas of the image, they are not particularly sensitive to edge-type
information, which is of high importance to the human visual system.

The Wavelet compression technique applies a discrete wavelet transform to the entire image rather than breaking
the picture into 8x8 blocks as the JPEG and MPEG techniques. The wavelet compression uses the intra-frame
compression technique and would have higher storage requirements than MPEG at the same bit rates. The wavelet
compression technique is also an emerging technology and has no defined standards. Therefore, wavelet
compression would be considered proprietary.

Wavelet video compression suffers from boundary effects. At the edges of blocks or of the image itself, artifacts are
introduced which degrade the quality of the decompressed image. The block-to-variable nature of the process also
limits the potential compression that can be achieved when an image is capable of being compressed with a large
compression ratio. For example, an image or sequence of images that consisted all of one color might be compressed
in one code word by simple run length coding whereas the same sequence would require one code word per block
by a block-to-variable technique. Wavelet compression varies in effectiveness depending on the suitability of the
actual wavelets chosen to the statistics of the data being compressed. If those statistics are unknown, the suitability
of any particular set of wavelets is in question.

Head-to-Head Analysis

Analog Devices provides a software simulation for their Wavelet Codec: ADV601 family for analysis of their
wavelet quality. Whether Wavelet, JPEG, or MPEG-1, the compression ratio is adjustable for a given required video
quality. Arbitrary selected 0.5 & 0.25 bits/pixel are used as comparison points. The Analog Devices Wavelet codec
is not even as good as the JPEG standard.

Since Wavelet pictures are completely independent from one to another, the image size will be consistent from one
frame to the next at a fixed compression ratio. The same will also be true using JPEG compression. JPEG is used in

Array Microsystems, Inc. 6 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

this comparison for picture quality. MPEG has superior compression ratio over Wavelet and JPEG by only encoding
the differences from one frame to the next and using motion estimation techniques to further increase the
compression ratio. The non-intra-frames will vary in size dependent upon differences from frame to frame. For
video surveillance where the motion is moderate, the MPEG files will have the highest compression ratio.

MPEG Advantages:
• Industry standard
• Much smaller file size for same quality level.

Wavelet Advantages:
• Lower chip cost
• No extra memory needed for multiple channels
• Consistent picture quality from frame to frame
• Capable of high resolution 720x486
• http://products.analog.com/products/info.asp?product=ADV601LC

If Wavelet or JPEG or I-frame only MPEG were used, each frame would be consistent in size from one frame to the
next. In the graph example below, Wavelet, JPEG or I-frame only MPEG would generate frames approximately
18KB in size for each and every frame. For MPEG, I-frames are periodically used. The graph shows a typical
MPEG encoding using the Array Microsystems VideoONE ™ Sentry product. The average size of the files is 8.6KB,
or 47% of the 18K size of an equivalent Wavelet or JPEG encoding.

20000

18000

16000

14000

12000
Num
10000 Size
Avg
8000

6000

4000

2000

0
11

13

15

17

19

21

23

25
1

Array Microsystems, Inc. 7 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

If the compression ratios are set too high, then picture quality and detail is quickly lost. In the following pictures,
there is slight degradation from the original to both the Wavelet and JPEG methods, using a 0.5 bits/pixel Wavelet
or JPEG quality setting of 50. If the compression ratio is further increased, the picture quality suffers more
dramatically. To maintain a high-quality image, then the compression ratio must be set at a reasonable level.

Picture Size (Bytes)


Fig. 1 - Original (bmp) 921,654
Fig. 2 - Wavelet - 0.5 bits/pixel (save back as bmp) 41,118
Fig. 3 - JPEG Quality 50 42,758
Fig. 4 - Wavelet 0.25 bits/pixel (save back as bmp) 23,650
Fig. 5 – JPEG Quality 20 24,838

Fig. 1 Original high-resolution image: 640x480x24; Size = 921,654 bytes

Array Microsystems, Inc. 8 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

Fig.2 Wavelet compressed @ .5 bits/pixel; Size = 41,118 bytes

Fig. 3 JPEG Quality = 50; Size = 42,758 bytes

Array Microsystems, Inc. 9 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

Fig. 4 Wavelet compressed @ .25 bits/pixel; Size = 23,650 bytes

Fig. 5 JPEG Quality = 20; Size = 24,838 bytes

Array Microsystems, Inc. 10 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

Summary

Assessing the needs of your application will determine the quality of resolution needed to successfully monitor and
record events. In digital recorders, resolution is defined in pixel dimensions. The quality of the image is described in
horizontal lines of resolution and signal-to-noise ratio. The more pixels used to capture an image, the more details
that image will have. The bargaining point comes with balancing the needed quality of resolution with the available
storage capacity. The higher the resolution, the larger the frame and file size of each image that will be stored. Be
wary if image quality is your top priority and a system is multiplexing the images. For the best viewing, the video
needs a full NTSC/PAL input into the video compression unit.

Array Microsystems has created a novel video encoding chipset, which combines an innovative vector data flow
architecture with very high compute power (about ten billion operations per second). This patented technology is
named VideoFLOW.® By using the VideoFLOW chipset, Array has focused on creating real-time, 30 fps MPEG-1
encoder products (PC add-in boards) that are the best-in-industry for developing security applications. Furthermore,
Array has integrated H.26X capabilities into its MPEG-1 encoder technology to serve the video conferencing
market. Therefore, Array products provide integrated video communication solutions combining good video quality,
relatively low bit rates and low cost.

Array Microsystems, Inc. 11 July 2001


White Paper: Video Compression for the Digital Video Surveillance Market: A Comparison of MPEG, Wavelet and JPEG Formats

Glossary of Terms

Pixel A pixel is a single point in a graphic image. Graphics monitors display pictures by dividing the
display screen into thousands (or millions) of pixels, arranged in rows and columns. The pixels are
so close together that they appear connected. The number of bits used to represent each pixel
determines how many colors or shades of gray can be displayed. For example, in 8-bit color mode,
the color monitor uses 8 bits for each pixel, making it possible to display 2 to the 8th power (256)
different colors or shades of gray.

Luminance In common usage, synonymous with brightness. In the HSL color space, luminance is the
weighted average of the red, green, and blue components.

Codec Short for compressor/decompressor, a codec is any technology for compressing and
decompressing data. Codecs can be implemented in software, hardware, or a combination of both.
Some popular codecs for computer video include MPEG, Indeo and Cinepak.

Array Microsystems, Inc. 12 July 2001

Das könnte Ihnen auch gefallen