Computer Graphics Raster Scan Display System Rasterization Refresh

  • Slides: 31
Download presentation
Computer Graphics Raster Scan Display System, Rasterization, Refresh Rate, Video Basics and Scan Conversion

Computer Graphics Raster Scan Display System, Rasterization, Refresh Rate, Video Basics and Scan Conversion

11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 2

11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 2

Refresh and Raster Scan Display System • Used in Television Screens. • Refresh CRT

Refresh and Raster Scan Display System • Used in Television Screens. • Refresh CRT is point plotting device. • It use refresh buffer to store display primitives(line, characters, shaded, patterned areas). • Refresh buffer store the primitives in terms of points and pixels components. • Display screen is a matrix of pixels. And each pixel brightness can be controlled. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 3

Refresh and Raster Scan Display System • Each point is an addressable point in

Refresh and Raster Scan Display System • Each point is an addressable point in screen and memory. • Line can not be drawn directly from one point to another. • This causes the effect of aliasing , jagging , staircase effect. • Refresh buffer is also called bit – plane. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 4

Rasterization • General Line • Special Line B A D B A C (a)

Rasterization • General Line • Special Line B A D B A C (a) General Line 11/29/2020 (b) Special Line Gaurav Raj, Lovely Professional University, Punjab 5

 • Raster is stored as a matrix of pixels representing the entire screen

• Raster is stored as a matrix of pixels representing the entire screen area. • Entire screen is scanned out sequentially by the video controller (One raster line at a time) • Raster lines are scanned from top to bottom and then back to the top. • The intensity of the beam decide the brightness of the pixel. • At least on memory – bit for each pixel is required. (bit - plane). 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 6

Basic Video Controller Refresh Operations Horizontal and Vertical Deflection Voltages Raster-Scan Generator X Register

Basic Video Controller Refresh Operations Horizontal and Vertical Deflection Voltages Raster-Scan Generator X Register Y Register Memory Address Pixel Register INTENSITY Frame Buffer 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 7

Architecture of Raster Display 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 8

Architecture of Raster Display 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 8

Raster Scan • With outline primitives • With filled primitives B 11/29/2020 Gaurav Raj,

Raster Scan • With outline primitives • With filled primitives B 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 9

Refresh Rate • A Typical Example – If one uses a 512 X 512

Refresh Rate • A Typical Example – If one uses a 512 X 512 element raster display, then 218 bits are required in a single bit plane. – Memory size required – 32 KB – A DAC is used to convert the bit values (0, 1) to analog signals for refreshing the screen. – Memory size required for N- bit gray level frame buffers: N Size in KB 11/29/2020 3 96 8 256 24 768 Gaurav Raj, Lovely Professional University, Punjab 10

Refresh Rate • Refresh Rate to avoid flickering – 60 Hz • If one

Refresh Rate • Refresh Rate to avoid flickering – 60 Hz • If one uses a 1024 X 1024 high resolution CRT: 11/29/2020 N Display Color Memory Size 1 8 24 32 Black & White 256 color 16 million color 128 KB 1 MB 3 MB 4 MB Gaurav Raj, Lovely Professional University, Punjab 11

Refresh Rate • Refresh Rate of CRT is the number of times the image

Refresh Rate • Refresh Rate of CRT is the number of times the image is drawn on the screen per second. • Reducing refresh rate increases flicker. • Horizontal Scan Rate is the number of scan lines the circuit drives a CRT display per second. HSR= Refresh Rate X number of scan lines • Resolution of screen is depend on spot size. • CRT resolution is not a function of bitmap resolution. • For large spot size, resolution decreases. • Horizontal Resolution depends on spot size and beam switching (ON/OFF) speed. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 12

Resolution Intensity distribution • Resolution is the number of pointes per inch or centimeter

Resolution Intensity distribution • Resolution is the number of pointes per inch or centimeter that can be plotted horizontally & vertically. • The smaller the spot size, the higher the resolution. • The higher the resolution, the better is the graphics system • High quality resolution is 1280 x 1024 • The intensity distribution of spots on the screen have Gaussian shape. • Adjacent points will appear distinct as long as their separation is greater than the diameter at which each spot has intensity of about 60% of that at the center of the spot. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 13

Persistence • How long small spots continue to emit light after the beam is

Persistence • How long small spots continue to emit light after the beam is moved. How long it takes to the emitted light from the screen to decay to one-tenth of its original intensity. – Lower persistence requires high refresh rate & it is good for animation – High persistence is useful for displaying highly complex static picture. – Graphics monitors are usually constructed with 10 to 60 microseconds. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 14

Bandwidth Of Display • The rate at which the beam can be turned ON

Bandwidth Of Display • The rate at which the beam can be turned ON to OFF and vice-versa. • For N pixel per scan line, it is necessary to turn the electron gun at maximum rate of N/2 times ON and N/2 times OFF. • This will create alternative black and white lines on the screen. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 15

1 -Bit Memory, Monochrome Display (Bitmap Display) 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab

1 -Bit Memory, Monochrome Display (Bitmap Display) 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 16

3 -Bit Color Display 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 17

3 -Bit Color Display 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 17

True Color Display n 24 8 bitplanes, 8 bits per color gun. n 224

True Color Display n 24 8 bitplanes, 8 bits per color gun. n 224 = 16, 777, 216 8 8 Red Green Blue 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 18

 • Horizontal Retrace : As the electron bean reached at right edge of

