+ All Categories
Home > Documents > 1 Computer Graphics Part 2: Images. 2 What is an image? An image is the graphical and visual...

1 Computer Graphics Part 2: Images. 2 What is an image? An image is the graphical and visual...

Date post: 12-Jan-2016
Category:
Upload: bethany-rice
View: 216 times
Download: 0 times
Share this document with a friend
35
1 Computer Graphics Part 2: Images
Transcript
Page 1: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

11

Computer Graphics

Part 2: Images

Page 2: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

22

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.

Page 3: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

33

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?

Page 4: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

44

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

Page 5: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

55

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.

Page 6: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

66

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

Page 7: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

77

Colour depth1 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

Page 8: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

88

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

Page 9: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

99

Bitmapped images

Original imageOriginal image

Shown Shown magnifiedmagnified

Page 10: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1010

8bytesinsize

depthcolourheightwidth

Calculating the sizeof 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)

Page 11: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1111

Example

A 640 x 480 pixel image in 24-bit colour would require how much disk space?

900KB

bytes9216008

7372800

8

24480640bytesinsize

Page 12: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1212

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

Page 13: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1313

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

Page 14: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1414

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

Page 15: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1515

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.

Page 16: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1616

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)

Page 17: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1717

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

Page 18: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1818

Primitive geometric drawing objects

Basic Line Polyline Arc Bezier curve

Text Font

Shapes Circle Rectangle Square Triangle Pentagon,

hexagon, heptagon, octagon, etc

Tex tText

Page 19: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

1919

Scaling vector graphics

Original imageOriginal image

V e c t o rg r a p h i c s

ShownShownmagnifiedmagnified

V e c t o rg r a p h i c s

Page 20: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2020

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

Page 21: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2121

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

Page 22: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2222

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

Page 23: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2323

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

XX

YY

ZZ

Page 24: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2424

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

Page 25: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2525

3-Dimensional Graphic models

Page 26: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2626

3-Dimensional Graphic models

Page 27: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2727

Resolution

Resolution (def1): number of points that can be displayed on a CRT (cathode ray tube).

Resolution (def2):number of points per centimeter that can be plotted horizontally and vertically .

Typical resolution on high-quality systems 1280 X 1024.

Higher resolution systems : also called high- definition systems .

The higher resolution gives the better picture quality .

Page 28: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2828

Raster Scan Displays (RSD)

Graphics monitors employing CRT technology is called raster scan displays, based on TV technology .

In RSD the beam is swept across the screen one row at a time from top to bottom , and from left to right .

Picture definition is stored in a memory area called Refresh Buffer or Frame Buffer .

Refresh Buffer contains the intensities of each point on the screen

Page 29: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

2929

Frame Buffer

Each screen point is referred to a pixel or pel (Picture element).

In simple black and white systems we need 1 bit per pixel . High resolution systems use 24 bit(3 byte ) per pixel . Systems with resolution of 1024 x 1024, and 24 bit per pixel

requires approximately 3 MByte of memory to store only a single frame .

Black and white systems that require 1 bit /pixel are called bitmap .

Colored systems that uses multibits/pixel are called pixmap.

Page 30: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3030

Refresh rate

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 .

Refresh rates are described in units of cycles per second or

Hertz (HZ).

So when we refer to a system with refresh rate of 60 frame

per second we simply say 60 Hz .

Page 31: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3131

How RSD works

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 .

The return to the left side of the screen to begin displaying the next scan line is called horizontal retrace of the electron beam .

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.

Page 32: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3232

Figure 3: The raster scan displays an object as a set of discrete point across each scan line

Page 33: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3333

Color raster images

The most common way to represent the colors of

pixels in a color raster image is using an order triple

(red,green,blue).

Color Depth : is the number of bits used to represent

the color of each pixel.

Page 34: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3434

Color raster images

Color value displayed

0,0,0 black

0,0,1 blue

0,1,0 green

0,1,1 cyan

1,0,0 red

1,0,1 magenta

1,1,0 yellow

1,1,1 white

Table 1: colors displayed with a color depth of 3 bits

Page 35: 1 Computer Graphics Part 2: Images. 2 What is an image?  An image is the graphical and visual representation of some information that can be displayed.

3535

Color raster images

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 .

True color systems as already defined use color depth of 3 bytes , 1 byte per each color .


Recommended