Lecture 1_ Computer Graphics
Lecture 1_ Computer Graphics
◼ Images
◼ Hardware
◼ Input Systems
◼ Output Systems
◼ Software
◼ OpenGL
◼ MAYA
◼ 3D MAX etc
Two Dimensional Images
(0,0) X Axis +X
Hardware Pipeline
◼ Locator Devices
◼ Keyboard
◼ Scanner
◼ Images
◼ Laser
◼ Cameras …..From the basic to complex
Locator Devices-1
When queried,
locator devices
return a position
and/or
orientation.
◼ Tablet
◼ Virtual Reality
Trackers
◼ Data Gloves
◼ Digitizers
Keyboard
◼ Text input
◼ List boxes, GUI
◼ CAD/CAM
◼ Modeling
◼ Image Scanners -
Flatbed, etc.
◼ What type of data is
returned? Bitmap
◼ Laser Scanners
◼ Emits a laser and does
time of flight. Returns
3D point
◼ Camera based -
research
◼ Examine camera image(s)
and try to figure out vertices
from them.
Other Input devices
◼ Light Pens
◼ Voice Systems
◼ Touch Panels
◼ Camera/Vision
Based
◼ Which is best?
◼ What factors to
look into ?
vert 4 edges 4
73
79 (7,9) (14,9)
14 9
14 3
vert 4 edges 4
(7,3) (14,3)
12
23
34
41
Computation Stage-1
Computation
Transformations Rasterization
Computation Stage-2
Computation
Model Output
Transformations Rasterization
Transformed
Model
Raster Images vs.
Vector Images
Raster (Bitmap) images
◼ A raster image is made up of grid of pixels.. In raster images, the more
pixels an image contains, the higher its resolution. For example, in a
raster image a square is drawn as a grid of pixels (dots) and each of
those pixels will have a specific color value.
◼ Bitmap images lose their clarity when they are increased in size
because the dots get bigger i.e cannot be scaled up without
losing quality.. (resolution dependent)
1) Type: does the file format store the type of image you
want to use ?
2) Portability: can other people use images in this format?
3) Color Depth: does the format support the number of
colors you need?
1) GIF supports 256 Colors (8-bit) , JPEG supports 16.7
M Colors – (24-bit), TIFF supports 16 M colors (24-bit)
32
1.Image Data Types -2 [8-bit color ]
24-bit:
◼ Each pixel is represented
8-bit:
by three bytes (e.g., ◼ One byte for each pixel
RGB) ◼ Supports 256 out of the
◼ Supports 256 x 256 x millions colors possible,
256 possible combined acceptable color quality
colors (16,777,216) ◼ Requires Color Look-Up
◼ A 640 x 480 24-bit color Tables (LUTs) -- Pallete
image would require ◼ A 640 x 480 8-bit color
921.6 KB of storage image requires 307.2 KB
◼ Many 24-bit color images of storage (the same as
are stored as 32-bit 8-bit grayscale)
images, the extra byte of
data for each pixel is
used to store an alpha
value representing
special effect information 37
3.Color Depth
Monochrome:
Grayscale:
◼ Each pixel is stored as a
◼ Each pixel is usually
single bit (0 or 1)
stored as a byte (value
◼ A 640 x 480 between 0 to 255)
monochrome image
◼ A 640 x 480 grayscale
requires 37.5 KB of
storage. image requires over 300
KB of storage.
39
3.Color Depth :Color codes -RGB-Code
Hexadecimal RGB-code
of significant colours:
◼ Black: (0,0,0)
Black: #000000
◼ White: (255,255,255)
White: #FFFFFF
◼ Red: (255,0,0)
Red: #FF0000
◼ Green: (0,255,0)
Green: #00FF00
◼ Blue: (0,0,255)
Blue: #0000FF
0-255 ….as
intensity
increases 40
3.Color Depth -When image has more colors
than the color depth?
Framebuffer
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
pages
GIMP and Photoshop support full transparency
The difference between Raster and Vector
Graphics
Source :https://tinyurl.com/taa5ju7 :
Resolution
◼ Resolution refers to the number of pixels in an image, and is a measurement of the
output quality of an image, usually in terms of samples, pixels, dots, or lines per
inch. Images are displayed on your computer screen at display (or screen)
resolution (72 or 96 ppi)..
◼ Resolution terminology varies according to the intended output device. PPI (pixels
per inch) refers to screen resolution (monitors), DPI (dots per inch) refers
to print resolution, SPI (samples per inch) refers to scanning resolution,
and LPI (lines per inch) refers to halftone (often newspapers) resolution.
◼ Sometimes images are referred to as high resolution (hi-res) or low resolution (lo-
res). High resolution would be an image intended for print, generally having at least
300 pixels per inch. Low resolution refers to images only intended for screen
display, generally having 72-96 pixels per inch. An image for use on the internet
should only be 72 dpi (the minimum display resolution) to minimize download time.
Graphic Card Memory
Clipping
Object window to
Object Applying
subset viewport
World Coordinates world window
mapping
Object
Display Rasterization
Screen coordinates
Rasterization (Scan Conversion)
Viewport
Rasterization
Transformation
Rasterization (Scan Conversion)
Viewport
Rasterization
Transformation
Rasterization
◼ http://cacs.usc.edu/education/cs596/OGL_Setup.p
df
◼ https://content.byui.edu/file/2315e65e-a34a-
48d3-814d-4175a2b74ed5/1/intro/165-opengl-
visualStudio2017.html
◼ http://www.cs.uky.edu/~cheng/cs633/OpenGLInst
allGuideWindows.pdf
◼END of Lecture 1