Assignment: Light, Cameras, and Image Formation

Similar documents
Capturing Light in man and machine

Capturing Light in man and machine

Capturing Light in man and machine

Assignment: Cameras and Light

Capturing Light in man and machine

Fig Color spectrum seen by passing white light through a prism.

Colors in images. Color spaces, perception, mixing, printing, manipulating...

Capturing Light in man and machine. Some figures from Steve Seitz, Steve Palmer, Paul Debevec, and Gonzalez et al.

Lecture 2. Electromagnetic radiation principles. Units, image resolutions.

Intorduction to light sources, pinhole cameras, and lenses

Bettina Selig. Centre for Image Analysis. Swedish University of Agricultural Sciences Uppsala University

Waitlist. We ll let you know as soon as we can. Biggest issue is TAs

Oversubscription. Sorry, not fixed yet. We ll let you know as soon as we can.

Capturing Light in man and machine

What is Color Gamut? Public Information Display. How do we see color and why it matters for your PID options?

Motion illusion, rotating snakes

Frequencies and Color

Color Image Processing. Gonzales & Woods: Chapter 6

Light. intensity wavelength. Light is electromagnetic waves Laser is light that contains only a narrow spectrum of frequencies

Teaching Time: Two 50-minute periods

Color Image Processing EEE 6209 Digital Image Processing. Outline

Image and Multidimensional Signal Processing

Image Processing. Michael Kazhdan ( /657) HB Ch FvDFH Ch. 13.1

Sensors and Sensing Cameras and Camera Calibration

12/02/2017. From light to colour spaces. Electromagnetic spectrum. Colour. Correlated colour temperature. Black body radiation.

Some Basic Concepts of Remote Sensing. Lecture 2 August 31, 2005

Color images C1 C2 C3

CS101 Lecture 12: Digital Images. What You ll Learn Today

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Introduction to Color Theory

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

Digital Photography: Fundamentals of Light, Color, & Exposure Part II Michael J. Glagola - December 9, 2006

Interactive Computer Graphics

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

MATH 5300 Lecture 3- Summary Date: May 12, 2008 By: Violeta Constantin

Light, Color, Spectra 05/30/2006. Lecture 17 1

Figure 1: Energy Distributions for light

Lecture Color Image Processing. by Shahid Farid

Introduction to Remote Sensing

746A27 Remote Sensing and GIS

Technology and digital images

Digital Image Processing. Lecture # 8 Color Processing

Introduction. The Spectral Basis for Color

Study guide for Graduate Computer Vision

Light and Color. Computer Vision Jia-Bin Huang, Virginia Tech. Empire of Light, 1950 by Rene Magritte

Hello, welcome to the video lecture series on Digital image processing. (Refer Slide Time: 00:30)

Digital Image Processing (DIP)

Introduction to Remote Sensing. Electromagnetic Energy. Data From Wave Phenomena. Electromagnetic Radiation (EMR) Electromagnetic Energy

PHYSICS - Chapter 16. Light and Color and More

To discuss. Color Science Color Models in image. Computer Graphics 2

Experiment P-40 Colors of Light

Color Image Processing

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

Chapter 16 Light Waves and Color

The RGB code. Part 1: Cracking the RGB code (from light to XYZ)

CS6640 Computational Photography. 6. Color science for digital photography Steve Marschner

CPSC 4040/6040 Computer Graphics Images. Joshua Levine

Light waves. VCE Physics.com. Light waves - 2

THE CANDELA - UNIT OF LUMINOUS INTENSITY

earthobservation.wordpress.com

LECTURE III: COLOR IN IMAGE & VIDEO DR. OUIEM BCHIR

Colour (1) Graphics 2

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

Lecture 8. Color Image Processing

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Computer Graphics Si Lu Fall /27/2016

Raster Graphics. Overview קורס גרפיקה ממוחשבת 2008 סמסטר ב' What is an image? What is an image? Image Acquisition. Image display 5/19/2008.

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Raster Graphics 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Alternate Light Source Imaging

