Top Banner
Introduc)ontoComputerGraphics IT137Mul)media
40

4 - Intro to Computer Graphics

Apr 07, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 1/40

Introduc)ontoComputerGraphics

IT137–Mul)media

Page 2: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 2/40

Outline

•  Computer Graphics –  Sources

 –  Copyright Issues

 –  Types

•  Vector –  Characteristics

 –  File formats –  Authoring software

Page 3: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 3/40

Outline

•  Bitmap –  Characteristics

 –  Processes

•  Images –  Concept

 –  Eyes vs. the Camera

•  Digital Camera –  CCD and CMOS

Page 4: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 4/40

Outline

•  ImageDataTypes

 –  Color – Grayscale – Monochrome/Binary

•  ImageDigi)za)on

 –  ImageResolu)on –  PixelAccuracy –  DitheringandBanding –  ImageCompression

•  ImageFileTypes

 –  JPEG – GIF –  PNG –  TIFF – GraphicAnima)onFiles –  Postscripts

•  Metafiles

Page 5: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 5/40

ComputerGraphics

•  refers to the use of computer to display andmanipulate information in graphical or pictorialform, either on a visual‐display unit or via a

printer or plotter. It can either be 2D or 3D.

Page 6: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 6/40

ComputerGraphics

•  Scanned Images - scanners

•  Still Images and Video Images – from

digital cameras and video cameras•  Photo CD

•  Stock Photography

•  Clip Art

•  Original Artwork – from digital tablet

Sources of Graphics

Page 7: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 7/40

ComputerGraphics

•  One can alter or manipulate artwork only if:

 –  Permission to use is granted by owner, artist orpublisher

 –  It is created by you

 –  It is clearly public domain

 –  It is used strictly for instructional purposes orfalls within the restrictions of fair use.

Copyright Issues

Page 8: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 8/40

ComputerGraphics

•  We have 2 major2D graphic

types:•  Vector

 –  Draw-type

•  Bitmap –  Raster

Types of Graphics

Page 9: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 9/40

Vector/Draw-TypeGraphics

•  Vector graphics are made up of manyindividual, scalable objects defined bymathematical equations rather thanpixels, so they always render at the

highest quality.•  Objects may consist of lines, curves, and

shapes with editable attributes such ascolor, fill, and outline.

•  Rasterizing is the conversion of vectorimages to bitmap images. Resultingimages are often called raster graphics. 

Page 10: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 10/40

Vector/Draw-TypeGraphics

•  Changing the attributes of a vector objectdoes not affect the object itself.

•  An object can also be modified by shapingand transforming it using nodes and control 

handles. –  Nodes - points through which a path passes,

preferably where it changes direction.

 –  Control handles - used to alter the shape andangle of the adjacent curve segment

Page 11: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 11/40

Vector/Draw-TypeGraphics

•  Scalable

•  Resolution independent

•  No background

•  Cartoon‐like

•  Inappropriate for photo‐realistic

images

Characteristics

Page 12: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 12/40

Vector/Draw-TypeGraphics

•  AI (Adobe Illustrator)

•  CDR (CorelDRAW)

•  CMX (Corel Exchange)

•  CGM (Computer Graphics Metafile)

•  DXF (AutoCAD)

•  WMF (Windows Metafile) 

File Formats

Page 13: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 13/40

Vector/Draw-TypeGraphics

•  Adobe Illustrator

•  CorelDRAW

•  Serif DrawPlus

•  Inkscape 

Authoring Software

Page 14: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 14/40

Bitmap/RasterGraphics

•  Stores the graphic/image data in thesame manner that the computer monitorcontents are stored in video memory.

•  The term digital image is usually refersto bitmap images.

•  Has a finite collection of discrete

samples, called pixels (pictureelements) in 2D, of any observableobject

Page 15: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 15/40

Bitmap/RasterGraphics

•  Pixels - point locations with associated samplevalues, usually of light intensities/colors,transparency, and other control information.

•  They are not little circles or little squares. 

Page 16: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 16/40

Bitmap/RasterGraphics

•  Interpolation is a process of estimatingcolor values for new pixels (based onsurrounding pixels) when the imagessize is increased.

•  Resampling to reduce the size meansthrowing away some pixels, therebyreducing image quality.

•  Scaling has no effect on the number of pixels in an image.

•  All scanned images and images fromdigital cameras are bitmaps.

Page 17: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 17/40

Bitmap/RasterGraphics

•  Pixels in a grid

•  Resolution dependent

•  Resizing reduces quality

•  Easily converted

•  Restricted to rectangle

•  Minimal support for transparency

Characteristics

Page 18: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 18/40

Image

•  Electromagnetic radiation that entersthe human visual system through eyesand is incident upon the cells of the

retina.

•  Wavelength of light is between 4,000and 7,700 Angstrom (violet and red),

i.e. between 4 x 10−7 and 7.7 x 10−

7m

Page 19: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 19/40

TheHumanEye

•  Light enters through pupil (the circular opening inthe center of iris), passes through the crystallinelens and vitreous humor to be converged to a nodalpoint focused on the retina.

Page 20: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 20/40

Eyevs.theCamera

•  Retina = Film

•  Lens = To adjust focus

•  Aperture = Iris

 –  Controls theamount of light thatreaches the camerasensor

Page 21: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 21/40

