4 - intro to computer graphics
TRANSCRIPT
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
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
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
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
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.
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
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
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
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.
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
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
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
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
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
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.
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.
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
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
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.
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
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)
8/4/2019 4 - Intro to Computer Graphics
http://slidepdf.com/reader/full/4-intro-to-computer-graphics 22/40
IMAGEDATATYPES
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
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
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
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
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
8/4/2019 4 - Intro to Computer Graphics
http://slidepdf.com/reader/full/4-intro-to-computer-graphics 28/40
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
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
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
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
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
8/4/2019 4 - Intro to Computer Graphics
http://slidepdf.com/reader/full/4-intro-to-computer-graphics 34/40
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
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
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.
8/4/2019 4 - Intro to Computer Graphics
http://slidepdf.com/reader/full/4-intro-to-computer-graphics 38/40
ImageFileTypes-JPEG
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
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