Microwave Diffraction and Interference

Color vision and representation

Period 3 Solutions: Electromagnetic Waves Radiant Energy II

Acquisition and representation of images

Color Measurement with the LSS-100P

Capturing light and color

INTRODUCTION TO CCD IMAGING

Color Image Processing

Colour. Cunliffe & Elliott, Chapter 8 Chapman & Chapman, Digital Multimedia, Chapter 5. Autumn 2016 University of Stirling

Introduction. Laser Diodes. Chapter 12 Laser Communications

PHYS General Physics II Lab Diffraction Grating

Human Vision, Color and Basic Image Processing

Histograms and Color Balancing

Build Spectroscope. This activity is suitable for Middle School or High School Students. State Standards Met

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

6.098/6.882 Computational Photography 1. Problem Set 1. Assigned: Feb 9, 2006 Due: Feb 23, 2006

Vision 1. Physical Properties of Light. Overview of Topics. Light, Optics, & The Eye Chaudhuri, Chapter 8

19. Vision and color

Overview. Pinhole camera model Projective geometry Vanishing points and lines Projection matrix Cameras with Lenses Color Digital image

Color & Compression. Robin Strand Centre for Image analysis Swedish University of Agricultural Sciences Uppsala University

Digital Image Processing

Spectral Analysis of the LUND/DMI Earthshine Telescope and Filters

Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology, Understand general usage of color

Radiometric and Photometric Measurements with TAOS PhotoSensors

Colour. Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!) Colour Lecture!

Comparing Sound and Light. Light and Color. More complicated light. Seeing colors. Rods and cones

DIGITAL IMAGE PROCESSING LECTURE # 4 DIGITAL IMAGE FUNDAMENTALS-I

Digital Image Processing

Camera Requirements For Precision Agriculture

Introduction Visible light is an electromagnetic wave, characterized by a wavelength, an amplitude

Human Retina. Sharp Spot: Fovea Blind Spot: Optic Nerve

Transcription:

Assignment: Light, Cameras, and Image Formation Erik G. Learned-Miller February 11, 2014 1

Problem 1. Linearity. (10 points) Alice has a chandelier with 5 light bulbs sockets. Currently, she has 5 100-watt incandescent bulbs in the sockets. Each incandescent bulb is characterized by a spectrum S INC (λ), for integer λ from 380 to 779, which gives the fraction of the total power output for each interval with wavelengths between λ and λ + 1 nanometers. For example, if S INC (523) = 0.002, then it means that the incandescent bulb outputs 0.002 100 =.2 watts in the range of 523 524 nanometer wavelengths. Eventually, she wants to replace the incandescent bulbs with fancy new light emitting diode (LED) bulbs (also 100-watt bulbs) that have a different spectrum S LED (λ), but right now, she only has 3 of these. She replaces 3 of the 5 incandescent bulbs with the LED bulbs. Give a formula for the chandelier s new spectrum S TOTAL in terms of the components of S INC and S LED. The new spectrum should give the fraction of the total power at each 1 nanometer portion of the visible spectrum. Problem 2. Inverse Square Law (10 points). Melon Husk, the CEO of Space OX, has just launched a new satellite into orbit. The satellite has a device which measures the amount of electromagnetic radiation (light), in wavelengths between 100nm and 1000nm, coming from a particular small region of the sky. It restricts the light detection to this small region by using a collimator to block light coming from other sources (such as the sun, the moon, and other stars). He aims the satellite s detector at a small region of the sky containing the binary star system Alpha Centauri. On the satellite s sensor, which is 1cm by 1cm, he estimates the light power is about 1.5 10 12 watts. Alpha Centauri is about 4.37 light years from earth. How much power is it producing in the 100-1000 nanometer range? (Warning: the numbers in this problem may not correspond to the star s true distance or power, so if you look them up on the internet, you will be wrong.) Draw a picture to illustrate your solution. 2

