1 / 31

G6DPMM - Lecture 4

G6DPMM - Lecture 4. Graphics & Still Image Representation. Analogue vs Digital. Analogue information Continuously variable signal Physical phenomena Sound/light/temperature/position/pressure Waveform Electromagnetic (e.g. light) Pressure (e.g. sound)

jafari
Download Presentation

G6DPMM - Lecture 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. G6DPMM - Lecture 4 Graphics & Still Image Representation

  2. Analogue vs Digital • Analogue information • Continuously variable signal • Physical phenomena • Sound/light/temperature/position/pressure • Waveform • Electromagnetic (e.g. light) • Pressure (e.g. sound) • Information conveyed by amplitude and frequency • Digital information • Discrete values • Smoke signals / Morse code / Binary electronic • Sampling of analogue information • Analogue to Digital Conversion (A2D) is sampling

  3. Analogue Media • We see an analogue world • Analogue image storage technologies: • Paint / Chemical film / Photocopier / Video • Analogue systems all have “noise” • Random variations • Hence sequential copies deteriorate • Analogue media is hard to manipulate by computer • Generally involves computer-controlled devices

  4. Digital Media • Digital media is very much easier to manipulate by software • Digitisation is never perfect • A2D Sampling is an approximation • Quality is dependent upon the amount of sampling done • High quality digital media tends to be large • Lots of bits needed to store samples! • Compression is a major issue

  5. Types of Graphics • Computer graphics fall into two categories: • Vector Graphics • Used for computer generated images, line drawings, cartoons etc. • Bitmap (Raster) Graphics • Used for photographs

  6. Vector Graphics • Mathematical definitions of lines • Scaleable • Not suitable for photographs • Examples • Postcript • CGM • WMF • HPGL • DXF • Edited using “drawing” software

  7. Bitmap Graphics • Matrix of ‘pixels’ • Difficult to re-size • Suitable for photographs • Examples • BMP (DIB) • GIF • PCX • TIFF • TARGA • JPEG • PNG • Edited using painting software (eg Photoshop)

  8. 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 Bitmap Graphics

  9. Colour Depth

  10. Colour Depth

  11. Colourmapping • 8-bit colour depth - pixels contain a reference to a “palette” (ie 24-bit values) • High quality 8-bit (256 colour) images • 16-bit colourmapping (32,768 colours) • Reasons for colourmapping • Hardware may require it • Some software manipulation requires it • Some compression techniques require it • Optimised vs System palette • Display Mode and Palette Flashing

  12. Vector / Bitmap Conversion • Vectors Bitmap • Easy • Perfect representation - scaling issue • Bitmap Vector • Much harder - autotrace • Poor quality • Highly lossy

  13. The Need for Compression • Graphics tend to be big! • Consider the following: • 1024x768 24-bit image • 1024 x 768 = 786,432 pixels • 786,432 x 24 bits = 18,874,368 (c. 18.4 Mb) • Approximately 40 images per 750 Mb CD-ROM! • Data compression is essential

  14. Image Compression • Lossless Compression • Decompressed image is a perfect copy of the original • Example File Format: GIF • Lossy Compression • Decompressed image is an imperfect approximation of the original • Example File Format: JPEG

  15. Lossless Algorithms • Run Length Encoding • Sequences of “runs” of repeated data is replaced by a single data item, and the length of the run. • Used by TIFF, DIB/BMP • LZ77 • Lempel-Ziv substitutional compression (1977) • Keeps track of a “window” of data – if repetition is seen it replaces this with a reference. • Many applications – including Huffman (LZH) and Zip • LZW (Lempel-Ziv-Welch) • Derived from LZ77 • Developed (and patented) by Unisys – licensed for Compuserve • Used by GIF • Deflate • Derived from LZ77 • Used by PNG

  16. Lossy Algorithms • Common algorithms all operate on the waveform • Fourier Transform • A technique for expressing a waveform as a weighted series of sines and cosines • DCT (Discrete Cosine Transform) • A type of Fourier transform • Waveform is expressed as a weighted sum of cosines • Used by JPEG • Wavelets • An alternative to Fourier transform • Signals converted into a series of rough-edged wavelets • Mostly used for specialised purposes (e.g. for fingerprints) • Fractal Compression • Fractal theory • Not (currently) widely used

  17. JPEG Compression Original Image - 285 K

  18. JPEG Compression 50% Compression - 15 K

  19. JPEG Compression 70% Compression - 10.8 K

  20. JPEG Compression 90% Compression - 6.9 K

  21. JPEG Compression 95% Compression - 5.3 K

  22. JPEG Compression 99% Compression - 2.6 K

  23. Image File Formats • Vendor Defined Formats • OS Vendors (eg Microsoft / Apple) • Application Vendors (eg Adobe) • May be open, (ie published specifications) or closed (protected by IPR) • Vendor Neutral Formats • Usually defined by standards organisations

  24. Apple Macintosh Formats • PICT • Very versatile • May contain bitmap and vector graphics, and metadata. • May be compressed or uncompressed using various algorithms. • Can be ported to other platforms, but some features usually lost. • Now rarely used – even on Macintosh!

  25. Windows Formats • Microsoft DIB (Device Independent Bitmap) • .BMP .DIB .RLE • 1, 8 or 24 bit bitmap - optional RLE compression • Microsoft PAL (Palette) • Palette for 8 bit images • Microsoft RIFF (Resource Interchange File Format) • Embedded DIB • Other media types • Windows Metafiles (WMF) • Usually used for vectors, but can contain almost anything!

  26. Adobe Formats • Photoshop PDF • Bitmap format (mostly) • Uncompressed • Supports various colour models • Supports all features of Photoshop (eg layers, channels etc). • Version issues • Postcript • Page description language for printers • Encapsulated postcript (EPF) • Primarily used for Vectors, but can contain embedded bitmaps.

  27. Truevision Targa • Truevision - graphics hardware & software company • Targa (TGA) • Bitmap (1 to 32 bits), with optional RLE • Multiple images (eg different resolutions) • Metadata • Advanced features (eg alpha channels and gamma values) • Developer definable data • Very widely used for storage of high quality (24 or 32 bit) images.

  28. Aldus/Adobe TIFF • TIFF (.TIF) Tag Image File Format • Formerly Aldus - now maintained by Adobe • 24 bit bitmap format • Supports a wide range of compression algorithms (including RLE, LZW, JPEG and many others) • Extensive metadata capability

  29. CompuServe GIF • 8 bit LZW compressed bitmap • Supports transparency • Supports multiple images & animation • Widely used on WWW • Licence problems • CompuServe patent • Unisys policy

  30. PNG • Portable Network Graphics • Designed to replace GIF • Supports greyscale, colourmapped or truecolour images (up to 48 bit!) • Supports alpha channels and gamma correction • Lossless CRC-32 compression • No multiple image support • No patent problems!

  31. JPEG • Joint Picture Expert Group • Both an algorithm and a file format! • Lossy Truecolour compression (DCT)

More Related