Still-image compression Moving-image compression and File types
“Moving” images Moving images are an illusion If can project still images at around 50 images per second then most people perceive smooth motion. Cine-cameras actually only capture 24 images. Cine-projectors display black image between each of these 24 People’s brains perceive this as 48 frames per second Click image to view
Digital images formed from pixels
Screen resolution 118 Some types of bitmap image (eg BMP): Each pixel displayed on one pixel of monitor (best quality) But high-resolution screens (eg 1800 dots across screen) display picture smaller than low-res (720)
Changing resolutions Image sent as 5 pixels / mm (!) Screen can only display 4 pixels / mm Display must interpolate (calculate) what colours to display May need to display colours not actually in original image. ??
Compression 1024 x 768 image 1024 x bytes per pixel (for colour) 1024 x bytes per pixel = 2.3 Mbytes 1024 x bytes (RGB) per pixel = 2.3 Mbytes = around 10 minutes to download on dial-up line Full-screen images are very big Compression is "squeezing" the file size, often to 1/20th of its original size, without destroying too much of the image
Lossless: Compression data is coded more efficiently, none is discarded Run-length encoding (RLE) Dictionary-code schemes Lossless Compression
Method 1 - Used by PGN photos "short code method" Lossless Compression But PNG must store (and transmit) code table with image data In a photo: if RED most common then red = shortest code if BLUE most common then blue = shortest code
Lossless Compression Method 2 - Used by JPEG RLE: Run Length Encoding - Record run-lengths of same-coloured values * (14 2 )
Get big speed-up by working with blocks of 8 x 8 pixels. So, for each 8 x 8 block, find (a)what 'pattern' is the nearest match (b)what main colour or 2 colours of the pattern are Lossy Compression : JPEG JPG uses approx 4 codes per 64 pixels : ____ % saving! Can run-length encode the sequence of blocks ~ even further savings!
Moving image compression frame 1 frame 2 ( uncompressed ) frame 3 ( uncompressed ) (Uncompressed) (compressed) Need only send the bits of the images that change
Types of video format .MOV .MPEG 1 : CD quality 2 : DVD quality 4 : many settings .WMV .3PG
Screen resolution 118 Some types of bitmap image (eg BMP): Each pixel displayed on one pixel of monitor (best quality) But high-resolution screens (eg 1800 dots across screen) display picture smaller than low-res (720)
Changing resolutions Image sent as 5 pixels / mm (!) Screen can only display 4 pixels / mm Display must interpolate (calculate) what colours to display May need to display colours not actually in original image. ??
Summary Bitmap (Rastors) based on storing pixels of image Uncompressed huge Problem of resolutions Compression : Lossless: can achieve some filesize reduction Lossy: can achieve huge reductions, without too noticeable changes in quality of image