CE-201Lecture 2-3

Embed Size (px)

Citation preview

  • 8/6/2019 CE-201Lecture 2-3

    1/78

    INDIANINSTITUTEOFTECHNOLOGYROORKEE

    DEPARTMENT

    OF

    CIVIL

    ENGINEERING

    CE201:ComputerAidedGraphicsWeek2&3,WedAug13,20

    RajatRastogi

    ra atfce iitr.ernet.in

  • 8/6/2019 CE-201Lecture 2-3

    2/78

    Graphics,sketching,photography

    en er ng, o e ngan n ma on

    ApplicationsofCGMovies,Games,Entertainment,CAD,Art,

    Interactivegraphics,Education,Training,

    sua za on, es gn ng AdvancementinGPUs

    August18,2008 2RajatRastogi

  • 8/6/2019 CE-201Lecture 2-3

    3/78

    Random/Rasterscan

    Co ourMo e s

    Pixels DisplayDevices

    August18,2008 RajatRastogi 3

  • 8/6/2019 CE-201Lecture 2-3

    4/78

    VideoDisplayTechnologiesAugust18,2008 4RajatRastogi

  • 8/6/2019 CE-201Lecture 2-3

    5/78

    Extremelyhighvoltage

    Electrongun

    FocusinganddeflectionsystemsPhosphorcoatedscreen

    Glasstubeenvelopemaintaining

    August18,2008 5RajatRastogi

  • 8/6/2019 CE-201Lecture 2-3

    6/78

    August18,2008 6RajatRastogi

  • 8/6/2019 CE-201Lecture 2-3

    7/78

  • 8/6/2019 CE-201Lecture 2-3

    8/78

    Intensit oftheelectronbeamiscontrolledb settin volta e

    levelonthecontrolgrid.Negativevoltagewilldecreasethenumberofelectronspassingthrough.

    s e s ance rave e ya eam ncreases owar s eperipheryofthescreen,duetoitscurvature,displayedimage

    becomeblurred.

    Deflectionoftheelectronbeamcanbecontrolledeitherwithelectricfieldorwithmagneticfield.

    ectronstrans erenergytop osp or,w c exc tesan onheatinggiveslightenergyproducingglowingspot,which

    fadesasphosphorreturnsbacktogroundenergylevel.

    August18,2008 8RajatRastogi

  • 8/6/2019 CE-201Lecture 2-3

    9/78

    Thefrequencyorcolor

    thephosphoris

    proportionaltothe

    energy erencebetweentheexcited

    quantumstateandthe

    August18,2008 9RajatRastogi

    groundstate.

  • 8/6/2019 CE-201Lecture 2-3

    10/78

    Phosphorsaredefinedeitherbycolour ortheirpersistence(howlongtheycontinuetoemitlight).

    Persistence isdefinedastimeittakestheemittedlightfromthescreentodecaytoonetenthofitsoriginalintensity.

    Phosphorwithlowerpersistenceisusefulforanimation;andwithhigherpersistenceisusefulforhighlycomplex,staticpictures.

    Usualpersistencerangeforgraphicmonitorsis10to60microseconds.

    Resolution ofCRTisdefinedasmaximumnumberofpointspercentimeterthatcanbeplottedhorizontallyorvertically.

    August18,2008 RajatRastogi 10

  • 8/6/2019 CE-201Lecture 2-3

    11/78

    Resolution:

    Twoilluminatedphosphorspotsaredistinguishablewhentheirseparationisgreaterthanthediameteratw c aspo n ens y as a en o percen o maximum

    De endentu on Typeofphosphor

    Intensitytobedisplayed

    Highdefinitionsystem:basicallyhighresolutionsystem,1280x1024orhigher

    August18,2008 RajatRastogi 11

  • 8/6/2019 CE-201Lecture 2-3

    12/78

    AspectRatio:

    Ratio

    of

    vertical

    points

    to

    horizontal

    points

    necessary

    toproduceequallengthlinesinbothdirectionsonthescreen.

    Ex.meanslengthof3pointsonverticalline=length

    of

    4

    points

    on

    horizontal

    line

    Sizeoftube(=lengthofscreendiagonal)Brightnessofphosphorsvs.darknessoftube

    SpeedofelectrongunWidthofelectronbeamPixels

    August18,2008 RajatRastogi 12

  • 8/6/2019 CE-201Lecture 2-3

    13/78

    DVSTstoresthe ictureinformationasachar e

    distributionjustbehindthephosphorcoatedscreen. Itusestwoelectronguns,primarygunstorespicture

    patternandfloodgunmaintainspicturedisplay.

    Thereisnoneedtorefreshscreen,henceverycomplexp c urescan e sp aye a very g reso u ons

    withoutflicker.

    ,beerasedandthewholepictureistobeerasedand

    redrawn.Nowreplacedbyrastersystems.

    August18,2008 RajatRastogi 13

  • 8/6/2019 CE-201Lecture 2-3

    14/78

    PlasmaPanels

    Liqui crysta isp ays

    Twocategories Emissivedisplays:devicesthatconvertelectricalenergy

    intolight.Ex.Plasmapanel,thinfilm

    electroluminescent dis la s li htemittin diodes

    Nonemissiveorreflectivedisplays:useopticaleffectstoconvertlightfromasourceintographicpatterns.Ex.

    LCD

    August18,2008 RajatRastogi 14

  • 8/6/2019 CE-201Lecture 2-3

    15/78

    Alsocalled asdischar edis la s constructedb fillin a

    mixtureofgas(usuallyhasneon)betweentwoglassplates.

    ThegasisexcitedbyelectricfieldemittingUVlight.

    UVlightexcitesphorphor.

    Phosphorrelaxesandemitssomeothercolour

    Gas at intersection of hori. andvert. conductors break down onapplication of high voltage into

    August18,2008 RajatRastogi 15

    ions

  • 8/6/2019 CE-201Lecture 2-3

    16/78

    August18,2008 RajatRastogi 16

  • 8/6/2019 CE-201Lecture 2-3

    17/78

    OLEDsfunctionlikeregularsemiconductorLEDs

    Thinfilmdepositionoforganic,light

    emittingmoleculesthroughvapor

    sublimationinavacuum.

    Dopeemissivelayerswithfluorescent.

    August18,2008 RajatRastogi 17

  • 8/6/2019 CE-201Lecture 2-3

    18/78

    thatliquefywhenexcitedbyheatorEfield Cr stallinestatetwists olarizedli ht90

    Flatpaneldisplayscommonlyusenematic

    (threadlike)liquidcrystalcompounds

    Itconsistsof

    Liquidcrystals

    Glassplates 2

    Lightpolarizer 2at90o

    Transparentconductors builtintoglassplatesat90o

    August18,2008 RajatRastogi 18

  • 8/6/2019 CE-201Lecture 2-3

    19/78

    August18,2008 RajatRastogi 19

  • 8/6/2019 CE-201Lecture 2-3

    20/78

    August18,2008 RajatRastogi 20

  • 8/6/2019 CE-201Lecture 2-3

    21/78

    matrix

    August18,2008 RajatRastogi 21

  • 8/6/2019 CE-201Lecture 2-3

    22/78

    August18,2008 RajatRastogi 22

  • 8/6/2019 CE-201Lecture 2-3

    23/78

    August18,2008 RajatRastogi 23

  • 8/6/2019 CE-201Lecture 2-3

    24/78

    August18,2008 RajatRastogi 24

  • 8/6/2019 CE-201Lecture 2-3

    25/78

    August18,2008 RajatRastogi 25

  • 8/6/2019 CE-201Lecture 2-3

    26/78

    Spaceball

    Trackball

    August18,2008 RajatRastogi 26

  • 8/6/2019 CE-201Lecture 2-3

    27/78

    August18,2008 RajatRastogi 27

  • 8/6/2019 CE-201Lecture 2-3

    28/78

    Alsocalledvectororstrokewritingorcalligraphicdisplays Earlycomputerdisplays:basicallyanoscilloscope Refreshdisplayfileorbufferorlistorprogramme,a

    memor area stores a set of line drawin commands.

    Thesehavehigherresolutionthanrasterscansystems.

    Lines

    drawn

    are

    smoother

    in

    contrast

    to

    raster

    system,

    , .

    Penplotterisanexampleofrandomscan,hardcopydevice.

    sa vantages: Justdoeswireframe,likelinedrawingapplications Complexscenescause visibleflicker

    August18,2008 RajatRastogi 28

  • 8/6/2019 CE-201Lecture 2-3

    29/78

    screenwhereapictureistobedrawn .

    August18,2008 RajatRastogi 29

  • 8/6/2019 CE-201Lecture 2-3

    30/78

    Pixel:Onedotorpictureelement(pel)ofthe

    Scan

    line:

    A

    row

    of

    pixels

    August18,2008 RajatRastogi 30

  • 8/6/2019 CE-201Lecture 2-3

    31/78

    ,

    onerowatatimefromtoptobottom.Asthe

    ,

    beamintensityisturnedonandofftocreatea

    .

    Picturedefinitionisstoredinamemoryarea

    .

    August18,2008 RajatRastogi 31

  • 8/6/2019 CE-201Lecture 2-3

    32/78

    Theintensit ran eof ixel ositionsdefine

    capability

    of

    raster

    system.

    The

    frame

    buffer

    may

    becalled:

    Bitmap:withonebitperpixel,ex.Blackandwhitesystem

    ,definitionsystems

    Refreshin onrasterscandis la iscarriedoutat

    arateof60to80framespersecond(Hz).Thiscreatesnewimage.

    August18,2008 RajatRastogi 32

  • 8/6/2019 CE-201Lecture 2-3

    33/78

    VerticalSyncPulse: SignalsthestartofthenextfieldVerticalRetrace: Timeneededto etfromthebottom

    ofthecurrentfieldtothetopofthenextfield

    HorizontalSyncPulse: Signalsthestartofthenewscanline

    HorizontalRetrace: Thetimeneededtogetfromthe

    en

    o

    e

    curren

    scan

    ne

    o

    e

    s ar

    o

    e

    nex

    scanline

    August18,2008 RajatRastogi 33

  • 8/6/2019 CE-201Lecture 2-3

    34/78

    Assumewecanonlyscanallpixelsofentirescreenat30frames/second.Someflickerwillbenoticedhere.

    Toreduceflicker,divideeachframeintotwofields

    ofoddandevenlines.Thisreducesthescantimeofscreenfromtoptobottomtohalfasthebeamwill

    sweepeveryalternatescanlineinonepassin1/60s.

    1/30Sec 1/30Sec1/60Sec 1/60Sec 1/60Sec 1/60Sec

    Field1 Field 2

    August18,2008 RajatRastogi 34

    Frame Frame

  • 8/6/2019 CE-201Lecture 2-3

    35/78

    Anima eiscom osedofdiscrete ixelsor icture

    elements. Thesearearrangedinarowcolumnfashiontoforma

    rectangulararea(raster).

    The

    total

    number

    of

    pixels

    in

    a

    image

    is

    a

    function

    of

    the

    s zeo e magean num ero p xe sperun eng n

    thehorizontalaswellasverticaldirection(Resolution).

    horizontaldirectiontimesthetotalnumberofpixelsin

    theverticaldirection(512x512,640x480,1024x768).

    August18,2008 RajatRastogi 35

  • 8/6/2019 CE-201Lecture 2-3

    36/78

    Sizeofima e at400 ixels erinchfor640x480ima e

    640/400

    x

    480/400

    =

    1.6

    x

    1.2

    inch Aspectratio,for640x480image=640/480=4/3

    Pixelatlowerleftcornerofanimageisconsideredtobe

    at

    the

    origin

    (0,0)

    of

    a

    pixel

    coordinate

    system.(639,479)(0,479)

    (0,0) (639,0)

    August18,2008 RajatRastogi 36

  • 8/6/2019 CE-201Lecture 2-3

    37/78

    August18,2008 RajatRastogi 37

  • 8/6/2019 CE-201Lecture 2-3

    38/78

    August18,2008 RajatRastogi 38

  • 8/6/2019 CE-201Lecture 2-3

    39/78

    Therearethreet esofcones,referredtoeitheras

    S,M,andL,whichare

    equivalenttoblue,green,

    and

    red

    sensors,

    respectively.Theirpeak

    sensitivitiesarelocatedat

    approximately430nm,

    560nm,and610nmforthe

    "average"observer

    August18,2008 RajatRastogi 39

  • 8/6/2019 CE-201Lecture 2-3

    40/78

    August18,2008 RajatRastogi 40

  • 8/6/2019 CE-201Lecture 2-3

    41/78

    ColourspecificationusingRBGmodelisanadditiverocess.Itstartswith G

    blackandnecessary

    primarycomponents GreenYellow

    (0,1,0)

    area e oy e

    desiredcolour.

    Cyan

    White

    , ,

    (1,1,1)(0,1,1)

    Grey axis

    principalofdisplaymonitor. R

    Black

    Blue

    Red(0,0,0)

    0,0,1(1,0,0)

    August18,2008 RajatRastogi 41

    BMagenta

    (1,0,1)

  • 8/6/2019 CE-201Lecture 2-3

    42/78

    Delta electron gun In-line electron gunarrangement arrangement

    August18,2008 RajatRastogi 42

  • 8/6/2019 CE-201Lecture 2-3

    43/78

    plane

    X+Y+Z=1

    CIE Chromaticity Diagram

    August18,2008 RajatRastogi 43

  • 8/6/2019 CE-201Lecture 2-3

    44/78

    Conversion from

    August18,2008 RajatRastogi 44

  • 8/6/2019 CE-201Lecture 2-3

    45/78

    Thisdefinescoloursusingasubtractiveprocesses.Itstartswithwhiteanda ro riate rimar colouris

    subtractedtogetdesiredcolour.

    It

    is

    working

    principal

    of

    printers.

    1

    1

    and1

    1

    =

    =

    G

    R

    M

    C

    M

    C

    G

    R

    11 BYYB

    Subtractive

    August18,2008 RajatRastogi 45

  • 8/6/2019 CE-201Lecture 2-3

    46/78

    Four

    colour

    procss

    or

    simplyprocess.

    Whenthetintsoffour

    colours

    are

    printed

    in

    overlappingpatterns,it

    givesillusionofprinted

    .

    August18,2008 RajatRastogi 46

  • 8/6/2019 CE-201Lecture 2-3

    47/78

    RGB Color Model CMYK Color Model

    Additive color modelFor computer displays

    Subtractive color modelFor printed material

    Uses light to display color

    Colors result from transmitted light

    Red + Green + Blue = White

    Uses ink to display color

    Colors result from reflected light

    Cyan + Magenta + Yellow = BlackBlack means total absence of light White means total absence of ink

    August18,2008 RajatRastogi 47

  • 8/6/2019 CE-201Lecture 2-3

    48/78

    August18,2008 RajatRastogi 48

  • 8/6/2019 CE-201Lecture 2-3

    49/78

    To roduceblue onehasto

    cyan red blue andgreen

    mixcyanandmagenta

    Blackisusedtoensurehigh

    magenta greenblue and

    red

    qua y ac pr n ng. s

    representedbyK

    Hence CMYK

    yellow bluered and

    green ImageprintedwithCMYK

    modelcannotbeconvertedac a none to mo e ,ast e

    informationgetslost.

    August18,2008 RajatRastogi 49

  • 8/6/2019 CE-201Lecture 2-3

    50/78

    Certainspaceisallottedtoapixeltocodeits. . ,

    Bit1:r Bit2:g Bit3:b Colour name0 0 0 Black

    0 0 1 Blue

    0 1 0 Green

    0 1 1 Cyan

    1 0 0 Red1 0 1 Magenta

    1 1 0 Yellow

    August18,2008 RajatRastogi 50

    1 1 1 white

  • 8/6/2019 CE-201Lecture 2-3

    51/78

    Each

    pixel

    has

    3

    bits,

    with

    each

    taking

    either

    0

    or

    1

    to

    representcolour.Itcanthuspresent2x2x2=8colours

    In24bitpixel,eachprimarycolour(onebyte)has8bits.Onebyte,therefore,canpresent 2x2x2x2x2x2x2x2=256

    A24bitpixelcanthushave256x256x256possiblechoices=16,777,216colourintensities.

    This24bitformatiscalledtruecolourrepresentation.Highstoragespaceisrequiredforthisformat.

    August18,2008 RajatRastogi 51

  • 8/6/2019 CE-201Lecture 2-3

    52/78

    The

    number

    of

    possible

    colors

    would

    be

    2

    to

    the

    power

    of

    thenumberofbitsperpixeli.e.2b

    Acolordepthof4bitswouldbe2timesitself4times:2x2x2x2=16colors

    Acolordepthofof8bitswouldbe2timesitself8times:

    2x2x2x2x2x2x2x2=256colors.

    Acolordepthofof24bitswouldbe2timesitself24times:

    2x2x2x2x2x2x2x2x2x2x2x2x

    2x2x2x2x2x2x2x2x2x2x2x2=16,777,216colors

    August18,2008 RajatRastogi 52

  • 8/6/2019 CE-201Lecture 2-3

    53/78

    In

    case

    of

    black

    and

    white

    and

    grey

    scale

    images,

    the

    three

    primarieshavethesamevalue.Blackandwhiteimage

    requiresonlyonebitperpixel,0representingblackand1

    representingwhite.Greyscaleiscodedwith8bitsper

    ixeltoallowatotalof256intensit of re levels. InRGBcolourmodel,thecolourisrepresentedbycolour

    intensityoritsmix,whereas,inCMYKcolourmodel,the

    co our sm xe npropor ons. .g.re co ormay e

    composedof14%cyan,100%magenta,99%yellowand

    3%black.

    August18,2008 RajatRastogi 53

  • 8/6/2019 CE-201Lecture 2-3

    54/78

    RGB

    true

    color

    would

    have

    a

    24

    bit

    color

    depth

    and

    CMYK

    truecolorwouldhavea32bitcolordepth(8bitsper

    colour)

    CMYKtruecolourwouldhave256x256x256possible

    .

    colourspaceorgamutthanRGB.www.sketchpad.net/basics4.htm#gamut

    August18,2008 RajatRastogi 54

  • 8/6/2019 CE-201Lecture 2-3

    55/78

    Low

    storage

    space

    is

    required

    for

    this

    format.

    Pixels

    do

    not

    codecoloursdirectly.Theyrefertoatablewherecolour

    valuerelatedtothatpixelisstored.

    Thesecolourvaluesforma colourmap fortheimage.

    referredtoasthe8bitformat.

    August18,2008 RajatRastogi 55

  • 8/6/2019 CE-201Lecture 2-3

    56/78

    0

    1

    .

    .

    .

    r g b

    .8 bit pixel value

    .

    .255

    24 bits

    August18,2008 RajatRastogi 56

    (8 bits per primary)

  • 8/6/2019 CE-201Lecture 2-3

    57/78

    Colours

    derived

    from

    a

    palette.

    These

    are

    restricted

    in

    numbersandhencedonotproduceimagesasrealisticasit

    canbeonusingRGBorCMYKmodel.

    Thistypeofcolorisknownas"IndexedColor"because

    whichareusedbythecomputertoidentifyeachcolor

    Somefileformatsrestrictthenumberofcolorstofewerthan256.TheGIFformat hasacolordepthof8bitsper

    pixelorless.GIFfilesuseindexedcolorandallowa

    maximumof256colors.TIFFfilescanbestoredasindexed

    colorortruecolor.

    August18,2008 RajatRastogi 57

  • 8/6/2019 CE-201Lecture 2-3

    58/78

    Grayscale

    images

    have

    a

    maximum

    color

    depth

    of

    8

    bits.

    WhendefiningshadesofgrayintermsofRGB,eachofthe

    3red,greenandbluecomponentsmustbeequaltoeach

    other.ExamplesofgraysareR=192G=192B=192,and

    R=128G=128B=128.

    Sinceallthreecomponentsmustbeequalforanyshadeofgraythereareonly256possiblecombinations.

    August18,2008 RajatRastogi 58

  • 8/6/2019 CE-201Lecture 2-3

    59/78

    black and white

    1 bit colour: 2 colour palette:

    blue and white

    August18,2008 RajatRastogi 59

  • 8/6/2019 CE-201Lecture 2-3

    60/78

    4 bit color: 16 colour palette:

    Windows 16 colour palette

    use or screen grap cs

    August18,2008 RajatRastogi 60

  • 8/6/2019 CE-201Lecture 2-3

    61/78

    8 bit color: 256 color palette:

    8 bit grayscale: 256 shade grayscale palette:

    August18,2008 RajatRastogi 61

  • 8/6/2019 CE-201Lecture 2-3

    62/78

    24 bit color: (No palette used)

    August18,2008 RajatRastogi 62

  • 8/6/2019 CE-201Lecture 2-3

    63/78

    HSL Hue Saturation Li htness

    Alternatesystems

    HSIandHSB,whereIstandsforintensityandBstandsforbrightness

    HSV Hue,Saturat on,Va ue

    BothHSLandHSVdescribecolorsaspointsinacylinder

    atthetopwithneutralcoloursbetweenthem,whereangle

    aroundtheaxiscorrespondstohue,distancefromtheaxis

    u , x

    correspondstolightness,value,orbrightness.

    August18,2008 RajatRastogi 63

  • 8/6/2019 CE-201Lecture 2-3

    64/78

    graphicsapplications.

    HSVColourWheel

    Thehueisrepresentedbyacircularregion

    A

    separate

    triangular

    region

    may

    be

    used

    to

    represent

    saturationandvalue.

    Typically,theverticalaxisofthetriangleindicates, .

    Inthisway,acolorcanbechosenbyfirstpickingthehue

    fromthecircularregion,thenselectingthedesired

    saturationandvaluefromthetriangularregion.

    August18,2008 RajatRastogi 64

  • 8/6/2019 CE-201Lecture 2-3

    65/78

    HSVColourCone 3Dinnature

    Thesaturationisrepresente yt e

    distancefromthecenterof

    acircularcrosssectionofHSV Colour Cone thecone,andthevalueis

    thedistancefromthe

    pointedendofthecone.

    Some

    representations

    use

    ahexagonalcone,or

    hexcone insteadofa

    circularcone

    August18,2008 RajatRastogi 65

  • 8/6/2019 CE-201Lecture 2-3

    66/78

    HSVColourC linder Mostappropriatefor

    mathematicalmodelling

    Thenumberofvisuallydistinctsaturationlevels

    valueapproachesblack

    Theconstraintsofprecision,coupledwiththelimitations

    ofhumancolorperception,

    maketheconevisualization

    morepractical.

    August18,2008 RajatRastogi 66

  • 8/6/2019 CE-201Lecture 2-3

    67/78

    Doubleconeorsphere White at to black at

    Invertedconeofcolour Black at the bottom and

    bottom,andfullysaturated

    colours aroundtheedgeof

    fullysaturatedcolours

    aroundthecircleandatthe

    August

    18,

    2008 Rajat

    Rastogi 67

  • 8/6/2019 CE-201Lecture 2-3

    68/78

    TheSaturationcomponentalwaysgoesfromfully

    Itgoesfromsaturatedcolortowhite

    saturatedcolortothe

    equivalentgray Vcomponentonlygoes

    halfway,fromblackto

    range,fromblacktowhite

    throughcolour hue Traditionallymorecommon

    August

    18,

    2008 Rajat

    Rastogi 68

  • 8/6/2019 CE-201Lecture 2-3

    69/78

    Applications TheCSS3specification

    Applications AppleMacOSX systemcolor

    Inkscape (startingfromversion0.42)

    Macromedia Studio

    picker(hasacolordiskfor

    H/SandasliderforV)

    Xara Xtreme

    MicrosoftWindows systemcolorpicker(including

    Microsoft Paint

    Paint.NET (hasacolordiskforH/SandasliderforV)

    Adobe ra hic a lications

    PaintShopPro ImageMagick

    (Illustrator,

    Photoshop,

    and

    others)

    PBMa InfoPro

    August

    18,

    2008 Rajat

    Rastogi 69

  • 8/6/2019 CE-201Lecture 2-3

    70/78

    Pixelimageeditor (startingfromBeta5)

    Pixia

    Bryce

    TheGIMP (HSVforcolorselection,HSLforimagecolora justment

    Paint.NET (HSVforcolorselection,HSLforimagecolor

    Photoshop (HSVforcolorselection,HSLforimagecoloradjustment)

    August

    18,

    2008 Rajat

    Rastogi 70

  • 8/6/2019 CE-201Lecture 2-3

    71/78

    August

    18,

    2008 Rajat

    Rastogi 71

  • 8/6/2019 CE-201Lecture 2-3

    72/78

    Letr b 0 1 bethered reen andbluecoordinates respectively,ofacolorinRGBspace.

    Letmaxbethegreatestofr,g,andb,andmintheleast.

    Tofindthehueangleh [0,360]foreitherHSLorHSVspace,compute:

    August

    18,

    2008 Rajat

    Rastogi 72

  • 8/6/2019 CE-201Lecture 2-3

    73/78

    Tofindsaturationandli htnesss l 0 1 forHSLs ace compute:

    Thevaluesfors andvofanHSVcoloraredefinedasfollows:

    August

    18,

    2008 Rajat

    Rastogi 73

  • 8/6/2019 CE-201Lecture 2-3

    74/78

    (h normalizedtobeintherange[0,1))

    August

    18,

    2008 Rajat

    Rastogi 74

  • 8/6/2019 CE-201Lecture 2-3

    75/78

    Com uteeachcolorcom onentColor ofthevector Color ColorG,ColorB)=(r,g,b),

    August18,2008 RajatRastogi 75

  • 8/6/2019 CE-201Lecture 2-3

    76/78

    August18,2008 RajatRastogi 76

  • 8/6/2019 CE-201Lecture 2-3

    77/78

    RGB HSL HSV Result

    1 0 0 0 1 0.5 0 1 1

    (0.5,1,0.5) (120,1,0.75) (120,0.5,1)

    (0,0,0.5) (240,1,0.25) (240,1,0.5)

    August18,2008 RajatRastogi 77

  • 8/6/2019 CE-201Lecture 2-3

    78/78

    ,

    Zhigang andRoy,0624 A itiona Rea ing Compi e materia

    August18,2008 RajatRastogi 78