42
1 Computer Graphics Week3 –Graphics & Image Processing

1 Computer Graphics Week3 –Graphics & Image Processing

Embed Size (px)

Citation preview

Page 1: 1 Computer Graphics Week3 –Graphics & Image Processing

1

Computer Graphics

Week3 –Graphics & Image Processing

Page 2: 1 Computer Graphics Week3 –Graphics & Image Processing

Sequence of Images

• Wireframe• Flat shading– HSR (Hidden surface removal)

• Smooth shading• Curves and surfaces– NURBS, Bezier curves/surfaces

• Texture mapping– Bump mapping, environmental maps, antialiasing…

2

Page 3: 1 Computer Graphics Week3 –Graphics & Image Processing

Pixels

3

Page 4: 1 Computer Graphics Week3 –Graphics & Image Processing

A Graphics System

4

Page 5: 1 Computer Graphics Week3 –Graphics & Image Processing

Frame Buffer

• High-end systems: VRAM or DRAM• Simpler systems: part of memory• Depth: the number of bits per pixel• True color: depth=24• Resolution: the number of pixels in the frame

buffer

5

Page 6: 1 Computer Graphics Week3 –Graphics & Image Processing

Rasterization or Scan-conversion

• Conversion of geometric entities to pixels in the frame buffer

– High-end systems• Special-purpose processors

– Simpler systems• A single and shared processor

6

Page 7: 1 Computer Graphics Week3 –Graphics & Image Processing

Output Devices

7CRT (Cathode-ray tube)

Page 8: 1 Computer Graphics Week3 –Graphics & Image Processing

Output Devices

• CRT– Refresh: at least 50 times per second– Interlace and non-interlace systems– Color CRTs have three colored phosphors and a

shadow mask• Other raster devices:– LCD (liquid-crystal displays)– Plasma panels and digital projection systems– Non-refreshable: printers and plotters

8

Page 9: 1 Computer Graphics Week3 –Graphics & Image Processing

Shadow-mask CRT

9

Page 10: 1 Computer Graphics Week3 –Graphics & Image Processing

Input Devices

• Mouse

10

Joystick Data tablet Anything else?

Hand Foot Voice Mind?

Page 11: 1 Computer Graphics Week3 –Graphics & Image Processing

Images: Physical and Synthetic

• Image formation– Lighting– Shading– Properties of materials

11

Page 12: 1 Computer Graphics Week3 –Graphics & Image Processing

Objects and Viewers

• Object: formed from geometric primitives– Points, lines, polygons– Vertex (pl. Vertices) is the most primitive one

• Viewer: – Locations– Viewing angles

12

Page 13: 1 Computer Graphics Week3 –Graphics & Image Processing

Objects and Viewers

13

Page 14: 1 Computer Graphics Week3 –Graphics & Image Processing

Objects and Viewers

14

3D world 2D image

Page 15: 1 Computer Graphics Week3 –Graphics & Image Processing

Light and Images

15

Page 16: 1 Computer Graphics Week3 –Graphics & Image Processing

16

Synthetic-camera Model

Film Plane

Projection Plane

Page 17: 1 Computer Graphics Week3 –Graphics & Image Processing

Single Point Light Source

17

Page 18: 1 Computer Graphics Week3 –Graphics & Image Processing

Ray Tracing

18

Penetrating transparent surfaces Reflected by

Mirrors Diffuse surfaces

Refracted Absorbed

Page 19: 1 Computer Graphics Week3 –Graphics & Image Processing

Human Visual System

19

Visual system does not have the same response to each color.We are most sensitive to green light

Page 20: 1 Computer Graphics Week3 –Graphics & Image Processing

Pinhole Camera

20

Page 21: 1 Computer Graphics Week3 –Graphics & Image Processing

Pinhole Camera

21

dz

xx

dz

yy

p

p

/

/

d

h

2tan2 1

(xp, yp, -d) is the projection of (x, y, z)

Page 22: 1 Computer Graphics Week3 –Graphics & Image Processing

Synthetic-camera Model

22

Bellows Camera Projector

Page 23: 1 Computer Graphics Week3 –Graphics & Image Processing

Synthetic-camera Model

23

COP(Center of Projection)

Focal Length

Page 24: 1 Computer Graphics Week3 –Graphics & Image Processing

Synthetic-camera Model

24

Film Plane

Projection Plane

Page 25: 1 Computer Graphics Week3 –Graphics & Image Processing

Synthetic-camera Model

25

Clipping Window

Page 26: 1 Computer Graphics Week3 –Graphics & Image Processing

Sequence of Images

• Wireframe• Flat shading– HSR (Hidden surface removal)

• Smooth shading• Curves and surfaces– NURBS, Bezier curves/surfaces

• Texture mapping– Bump mapping, environmental maps, antialiasing…

26

Page 27: 1 Computer Graphics Week3 –Graphics & Image Processing

Wireframe

27

Page 28: 1 Computer Graphics Week3 –Graphics & Image Processing

Flat Shading

28

Page 29: 1 Computer Graphics Week3 –Graphics & Image Processing

Smooth Shading

29

Page 30: 1 Computer Graphics Week3 –Graphics & Image Processing

Modeling With Curves/surfaces

30

Page 31: 1 Computer Graphics Week3 –Graphics & Image Processing

Bump Mapping

31

Page 32: 1 Computer Graphics Week3 –Graphics & Image Processing

Environmental Maps

32

Page 33: 1 Computer Graphics Week3 –Graphics & Image Processing

Antialiasing

33

Page 34: 1 Computer Graphics Week3 –Graphics & Image Processing

Modeling-rendering Paradigm

34

Example: Scene graph

Page 35: 1 Computer Graphics Week3 –Graphics & Image Processing

Graphics Architecture

35

Early graphics system

Computeline segments

Drawline segments

Very high rate to avoid flickering

Page 36: 1 Computer Graphics Week3 –Graphics & Image Processing

Graphics Architecture

36Display-processor architecture

Page 37: 1 Computer Graphics Week3 –Graphics & Image Processing

Graphics Architecture

37

Arithmetic pipeline: doubling the throughput!

Pipeline Architecture: Geometric pipeline

Page 38: 1 Computer Graphics Week3 –Graphics & Image Processing

Pipelining

38

Arithmetic pipeline: doubling the throughput!

Pipeline Architecture: Geometric pipeline

Page 39: 1 Computer Graphics Week3 –Graphics & Image Processing

Geometric Pipeline

• Transformation– Conversion between coordinate systems– Translation, rotation, scaling– Aggregate transforms by matrix multiplications

• Clipping– Could be further pipelined

39

Page 40: 1 Computer Graphics Week3 –Graphics & Image Processing

Geometric Pipeline

• Projection– Remaining 3D objects are projected into 2D

objects– Parallel or perspective projections

• Rasterization– Convert 2D objects into pixels

40

Page 41: 1 Computer Graphics Week3 –Graphics & Image Processing

Performance Characteristics

• Latency• Throughput: – How fast we can move geometric entities through

the pipeline– How many pixels per second we can alter in the

frame buffer• Pipeline architecture is not a must– Ray tracing or radiosity for better quality

41

Page 42: 1 Computer Graphics Week3 –Graphics & Image Processing

Summary & Notes of Lecture 1

• Application of computer graphics• A graphics system• Human visual system• Pinhole and synthetic camera models• Image formation• Geometric pipeline• Realistic images may require resolution of up

to 40006000

42