Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 1. Objectives We explore what computer graphics is about and survey some application areas We start with a historical introduction Course Instructor:

Similar presentations


Presentation on theme: "Lecture 1. Objectives We explore what computer graphics is about and survey some application areas We start with a historical introduction Course Instructor:"— Presentation transcript:

1 Lecture 1

2 Objectives We explore what computer graphics is about and survey some application areas We start with a historical introduction Course Instructor: Sadia Arshid2

3 Computer graphics deals with all aspects of creating images with a computer Hardware Software Applications Course Instructor: Sadia Arshid3

4 Example Where did this image come from? What hardware/software did we need to produce it? Course Instructor: Sadia Arshid4

5 Preliminary Answer Application: The object is an artist’s rendition of the sun for an animation to be shown in a domed environment (planetarium) Software: Maya for modeling and rendering but Maya is built on top of OpenGL Hardware: PC with graphics card for modeling and rendering Course Instructor: Sadia Arshid5

6 Use of Computer Designed Pictures Art, Entertainment and publishing Movie production, Animation and special effects Computer Games Browsing on world wide web Paint System Course Instructor: Sadia Arshid6

7 Use of Computer Designed Pictures Monitoring a process Displaying simulations Computer aided designs Scientific analysis and visualization Course Instructor: Sadia Arshid7

8 Computer Graphics & Image Processing Computer Graphics-> create pictures and images Synthesize them on basis of some description Model Image Processing-> Improve or alter the images Processing can remove noise or enhance contrast Enhance certain features. Course Instructor: Sadia Arshid8

9 Computer Graphics & Image Processing Out put Input Imagedescription imageImage ProcessingPattern Recognition DescriptionComputer GraphicsData Processing Course Instructor: Sadia Arshid9

10 Elements of pictures Created in Computer Graphics Basic objects are Poly line Text Filled regions Raster images Course Instructor: Sadia Arshid10

11 Elements of pictures Created in Computer Graphics Poly Lines Connected sequence of straight lines Line Drawings Pictures made up of poly lines If several lines in poly line Each line is called an edge Two adjacent lines meet at vertex A polyline is closed if it ends where it starts called polygon It is simple if it does not self-intersect simple polygon(Jordan polygons) Well defined two regions(inside and out side) convex polygon. Course Instructor: Sadia Arshid11

12 Course Instructor: Sadia Arshid12

13 Attributes of Lines & Poly Lines Color Thickness Type( dashed, solid, dotted) Manner in which thick edges are blend Course Instructor: Sadia Arshid13

14 Filled Region Shape filled with some color or pattern. Boundary of filled shape is a polygon Attributes Enclosing border Pattern color Course Instructor: Sadia Arshid14

15 Course Instructor: Sadia Arshid15

16 Text Text can be thought of as a sequence of characters in some font. Some Graphic devices has two modes Text Mode Graphic Mode Text Mode Use for simple input & out put Characters to control operating system or edit code in program Built in character generator Capable of drawing Alphabets, Numeric & special characters Place data on pre defined grid Do not support images or tables Course Instructor: Sadia Arshid16

17 Graphic Mode Richer set of character shapes Characters can be placed arbitrarily Attributes: Font Face Weight Size Style Spacing Orientation Course Instructor: Sadia Arshid17

18 Course Instructor: Sadia Arshid18

19 Raster Images Image is made up of many cells, in different shades. Each cell is known as pixel. Stored in memory as 2-dimensional array of square/ rectangle cells pixel maps/bitmap Course Instructor: Sadia Arshid19

20 How Raster Images are created Hand Designed Images Designer figure out value of each pixel and store it in memory Paint program Computed Images Algorithm is used to render a scene. Scanned Images Digitization Course Instructor: Sadia Arshid20

21 Representation of Shades in Raster images Monochrome raster images Pixel can contain one of two values in a raster image(bi- level). Grey level images Pixel depth( number of bits needed to represent grey levels) n bit quantity has 2 n possible values Course Instructor: Sadia Arshid21

22 Grey Scale Quantization Let we have original image using 8 bit per pixel Display it or alter it with some less value per bit Either display image is not capable of displaying 256 values Image takes too much memory This loss is hardly noticeable if we use 5 or 6 bits per pixel Banding Course Instructor: Sadia Arshid22

23 Color Raster Images Commonly each pixel is Ordered triple with red, green and blue value Number of bits used to represent color of each pixel is called Color depth. Color depth of 3 allows one bit for each color. True color image- color depth of 24 bit Course Instructor: Sadia Arshid23

