Presentation is loading. Please wait.

Presentation is loading. Please wait.

Still-image compression Moving-image compression and File types.

Similar presentations


Presentation on theme: "Still-image compression Moving-image compression and File types."— Presentation transcript:

1 Still-image compression Moving-image compression and File types

2 “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

3 Digital images formed from pixels

4 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)

5 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. ??

6 Compression 1024 x 768 image 1024 x 768 image @ 3 bytes per pixel (for colour) 1024 x 768 image @ 3 bytes per pixel = 2.3 Mbytes 1024 x 768 image @ 3 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

7  Lossless: Compression data is coded more efficiently, none is discarded  Run-length encoding (RLE)  Dictionary-code schemes Lossless Compression

8  Method 1 - Used by PGN photos  "short code method" Lossless Compression 111 0111 10111 1101101111 0101101110111 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

9 Lossless Compression Method 2 - Used by JPEG RLE: Run Length Encoding - Record run-lengths of same-coloured values 39 3 12 4 11 2 1 2 6 * (14 2 )11 7 9 7 36

10  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!

11 Moving image compression frame 1 frame 2 ( uncompressed ) frame 3 ( uncompressed ) (Uncompressed) (compressed) Need only send the bits of the images that change

12 Types of video format .MOV .MPEG 1 : CD quality  2 : DVD quality  4 : many settings  .WMV .3PG

13 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)

14 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. ??

15 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


Download ppt "Still-image compression Moving-image compression and File types."

Similar presentations


Ads by Google