ce-201 lect_3
Post on 14-Jul-2016
224 Views
Preview:
DESCRIPTION
TRANSCRIPT
GRAPHIC SYSTEMS
1
Lecture-3
Display Systems
Random Scan Displays
Raster Scan Displays
2
Random Scan Displays
Raster-‐Scan Display
• Raster: A rectangular array of points or dots
• Pixel: One dot or picture element (pel) of the raster
• Scan line: A row of pixels
3
4
Raster-‐Scan Display…1 • The electron beam is swept across the screen, one row at a
Eme from top to bottom. As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots.
5
Raster-‐Scan Display…2 • Picture definiEon is stored in a memory area called the
refresh buffer or frame buffer, which holds the set of intensity values for all the screen points.
• Stored intensity values are then retrieved from the refresh buffer and painted on the screen one row at a time as shown in the figure.
Display of an object as a set of discrete points across each scan line
6
Raster-‐Scan Display…3 • The intensity range of pixel posiEons define capability
of raster system. The frame buffer may be called: – Bitmap: with one bit per pixel, ex. Black and white system, a bit value of 1 indicates that the electron beam is to be turned on and 0 indicates off.
– Pixmap: with mulEple bits per pixel, 24 bits per pixel in high definiEon systems
A system with 24 bits per pixel and a screen resoluEon 1024 by 1024 requires 3 MB (24*1024*1024) storage for frame buffer.
• Refreshing on raster-‐scan display is carried out at a rate of 60 to 80 frames per second (Hz). This creates new image. Refresh rate 1/60 to 1/80 second.
7
Raster-‐Scan Display…4
• Scanning (leW to right, top to bottom) – Vertical Sync Pulse: Signals the start of the next field – Vertical Retrace: Time needed to get from the bottom of
the current field to the top of the next field – Horizontal Sync Pulse: Signals the start of the new scan
line
– Horizontal Retrace: The time needed to get from the end of the current scan line to the start of the next scan line
Refresh rate for 512×512 monochrome raster with an access rate of 200 nanosecond per pixel =1/(512*512*200*10-9)=19 frame/s (approx.)
8
Raster-‐Scan Display…5
Raster-‐Scan Display…6 § Interlace procedure is used in slow refreshing rate display
device like TV
§ Flickers are noticed for scanning all the pixels of screen at low refreshing rate like 30 frames/second.
§ To reduce flicker, divide each frame into two “fields” of odd and even lines. This reduces the scan time of screen from top to bottom to half as the beam will sweep every alternate scan line in one pass in 1/60s.
9
1/60 Sec 1/60 Sec Field 1 Field 2
Frame
10
11
PIXELS
• An image is composed of discrete pixels or picture elements.
• These are arranged in a row-‐column fashion to form a rectangular area (raster).
• The total number of pixels in a image is a funcEon of the size of the image and number of pixels per unit length in the horizontal as well as verEcal direcEon (ResoluEon).
• Image size is defined as total number of pixels in the horizontal direcEon Emes the total number of pixels in the verEcal direcEon (512 x 512, 640 x 480, 1024 x 768).
Pixels…1
• Size of image, at 400 pixels per inch for 640 x 480 image = 640/400 x 480/400 = 1.6 x 1.2 inch
• Aspect raEo, for 640 x 480 image = 640/480 = 4/3 • Pixel at lower leW corner of an image is considered to be at
the origin (0,0) of a pixel coordinate system.
12
13
Random Scan Display
§ In random scan display unit, a CRT has the electron beam directed only to the parts of the screen where picture is to be drawn.
§ Draws a picture one line at a time: also called vector or stroke-‐wri-ng or calligraphic displays.
§ The component lines of a picture can be drawn and refreshed in a specified manner (see next figure)
§ Refresh rate depends on the number of lines to be displayed
§ Refresh display file or buffer or list or program is a memory area which stores a set of line drawing commands.
Random Scan Display
14
In random scan display an electron beam is deflected from endpoint to end-‐point. The order of deflecEon is dictated by the arbitrary order of the display commands. The display must be refreshed at regular intervals – minimum of 30 Hz (fps) for flicker-‐free display
Random Scan Display
15
16
Random Scan Display
• Advantages
– It has higher resoluEon than raster-‐scan systems. – Lines drawn are smoother in contrast to raster system, which
produces jagged lines, plobed as discrete point sets.
• Disadvantages
– Suitable only for line drawings like wireframes and can not display realisEc shaded scenes.
– Complex scenes cause visible flicker
17
Raster Scan vs. Random Scan
Base of Difference
Raster Scan System Random Scan System
Electron Beam
The electron beam is swept across the screen, one row at a Eme, from top to bobom.
The electron beam is directed only to the parts of screen where a picture is to be drawn.
ResoluEon Its resoluEon is poor because raster system produces zig-‐zag lines that are plobed as discrete point sets.
Its resoluEon is good because this system produces smooth lines drawings because CRT beam directly follows the line path.
Picture DefiniEon
Picture definiEon is stored as a set of intensity values for all screen points, called pixels in a refresh buffer area.
Picture definiEon is stored as a set of line drawing instrucEons in a display file.
RealisEc Display
The capability of this system to store intensity values for pixel makes it well suited for the realisEc display of scenes contain shadow and color pabern.
These systems are designed for line-‐drawing and can’t display realisEc shaded scenes.
Draw an Image
Screen points/pixels are used to draw an image.
MathemaEcal funcEons are used to draw an image.
Raster Scan Systems
• InteracEve raster graphics systems employ several processing units:
– CPU – Display controller or video controller
typically
18
Raster Scan Systems
§ A fixed area of the system memory is reserved for the frame buffer.
§ Video controller is frame buffer.
given direct access to the
19
Raster Scan Systems
§ Frame buffer locaEons and corresponding screen posiEons are referenced in Cartesian coordinates.
§ The origin of the coordinate system is usually specified in the lower leW corner.
§ Screen surface is represented as first quadrant of a two dimensional system.
§ Two registers (x & y) are used to store the coordinates of the screen pixels.
20
21
Image File Formats
• Standardized means of organizing and storing images. • These are digital image formats basically used to store photographs and images. Image files are composed of: – Pixels – Vector (geometric) data rasterized to pixels for display in vector graphic display
• Pixels composing an image are ordered as a grid (columns and rows) and its number represents the brightness and colour.
22
Image File Sizes
• Expressed as number of bytes, the size increasing with the number of pixels and the colour depth of a pixel. – Greater pixels means greater columns and rows, defining image resoluEon and size
– Greater colour depth is defined by bits and bytes of a pixel. Single byte, 8 bit pixel stores 256 colours and 3 byte, 24 bit pixel stores 16,000,000 colours (termed as true colours)
– E.g. 8 megapixel digital camera requires 24,000,000 bytes of memory to store an image in true colour (each pixel using 3 bytes to store true colour)
23
Image Compression
• Compression is used to reduce the size of an image and hence the storage requirement.
• This is based on image file compression algorithms. These are of two types –
– Lossless Compression: When image quality is valued above file size, lossless algorithms are typically chosen.
– Lossy Compression: Lossy compression algorithms take advantage of the inherent limitaEons of the human eye and discard invisible informaEon. Most lossy compression algorithms allow for variable quality levels (compression) and as these levels are increased, file size is reduced.
• At the highest compression levels, image deterioraEon becomes noEceable as "compression arEfacEng“ in the case of lossy compression.
Image Compression…2
LOSSLESS COMPRESSION
24
Image Compression…3
LOSSY COMPRESSION
25
26
Major File Formats
• Raster formats – These formats store images as bitmaps – E.g. JPEG, PNG, TIFF, RAW, GIF, BMP, PPG, PPM, PBM, PNM
• Vector formats – These formats contain a geometric descripEon that can be rendered smoothly at any desired display size. These formats can contain pixel data as well (texture mapping of 3-‐D images)
– E.g. CGM, SVG, Encapsulated Post script, PDF, SWF, Window Metafile
27
Raster Formats
• JPEG-‐ Joint Photographic Experts Group • TIFF -‐ Tagged Image File Format • GIF-‐Graphics Interchange Format • BMP-‐bitmap • PNG-‐ Portable Network Graphics • Raw –Raw Image formats • PPM-‐portable pixmap • PGM-‐portable graymap • PBM-‐portable bitmap • PNM -‐portable anymap
28
Vector Formats
• CGM-‐ Computer Graphics Metafile • SVG-‐ Scalable Vector Graphics • EPS-‐ Encapsulated PostScript • PDF -‐ Portable Document Format • SWF-‐Shock Wave Flash • WMF-‐ Windows Meta File
Image File Structure
• Consist of two parts: – Header – Footer
Format / version identification Image width and height in pixels Image type Image data format Compression type Etc.
Colour map (if any) Pixel values
Header
29
Image data
30
Image File Structure…1
• Header – IdenEficaEon of format is in the form of a binary code or ASCII string
– Number of pixels define the width and height of an image – Common image types are black and white (1 bit per pixel), 8-‐bit grey scale (256 levels along the grey axis), 8-‐bit colour, and 24-‐bit colour
– Image data format specifies the order in which pixel values are stored in the image data secEon
• Common order is leW to right and top to bobom / bobom to top • It also specifies whether the RGB values are interlaced (R,G,B,R,G,B,..) or non-‐interlaced (R,R,R,..,G,G,G,..,B,B,B,..)
top related