colorppt

Upload: vinodkumartummalur

Post on 20-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 colorppt

    1/53

    Digital Image ProcessingChapter 5:

    Color Image Processing

  • 7/24/2019 colorppt

    2/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Spectrum of White LightSpectrum of White Light

    1666 ir Isaac !e"ton, 2# $ear old, disco%ered "hite light s&ectr'm.

  • 7/24/2019 colorppt

    3/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Electromagnetic SpectrumElectromagnetic Spectrum

    isi)le light "a%elength* from aro'nd #++ to ++ nm

    1. -or an achromatic (monochrome light so'rce,

    there is onl$ 1 attri)'te to descri)e the /'alit$*intensit$

    2. -or a chromatic light so'rce, there are 0 attri)'tes to descri)ethe /'alit$*

    Radiance total amo'nt of energ$ flo" from a light so'rce (Watts

    'minance amo'nt of energ$ recei%ed )$ an o)ser%er (l'mens

    3rightness intensit$

  • 7/24/2019 colorppt

    4/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Sensitivity of Cones in the Human EyeSensitivity of Cones in the Human Eye

    64 millions cones

    in a h'man e$e 4 65 sensiti%e to Red light

    4 00 sensiti%e to Green light

    4 2 sensiti%e to 3l'e light

    Primar$ colors*

    Defined CIE in 1701

    Red ++ nm

    Green 5#6.1nm

    3l'e #05.8 nm

    CIE Commission Internationale de l9Eclairage

    (:he International Commission on Ill'mination

  • 7/24/2019 colorppt

    5/53

    Primary and Secondary ColorsPrimary and Secondary Colors

    Primar$color

    Primar$

    color

    Primar$

    color

    econdar$

    colors

  • 7/24/2019 colorppt

    6/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Primary and Secondary Colors (cont.)Primary and Secondary Colors (cont.)

    ;dditi%e &rimar$ colors* RG3

    'se in the case of light so'rces

    s'ch as color monitors

    ')tracti%e &rimar$ colors* C

  • 7/24/2019 colorppt

    7/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    R! Color "odelR! Color "odel

    P'r&ose of color models* to facilitate the s&ecification of colors in

    some standard

    RG3 color models*4)ased on Cartesian

    coordinate s$stem.

    :he n'm)er of )its 'sed

    to re&resent each &i?el in

    RG3 &ace is called the

    &i?el De&th.

  • 7/24/2019 colorppt

    8/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    R! Color Cu#eR! Color Cu#e

    R 8 )its

    G 8 )its3 8 )its

    Color de&th 2# )its

    16216 colors

    @idden faces

    of the c')e

  • 7/24/2019 colorppt

    9/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    R! Color "odel (cont.)R! Color "odel (cont.)

    Red fi?ed at 12

  • 7/24/2019 colorppt

    10/53

    C"$ and C"$% Color "odelsC"$ and C"$% Color "odels

    =

    B

    G

    R

    Y

    M

    C

    1

    1

    1

    C C$an

    <

  • 7/24/2019 colorppt

    11/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    HS& Color "odelHS& Color "odel

    RG3, C

  • 7/24/2019 colorppt

    12/53

    @'e* dominant color corres&onding to a dominant

    "a%elength of mi?t're light "a%e.(dominant color as

    &ercei%ed )$ an o)ser%er.

    at'ration* Relati%e &'rit$ or amo'nt of "hite light mi?ed

    "ith a h'e (in%ersel$ &ro&ortional to amo'nt of "hite

    light added

    3rightness* Intensit$

    Color Characteri'ationColor Characteri'ation

    @'e

    at'rationChromaticit$

    amo'nt of red (B, green (= and )l'e ( to form an$ &artic'lar

    color is called tristimulus.

  • 7/24/2019 colorppt

    13/53

    Hue and Saturation on Color PlanesHue and Saturation on Color Planes

    1. ; dot is the &lane is an ar)itrar$ color

    2. @'e is an angle from a red a?is.

    0. at'ration is a distance to the &oint.

  • 7/24/2019 colorppt

    14/53

    HS& Color "odel (cont.)HS& Color "odel (cont.)

    Intensit$ is gi%en )$ a &osition on the %ertical a?is.

  • 7/24/2019 colorppt

    15/53

    HS& Color "odelHS& Color "odel

    Intensit$ is gi%en )$ a &osition on the %ertical a?is.

  • 7/24/2019 colorppt

    16/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Eample HS& Components of R! Cu#eEample HS& Components of R! Cu#e

    @'e at'ration Intensit$

    RG3 C')e

  • 7/24/2019 colorppt

    17/53

    Converting Colors from R! to HS&Converting Colors from R! to HS&

    >

    =

    GB

    GBH

    if06+

    if

    [ ]

    [ ]

    +

    +=

    212

    1

    (((

    ((2

    1

    cosBGBRGR

    BRGR

    BGRS

    ++=

    01

    .(01 BGRI ++=

  • 7/24/2019 colorppt

    18/53

    Converting Colors from HS& to R!Converting Colors from HS& to R!

    .1( SIB =

    +=

    6+cos(cos1HHSIR

    .(1 BRG +=

    RG sector* 12++

  • 7/24/2019 colorppt

    19/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Eample HS& Components of R! ColorsEample HS& Components of R! Colors

    @'e

    at'ration Intensit$

    RG3

    Image

    E l " i l i HS& C

  • 7/24/2019 colorppt

    20/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Eample "anipulating HS& ComponentsEample "anipulating HS& Components

    @'e

    at'ration Intensit$

    RG3

    Image @'e at'ration

    Intensit$ RG3

    Image

    C l & P i

  • 7/24/2019 colorppt

    21/53

    Color &mage ProcessingColor &mage Processing

    :here are 2 t$&es of color image &rocesses

    1. Pse'docolor image &rocess* ;ssigning colors to gra$

    %al'es )ased on a s&ecific criterion. Gra$ scale images to )e &rocessed

    ma$ )e a single image or m'lti&le images s'ch as m'ltis&ectral images

    2. -'ll color image &rocess* :he &rocess to mani&'late real

    color images s'ch as color &hotogra&hs.

    P d l & P iP d l & P i

  • 7/24/2019 colorppt

    22/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Pseudocolor &mage ProcessingPseudocolor &mage Processing

    Wh$ "e need to assign colors to gra$ scale image

    ;ns"er* @'man can disting'ish different colors )etter than different

    shades of gra$.

    Pse'do color false color * In some case there is no Fcolor conce&t

    for a gra$ scale image )'t "e can assign Ffalse colors to an image.

    & t it Sli i * it Sli i& t it Sli i * it Sli i

  • 7/24/2019 colorppt

    23/53

    &ntensity Slicing or *ensity Slicing&ntensity Slicing or *ensity Slicing

    >

    =

    TyxfC

    TyxfCyxg

    ,(if

    ,(if,(

    2

    1

    -orm'la*

    C1 Color !o. 1

    C2

    Color !o. 2

    :

    Intensit$

    Co

    lor

    C1

    C2

    :+ 41

    ; gra$ scale image %ie"ed as a 0D s'rface.

    & t it Sli i E l& t it Sli i E l

  • 7/24/2019 colorppt

    24/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    &ntensity Slicing Eample&ntensity Slicing Eample

    ;n B4ra$ image of a "eld "ith crac>s

    ;fter assigning a $ello" color to &i?els "ith

    %al'e 255 and a )l'e color to all other &i?els.

    " lti L l & t it Sli i" lti L l & t it Sli i

  • 7/24/2019 colorppt

    25/53

    "ulti Level &ntensity Slicing"ulti Level &ntensity Slicing

    kkk lyxflCyxg

  • 7/24/2019 colorppt

    26/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    "ulti Level &ntensity Slicing Eample"ulti Level &ntensity Slicing Eample

    kkk lyxflCyxg er

    :h$roid Phantom.

    ;fter densit$ slicing into 8 colors

    L l t C l + f ti L l t C l + f ti

  • 7/24/2019 colorppt

    27/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    ray Level to Color +ransformationray Level to Color +ransformation

    ;ssigning colors to gra$ le%els )ased on s&ecific ma&&ing f'nctions

    Red com&onent

    Green com&onent

    3l'e com&onent

    Gra$ scale image

    L l t C l + f ti E lray Level to Color +ransformation Eample

  • 7/24/2019 colorppt

    28/53

    (Images from Rafael C.

    Gonzalez and Richard

    E. Wood, Digital ImageProcessing, 2ndEdition.

    ray Level to Color +ransformation Eampleray Level to Color +ransformation Eample

    ;n B4ra$ image of a

    garment )ag "ith a

    sim'lated e?&losi%e

    de%ice

    ;n B4ra$ image

    of a garment )ag

    Color

    coded

    images

    :ransformations

    L l t C l + f ti E lray Level to Color +ransformation Eample

  • 7/24/2019 colorppt

    29/53

    (Images from Rafael C.

    Gonzalez and Richard

    E. Wood, Digital ImageProcessing, 2ndEdition.

    ray Level to Color +ransformation Eampleray Level to Color +ransformation Eample

    ;n B4ra$ image of a

    garment )ag "ith a

    sim'lated e?&losi%e

    de%ice

    ;n B4ra$ image

    of a garment )ag

    Color

    codedimages

    :ransformations

    Pse docolor CodingPseudocolor Coding

  • 7/24/2019 colorppt

    30/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Pseudocolor CodingPseudocolor Coding

    Hsed in the case "here there are man$ monochrome images s'ch as m'ltis&ectral

    satellite images.

    !asics of ,ull Color &mage Processing!asics of ,ull Color &mage Processing

  • 7/24/2019 colorppt

    31/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    !asics of ,ull-Color &mage Processing!asics of ,ull-Color &mage Processing

    2

  • 7/24/2019 colorppt

    32/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    EampleEample ,ull-Color &mage and ariouis Color Space Components,ull-Color &mage and ariouis Color Space Components

    Color image

    C

  • 7/24/2019 colorppt

    33/53

    Color +ransformationColor +ransformation

    -orm'lation*

    [ ].,(.,( yxfTyxg =

    f(x,y in&'t color image, g(x,y o't&'t color image

    T o&eration on fo%er a s&atial neigh)orhood of (x,y

    When onl$ data at one &i?el is 'sedin the transformation, "e

    can e?&ress the transformation as*

    .,,,( 21 nii rrrTs

    = i 1, 2, , n

    Where ri color com&onent of f(x,y

    si color com&onent of g(x,y

    Hse to transform colors to colors.

    -or RG3 images, n 0

    Eample Color +ransformationEample Color +ransformation

  • 7/24/2019 colorppt

    34/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Eample Color +ransformationEample Color +ransformation

    .,(.,(

    .,(.,(

    .,(.,(

    yxkryxs

    yxkryxs

    yxkryxs

    BB

    GG

    RR

    =

    =

    =

    -orm'la for RG3*

    .,(.,( yxkryxs II =

    -orm'la for CJ1.

    k +.

    I H,S

    Color ComplementsColor Complements

  • 7/24/2019 colorppt

    35/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color ComplementsColor Complements

    Color com&lement re&laces each color "ith its o&&osite color in the

    color circle of the @'e com&onent. :his o&eration is analogo's to

    image negati%e in a gra$ scale image.

    Color circle

    Color &mage SmoothingColor &mage Smoothing

  • 7/24/2019 colorppt

    36/53

    Color &mage SmoothingColor &mage Smoothing

    / "ethods1. Per4color4&lane method*for RG3, C

  • 7/24/2019 colorppt

    37/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color &mage Smoothing Eample (cont.)Color &mage Smoothing Eample (cont.)

    Color image Red

    Green 3l'e

    Color &mage Smoothing Eample (cont )Color &mage Smoothing Eample (cont )

  • 7/24/2019 colorppt

    38/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color &mage Smoothing Eample (cont.)Color &mage Smoothing Eample (cont.)

    @'e at'ration Intensit$

    Color image

    @I Com&onents

    Color &mage Smoothing Eample (cont )Color &mage Smoothing Eample (cont )

  • 7/24/2019 colorppt

    39/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color &mage Smoothing Eample (cont.)Color &mage Smoothing Eample (cont.)

    mooth all RG3 com&onents mooth onl$ I com&onent of @I

    (faster

    Color &mage Smoothing Eample (cont )Color &mage Smoothing Eample (cont )

  • 7/24/2019 colorppt

    40/53

    Color &mage Smoothing Eample (cont.)Color &mage Smoothing Eample (cont.)

    Difference )et"een

    smoothed res'lts from 2methods in the &re%io's

    slide.

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color &mage SharpeningColor &mage Sharpening

  • 7/24/2019 colorppt

    41/53

    Color &mage SharpeningColor &mage Sharpening

    We can do in the same manner as color image smoothing*

    1. Per4color4&lane method for RG3,C

  • 7/24/2019 colorppt

    42/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color &mage Sharpening Eample (cont.)Color &mage Sharpening Eample (cont.)

    Difference )et"een

    shar&ened res'lts from 2methods in the &re%io's

    slide.

    Color SegmentationColor Segmentation

  • 7/24/2019 colorppt

    43/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color SegmentationColor Segmentation

    / "ethods

    1. egmented in @I color s&ace*

    ; thresholding f'nction )ased on color information in @ and Com&onents. We rarel$ 'se I com&onent for color image

    segmentation.

    2. egmentation in RG3 %ector s&ace*; thresholding f'nction )ased on distance in a color %ector s&ace.

  • 7/24/2019 colorppt

    44/53

    egmentation in @I model*

    K Color is con%enientl$ re&resented in the h'e

    image.

    K at'ration is 'sed as a mas>ing image inorder to isolate f'rther regions of interest in

    the h'e image.

    K Intensit$ image is 'sed less fre/'entl$ forsegmentation of color images. 3eca'se it

    carries no color information.

    Color Segmentation in HS& Color SpaceColor Segmentation in HS& Color Space

  • 7/24/2019 colorppt

    45/53

    Color Segmentation in HS& Color SpaceColor Segmentation in HS& Color Space

    @'e

    at'ration Intensit$

    Color image

    1 2

    0 #

    (Images from Rafael C.

    Gonzalez and Richard E.Wood, Digital Image

    Processing, 2ndEdition.

    Color Segmentation in HS& Color Space (cont.)Color Segmentation in HS& Color Space (cont.)

  • 7/24/2019 colorppt

    46/53

    Color Segmentation in HS& Color Space (cont.)Color Segmentation in HS& Color Space (cont.)

    Prod'ct of and

    5 6

    8

    523inar$ thresholding of com&onent

    "ith : 1+

    @istogram of 6 egmentation of red color &i?els

    Red &i?els

    (Images from Rafael C.

    Gonzalez and Richard E.

    Wood, Digital Image

    Processing, 2ndEdition.

    Color Segmentation in HS& Color Space (cont.)Color Segmentation in HS& Color Space (cont.)

  • 7/24/2019 colorppt

    47/53

    Color Segmentation in HS& Color Space (cont.)Color Segmentation in HS& Color Space (cont.)

    Color image egmented res'lts of red &i?els

    (Images from Rafael C.

    Gonzalez and Richard E.

    Wood, Digital Image

    Processing, 2ndEdition.

    Color Segmentation in R! ector SpaceColor Segmentation in R! ector Space

  • 7/24/2019 colorppt

    48/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Color Segmentation in R! ector SpaceColor Segmentation in R! ector Space

    1. Each &oint "ith (R,G,3 coordinate in the %ector s&ace re&resents

    one color.

    2. egmentation is )ased on distance thresholding in a %ector s&ace

    >=TyxD

    TyxDyxg

    T

    T

    ,,((if+

    ,,((if1,(

    cc

    cc

    cT color to )e segmented.

    c(x,y RG3 %ector at &i?el (?,$.D(u,v distance f'nction

    Eample Segmentation in R! ector SpaceEample Segmentation in R! ector Space

  • 7/24/2019 colorppt

    49/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    Eample Segmentation in R! ector SpaceEample Segmentation in R! ector Space

    Color image

    Res'lts of segmentation in

    RG3 %ector s&ace "ith :hreshold%al'e

    Reference color cTto )e segmented)o?thein&i?elofcolora%erage=

    Tc

    T 1.25 times the D of R,G,3 %al'es

    In the )o?

    radient of a Color &mageradient of a Color &mage

  • 7/24/2019 colorppt

    50/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    radient of a Color &mageg

    ince gradient is define onl$ for a scalar image, there is no conce&t

    of gradient for a color image. We can9t com&'te gradient of each

    color com&onent and com)ine the res'lts to get the gradient of a colorimage.

    Red Green 3l'e

    Edges

    We see

    # o)Lects.

    We see

    2 o)Lects.

    radient of a Color &mage (cont.)radient of a Color &mage (cont.)

  • 7/24/2019 colorppt

    51/53

    radient of a Color &mage (cont.)g ( )

    Mne "a$ to com&'te the ma?im'm rate of change of a color image

    "hich is close to the meaning of gradient is to 'se the follo"ing

    form'la* Gradient com&'ted in RG3 color s&ace*

    [ ]2

    1

    2sin22cos((2

    1(

    +++= xyyyxxyyxx gggggF

    ( )

    =

    yyxx

    xy

    gg

    g2tan

    2

    1 1

    222

    x

    B

    x

    G

    x

    R

    gxx

    +

    +

    =

    222

    y

    B

    y

    G

    y

    R

    gyy

    +

    +

    =

    y

    B

    x

    B

    y

    G

    x

    G

    y

    R

    x

    Rgxy

    +

    +

    =

    radient of a Color &mage Eampleradient of a Color &mage Eample

  • 7/24/2019 colorppt

    52/53

    (Images from Rafael C. Gonzalez and Richard E.

    Wood, Digital Image Processing, 2ndEdition.

    M)tained 'sing

    the form'lain the &re%io's

    slide

    'm of

    gradients of

    each colorcom&onent

    Mriginal

    image

    Difference

    )et"een2 and 0

    2

    0

    2 0

    g pg p

    radient of a Color &mage Eampleradient of a Color &mage Eample

  • 7/24/2019 colorppt

    53/53

    Gradients of each color com&onent

    Red Green 3l'e

    g pg p