Problem 3. Tristimulus theory (30 points). Let F 1, F 2, and F 3 below represent the power spectra of 3 different colored flashlights, where each of the 10 values is the fraction of power produced in a 40nm range from 380nm to 780nm. (Note: some of the power will be in the non-visible spectrum). F 1 = [ 0.0, 0.01, 0.01, 0.02, 0.01, 0.02, 0.17, 0.29, 0.35, 0.02 ] F 2 = [ 0.0, 0.01, 0.02, 0.11, 0.20, 0.30, 0.19, 0.10, 0.01, 0.0 ] F 3 = [ 0.01, 0.12, 0.25, 0.27, 0.13, 0.02, 0.01, 0.01, 0.0, 0.0 ] For example, flashlight F 1 produces 2 percent of its power in the range 740-780nm. Figure 1: Three Flashlight Spectra. This image shows the three spectra of F 1, F 2, and F 3. Let S r (λ), S g (λ), and S b (λ) represent the relative absorption spectra of the cone cells in your eye. This means that, of the power absorbed by a given type of cone cell, the fraction absorbed in a given range is given by these numbers. S r (λ) = [ 0.16, 0.26, 0.28, 0.15, 0.10, 0.03, 0.02, 0.0, 0.0, 0.0 ] S g (λ) = [ 0.0, 0.0, 0.04, 0.23, 0.34, 0.23, 0.15, 0.01, 0.0, 0.0 ] S b (λ) = [ 0.0, 0.0, 0.0, 0.0, 0.01, 0.04, 0.08, 0.23, 0.35, 0.29 ] 3

When a flashlight is 5 meters from a white screen, assume that it stimulates a cone cell response (relative to the maximum possible response from that cone) given by 10 Rc f = F f (i) S c (i). i=1 Here F f is flashlight f, S c is the absorption spectrum for cones of type c, and R f c is the response for cone cell type c and flashlight f. For example, from 5 meters away, the third flashlight F 3 generate a response from the green cone cells of 10 i=1 F 3 (i) S g (i) = (0.01)(0.0) + (0.12)(0.0) + (0.25)(0.04) + (0.27)(0.23) + (0.13)(0.34) + (0.02)(0.23) + (0.01)(0.15) + (0.01)(0.01) + (0.0)(0.0) + (0.0)(0.0) = 0.1225. Consider the response of all 3 cone cell types at once to a given flashlight f at 5 meters from the white screen. We will call this variable R f, and it will be a vector of 3 values: R f = Of course, the color that you see for a particular flashlight will be related to the cone cell responses R f produced by that flashlight. Due to the linearity of light and the approximate linearity of cone cell responses, you can model the responses of the cone cells to two flashlights, say 1 and 3, as R 1 + R 3 = R f r R f g R f b R 1 r + R 3 r R 1 g + R 3 g R 1 b + R3 b Problem 3.A. Let the matrix R be defined to be Rr 1 Rr 2 Rr 3 R = Rg 1 Rg 2 Rg 3 Rb 1 Rb 2 Rb 3 Write a Matlab function to compute the matrix R given F 1, F 2, F 3, S r, S g, and S b. Give the value of the matrix R here: 4

If we had a way to make each flashlight brighter or dimmer, then we could create novel color combinations. In particular, if we let b 1 be the brightness multiplier for flashlight 1, b 2 the brightness multiplier for flashlight 2, and b 3 the brightness multiplier for flashlight 3, then we can create arbitrary linear combinations of the 3 flashlights as b 1 R 1 + b 2 R 2 + b 3 R 3 = b 1 R 1 r + b 2 R 2 r + b 3 R 3 r b 1 R 1 g + b 2 R 2 g + b 3 R 3 g b 1 R 1 b + b 2R 2 b + b 3R 3 b In particular, a brightness multiplier value of 1 would result in a brightness equal to the brightness of the flashlight at the default distance of 5 meters. By the inverse square law of brightness, the brightness would be 0.25 if the flashlight were twice as far from the screen (10 meters away). Problem 3.B. To achieve various brightness multiplier values, we will move a flashlight closer to or further from the screen than the 5 meter starting distance. Give a formula for the distance to achieve a certain brightness multiplier b using the inverse square law: Now suppose you want to create a combination of lights that results in a particular perceived color. For example, the color turquoise is perceived when the RGB cone cells have a response of C turquoise = 0.2896 0.8862 0.7471 We need to solve the following set of equations b 1 R 1 r + b 2 R 2 r + b 3 R 3 r = C r b 1 R 1 g + b 2 R 2 g + b 3 R 3 g = C g b 1 R 1 b + b 2R 2 b + b 3R 3 b = C b 5

