Download presentation
Presentation is loading. Please wait.
Published byBethany Rice Modified over 9 years ago
1
1 Computer Graphics Part 2: Images
2
2 What is an image? An image is the graphical and visual representation of some information that can be displayed on a computer screen or printed out Images come in a variety of forms: Photographs Drawings Paintings Television and motion pictures Maps etc.
3
3 Images show us the prominent features of the objects that they represent. Images play an important part in multimedia Navigation User interface components Help systems Clip art What is an image?
4
4 Image media types Images can be generally divided into two formats: Bitmapped or raster images Vector graphics or Metafile images Bitmapped images are stored as an array of pixels Vector graphics are stored as the set of graphic primitives required to represent the image
5
5 Bitmaps Image A pixel is the smallest element of resolution on a computer screen A pixel is the basic unit of a digital images. Digital image is a picture that may be stored in, displayed on, processed by a computer. As mentioned, bitmap is composed of a matrix elements called pixels Each pixel can be in a specific colour and each pixel consists of two or more colours.
6
6 Bitmaps Image The range of these colours is known as the colour depth. The colour depth determine “How much data in bits used to determine the number of colours”. Colour depth is measured in bits per pixel Remember: a bit (binary digit) is either 1 or 0 and that there are eight bits in a byte
7
7 Colour depth 1 bit per pixel = 2 colours (monochrome) 2 bits per pixel = 4 colours 4 bits per pixel = 16 colours 8 bits per pixel = 256 colours Generally good enough for colour images 16 bits per pixel = 65536 colours Better quality for photograph-like images, also known as high colour 24 bits per pixel = >16 million possible colours Used to recreate photo realistic images, also known as true colour
8
8 Bitmaps Image The number of pixels is related to the size of file that required to store an image. Remember, two factors effect the size of file bitmap : Resolution Color Depth
9
9 Bitmapped images Original image Shownmagnified
10
10 Calculating the size of a raster image Where: Width of the images measured in pixels Height of the images measured in pixels Colour depth is the number of bits used for color measured in bits per pixel Remember: 1024 bytes = 1 kilobyte (KB) 1024 kilobytes = 1 megabyte (MB)
11
11 Example A 640 x 480 pixel image in 24-bit colour would require how much disk space?
12
12 Popular bitmap formats Microsoft bitmap (.bmp) Used in Microsoft windows TIFF - Tagged Image File Format (.tif) Used for faxing images JPEG - Joint Photographic Expert Group (.jpg) Useful for storing photographic images
13
13 Popular bitmap formats GIF - Graphics Interchange Format (.gif) Used a lot on web sites PNG - Portable Network Graphics (.png) A new format for web graphics PCD – Kodak photo CD A new format for store image in a compressed form on a CD
14
14 Advantages and Disadvantages of using bitmap images Advantages Convey(يوصل, ينقل) detail of information quickly Real life Disadvantages Depend on a Resolution Effect to the image quality Size file is big
15
15 Vector images Vector images are stored as the set of graphic primitives required to represent the image A graphic primitive is a simple graphic based on drawing elements or objects such as shape square, line, arc, etc. The image consists of a set of commands (mathematical equations) that are drawn the object when needed.
16
16 Vector images Storing and representing images by mathematical equations is called vector graphics or Object Oriented graphics. Each primitive object has various attributes that go to make up the entire image x-y location, fill colour, line colour, line style, etc. Example: RECTANGLE : rectangle top, left, width, height, colour is ( 0, 0, 300, 200, red)
17
17 Vector images CIRCLE : circle top, left, radius, colour LINE : Line x1, y1, x2, y2, colour Vector image or vector graphics can be resized without losing the integrity of the original image. Scaling a vector is a mathematical operation - only the attributes change, the image is unaffected
18
18 Primitive geometric drawing objects Basic Line Polyline Arc Bezier curve Text Font Shapes Circle Rectangle Square Triangle Pentagon, hexagon, heptagon, octagon, etc
19
19 Scaling vector graphics Original image Shownmagnified
20
20 Advantages and Disadvantages of using vector image Advantages Relatively small amount of data required to represent the image. Therefore, it does not required a lot of memory to store Easier to manipulate Disadvantages Limited level of details that can be presented in an image
21
21 Vector formats Windows metafile (.wmf) Used by Microsoft Windows SVG - Scalable Vector Graphics (.svg) A new format devised for the web CGM - Computer Graphics Metafile (.cgm) Older format commonly used for clip art Adobe PostScript (.ps) A page description language used to control printers
22
22 Vector formats Adobe Portable Document Format (.pdf) A page description language common on the web Drawing Exchange Format (.dfx) Store 3D image created by design program AutoCAD Encapsulated PostScript (.epf) Professional printing: Illustration program, Adobe Systems, Desktop Publishing programs
23
23 3-Dimensional Graphic models A 3D model is a variation on the vector format The location of a 3-dimensional object is specified using x, y and z co-ordinates Further primitives can be found in 3D models Cube, sphere, pyramid, etc. Camera, spotlight, texture, shading etc. 3D model X Y Z
24
24 3-Dimensional Graphic models 3D graphics offer the photo-realistic effects that have you seen in TV, Computer Games Examples, Motion Picture films such as: Jurassic Park, Terminator 2, Lost World and Toy Story Examples 3D programs: Carigali Truespace 3D Studio Max Infini-D
25
25 3-Dimensional Graphic models
26
26
27
27 Resolution Resolution (def1): number of points that can be displayed on a CRT ( cathode ray tube). l Resolution (def2): number of points per centimeter that can be plotted horizontally and vertically. l Typical resolution on high-quality systems 1280 X 1024. l Higher resolution systems : also called high- definition systems. l The higher resolution gives the better picture quality.
28
28 Raster Scan Displays (RSD) l Graphics monitors employing CRT technology is called raster scan displays, based on TV technology. l In RSD the beam is swept across the screen one row at a time from top to bottom, and from left to right. l Picture definition is stored in a memory area called Refresh Buffer or Frame Buffer. l Refresh Buffer contains the intensities of each point on the screen
29
29 Frame Buffer l Each screen point is referred to a pixel or pel (Picture element). l In simple black and white systems we need 1 bit per pixel. l High resolution systems use 24 bit(3 byte ) per pixel. l Systems with resolution of 1024 x 1024, and 24 bit per pixel requires approximately 3 MByte of memory to store only a single frame. l Black and white systems that require 1 bit /pixel are called bitmap. l Colored systems that uses multibits/pixel are called pixmap.
30
30 Refresh rate l Refresh rate for RSD carried out at the rate of 60 to 80 frames per second, although there might be some systems with higher refresh rates. l Refresh rates are described in units of cycles per second or Hertz (HZ). l So when we refer to a system with refresh rate of 60 frame per second we simply say 60 Hz.
31
31 How RSD works l The RSD starts from the upper-left corner of the screen, and continues at the same scan line (as shown in fig3). At the end of each scan line ( a single row of pixels in a raster graphics image ), the electron beam ( Cathode rays )returns to the left side of the screen to begin displaying the next line. l The return to the left side of the screen to begin displaying the next scan line is called horizontal retrace of the electron beam. l At the end of each frame the electron beam must return to the top left corner of the screen to begin a new frame this is called vertical retrace.
32
32 Figure 3: The raster scan displays an object as a set of discrete point across each scan line
33
33 Color raster images l The most common way to represent the colors of pixels in a color raster image is using an order triple (red,green,blue). l Color Depth : is the number of bits used to represent the color of each pixel.
34
34 Color raster images displayedColor value black0,0,0 blue0,0,1 green0,1,0 cyan0,1,1 red1,0,0 magenta1,0,1 yellow1,1,0 white1,1,1 Table 1: colors displayed with a color depth of 3 bits
35
35 Color raster images l If a color depth of a byte represents 256 colors.in this system we allow the red and green components to have three bits each and the blue component has two bits. l True color systems as already defined use color depth of 3 bytes, 1 byte per each color.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.