03 - Light, Color, Eyes, And Pixels

Embed Size (px)

Citation preview

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    1/34

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    2/34

    The Eye

    The human eye is a camera! Iris - colored annulus with radial muscles Pupil - the hole (aperture) whose size is controlled by the iris Whats the film?

    photoreceptor cells (rods and cones) in the retina

    Slide by Steve Seitz

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    3/34

    The Retina

    Cross-section of eye

    Ganglion cell layerBipolar cell layer

    Receptor layer

    Pigmentedepithelium

    Ganglion axons

    Cross section of retina

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    4/34

    What humans dont have: tapetum lucidum

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    5/34

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    6/34

    Rod / Cone sensitivity

    The famous sock- matching problem

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    7/34

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    8/34

    Electromagnetic Spectrum

    http://www.yorku.ca/eye/photopik.htm

    Human Luminance Sensitivity Function

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    9/34

    Why do we see light of these wavelengths?

    Stephen E. Palmer, 2002

    because thats where the

    Sun radiates EM energy

    Visible Light

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    10/34

    The Physics of Light

    Any patch of light can be completely describedphysically by its spectrum: the number of photons(per time unit) at each wavelength 400 - 700 nm.

    400 500 600 700

    Wavelength (nm.)

    # Photons(per ms.)

    Stephen E. Palmer, 2002

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    11/34

    The Physics of Light

    .

    #Photons

    D. Normal Daylight

    Wavelength (nm.)

    B. Gallium Phosphide Crystal

    400 500 600 700

    #P

    hotons

    Wavelength (nm.)

    A. Ruby Laser

    400 500 600 700

    400 500 600 700

    #Photons

    C. Tungsten Lightbulb

    400 500 600 700

    #P

    hotons

    Some examples of the spectra of light sources

    Stephen E. Palmer, 2002

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    12/34

    The Physics of Light

    Some examples of the reflectance spectra of surfaces

    Wavelength (nm)

    % P

    h o t o n s

    R e

    f l e c t e

    d

    Red

    400 700

    Yellow

    400 700

    Blue

    400 700

    Purple

    400 700

    Stephen E. Palmer, 2002

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    13/34 Stephen E. Palmer, 2002

    .

    400 450 500 550 600 650RELATIVE ABSORBANCE (%)

    WAVELENGTH (nm.)

    100

    50

    440

    S

    530 560 nm.

    M L

    Three kinds of cones:

    Physiology of Color Vision

    Why are M and L cones so close? Why are there 3?

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    14/34

    Tetrachromatism

    Most birds, and many other animals, havecones for ultraviolet light.

    Some humans, mostly female, seem to haveslight tetrachromatism.

    Bird coneresponses

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    15/34

    Image Formation

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    16/34

    Digital camera

    A digital camera replaces film with a sensor array Each cell in the array is light-sensitive diode that converts photons to

    electrons Two common types: Charge Coupled Device (CCD) and CMOS http://electronics.howstuffworks.com/digital-camera.htm

    Slide by Steve Seitz

    http://electronics.howstuffworks.com/digital-camera.htmhttp://electronics.howstuffworks.com/digital-camera.htmhttp://electronics.howstuffworks.com/digital-camera.htm
  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    17/34

    Sensor Array

    CMOS sensor

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    18/34

    The raster image (pixel matrix)

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    19/34

    The raster image (pixel matrix)0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.92

    0.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    20/34

    Color Images: Bayer Grid

    Estimate RGB

    at G cells fromneighboringvalues

    http://www.cooldictionary.com/words/Bayer-filter.wikipedia

    Slide by Steve Seitz

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    21/34

    Color ImageR

    G

    B

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    22/34

    Images in Matlab Images represented as a matrix Suppose we have a NxM RGB image called im

    im(1,1,1) = top-left pixel value in R-channel im(y, x, b) = y pixels down, x pixels to right in the b th channel im(N, M, 3) = bottom-right pixel in B-channel

    imread(filename) returns a uint8 image (values 0 to 255) Convert to double format (values 0 to 1) with im2double

    0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.99

    0.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

    0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.92

    0.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

    0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

    R

    G

    B

    row column

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    23/34

    Color spaces

    How can we represent color?

    http://en.wikipedia.org/wiki/File:RGB_illumination.jpg

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    24/34

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    25/34

    Color spaces: HSV

    Intuitive color space

    H(S=1,V=1)

    S(H=1,V=1)

    V(H=1,S=0)

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    26/34

    Color spaces: YCbCr

    Y(Cb=0.5,Cr=0.5)

    Cb(Y=0.5,Cr=0.5)

    Cr (Y=0.5,Cb=05)

    Y=0 Y=0.5

    Y=1Cb

    Cr

    Fast to compute, good forcompression, used by TV

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    27/34

    Color spaces: L*a*b*

    Perceptually uniform * color space

    L(a=0,b=0)

    a(L=65,b=0)

    b(L=65,a=0)

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    28/34

    If you had to choose, would you rather gowithout luminance or chrominance?

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    29/34

    If you had to choose, would you rather gowithout luminance or chrominance?

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    30/34

    Most information in intensity

    Only color shown constant intensity

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    31/34

    Most information in intensity

    Only intensity shown constant color

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    32/34

    Most information in intensity

    Original image

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    33/34

    Back to grayscale intensity0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.92

    0.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

  • 8/10/2019 03 - Light, Color, Eyes, And Pixels

    34/34

    Next classes: filtering!

    Image filters in spatial domain Filter is a mathematical operation of a grid of numbers Smoothing, sharpening, measuring texture

    Image filters in the frequency domain Filtering is a way to modify the frequencies of images Denoising, sampling, image compression

    Templates and Image Pyramids Filtering is a way to match a template to the image Detection, coarse-to-fine registration