24 Digitization Digitization involves Quantization Converting set of “continues values” to discrete Decide number of bits required to save each pixel value Sampling Digitizing coordinate values Course Instructor: Sadia Arshid24

25 Quantization Effect Original image 256 levels, 128 levels,64levels,32levels,16levels,8levels, 4levels, 2levels Course Instructor: Sadia Arshid25

26 Quantization Effect 8 bits 4 bits 2 bits 1 bit Course Instructor: Sadia Arshid26

27 Sampling Effect (a) 1024*1024, 8-bit image. (b) 512*512 image resampled into 1024*1024 pixels by row and column duplication. (c) through (f) 256*256, 128*128, 64*64, and 32*32 images resampled into 1024*1024 pixels. Course Instructor: Sadia Arshid27

28 Resolution Number of pixels per inch(PPI) or DPI Higher the resolution, greater number of pixels Smaller resolution, smaller digital Image Keep balance between resolution and image size. Course Instructor: Sadia Arshid28

29 Vector graphics Geometrical primitives such as points, lines, curves, and shapes or polygon(s), Based on mathematical equations, to represent images in computer memory They can be enlarged, rotated, stretched without loss of picture resolution Course Instructor: Sadia Arshid29

30 Vector Images vs Raster images Vector Drawing Applications(Path Based) Create and modify technical diagrams ie houses, cars Resolution independent While zooming edges are always sharp Raster Painting Applications(Pixel Based) Create art work Zooming based on interpolation Course Instructor: Sadia Arshid30

31 Vector images Usually have no back ground In appropriate for photo realistic images Raster images Pixels in grid Resizing reduce quality Minimal support for transparency Course Instructor: Sadia Arshid31

32 Course Instructor: Sadia Arshid32

33 Course Instructor: Sadia Arshid33

34 Vector Displays Early computer displays: basically an oscilloscope Control X,Y with vertical/horizontal plate voltage Intensity or brightness of the display is sometimes called the Z axis. Course Instructor: Sadia Arshid34

35 Vector Drawing’s Commands Course Instructor: Sadia Arshid35

36 Each line segment to be displayed takes very few data values Vector displays can draw a picture very rapidly Each XY pair is used to generate deflection voltages which will sweep the beam across the face of screen When the beam strike the phosphor, visible light is produced for certain time Course Instructor: Sadia Arshid36

37 Vector Displays: Refresh Rate Screen refresh every 1/30th of a second assume approximately 100 microseconds per command 1/30th second = 33 milliseconds = microseconds Therefore this Vector Display can only process approximately 330 commands before flicker starts. Course Instructor: Sadia Arshid37

38 Vector Displays Disadvantages Complex object drawing is difficult list of commands becomes very long Complex scenes visible flicker first line may have faded out before last is drawn Vector displays can not show smoothly shaded regions Scanned images Cross hatching effect Course Instructor: Sadia Arshid38

39 Raster Displays Pen plotters move the pen invisibly on the papers on the spots specify by computer Types Flatbed Plotters Move pen in two directions on stationary sheet Drum Plotters Move paper back and forth to provide one direction in motion Move pen back and forth to provide other direction. Course Instructor: Sadia Arshid39

40 Raster Displays Raster: A rectangular array of points or dots Pixel: One dot or picture element of the raster Scan line: A row of pixels Course Instructor: Sadia Arshid40

41 Examples Video Monitor Flat panel Laser printer Course Instructor: Sadia Arshid41

42 Dot matrix Ink jet plotter Film recorder Course Instructor: Sadia Arshid42

43 Line/vector displayraster display no pixelsarray of pixels Course Instructor: Sadia Arshid43

44 Fixed scan pattern left to right, top to bottom To paint the screen, computer needs to synchronize with the scanning pattern Framebuffer special memory to buffer image with scan-out synchronous to the raster display device. Region of memory should be large enough to hold all pixel values Graphic card House the memory require for frame buffer Course Instructor: Sadia Arshid44 Raster Displays

45 Scanning process RGB Frame buffer Course Instructor: Sadia Arshid45

46 Display Technologies Cathode Ray Tubes (CRTs) Most common display device today Evacuated glass bottle Electrons pulled towards anode focusing cylinder Vertical and horizontal deflection plates Beam strikes phosphor coating on front of tube Course Instructor: Sadia Arshid46

47 Course Instructor: Sadia Arshid47

48 Color CRTs have Three electron guns A metal shadow mask to differentiate the beams Course Instructor: Sadia Arshid48

