Docstoc

Color to Binary Vision The assignment More challenging Extra

Document Sample
Color to Binary Vision The assignment More challenging Extra Powered By Docstoc
					                                                                                                  Announcements

                                                                              •     First assignment was available last Thursday
                                                                                    –    Use whatever language you want.
                          Color to                                                  –    Link to matlab resources from web page

                        Binary Vision                                         •     Always check web page for updates on readings,
                                                                                    etc.
                         Computer Vision                                      •     Discussion group for course is available as link
                                                                                    from the course web page.
                           CSE 190-B                                          •     Subscribe to class mailing list with
                            Lecture 5                                               send e-mail to majordomo@cs.ucsd.edu with body
                                                                                         subscribe cse190-b my_email@something.something


CSE190-B, Spring 2003                                Computer Vision   CSE190-B, Spring 2003                                         Computer Vision




                        The assignment                                            More challenging (Extra Credit)
                              Irfanview: A good utility
       Two parts:                    For images
             1. Color classification
             2. Binary image processing


                                   Label
                                     • Red pixels as 1
                                     • Green Pixels as 2
                                     • Black pixels as 0

CSE190-B, Spring 2003                                Computer Vision   CSE190-B, Spring 2003                                         Computer Vision




         Other part: Binary Image Proccessing                                                          Lighting
                     (Next lecture)
                                                                              • Applied lighting can be represented as a
                                                                                function on the 4-D ray space (radiances)

                                                                              • Special light sources
                                                                                 – Point sources
                                                                                 – Distant point sources
                                                                                 – Strip sources
                                                                                 – Area sources


CSE190-B, Spring 2003                                Computer Vision   CSE190-B, Spring 2003                                         Computer Vision
                              Camera’s sensor                                                                                    BRDF
       • Measured pixel intensity is a function of irradiance                     • Bi-directional Reflectance
         integrated over                                                            Distribution Function
             – pixel’s area
             – over a range of wavelengths
                                                                                             ρ(θin, φin ; θout, φout)
             – For some time
                                                                                  • Function of
       • Ideally, it’s proportional to the radiance.                                   – Incoming light direction:                              (θin,φin)
                                                                                                                                                                     ^
                                                                                                                                                                     n
                                                                                             θin , φin
                                                                                       – Outgoing light direction:
                                                                                             θout , φout
             I = ∫∫∫∫ E(x, y, λ, t )s(x, y)q(λ)dydxd dt
                                                   λ                                                                                                                (θout,φout)
                    t λ x y                                                       • Ratio of incident irradiance to
                                                                                    emitted radiance

CSE190-B, Spring 2003                                           Computer Vision   CSE190-B, Spring 2003                                                                           Computer Vision




                                                                                                            The appearance of colors
                               Robot Soccer
                                                                                         • Color appearance is strongly affected by (at
                                                                                           least):
                                                                                               –   Spectrum of lighting striking the retina
                                                                                               –    other nearby colors (space)
                                                                                               –   adaptation to previous views (time)
                                                                                               –   “state of mind”




CSE190-B, Spring 2003                                           Computer Vision   CSE190-B, Spring 2003                                                                           Computer Vision




                              Light Spectrum                                                                    Color Reflectance
                                                                                                                                     Measured color spectrum is
                                                                                                                                      a function of the spectrum
                                                                                                                                      of the illumination and
                                                                                                                                      reflectance




                                                                                                 From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides
CSE190-B, Spring 2003                                           Computer Vision   CSE190-B, Spring 2003                                                                           Computer Vision
                          Illumination Spectra                                                                                     Color receptors

                   Blue skylight                                     Tungsten bulb



                                                                                                                    “Red” cone      “Green” cone           “Blue” cone


                                                                                                                Response of k’th cone =
                                                                                                                                               ∫ρ    k
                                                                                                                                                         (λ ) E (λ ) dλ


               From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides
CSE190-B, Spring 2003                                                                    Computer Vision   CSE190-B, Spring 2003                                            Computer Vision




                               RGB Color Cube                                                                                       Color spaces
                                                           • Block of colours for (r, g,                     • Linear color spaces describe        • RGB: primaries are
                                                             b) in the range (0-1).                            colors as linear combinations         monochromatic, energies are
                                                           • Convenient to have an                             of primaries                          645.2nm, 526.3nm, 444.4nm.
                                                             upper bound on                                                                          Color matching functions have
                                                                                                             • Choice of primaries=choice of         negative parts -> some colors
                                                             coefficient of each                               color matching
                                                             primary.                                                                                can be matched only
                                                                                                               functions=choice of color             subtractively.
                                                           • In practice:                                      space                               • CIE XYZ: Color matching
                                                                 – primaries given by monitor
                                                                   phosphors                                 • Color matching functions,             functions are positive
                                                                 – (phosphors are the materials                hence color descriptions, are         everywhere, but primaries are
                                                                   on the face of the monitor                  all within linear                     imaginary. Usually draw x, y,
                                                                   screen that glow when
                                                                                                               transformations                       where x=X/(X+Y+Z)
                                                                   struck by electrons)                                                                   y=Y/(X+Y+Z)


