Computer Graphics
WBCS019-05, 2025/26
Rasterisation & Quantisation
Jiřı́ Kosinka [Link]@[Link]
What is Computer Graphics?
Scene Scene
capture design
Scene Modelling
description
Computer
Rendering
graphics
Digital display
camera
Image image Image
capture display
Animation
Video
2/52
What is Computer Graphics?
3D geometry,
lights,
textures
Scene
description
Computer Rasterisation Raytracing
graphics (OpenGL, DirectX)
Digital
image
Coloured
pixels
3/52
What is Computer Graphics?
3D geometry,
lights,
textures
Scene
description
Computer Rasterisation Raytracing
graphics (OpenGL, DirectX)
Digital
image
Coloured
pixels
4/52
Digital Image
• Vector images • Raster (bitmap) images
• Described by ‘vectors’ • Array of picture elements, pixels
• Rely on (smooth) geometry primitives • Rely on rasterisation
• Typical example: fonts • Typical example: .jpg, .bmp
• Resolution independent • Fixed resolution
• Need to be rasterised for display • Need to be resampled for display
In this course: image = digital image = raster image
5/52
Digital Image
• Vector images • Raster (bitmap) images
• Described by ‘vectors’ • Array of picture elements, pixels
• Rely on (smooth) geometry primitives • Rely on rasterisation
• Typical example: fonts • Typical example: .jpg, .bmp
• Resolution independent • Fixed resolution
• Need to be rasterised for display • Need to be resampled for display
In this course: image = digital image = raster image
6/52
How Many Pixels Do We Need?
1×1
7/52
How Many Pixels Do We Need?
2×2
8/52
How Many Pixels Do We Need?
4×4
9/52
How Many Pixels Do We Need?
8×8
10/52
How Many Pixels Do We Need?
16 × 16
11/52
How Many Pixels Do We Need?
16 × 16
12/52
How Many Pixels Do We Need?
32 × 32
13/52
How Many Pixels Do We Need?
32 × 32
14/52
How Many Pixels Do We Need?
64 × 64
15/52
How Many Pixels Do We Need?
128 × 128
16/52
How Many Pixels Do We Need?
256 × 256
17/52
How Many Pixels Do We Need?
512 × 512
18/52
How Many Pixels Do We Need?
1024 × 1024
19/52
Resolution
• Horizontal × vertical; in pixels (or dots)
• Image resolution
• Display resolution (← image resampling); LCD, (O)LED, . . .
• HD: 1366 × 768
• FHD: 1920 × 1080
• Size vs. density
• Number of dots/pixels per a unit of length
• DPI: dots per inch; binary devices (ink-jet printers)
• PPI: pixels per inch
20/52
Resolution
• Horizontal × vertical; in pixels (or dots)
• Image resolution
• Display resolution (← image resampling); LCD, (O)LED, . . .
• HD: 1366 × 768
• FHD: 1920 × 1080
• Size vs. density
• Number of dots/pixels per unit of length
• DPI: dots per inch; binary devices (printers)
• PPI: pixels per inch
21/52
What’s Your Phone’s PPI?
• Find out your phone’s PPI
• You may already know it.
• If not, compute it.
• If you are too lazy (= don’t know the maths;-), go here: [Link]
and enter resolution and diagonal.
• If you don’t know these,
go to your phone’s specs.
• and share your result.
22/52
Visual Acuity
Brightspace → Content → Additional Items → Test Image
[Link]/~jiri/[Link]
23/52
Visual Acuity
tan α2 = w
2d
25.4
w= PPI ; w in mm
d pixel
eye α
2
w
2
α =?
24/52
Visual Acuity
tan α2 = w
2d
25.4
w= PPI ; w in mm
d pixel
eye α
2
w
2
α =?
my old phone: 256PPI; 36cm
25/52
PPI and Viewing Distance
• Assuming average eyesight (20/20 vision): α = one arcminute, i.e.,
α = 1′ = 1/60 degrees, we obtain d = 8732
PPI ; d in cm.
d in cm 44 35 29 25 22 19 17
PPI 200 250 300 350 400 450 500
26/52
PPI and Viewing Distance
• Assuming average eyesight (20/20 vision): α = one arcminute, i.e.,
α = 1′ = 1/60 degrees, we obtain d = 8732
PPI ; d in cm.
d in cm 44 35 29 25 22 19 17
PPI 200 250 300 350 400 450 500
• Based on our simplifying assumptions (but actually rather accurate in this range).
27/52
Field of View
• Field of view (FOV), or field of vision
• Total: ∼ 200 degrees
• Binocular: ∼ 124 degrees
• Comfortable: ∼ 40 degrees
28/52
Homework
• Compute the ultimate display resolution
• You will need to make some assumptions (distance, eyesight, ...)
• Is Retina display ‘good’ enough?
• If so, what for?
• If not, why?
29/52
Rasterisation & Quantisation
• Raster image: map from a 2D array of pixels to some colour space (e.g. RGB)
• Quantisation: only discrete values are allowed
• But how many values do we need?
30/52
How many colours do we need?
31/52
How many colours do we need?
32/52
How many colours do we need?
33/52
How many colours do we need?
34/52
How many colours do we need?
16
35/52
How many colours do we need?
32
36/52
How many colours do we need?
64
37/52
How many colours do we need?
128
38/52
How many colours do we need?
256
39/52
How many colours do we need?
8 bits per channel; RGB; 24 bits per pixel
40/52
How many colours do we need?
64 colours 64 colours
41/52
How many colours do we need?
8 colours 8 colours
42/52
How many colours do we need?
8 colours 8 colours
‘best fitting’ palette RGB cube corner colours
(1 bit per channel)
43/52
Palette Selection
blue channel removed palette computation
Wikipedia Photoshop
44/52
Bit Depth
• Intensity
• The eye can adjust over a range of 107 : 1 (or even 1010 : 1)
• At any one time, ‘only’ ∼ 100 : 1
• Displays offer contrast ratios in the thousands (LCD) or even higher (LED)
• Humans distinguish ∼ 2% change in intensity ⇒ 8 bits typically sufficient
• Three channels ⇒ 256 · 256 · 256 = 16, 777, 216 colours
• The human eye can distinguish about 10, 000, 000 colours
45/52
Bit Depth
• Intensity
• The eye can adjust over a range of 107 : 1 (or even 1010 : 1)
• At any one time, ‘only’ ∼ 100 : 1
• Displays offer contrast ratios in the thousands (LCD) or even higher (LED)
• Humans distinguish ∼ 2% change in intensity ⇒ 8 bits typically sufficient
• Three channels ⇒ 256 · 256 · 256 = 16, 777, 216
• The human eye can distinguish about 10, 000, 000 colours
46/52
Bit/Colour Depth
• 8-bit fixed-range RGB
• Web and email applications
• Consumer photographs
• 16-bit fixed-range grey-scale
• Medical imaging
• 16-bit fixed-range RGB
• Professional photography and printing
• Image editing
• 32-bit floating-point RGB
• HDR: high dynamic range images
47/52
Summary
• Computers/displays/printers are digital ⇒ we need to
&
rasterise space quantise colour,
• but so that we get away with it;-)
• Disclaimer: no analogue cats were rasterised or quantised during the making of this presentation
48/52
Summary
• Computers/displays/printers are digital ⇒ we need to
&
rasterise space quantise colour,
• but so that we get away with it;-)
• Disclaimer: no analogue cats were rasterised or quantised during the making of this presentation.
49/52
Summary
• Computers/displays/printers are digital ⇒ we need to
&
rasterise space quantise colour,
• but so that we get away with it;-)
• Disclaimer: no analogue cats were rasterised or quantised during the making of this presentation.
50/52
Feedback via Poll Everywhere
• Navigate to [Link]/jirikosinka874
• No need to use real name (but be nice;-)
• What did you like?
• What can be improved?
• What should be covered in tutorials?
• Anything else?
51/52
Computer Graphics
WBCS019-05, 2025/26
Rasterisation & Quantisation
Jiřı́ Kosinka [Link]@[Link]