Input and Output

Download Report

Transcript Input and Output

Computer Graphics
System
Input & Output Technologies
Introduction to Computer Graphics
and Animation
(Principle of Computer Graphics)
Rattapoom Waranusast
A Graphics System
Output devices
Input devices
Processor and memory
Display Devices
• Hard Copy devices
– Printers, plotters
• Transient displays
– LCD Monitors, CRT
Monitors, projectors
Cathode Ray Tube
• Recently, most common is Cathode Ray Tube (CRT)
monitor
• Horizontal and vertical deflectors focus an electron beam
on any spot on a phosphor coated screen
Electrons hit the
screen phosphor
molecules and excite
them
Karl Ferdinand Braun
1897 – Cathode Ray Oscilloscope
Phosphors
• Most phosphors relax back to the ground state by
emitting a photon of light which is called fluorescence,
which decays in under a millisecond
• Some molecules may be further excited, and emit a light
call phosphorescence, which decays slower, but still
rapidly (15-20 milliseconds)
• Therefore, the screen must be refreshed by redrawing
the image
• They also are characterized by their persistence (time to
decay of emitted light)
– High persistence cheap and good for text, bad for animation
– Low persistence, good for animation, but need high refresh rate
Color Systems
• Phosphors have a color. Color systems have groups of 3
different phosphors, for red, green and blue.
• 3 Electron guns used, for R G and B
• Each pixel consists of 3 dots of phosphor, arranged as
triangle
• Combining different intensities of phosphors can generate
different colours
Standard Dot-trio
SONY Trinitron CRT
NEC Hybrid Mask
Hitachi EDP
Shadow Masks
Shadow mask holes are arranged so that each
beam can only excite it’s own color phosphor
Shadow Masks (2)
Vector Display Devices
• A.K.A. Vector Scan
Displays, Random
Scan Devices, Line
Plotters
• The electron beam
directly draws the
picture
B
A
DrawLine(A, B):
Turn
move
Turn
move
beam off,
to A.
beam on,
to B.
Vector Graphics
• Although Vector Displays no longer as widely used, it is
still common practice to deal with certain types of images
in terms of vector graphics.
• A vector file contains a list of entries each of which
describes an element of a picture.
• How a picture element is described depends on what
type of element it is. e.g. a line segment can be
described in terms the co-ordinates of its two end points,
its thickness, and its style (solid, dotted, etc.) Also curves
and shapes.
• Example: postscript files (PS/EPS)
• To display on a RASTER device the graphic needs to be
rasterized
Raster Graphics
• An image made up of many small regularly
placed cells called picture elements (pixels)
• Stored as an array of numerical values
commonly called a pixelmap (or bitmap)
Raster Scan Devices
• Scans the screen from
top to bottom in a regular
pattern (common TV
technology)
• A Raster is a matrix of
pixels (picture elements)
covering the screen
• The electron beam is
turned on/off so the
image is a collection of
dots painted on screen
one row (scan line) at a
time.
Frame Buffer
• An image is stored in a special graphics memory area
called a frame buffer where each memory location
corresponds to a pixel
• A display processor scans this memory and controls the
electron beam at each pixel accordingly
• For a monochrome system, each pixel is either on or off, so
only one bit per pixel is required, the electron beam is
either on or off
• For greyscale images, 8 bits per pixel gives 256 different
intensities of gray
• For a true color display there should be 8 bits/color giving a
total of 24 bits (or more) per pixel.
14
Bits Per Pixel
• 1 Bit Per Pixel
1
• 2 Bits Per Pixel
22 = 4 possible
combinations: 00,
or 0 in binary (on/off)
01, 10, 11
to 11111111.
28 = 255 possible values
• 8 Bits Per Pixel
00000000
• 24 Bits Per Pixel
000000000000000000000000
to
111111111111111111111111. i.e.
224 or 16 million possible
values
Memory Usage Example
Black-and-white
8x8x1 = 64 bits
Greyscale
True-colour
8x8x8 = 512 bits
8x8x24 = 1536 bits
Rasterization
• Geometric and Mathematical Data structures
typically in vertex coordinates not dependent
on resolution
• We must convert from typical continuous
representation to discrete
Anti-aliasing
Raster Scan Systems: Conclusion
• Advantages of Raster Scan systems:
–
–
–
–
Low cost
Refresh rate independent of image complexity
Handles colour and filled areas images -> high refresh
Regular repetitive => easier and cheaper to implement.
• Disadvantages
– Models must be scan converted. Often this can’t be reused so
must do this every frame.
– Aliasing
– Requires large refresh buffers even for small or simple images.
– Images bound to a certain resolution
Vector Displays
• Advantages:
– High resolution and not discretized
– Less Storage Space
– Less Transfer Time (usually)
• Disadvantages
–
–
–
–
–
Limited colour capability. Problems with filled areas and shading.
Flicker occurs as complexity of image increases.
Vector data needs some processing before display
Processing required before obtaining the Vector representation
Wastage in Overlapping areas
LCD Displays
• Thinner and lighter. No tube or electron beams.
• Blocking/unblocking light through polarized crystals.
Crystals liquefy when excited by heat or E field.
• No refresh unless the screen changes.
• Color - 3 cells per pixel.
• After light passes through
first layer, the LCD
crystals change the plane
of the light’s vibration so
that it can pass through
the second layer.
LCD Displays
• When an electric field is passed through the
LCD layers, they align themselves with the
field and untwist.
• Polarised light is let through the crystals
unhindered but
becomes blocked
by the second
polarizer layer.
• The relevant pixel
then becomes
darkened out
CRT Displays
Advantages
• Fast response (high
resolution possible)
• Full color (large
modulation depth of Ebeam)
• Saturated and natural
colours
• Inexpensive, matured
technology
• Wide angle, high contrast
and brightness
Disadvantages
• Large and heavy (typ.
70x70 cm, 15 kg)
• High power consumption
(typ. 140W)
• Harmful DC and AC
electric and magnetic
fields
• Flickering at 50-80 Hz (no
memory effect)
• Geometrical errors at
edges
23
LCD Displays
Advantages
• Small footprint (approx 1/6 of
CRT)
• Light weight (typ. 1/5 of CRT)
• Low power consumption (typ.
1/4 of CRT)
• Completely flat screen - no
geometrical errors
• Crisp pictures - digital and
uniform colors
• No electromagnetic emission
• Fully digital signal processing
possible
• Large screens (>20 inch) on
desktops
Disadvantages
• High price (presently 3x CRT)
• Poor viewing angle (typ. +/- 50
degrees)
• Low contrast and luminance
(typ. 1:100)
• Low luminance (typ. 200 cd/m2)
24
Plasma Displays
Plasma Displays
• Plasma Display Panel Pros
– Large viewing angle
– Good for large-format displays
– Fairly bright
• Cons
–
–
–
–
Expensive
Large pixels (~1 mm versus ~0.2 mm)
Phosphors gradually deplete
Less bright than CRTs, using more power
Organic LED Arrays
• Organic Light-Emitting Diode (OLED) Arrays
– OLEDs function like regular semiconductor LEDs
– But they emit light
• Thin-film deposition of organic, light-emitting molecules through vapor
sublimation in a vacuum.
• Dope emissive layers with fluorescent molecules to create color.
Display Technologies:
Organic LED Arrays
• OLED pros:
–
–
–
–
–
–
–
Transparent
Flexible
Light-emitting, and quite bright (daylight visible)
Large viewing angle
Fast (< 1 microsecond off-on-off)
Can be made large or small
Available for cell phones and car stereos
• OLED cons:
– Not very robust, display lifetime a key issue
– Currently only passive matrix displays
• Passive matrix: Pixels are illuminated in scanline order, but the lack of
phospherescence causes flicker
• Active matrix: A polysilicate layer provides thin film transistors at each pixel,
allowing direct pixel access and constant illum.
Logical Input Devices
• A Classification of Input Devices to enable some
level of abstraction so they can be supported by
various graphics systems
• Diverse variations of input devices exist
• It is useful to classify object in terms of what it
does
• This provides level of abstraction
– Enhances portability (device independent design of
interface)
– Shields application from physical details
Classes of Logical Input Devices
• Locator/ Pick
– to indicate a position or orientation (subclasses)
– to select a displayed entity
• Valuator
– to input a single real number
• String
– To input a character string
– Returns key with specific meaning
– Letters, Numbers etc.
• Choice
– To select from a set of possible actions or choices
– Often return sensory feedback e.g. lights, clicks
Physical Input Devices
• Keyboard: string/choice input
• Gamepad: choice
• Mouse: pick/locator device with relative
positioning
• Tablet: pick/locator device with absolute
positioning
• Joystick/Trackball: locator/valuator
• Knobs (e.g. Volume control): valuator devices
31
Drivers
• Nowadays days we have a lot more diverse input
hardware, some of which don’t fit well into the Logical
Input Device Classes
– e.g.: bat, blow-suck tube, brain-computer interface, chording,
dataglove, electronic ink, eye-tracking, foot pedal, gesture,
joystick, light pen, motional input device, mouthstick, OCR,
paddle, pointing device, puck, stroke recognition, tongueactivated joystick, touch interactive display, touch tablet,
touchpad, trackball
• Logical Input Devices were invented for the GKS
standard graphics system. These days dedicated drivers
for all pieces of hardware can be written that talk more
directly to your Operating system.
32
Physical Input Devices
Other Common Input Devices
Data Gloves
Force Feedback Devices
• Combine input and
some degree of
output
• Useful for
navigating
simulated virtual
environments
• Range of feedback
types:
– Tactile Feedback
– Haptic Feedback
– Force Feedback
Eye Trackers
Motion Capture