25
Computer Vision Spring 2006 15-385,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm

Computer Vision

  • Upload
    beck

  • View
    30

  • Download
    0

Embed Size (px)

DESCRIPTION

Computer Vision. Spring 2006 15-385,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm. Lightness and Retinex: An Early Vision Problem Lecture #10 Readings: Horn Chapter 9. Vision (Marr): pgs 250-258. - PowerPoint PPT Presentation

Citation preview

Page 1: Computer Vision

Computer Vision

Spring 2006 15-385,-685

Instructor: S. Narasimhan

Wean 5403

T-R 3:00pm – 4:20pm

Page 2: Computer Vision

Lightness and Retinex:

An Early Vision Problem

Lecture #10

Readings: Horn Chapter 9.

Vision (Marr): pgs 250-258.

“The perception of Surface Blacks and Whites”, A. L. Gilchrist, Scientific American, 240 (pgs 112-114), 1979

Webpages of Prof. Edward Adelson, MIT

Page 3: Computer Vision

Checker Shadow Illusion

[E. H. Adelson]

Page 4: Computer Vision

Checker Shadow Illusion

[E. H. Adelson]

Page 5: Computer Vision

Land’s Experiment (1959)

• Cover all patches except a blue rectangle• Make it look gray by changing illumination• Uncover the other patches

We filter out illumination variations

Color Constancy

Page 6: Computer Vision

Color Constancy in Gold Fish

In David Ingle's experiment, a goldfish has been trained to swim to a patch of a givencolor for a reward—a piece of liver. It swims to the green patch regardless of theexact setting of the three projectors' intensities. The behavior is strikingly similar tothe perceptual result in humans.

http://neuro.med.harvard.edu/site/dh/b45.htm

Page 7: Computer Vision

Color Cube Illusion

D. Purves, R. Beau Lotto, S. Nundy “Why We See What We do,” American Scientist

Page 8: Computer Vision

Lightness Recovery and Retinex Theory

• Problem: Recover surface reflectance / color in varying illumination conditions.

• We use tools developed before:

- Sensing: Intensity / Color

- Image Processing: Fourier Transform and Convolution

- Edge Operators

- Iterative Techniques

Page 9: Computer Vision

Image Brightness (Intensity)

)(' e

)(' r)(' p

)(q'b

SceneIrradiance

SceneReflectance

ImageIntensity

• Monochromatic Light : )( i

),('),('),(' yxeyxryxb 1)( iq

NOTE: The analysis can be applied to COLORED LIGHT using FILTERS

Page 10: Computer Vision

Recovering Lightness

),('),('),(' yxeyxryxb • Image Intensity:

Can we recover and from ? 'e 'r 'b

• Assumptions: - Sharp changes in Reflectance

- Smooth changes in Illumination

• Frequency spectrum (Fourier transform)

'R'B 'E

We want to filter out e’

Page 11: Computer Vision

Recovering Lightness

),('),('),(' yxeyxryxb • Image Intensity:

• Take Logarithm: ),('log),('log),('log yxeyxryxb

),(),(),( yxeyxryxb OR

• Use Laplacian:

2

2

2

22

yx

erbd 222

• Sharp changes in reflectance

• Smooth changes in illumination

yxr ,'

yxe ,'02 e everywhere

r2 has 2 infinite spikes near edges and elsewhere02 r

Page 12: Computer Vision

Lightness Recovery (Retinex Scheme)

Image:erb

Thresholding :

rdTt 2

Reconstruction : yxl ,

yxrkyxl ,, (lightness) (reflectance)

Laplacian :erbd 222

Page 13: Computer Vision

Solving the Inverse Problem

Image

erb Laplacian

erbd 222 Thresholding

rdTt 2Lightness yxl ,

Find lightness l(x,y) from t(x,y):

tl 2

yxtyxlyx

,,2

2

2

2

We have to find g(x,y) which satisfies

dudvvyuxgvutyxl ,,,

yxgyxtyxl ,,,

Poisson’s Equation

Page 14: Computer Vision

Solving Poisson’s Equation

We have

yxtyxl ,,2 yxgyxtyxl ,,, and

vuGvuTvuL ,,, vuTvuLvu ,,22 and

So

Fourier transform

vuGvuTvuL ,,, vuT ,? and

Thus

22

1,

vuvuG

cyxyxg 22log

2

1,

Page 15: Computer Vision

yxl ,

gt yxt ,

dT yxd ,

b2

Lightness Recovery

Log of image

yxb , 22log

2

1, yxyxg

Which means: yxkryxl ,','

yxrkyxl ,, (lightness) (reflectance)

Normalize: Assume maximum value of corresponds to

Then:

max',' lyxl 1'r

yxryxb

yxel

yxlyxr

,'

,','

,','

max

(reflectance) (illumination)

Page 16: Computer Vision

Computing Lightness (Discrete Case)

yxl ,

gt yxt ,

dT yxd ,

b2

Log of image

yxb , 22log

2

1, yxyxg

Basically, inverse of Laplacian mask1

4

1

1

4

1

4

-20

46

1But, discrete approximation of the inverseLaplacian would not be sufficiently accurate!

tl 2Solve directly

Page 17: Computer Vision

Computing Lightness (Discrete Case)

tl 21

4

1

1

4

1

4

-20

46

11

4

1

1

4

1

4

-20

46

1bT

jijijijijijijijijiji tlllllllll ,1,11,11,11,11,,11,,1, 6420

Solve iteratively:

jinnnnnnnnn tlllllllll

jijijijijijijijiji ,1

10

3

20

1

5

11,11,11,11,11,,11,,1,

Use a discrete approximation to the inverse of Laplacian to obtain initial estimate of l

Page 18: Computer Vision

Lightness from Multiple Images taken under Varying Illumination

Illumination is not smooth

Use spatial statistics of edges

Derivative operator responses are sparse

tyxbyxr

tyxeyxrtyxb

t,,median,

,,,,,

Y. Weiss ICCV 2001

Page 19: Computer Vision

Lightness from Multiple Images taken under Varying Illumination

Y. Weiss ICCV 2001

Page 20: Computer Vision

Lightness from Multiple Images taken under Varying Illumination

Y. Weiss ICCV 2001

Page 21: Computer Vision

Using Lightness

w/o decomposition w/ decomposition

Y. Weiss ICCV 2001

Page 22: Computer Vision

Using Lightness

Y. Matsushita and K. Nishino CVPR 2003

Page 23: Computer Vision

Comments on Retinex Theory

• Not applicable to smooth reflectance variations• Not applicable to curved objects

In general:

Intensity=f( Shape, Reflectance, Illumination )

http://www.michaelbach.de/ot/index.html

For very good illusions, see:

http://web.mit.edu/persci/gaz/gaz-teaching/index.html

Page 24: Computer Vision

Tricking the Human Eye

Eye Tremors (~ 35 cycles/second)

Tremors used for edge detection

Edges disappear when edge motion is synchronous with Tremors!

Page 25: Computer Vision

Next Class

• Surface Reflectance and BRDF

• Reading: Horn, Chapter 10.

• F. E. Nicodemus, J.C. Richmond and J.J. Hsia, “Geometrical Considerations and Nomenclature for Reflectance”, Institute of Basic Standards, National Bureau of Standards, October 1977