TheDigitalCamera

•  Two types of sensor:

 – Charge Coupled Devices (CCD)

 – Complementary Metal Oxide

Semiconductor (CMOS)•  Both are N x M rectangular grid photosensor

(sensitive to light intensity)

Page 22: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 22/40

IMAGEDATATYPES

Page 23: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 23/40

ImageDataTypes

 Eachpixelisstoredasasinglebit(0or

1 Forsimplegraphicsortextonly.

Monochrome/BinaryImages

Page 24: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 24/40

ImageDataTypes

•  Eachpixelhasagrayvaluebetween

0and255.•  A640x480grayscaleimage

requiresover300KBofstorage.

GrayscaleImages

Page 25: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 25/40

ImageDataTypes

 Eachpixelisrepresentedbythreebytes(e.g.,RGB

 24-bitimagessupport256x256x256possiblecombinedcolors(16,777,216

 8-bitimagesexistbutundergoesbandingbecauseoflimitedcolors.

ColorImages

Page 26: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 26/40

ImageDataTypes

•  Togetthespecificcolor,aColorLook-UpTable(LUTsisused.

•  LUTsarealsoknownasthepalee.•  Most24-bitimagesare32-bitimages,the

extrabyteofdataforeachpixelisusedto

storeanalphavalue(α)represen)ngspecial

effectinforma)on.

ColorImages

Page 27: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 27/40

ImageDigi)za)on

•  Themainparametersofthedigi)za)onare: – Imageresolu)on–thenumberofsamplesinthegrid

 – Pixelaccuracy–howmanybitsareusedpersample.

 – ImageCompression–algorithmstoproducesmallerfilesizes

•  Theseparametershaveadirecteffectontheimagequalitybutalsotothestoragesizeoftheimage

Page 28: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 28/40

Page 29: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 29/40

ImageDigi)za)on

•  Example: – Imageresolu)on=640x480

 – Screenresolu)on=640x480

•  Howwilltheimageappearonscreen?

ImageResolu)on

Page 30: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 30/40

ImageDigi)za)on

•  Resolu)ondiffersonscreenandonprint.•  Displayingonscreen–72to100dpi•  Prin)ng–300dpi

ImageResolu)on

Page 31: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 31/40

ImageDigi)za)on

•  DigitalimageconsistsofNxMpixels,each

representedbykbits.

•  Apixelcan,thus,have2kdifferentvalues•  Thepixelvaluesareconsideredasintegersvaryingfrom0(blackpixelto2k-1(white

pixel.

•  MayalsobetermedasColorDepth.

PixelAccuracy

Page 32: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 32/40

ImageDigi)za)on

•  Thesameimagesize256x256pixels,

differentinnumberofgraylevels:

•  32(5bits• 16(4bits

•  8(3bits•  4(2bits

PixelAccuracy

Page 33: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 33/40

ImageDigi)za)on

•  Banding–reducescolorswithoutdithering,resul)ngtoareasofsolidcolors.

•  Dithering–theprocessofposi)oningdifferentcoloredpixelsside-by-sidetocreate

theillusionthatnocolorsaremissing.

•  Ditheringisatechniqueusedfordisplayingmonochromeimages

Ditheringvs.Banding

Page 34: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 34/40

Page 35: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 35/40

ImageFileTypes

•  GIF(GraphicsInterchangeFormat•  JPEG(JointPhotographicExpertsGroup• PNG(PortableNetworkGraphics

•  TIFF(TaggedImageFileFormat•  GraphicsAnima)onFiles•  Postscript/EncapsulatedPostscript

Page 36: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 36/40

ImageFileTypes–GIF

•  GraphicsInterchangeFormat•  CreatedbyUNISYSCorp.andCompuserve,ini)allyfortransminggraphicalimagesoverphonelinesviamodems.

•  Limitedtoonly8-bit(256colorimages,suitableforimageswithfewdis)nc)vecolors(e.g.graphicsdrawing=smallfilesize

•  Types: – GIF87a–transparentGIF – GIF89a–animatedGIF

Page 37: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 37/40

ImageFileTypes-JPEG

•  JointPhotographicExpertsGroup•  Supportsmillionsofcolors(24-bit• Bestforcon)nuous-toneimagessuchasphotographs.

•  Lossycompressionwhichallowsusertosetthedesiredlevelofquality/compression.

•  Doesnotsupporttransparency.

Page 38: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 38/40

ImageFileTypes-JPEG

Page 39: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 39/40

ImageFileTypes

•  Supportsfrom8-bitto32-bitcolordepths•  Usescompressionforsmallfilesizes•  Supportstransparencyandinterlacing•  Capableofgammacorrec8on

 – Note:somebrowsersrequirepluginsforsupport

PortableNetworkGraphics

Page 40: 4 - Intro to Computer Graphics

8/4/2019 4 - Intro to Computer Graphics

http://slidepdf.com/reader/full/4-intro-to-computer-graphics 40/40

ImageFileTypes

•  storesmanydifferenttypesofimages(e.g.,monochrome,grayscale,8-bit&24-bitRGB,

etc.

•  DevelopedbytheAldusCorp.inthe1980'sandlaterbyAdobeSystems

•  TIFFisalosslessformat(whennotu)lizingthenewJPEGtagwhichallowsforJPEG

compression

TaggedImageFileFormat