PowerPoint Presentation
Images and Displays
Computer Graphics
Instructor: Sungkil Lee
2
Today
• Digital Images
• Raster Graphics
• Vector Graphics
• Displays
3
Images
• Image:
• (continuous) 2D distribution of intensity or color, defined as a 2-D
function 𝑓 𝑥, 𝑦 at spatial coordinates (𝑥, 𝑦)
• 𝑓 𝑥, 𝑦 is the intensity (or gray level) or the amplitude of light.
Lena: the most famous test image in image processing community
4
Digital Images
• Digital image: a finite, discrete quantities of image
• finite range: e.g., 0-255
• discrete quantities: e.g., 0, 1, 2, …., 255 (integer only here)
• usually has 3 channels: RGB (red, green, and blue)
• motivated by 3 types of cone cells (L, M, S) in the retina
• Pixel (picture element):
• A single element of a digital image
• For multi-channel images, three channel elements form a pixel.
• c.f., voxel (volume element), texel (texture element)
5
Digital Images: Example
• 3-channel RGB format
• Intensity of the red channel is stronger than the other two in the example.
red green blue RGB+ + =
6
Raster Graphics
• A raster graphics representation (also called the bitmap)
• 2D array structure that represents a rectangular grid of pixels.
• When enlarged, a blocky structure is visible
7
Raster Graphics
• Memory structure
• e.g., BGR format in Windows BMP
B G R B G R B G R
B G R B G R B G R
B G R B G R B G R
B G R B G R B G R
…
…
…
…
…
…
…
…
…
…
…
…
…
B G R B G R B G R
B G R
B G R
B G R
B G R
B G R…
…
…
…
width × 3
h
e
ig
h
t
unsigned char image[height*width*3]; // as a 1D array
8
Raster Graphics
• Implication of a raster image
• approximation (sampled representation) of a real intensity distribution
• c.f., a float-point number in computer is always an approximation.
• A single pixel represents the color of the pixel center, not on the whole
area of a pixel.
• example: the yellow color of the center approximates the whole pixel area.
• Advantages:
• Brute-force sampling can represent arbitrary images; memory is cheap.
• Quality becomes higher with increasing resolution (denser sampling)
• 2D array can easily be mapped to display devices.
9
Raster Graphics: Data Types
• Bitmaps:
• boolean per pixel (black or white); e.g., fax, (old) newspaper
• Grayscale:
• integer per pixel (gray levels)
• Precision: usually 8-bits per pixel (bpp), but often 10, 12, 16 bpp
• Color:
• 3 or 4 integers per pixel (RGBA for 4 integers)
• “A” means “alpha” or opacity
• Precision: usually 24 bpp (RGB) or 32 bpp (RGBA)
• Floating-point
• Floating-point format is often used for high-dynamic range (48 or 96 bpp)
• Exposure effects can be captured with HDR formats
10
Raster Graphics: Storage Requirements
• 1024 × 1024 image (1 Megapixel) example
• bitmap: 128 KB
• grayscale 8bpp: 1MB
• grayscale 16bpp: 2MB
• color 24bpp: 3MB
• floating-point HDR color: 12MB
• Think about:
• how many memory is required for an arbitrary resolution and bpp.
11
Raster Graphics: File Containers
• Compression of image files
• When images are stored into disks with particular formats, they are
usually compressed. So, you see much smaller file sizes for them.
• Typical containers
• BMP: Lossless raw format
• JPEG: Lossy compression (pronounced as “Jay-Peg”)
• Using DCT (discrete cosine transform for compression)
• PNG: Lossless compression (pronounced as “Ping”)
• Using ZLIB for compression
• TIFF, GIF, … (obsolete)
• WebP (recent container/compression by Google)
12
Vector Graphics
• Unlike the raster graphics, vector graphics uses geometrical
primitives such as points, lines, triangles, curves, etc.
• The primitives are represented as a mathematical expressions.
• “Vector”, in this context, is more than a straight line.
• Common tools/formats to manipulate 2D vector graphics
• Adobe illustrator
• Adobe Acrobat
• SVG (Scale Vector Graphics; recently available on the web)
• Postscripts (for printers or printer file)
13
Vector Graphics
• Vector graphics representations are usually independent of
the output resolution.
• Because they are rasterized on the fly at the output stage to be displayed.
• Still, most of display devices use raster display.
3D Graphics and Images
15
Vector Graphics to Raster Graphics
• Input: vector representation
• Graphics uses vector graphic formats as an input
• Points, lines, triangles, quads, polygons, curves, …
• Output: raster representation
• Raster images whose dimension is identical to the window resolution
16
Graphics Terms
• “capture images” means:
• record the light distribution on the sensor (using cameras)
• “represent images” means:
• encode images numerically (normally binary)
• “display images” means:
• realize the encoded images as actual intensity distribution on the display
devices (e.g., monitors)
Displays
18
Raster Display System
• Screen image is defined by a 2D array in RAM
• The memory area is called the frame buffer.
• Nowadays, the most system has it in Graphics Processor Unit (GPU)
memory.
• Architecture of raster display system
CPU GPU
Main
memory
System Bus
I/O Devices
GPU
Memory
Frame
Buffer
Video
Controller
Monitor
19
Display Devices
• Computer displays
• CRT (Cathode Ray Tube)
• LCD (Liquid Crystal Display)/LED (Light Emitting Diode)
• OLED (Organic LED)
• AMOLED (Active Matrix OLED)
• Printers
• Laser printers
• Inkjet printers
• Dot printers (-1990s)
• not much of interests in this course
20
Cathode Ray Tube (CRT)
• Raster scan display
• Can be used either as vector (calligraphic or random-scan) display device
or raster display system (from frame buffer)
• TV-standards: PAL, NTSC
• Direct view storage tube (DVST):
• an early alternative for persistent display without constant refresh
y deflect
x deflectElectron gun
Focus
Phosphor
21
LCD Flat Panel (TN: Twisted Nematic)
• Principle:
• Block or transmit light by twisting its polarization
• Intermediate intensity levels possible by partial twist
• Fundamentally raster technology
• Always need backlight (often using LED)
22
LCD Flat Panel (IPS: In-plane Switching)
• Principle:
• While TN panel twists LC vertically, IPS panel twists
LC horizontally in its plane.
• Better for wide-angle viewing.
23
OLED (Organic Light Emitting Diode)
• Principle:
• Self-emit or not light by organic materials
• Works without backlit: better in contrast ratio than LCD
• Fundamentally raster technology
1. Cathode (−), 2. Emissive Layer, 3. Emission of radiation, 4. Conductive Layer, 5. Anode (+)
24
AMOLED (Active-Matrix OLED)
• Principle:
• Active matrix addressing:
• Each element’s state is maintained by individual circuits.
• Faster than passive matrix addressing in refresh rates
※ Super AMOLED (Samsung Elec. Co. Ltd.) = AMOLED + touch digitizer
Pentile matrix pattern on Galaxy S6/S7