C481 B581 Computer Graphics
Dana Vrajitoru
Image representation

Digital image : a matrix of pixels.

Pixel: picture element, unit for screen and digital images.

Resolution: pixel density.

Screen: 1024x768
Printer 300 dpi (dots per inch)
Picture: 76 dpi
Pixel encoding:
B/W: 1 bit/pixel
16 colors: 4 bits/pixel
256 colors or grays : 8 bits/pixel
True color : 32 bits/pixel
Human vision: RGB cells (cornets)
Color and Light

Electromagnetic spectrum: radio, TV, phones, radar, microwave, infrared (heat), visible light, ultraviolet, X-rays, Gamma-rays.

Light properties:

electromagnetic wave
frequency (f) and wavelength (l) : c=fl
white light: contains all visible frequencies
red frequency < violet frequency
energy : white energy Ew and dominant energy Ed
Color: hue, tone, shade, tint.

Color composition

Primary colors: can produce the others from them

mixing : red, yellow, blue (painting)
composing : red, green, blue (vision, computer screen)
Complementary colors:
mixing : red - green, blue - orange, yellow - violet
composing : red - cyan, green - magenta, blue - yellow

Color models



TV / screen: matrix of RGB dots.

Printer : matrix of CMY + Black dots.
RGB: red, green, blue
[0, 1] [0, 1] [0, 1] or [0, 255] [0, 255] [0, 255]
CMY: cyan, magenta, yellow – printing
[0, 1] [0, 1] [0, 1]
HSV: hue, saturation, value – painting programs
[0, 359] [0, 1] [0, 1]
 
 
 
RGB
CMY
See Fig. 2-1 from the textbook
See Fig. 2-2 from the textbook.

(C, M, Y) = (1, 1, 1) - (R, G, B)

HSV


Named Colors

Image representation
Vector :
set of primitives like lines, rectangles, spheres, etc., given by coordinates
xfig, ClarisDraw, etc.
high level of compression, easy editing
shape restrictions
Bitmap:
set of individual pixels
direct RGB / lookup table  or color map
true color   /  256 colors or grayscale
Images formats:
GIF (Graphics Interchange Format) 256
JPEG (Joint Photographic Experts Group) true
BMP (Windows bitmap) 2-true
TIFF (Tagged Image File Format) true
TGA (Targa File, SUN) true
PNG (Portable Network Graphics) 256
EPS (Encapsulated PostScript) true

Generic Image File
Header
format identification
image size
image type
image data format
compression type
Image data
color map
pixel data (raster)

Graphic Scene and Components