Beruflich Dokumente
Kultur Dokumente
MOTION IMAGES
Image resolution Image and pixel aspect ratio Color system Image compexity
A scheme for video compression based on JPEG called Motion JPEG (MJPEG) exists
Experiments indicate that humans are not very sensitive to the high frequency data images
Quantization
Quantization in JPEG aims at reducing the total number of bits in the compressed image Divide each entry in the frequency space block by an integer, then round Use a quantization matrix Q(u, v)
Quantization
Use larger entries in Q for the higher spatial frequencies These are entries to the lower right part of the matrix The following slide shows the default Q(u, v) values for luminance and chrominance
Based on psychophysical studies intended to maximize compression ratios while minimizing perceptual distortion Since after division the entries are smaller, we can use fewer bits to encode them
Quantization
Multiple quantization matrices can be used (perhaps by scaling the defaults), allowing the user to choose how much compression to use Trades off quality vs. compression ratio More compression means larger entries in Q An example of JPEG coding and decoding on one image block is shown next
Preparation for Entropy Coding two main steps in JPEG coding: We have seen
DCT and quantization The remaining steps all lead up to entropy coding of the quantized DCT coefficients These additional data compression steps are lossless Most of the lossiness is in the quantization step
Run-Length Coding
We now do run-length coding The AC and DC components are treated differently Since after quantization we have many 0 AC components, RLC is a good idea Note that most of the zero components are towards the lower right corner (high spatial frequencies) To take advantage of this, use zigzag scanning to create a 64-vector
JPEG Modes
JPEG supports several different modes Sequential Mode Progresssive Mode Sequential is the default mode Each image component is encoded in a single left-to-right, top-to-bottom scan
Progressive Mode
Progressive mode delivers low-quality versions of the image quickly, and then fills in the details in successive passes This is useful for web browsers, where the image download might take a long time
The user gets an approximate image quickly Can be done by sending the DC coefficient and a few AC coefficients first Next send some more (low spatial resolution) AC coefficients, and continue in this way until all of the coefficients have been sent
Click to edit Master text styles Second level Third level Fourth level Fifth level
JPEG Bitstream
The JPEG hierarchical organization is described in the next slide
Frame is a picture Scan is a picture component Segment is a group of blocks Frame header inlcudes
JPEG Bitstream
DIBs in memory
A Bitmap Image File loaded into memory becomes a DIB data structure - an important component of the Windows GDI API. The inmemory DIB data structure is almost the same as the BMP file format, but it does not contain the 14-byte Bitmap File Header and begins with the DIB Header. For DIBs loaded in memory, the Color Table can also consist of 16 bit entries, that constitute indexes to the currently realized palette(an additional level of indirection), instead of explicit RGB color definitions. In all cases, the Pixel Array must begin at a memory
When the size of Gap1 and Gap2 is zero, the inmemory DIB data structure is customarily referred to as "packed DIB" and can be referred to by a single pointer pointing to the beginning of the DIB Header. In all cases, the Pixel Array must begin at a memory address that is a multiple of 4 bytes. In some cases it may be necessary to adjust the number of entries in the Color Table in order to force the memory address of the Pixel Array to a multiple of 4 bytes.For "packed DIBs" loaded in memory, the optional Color Profile data should immediately follow the Pixel Array, as depicted in Diag.1 (with Gap1=0 and Gap2=0). "Packed DIBs" are required byWindowsclipboard API functions as well as
DIB Headerthe application detailed (Bitmap This block of bytes tells information about the image, which will be used Information Header) to display the image on the screen. The block
also matches the header used internally by Windows and OS/2 and has several different variants. All of them contain a dword (32bit) field, specifying their size, so that an application can easily determine which header is used in the image. The reason that there are different headers is that Microsoft extended the DIB format several times. The new extended headers can be used with some GDI functions