SI23 Introduction to Computer Graphics Lecture 2 - Images Graphics Programming 3D Graphics URL VRML viewer 2D vector graphics surfaces Image Display URL SVG Viewer lines, areas URL GIMP viewing, shading graphics algorithms colour interaction Course Outline OpenGL API
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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
SI23Introduction to Computer Graphics
Lecture 2 - Images
Basic technology for
workstation screens is the
cathode ray tube
Beam scans across
screen in series
- 60 times per second
Colour composed as
combination of RED, GREEN, BLUE
Today most colour displays
have 24bit frame buffers
So each pixel has a 24bit
colour value associated
with it - 8 bits for R,G,B.
01101101 11011001 10011100
To save on memory costs, some displays use a look-up table …
8-bit frame buffer
1 0 1 0 0 1 1 1
Pixel value (=167)
24-bit colour table
11001100 10110110 11011100
red green blue
Pixel value acts as an index into the look up table. This
allows 256 (=28) on-screen colours from a palette of 16.7 million
Brightness = (Signal)g
Note: assumes signal in range [0,1]
We can generate images in a variety of ways…
… and we can subsequently process them in order to …
The GIMP will help us do many of these things
Fill in the answers!
Large number of formats have emerged over the years
Which are in common use?
Use a couple of test pictures
The picture of Bank’s Peninsula is 2472 by 1704 pixels
as RGB image it is 12 Mbytes
The diagram with the square is 256 by 256 pixels
As RGB image it is 193k bytes
Consider the triangle
Suppose 0 represents
black and 1 represents
The image file will look like, for each scan line:
It would be more efficient to store as ‘runs’ of pixel values:
This is known as Run Length Encoding (RLE)
and is an option in the RGB image file specification.
The NZ photo reduces from 12 Mbytes to 9.5 with RLE compression
Is this what you’d expect?
The square reduces from 193k to 13k with RLE compression
Is this what you’d expect?
PNG = Portable Network Graphics
Created as a successor to GIF, free of legal restrictions
Defined as a Web standard by W3C
.. And better than GIFs!
Alpha channel in addition to RGB
Store the gamma value at creation
Correct at display time
Can you work out the correction formula?
Why would it be useful to associate text with an image?
7 passes (Adam7)
Why is this useful?
Simple operator to promote good compression
Eg sub filter replaces pixel values on scan line, with differences from predecessor
Uses LZ77 approach (recall from SI11)
Plus Huffman encoding (also from SI11)
Used in gzip
Encoding is: interlace, filter, compress
NZ photo does not compress particularly well
Uncompressed 12 MB
RLE 9.5 MB
PNG 4 MB
Square compresses outstandingly well
Uncompressed 193 kB
RLE 13 kB
PNG 1 kB
For the NZ photograph, we have outstanding compression