This can be written in matrix form as Rb = C, where R is the matrix defined previously, b is a vector of 3 multiplier values, and C is the 3 color components for the desired color. Fortunately, this is extremely easy to solve in Matlab! By multiplying both sides by the matrix inverse of R, we obtain R 1 Rb = R 1 C, and then, simplifying, b = R 1 C. In Matlab, the inverse of a matrix can be obtained by simply raising the matrix to the power -1. Problem 3.C. Write a Matlab function, which, given the matrix R and a set of desired color responses in the form of a vector C calculates the proper brightness multiplier weights b and returns them as a single vector of 3 values. 6

Problem 3.D. Finally, use your results from the previous parts to figure out how far away each flashlight should be from the screen to obtain these color values. As an intermediate step, you will want to compute the multiplier weights for each flashlight that you want to obtain: Turquoise: C turquoise = 0.2896 0.8862 0.7471 b 1 : b 2 : b 3 : Goldenrod (a slightly brownish yellow): 0.8567 C goldenrod = 0.6874 0.1408 b 1 : b 2 : b 3 : For each color, how far from the wall should you place the 3 flashlights? Turquoise: Flashlight 1 dist: Flashlight 2 dist: Flashlight 3 dist: Goldenrod: Flashlight 1 dist: Flashlight 2 dist: Flashlight 3 dist: 7

Problem 4. Simulated Bayer filters (30 points). Bayer filters or patterns are used in many camera designs to allow the capture of different parts of the visible light spectrum across the image and hence gather color information while still only using a single sensor array (such as a CCD array). Bayer patterns consist of a pattern of red, green, and blue filters arranged in a grid as shown in Figure 2. For more information about Bayer filters, check the Wikipedia article. For this question, you will be using the M&M s image to test your code. Figure 2: Bayer pattern. (Taken from Wikipedia page.) This shows the pattern of filters typically used on CCD cameras to measure different aspects of the incoming spectrum at different pixels. Problem 4.A. Write a Matlab function called simulatebayersampling that takes an RGB image as input and outputs the gray-level Bayer filtered image. The gray-level image should be the selected elements of the RGB image, placed in a single layer (gray) image. Use the grid shown in Figure 2 as an example, with the blue pixel in the left corner as (1,1), and the first row of the image proceeding across the alternativing blue and green pixels. Problem 4.B. Now write a Matlab function called rebuildrgbfrombayer that takes a gray-level Bayer filter image as input and outputs an RGB image. There are a variety of methods to estimate the RGB image from Bayer filter image. Briefly describe a couple simple algorithms (you can research these using the web, but do not copy the code from the web), then choose one to implement in this function. 8

Problem 4.C. The estimate produced in rebuildrgbfrombayer will have errors when compared to the original, as some of the information in the original image was lost when producing the Bayer filtered image. Write a Matlab function called computeerrorimage that takes the original image and the estimated RGB image as input and produces an image representing the error between the original and estimate images at each pixel location. The formula you use for the error at each pixel should be error = (r 1 r 2 ) 2 + (g 1 g 2 ) 2 + (b 1 b 2 ) 2, where the r 1 is the red channel value of the original image and r 2 is the red channel value of the reconstructed image, and so on. Display the error image by creating an image whose value at each pixel is the error at that pixel. Briefly comment on where the errors are largest and why that may be. What to turn in This assignment asks for various written answers, code, and images. Please turn these in however you see fit, but please make it at clear as possible to the grader. I suggest that you turn in your code in separate files from the remainder of your answers. -Erik 9