CSE190-B, Spring 2003                                                                    Computer Vision   CSE190-B, Spring 2003                                            Computer Vision




                                 Color Matching                                                                              Color matching functions
                                                                                                                  • Choose primaries, say A, B, C
                                                                                                                  • Given energy function, E(λ )
                                                                                                                    what amounts of primaries will          Then our match is:
                                                                                                                    match it?
                                                                                                                  • For each wavelength λ, determine
                                                                                                                    how much of A, of B, and of C is          { a(λ )E(λ )dλ } +
                                                                                                                                                               ∫               A
                                                                                                                    needed to match light of that
                                                                                                                    wavelength alone. λ )
                                                                                                                                    a(
                                                                                                                                                              { b(λ )E(λ )dλ} +
                                                                                                                                                                ∫              B

                                                                                                                                    b(λ )                        { c(λ )E(λ )dλ}
                                                                                                                                                                  ∫              C
                                                                                                                                    c(λ )
  Not on a computer Screen
                                                                                                                  • These are color matching
                                                                                                                    functions

CSE190-B, Spring 2003                                                                    Computer Vision   CSE190-B, Spring 2003                                            Computer Vision
                        RGB Color Matching
                                                                                                                           CIE XYZ: Color
                                                                                                                           matching functions are
                                                                                                                           positive everywhere, but
                                                                                                                           primaries are imaginary.
                                                                                                                           Usually draw x, y, where
                                     RGB: primaries are
                                                                                                                           x=X/(X+Y+Z)
                                     monochromatic, energies are
                                                                                                                                    y=Y/(X+Y+Z)
                                     645.2nm, 526.3nm, 444.4nm.
                                     Color matching functions have
                                     negative parts -> some colors
                                     can be matched only
                                     subtractively.




CSE190-B, Spring 2003                                  Computer Vision   CSE190-B, Spring 2003                                              Computer Vision




        CIE XYZ Color Matching Functions                                                         CIE -XYZ and x-y


                                      CIE XYZ: Color
                                      matching functions are
                                      positive everywhere, but
                                      primaries are imaginary.
                                      Usually draw x, y, where
                                      x=X/(X+Y+Z)
                                               y=Y/(X+Y+Z)




CSE190-B, Spring 2003                                  Computer Vision   CSE190-B, Spring 2003                                              Computer Vision




        CIE xyY (Chromaticity Space)                                                                 RGB to YIQ

                                                                                The YIQ system is the colour primary system adopted by
                                                                                  NTSC for color television broadcasting. The YIQ color
                                                                                  solid is formed by a linear transformation of the RGB
                                                                                  cube. Its purpose is to exploit certain characteristics of the
                                                                                  human visual system to maximize the use of a fixed
                                                                                  bandwidth.

                                                                                [Y]     [ 0.299 0.587 0.114 ] [ R ]
                                                                                [ I ] = [ 0.596 -0.274 -0.322 ] [ G ]
                                                                                [Q]     [ 0.212 -0.523 0.311 ] [ B ]

                                                                                Note that “Y” captures intensity whereas I & Q capture the
                                                                                  effects of hue & saturation.

CSE190-B, Spring 2003                                  Computer Vision   CSE190-B, Spring 2003                                              Computer Vision
                                                                                                             Metameric Lights
                                HSV Hexcone
                                                                                                               (Metamers)
                              Hue, Saturation, Value
                        AKA: Hue, Saturatation, Intensity (HIS)




     Hexagon arises from projection of cube onto plane
     orthogonal to (R,G,B) = (1,1,1)
CSE190-B, Spring 2003                                             Computer Vision   CSE190-B, Spring 2003                               Computer Vision




        Blob Tracking for Robot Control                                                                     Connected Regions

                                                                                                            1 1 1
                                                                                                            1 1 1         1 1 1   1
                                                                                                            1 1 1       1 1       1
                                                                                                                  1 1   1 1       1 1
                                                                                                                1 1 1     1 1 1   1
                                                                                                                  1


                                                                                     • What the connected regions in this binary image?
                                                                                     • Which regions are contained within which region?
CSE190-B, Spring 2003                                             Computer Vision   CSE190-B, Spring 2003                               Computer Vision




                           Connected Regions

                          1                     1 1 1 1 1
                        1 1                 1           1
                        1 1               1 1           1 1
                        1 1                     1 1 1 1 1




 • What the connected regions in this binary image?
 • Which regions are contained within which region?
CSE190-B, Spring 2003                                             Computer Vision

				
DOCUMENT INFO