49 Phosphers Flourescence: Light emitted while the phospher is being struck by electrons Phospherescence: Light emitted once the electron beam is removed emits visible light for a certain period after the bombardment has ceased Persistence: Time from the removal of the excitation to the moment when phosphorescence has decayed to 10% of the initial light output Long persistence -> image smears as picture is moved on screen. Short persistence -> no smearing as image moves but more refreshing needed Course Instructor: Sadia Arshid49

50 Raster Displays Frame must be “refreshed” to draw new images As new pixels are struck by electron beam, others are decaying Electron beam must hit all pixels frequently to eliminate flicker Critical fusion frequency Typically 60 times/sec Varies with intensity, individuals, phosphor persistence, lighting... Scan controller scans quickly through the entire memory of frame buffer Sending each pixel value to its proper spot on screen surface Course Instructor: Sadia Arshid50

51 Index Colour and lookup table Suppose we have Color depth 6 Each pixel go through an intermediate step Before they drive CRT These bits are used as an index in to a table of 2 n values Course Instructor: Sadia Arshid51

52 Color is expensive … The more color you want, the more bits you will need for each pixel Exercise: 1024 x 1280 screen with 24 bits per pixel, how large is the frame buffer? 1024 x 1280 x 24 / 8 = 4M Byte Course Instructor: Sadia Arshid52

53 Color Lookup Table only 3 bits per pixel But I insist on having high quality pictures … Use Color Look Up Table (LUT) 3 bits/pixel frame buffer R G B You can still have 24 bits in each of the color table entries bit wide Course Instructor: Sadia Arshid53

54 Colour Index Framebuffer Course Instructor: Sadia Arshid54

55 LUT memory If Raster display has color depth= b bits Each LUT entry is w bits wide then System can display 2 w colors 2 b at one time So it require very little memory Only 2 b words of w bits each System have capability of 24 bit colors Frame Buffer 1024 x 1280 x 8 / 8 = 1M Byte LUT 768 bytes Course Instructor: Sadia Arshid55

56 Summarizing LUT System has color depth of b bits. LUT entry is w bit wide System will display: 2 w colors 2 b at one time Relationship b/w bitplanes and width of LUT W is multiple of 3 derive each DAC. Memory required by LUT 2 b *w/8 Storage required by System b/3*rows *cols + size of LUT Course Instructor: Sadia Arshid56

57 Advantage To reduce cost of memory Increasing b increases amount of memory needed for the frame buffer Course Instructor: Sadia Arshid57

58 Display Technology: LCDs Liquid Crystal Displays (LCDs) organic molecules naturally in crystalline state that liquefy when excited by heat or E field Crystalline state twists polarized light 90º. Course Instructor: Sadia Arshid58

59 Display Technology: LCDs Converts electric field to visible dots Each pixel is addressed by horizontal and vertical grid wire Course Instructor: Sadia Arshid59

60 Active matrix panels Are LCD panels Have tiny transistors at each pixel Transistors responds to electric field adjusts the liquid crystal by an amount proportional to the field Allow the display of different level of brightness Course Instructor: Sadia Arshid60

61 CRT uses 2 patterns Left to right Top to bottom LCD don’t use it Display whole screen at once Transistors provide some “memory” that holds the crystals in their adjusted states so that the display need not be refreshed This produce much brighter display Course Instructor: Sadia Arshid61

62 Display Technology Plasma Display geometry Neon bulb turn on and off by electric field DMD / DLP optical semiconductor, called a Digital Micromirror Device (DMD), uses mirrors made of aluminum to reflect light to make the picture Organic LED Arrays It consists of a series of organic layers between two electrical contacts (electrodes). Each layer is deposited on the other, creating a single unit. Course Instructor: Sadia Arshid62

63 Hard Copy Raster Devices Film Recorder Strip of photographic film electron beam exposes as it sweeps over it in raster pattern Have their own frame buffer or camera mounted on CRT Electronic Hard copy of Image Laser Printer Sweep a laser beam on internal defined buffer Surface becomes electronically charged causing toner to adhere to spots. Course Instructor: Sadia Arshid63

64 InkJet Plotter A tiny nozzle sweeps over the paper and squirts proper color of ink at each pixel position. Post Script Language Printer are equipped with micro processor. Generate high quality text and graphics Course Instructor: Sadia Arshid64

65 References Computer Graphics using open GL( chapter 1) by F.S Hill InterNET Resources Howstufff works.com/lcd.htm & A lot More Course Instructor: Sadia Arshid65


Download ppt "Lecture 1. Objectives We explore what computer graphics is about and survey some application areas We start with a historical introduction Course Instructor:"

Similar presentations


Ads by Google