• Horizontal Retrace : As the electron bean reached at right edge of the screen, it is made invisible and rapidly return to left edge. • Time taken for horizontal retrace is 17% of allotted to scan horizontal line. • Vertical Retrace: Return the beam from bottom left edge to top right edge. – Odd field Vertical Retrace – Even field Vertical Retrace 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 19

Raster Scan Horizontal Retrace Vertical Retrace Scan Line 11/29/2020 Gaurav Raj, Lovely Professional University,

Raster Scan Horizontal Retrace Vertical Retrace Scan Line 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 20

Video Basic Standards • NTFS: (Amarican Standerd Video) has 525 horizontal lines with a

Video Basic Standards • NTFS: (Amarican Standerd Video) has 525 horizontal lines with a frame rate of 30 fps. • Viewing aspect ratio 4: 3 • Each frame has two fields, each containing half the picture. • Fields are interlaced or interwoven. • Fields are presented alternatively every other 1/60 th of second. • One field contain odd scan line(1, 3, 5, …). • Other field contain even scan line (0, 2, 4, 6, …. ). 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 21

Computer colour system … let’s try to we think this way: WHITE All the

Computer colour system … let’s try to we think this way: WHITE All the light is reflected No light is absorbed BLACK No light is reflected All the light is absorbed YELLOW Yellow light is reflected The rest of light is absorbed Conclusion: If the model is based on reflection, then black is 0 (RGB). If the model is based on absorption, then black is 1 (CMY). 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 22

RGB R G B RGB (Red, Green, Blue) Red (255, 0, 0) Green (0,

RGB R G B RGB (Red, Green, Blue) Red (255, 0, 0) Green (0, 255, 0) Blue (0, 0, 255) Each colour has a range from 0 to 255, i. e. 256 levels (255, 0) (215, 185, 229) There are 256 x 256 = 16, 777, 216 possible colors. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 23

The colors may also be written as range of: • binary numbers from 0000

The colors may also be written as range of: • binary numbers from 0000 to 1111 • hexadecimal from 00 to FF (255, 255) (#FFFFFF) (0, 0, 0) (#000000) (255, 0) (#FFFF 00) 11/29/2020 (56, 108, 98) (#386 C 62) Gaurav Raj, Lovely Professional University, Punjab CMY system 24

PIGMENT 1. A pigment is a material that changes the color of reflected or

PIGMENT 1. A pigment is a material that changes the color of reflected or transmitted light as the result of wavelength-selective absorption. 2. This physical process differs from fluorescence, phosphorescence, and other forms of luminescence, in which a material emits light. 3. Many materials selectively absorb certain wavelengths of light. 4. Materials that humans have chosen and developed for use as pigments usually have special properties that make them ideal for coloring other materials. 5. A pigment must have a high tinting strength relative to the materials it colors. It must be stable in solid form at ambient temperatures. 6. Pigments are used for coloring paint, ink, plastic, fabric, cosmetics, food and other materials. 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 25

How colours and pigments combine RGB describes colours: • R – red • G

How colours and pigments combine RGB describes colours: • R – red • G – green • B – blue CMYK describes pigments: • Y – yellow • M – magenta (pink) • C – cyano (aqua) • K – black (key colour) 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 26

Hue, Saturation, and Brightness/Lightness = HSL/HSB Saturation change HSL (42, 155, 255) RGB (255,

Hue, Saturation, and Brightness/Lightness = HSL/HSB Saturation change HSL (42, 155, 255) RGB (255, 0) HSL (42, 255, 128) HSL (42, 114, 255) HSL (x, x, 255) = full light HSL (42, 0, 255) HSL (42, 255, 226) HSL (x, x, 0) = no light HSL (42, 255, 114) Brightness change HSL scheme is an alternative to RGB to express colours 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 27

Colour depth • 1 pixel = 1 bit, i. e. it can be 0

Colour depth • 1 pixel = 1 bit, i. e. it can be 0 or 1 to express only black or white colors • The image consisting of 1 -bit pixels is called: – 1 -bit image or bi level image or black-and-white image – If we have a two-megapixel image (1, 920, 000 pixels), then such an image will have 1, 920, 000 bits, i. e. 240, 000 bytes (240 KB) 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 28

Colour depth • 1 pixel = 8 bits (= 1 byte), i. e. we

Colour depth • 1 pixel = 8 bits (= 1 byte), i. e. we can express a palette of 256 different colors – Then the above two-megapixel image will have 1. 92 MB • 1 pixel = 24 bits (= 3 bytes), i. e. each byte can express 256 colors, i. e. altogether 16, 777, 216 possible colors – Then the above two-megapixel image will have 5. 76 MB 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 29

Colour depth The color depth says in how deep the pixel is, i. e.

Colour depth The color depth says in how deep the pixel is, i. e. it informs about the number of possible colors. 24 -bit 11/29/2020 4 -bit 8 -bit 12 -bit Gaurav Raj, Lovely Professional University, Punjab 30

However, if the color is special… • If the R, G, and B components

However, if the color is special… • If the R, G, and B components have equal values, e. g. (57, 57) … then the pixel will be grey • Such an image will not have 16 million colors, but only 256 shades of grey • As we need only one byte to express this, the image will be three times smaller than the full (true) color image • The image in shades of grey is a color image, we should not talk about it as about black-and-white image (as we do in the field of non-color photographs) 11/29/2020 Gaurav Raj, Lovely Professional University, Punjab 31