CAF302-Unit1.pptx
Document Details
Uploaded by Deleted User
Full Transcript
Computer Graphics (CAF302) UNIT-1 1 Introduction Computer graphics is an art of drawing pictures, lines, charts, etc using computers with the help of programming. Computer graphics is made up of number of pixels. Main tasks: Modeling:...
Computer Graphics (CAF302) UNIT-1 1 Introduction Computer graphics is an art of drawing pictures, lines, charts, etc using computers with the help of programming. Computer graphics is made up of number of pixels. Main tasks: Modeling: creating and representing the geometry of objects in the 3D world Rendering: generating 2D images of the objects Animation: describing how objects change in time 2 Advantages High quality graphics display provides best way to communicate with computer. It is possible to produce animation. Can be used to control animation such as speed, total scene in view etc. Provides facility of dynamic update which can be used to change shape, color and other properties of object in view. With the development in DSP, it can provide audio feedback along with the video. 3 Application Areas Computer Aided Design(CAD) Presentation Graphics Computer Art Education and training Visualization Image processing Entertainment Movies Industry Gaming Industry Medical field Graphical User Interface(GUI) 4 CAD Major use of computer graphics is in design process, particularly for engineering and architectural systems. This include design of buildings, automobiles, aircraft etc. 5 Presentation Graphics Used to summarize the financial, mathematical, scientific and economic data. Typical examples are bar charts, line graphs, pie charts etc. 6 Computer Art Artist uses special purpose hardware and programs that provides facilities for designing object shapes and specifying object motion. For Example pixel paint, super paint etc. 7 Education and training Computer generated models of physical, financial and economic system are often used as educational aids. Various kinds of simulators program can be used to provide the trainings. E.g. automobile driving simulator. 8 Visualization Various techniques can be used to represent the large amount of data obtained from scientific, medical or business analysis. These includes color coding, contour plots, graphs, charts etc. 9 Image Processing Computer graphics is used to create pictures. Image processing applies techniques to modify or interpret the existing pictures. It is used to: Improve picture quality Machine perception of visual information 10 Entertainment Computer graphics methods are now commonly used in making motion pictures, music videos, games and televisions shows. Sometime graphics pictures are displayed by themselves and sometime combined with the actors and live scenes. 11 Medical Field Computer graphics can also be used to represent the various internal parts and process of the human body. 12 GUI It is the interface of the software that communicates with the user with help of some input devices. It contains number of windows, menus and icons for fast selection of processing options. 13 Active and Passive Graphics Non-Interactive or Passive Computer Graphics: In non-interactive computer graphics, the picture is produced on the monitor, and the user does not have any controlled over the image, i.e., the user cannot make any change in the rendered image. One example of its Titles shown on T.V. Non-interactive Graphics involves only one-way communication between the computer and the user. 14 Active and Passive Graphics Interactive Computer Graphics: In interactive Computer Graphics user have some controls over the picture, i.e., the user can make any change in the produced image. One example of it is the ping-pong game. Interactive Computer Graphics require two-way communication between the computer and the user. 15 CG Basic Terms Pixel: Pixel is the smallest element of an image. Each pixel correspond to any one value. In an 8-bit gray scale image, the value of the pixel between 0 and 255. The value of a pixel at any point correspond to the intensity of the light photons striking at that point. Each pixel store a value proportional to the light intensity at that particular location. 16 CG Basic Terms Resolution: In pixel resolution, the term resolution refers to the total number of count of pixels in an digital image. For example. If an image has M rows and N columns, then its resolution can be defined as M X N. The first number the width of the picture, or the pixels across columns, and the second number is height of the picture, or the pixels across its width. 17 CG Basic Terms Aspect ratio: Aspect ratio is the ratio between width of an image and the height of an image. It is commonly explained as two numbers separated by a colon. This ratio differs in different images, and in different screens. Aspect ratio maintains a balance between the appearance of an image on the screen, means it maintains a ratio between horizontal and vertical pixels. 18 CG Basic Terms Frame Buffer: It is a large contiguous piece of memory where the image is stored as a pattern of bits. Amount of frame buffer memory required depends on the resolution of the screen. 19 Pointing and Positioning Technique Pointing technique refers to look at the items already on the screen whereas the positioning technique refers to position the item on the screen to a new position, i.e., the old current position. The user indicates a position on the screen with an input device, and this position is used to insert a symbol. There are various pointing and positioning devices which are discussed below: 1. Light Pen 2. Mouse 20 3. Tablet Pointing and Positioning Technique Light Pen: It is a pointing device. When light pen is pointed at an item on the screen, it generates information from which the item can be identified by the program. It does not have any associated tracking hardware instead tracking is performed by software, making use of the output function of the display. 21 Pointing and Positioning Technique Mouse: It is a positioning device which consists of a small plastic box resting on two metal wheels whose axes are at right angles. Each wheel of the mouse is linked to a shaft encoder that delivers an electrical pulse for every incremental rotation of the wheel. As the mouse is rolled around on a flat surface, its movement in two orthogonal directions is translated into rotation of the wheels. 22 Pointing and Positioning Technique Tablet: It is also a positioning device and is used to describe a flat surface separate from the display, on which the user draws with a stylus. Joystick: A joystick consists of a small that is used to steer the screen cursor around. The distance that the stick is moved in any direction from its center position corresponds to the screen- cursor movement in that direction. 23 Pointing and Positioning Technique Trackball and spaceball: Trackball is a ball that can be rotated with the fingers to produces screen-cursor movement potentiometers, attached to the ball, measure the amount and direction of rotation. Trackballs are after mounted on keyboards, whereas space-ball provides six degrees of freedom. Spaceballs is used for three-dimensional positioning and selection operation in virtual reality system, modeling, animation, CAD and other applications. 24 Computer Graphics Types There are two kinds of computer graphics: 1. Raster (composed of pixels) 2. Random/Vector (composed of paths) Raster images are more commonly called bitmap images. A bitmap image uses a grid of individual pixels where each pixel can be a different color or shade. Bitmaps are composed of pixels. Vector graphics use mathematical relationships between points and the paths connecting them to describe an image. Vector graphics are composed of25 Computer Graphics Types Bitmap Image Vector Graphic 26 Raster Scan Display Raster: A rectangular array of points or dot. An image is subdivided into a sequence of (usually horizontal) strips known as "scan lines“ which can be further divided into discrete pixels for processing in a computer system. A raster image is a collection of dots called pixels 27 Raster Image 28 Raster Working In a raster scan system, the electron beam is swept across the screen, one row at a time 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. The return to the left of the screen, after refreshing each scan line is called Horizontal retrace. At the end of each frame the electron beam returns to the top left corner of the screen to begin the next frame is called Vertical retrace. 29 Raster Working 30 Raster Working 31 Raster Working 32 Raster Working Picture definition is stored in a memory area called the refresh buffer or frame buffer. Refresh buffer or frame buffer is memory area that holds the set of intensity values for all the screen points. Stored intensity values are retrieved from refresh buffer and painted on the screen, one row (scan line) at a time. 33 Raster Working The quality of a raster image is determined by the total number pixels (called resolution), and the amount of information in each pixel (called color depth). A black-and-white system: each screen point is either on or off, so only one bit per pixel is needed to control the intensity of screen positions. Such type of frame buffer is called Bit map High quality raster graphics system have 24 bits per pixel in the frame buffer (case of a full color system or a true color system) 34 Raster Applications Suited for realistic display of screens Home television, computer, printers create their images basically by raster scanning. Laser printers use a spinning polygonal mirror (or an optical equivalent) to scan across the photosensitive drum and paper movement provides the other scan axis Common raster image formats include BMP (Windows Bitmap), JPEG (Joint Photographic Expert Group), GIF (Graphics Interchange Format), PNG (Portable Network Graphic), PSD (Adobe PhotoShop) 35 Raster Disadvantage To increase the size of a raster image, the pixels defining the image are to be increased in either number or size, spreading the pixels over a larger area causing the image to lose details and clarity. Produces jagged lines that are plotted as discrete points. 36 Interlacing Interlacing (also known as interleaving) is a method of encoding a bitmap image such that a person who has partially received it sees a degraded copy of the entire image. On some raster systems, each frame is displays in two passes using an interlaced refresh procedure. Interlacing is primarily used for slower refresh rates. 37 Interlacing 38 Raster Scan Architecture In addition to the central processing unit (CPU), a special processor, called the video controller or display controller, is used to control the operation of the display device. A fixed area of the system memory is reserved for the frame buffer, and the video controller is given direct access to the frame buffer memory. Operation performed: 1. Refreshing operation 2. Transformation (Areas of the screen can be enlarged, reduces, or moved during the refresh cycles) 39 Raster Scan Architecture 40 Raster Refresh Process Raster Scan Generator x Register y Register Memory Address Frame Buffer Intensity 41 Random Scan Display Random Scan System uses an electron beam which operates like a pencil to create a line image on the CRT screen. 42 Random Scan Working When operated as a random-scan display unit, a CRT has the electron beam directed only to the parts of the screen where a picture is to be drawn. Random-scan monitors draw a picture one line at a time and for this reason are also referred as vector displays (or stroke-writing or calligraphic displays). Refresh rate depends on the number of lines to be displayed. Picture definition, stored as line drawing commands, is an area of memory referred as refresh display file (display list). To display a picture, the system cycles through the set43 Random Scan Working Random scan displays are designed to draw all the component lines of a picture 30 to 60 times each second. Vector displays produce smooth line drawing. Random scan displays are designed for line-drawing applications and can not display realistic shaded scenes. 44 Random Scan Working 45 Random Scan Advantages Random scan displays have higher resolution than raster systems. Vector displays produce smooth line drawing. This minimal amount of information translates to a much smaller file size. (file size compared to large raster images) On zooming in, it remains smooth. The parameters of objects are stored and can be later modified. 46 Random Scan Disadvantages Costlier Just does wire frame. Complex scene cause visible flicker. 47 Random Scan Architecture 48 Display Devices The display device is an output device used to represent the information in the form of images (visual form). Display systems are mostly called a video monitor or Video display unit (VDU). Display devices are designed to model, display, view, or display information. The purpose of display technology is to simplify information sharing. 49 Display Devices There are some display devices given below: 1. Cathode-Ray Tube(CRT) 2. Liquid crystal display(LCD) 3. Light Emitting Diode(LED) 4. Direct View Storage Tubes(DVST) 5. Plasma Display 6. 3D Display 50 Cathode-ray Tube (CRT) Cathode ray tube is a particular type of vacuum tube that displays images when an electron beam collides on the radiant surface. 51 CRT Components Electron Gun: The electron gun is made up of several elements, mainly a heating filament (heater) and a cathode. It is a source of electrons focused on a narrow beam facing the CRT. Focusing & Accelerating Anodes: These anodes are used to produce a narrow and sharply focused beam of electrons. Horizontal & Vertical Deflection Plates: These plates are used to guide the path of the electron the beam. The plates produce an electromagnetic field that bends the electron beam through the area as it52 Liquid Crystal Display (LCD) The LCD depends upon the light modulating properties of liquid crystals. It generally works on flat panel display technology. The LCD screen uses the liquid crystal to turn pixels on or off. Liquid Crystals are a mixture of solid and liquid. When the current flows inside it, its position changes into the desired color. 53 Liquid Crystal Display (LCD) Advantages: Produce a bright image Energy efficient Completely flat screen Disadvantages: Fixed aspect ratio & Resolution Lower Contrast More Expensive 54 Light Emitting Diode (LED) LED is a device which emits when current passes through it. It is a semiconductor device. The size of the LED is small, so we can easily make any display unit by arranging a large number of LEDs. LEDs are powerful in structure, so they are capable of withstanding mechanical pressure. Advantages: The Intensity of light can be controlled. Low operational Voltage. Capable of handling the high temperature. Disadvantages: More Power Consuming than LCD. 55 Direct View Storage Tube (DVST) It is used to store the picture information as a charge distribution behind the phosphor-coated screen. There are two guns used in DVST: 1. Primary Gun: It is used to store the picture information. 2. Flood / Secondary Gun: It is used to display a picture on the screen. 56 Direct View Storage Tube (DVST) Advantages: Less Time Consuming No Refreshing Required High-Resolution Less Cost Disadvantages: The specific part of the image cannot be erased. They do not display color. 57 Color Models The purpose of a color model is to facilitate the specification of colors in some standard generally accepted way. In essence, a color model is a specification of a 3-D coordinate system and a subspace within that system where each color is represented by a single point. Basic Color Models: 1. RGB Color Model 2. CMYK Color Model 58 RGB Color Model In the RGB model, each color appears as a combination of red, green, and blue. This model is called additive, and the colors are called primary colors. The primary colors can be added to produce the secondary colors. The combination of red, green, and blue at full intensities makes white. 59 CMYK Color Model The CMYK color model is a subset of the RGB model and is primarily used in color print production. CMYK is an acronym for cyan, magenta, and yellow along with black. The CMYK color space is subtractive, meaning that cyan, magenta yellow, and black pigments or inks are applied to a white surface to subtract some color from white surface to create the final color. 60 RGB and CMY Color Models Cube 61 HSV Color Model The HSV color model describes colors in terms of their shade (saturation or amount of gray) and brightness (value). RGB Cube HSV Top View 62 HSV Cone HSV Color Model Hue, an angular measure (0 … 360) 63 HSV Color Model Saturation, a fractional measure (0.0 … 1.0) 64 HSV Color Model Value, a fractional measure (0.0 … 1.0) 65 Colour Lookup Table colour R G B Frame buffer index 0 0 0 0 0 0 0 0 0 0 0 7 7 7 6 1 102 255 53 0 7 7 7 CLUT: 2 255 255 204 pixel = code 0 0 0 0 0 True colour: 4 255 102 153 pixel = R,G,B 0... 7 102 0 51 66 Thank You 67