Intrinsic Images by Entropy Minimization How Peter Pan Really Lost - - PowerPoint PPT Presentation

intrinsic images by entropy minimization
SMART_READER_LITE
LIVE PREVIEW

Intrinsic Images by Entropy Minimization How Peter Pan Really Lost - - PowerPoint PPT Presentation

Intrinsic Images by Entropy Minimization How Peter Pan Really Lost His Shadow Presentation By: Jordan Frank Based on work by Finlayson, Hordley, Drew, and Lu [1,2,3] Image from


slide-1
SLIDE 1

Intrinsic Images by Entropy Minimization

How Peter Pan Really Lost His Shadow

Presentation By: Jordan Frank Based on work by Finlayson, Hordley, Drew, and Lu [1,2,3]

Image from http://dvd.monstersandcritics.com/reviews/article_1273419.php/DVD_Review_Peter_Pan__Two-Disc_Platinum_Edition_

slide-2
SLIDE 2

Colour Constancy

  • Humans automatically remove the effect of

lighting in visual perception. Our vision system is very robust to illumination.

  • We can easily tell that the

bricks in the sunlight are the same colour as the bricks in the shade.

slide-3
SLIDE 3

Colour Constancy

  • However, this is an Ill-posed problem.
  • We cannot tell whether differences in the

colour that we detect are due to differences in the colour of the object, or differences in illumination.

  • What if the bricks on the right really were

darker? In fact, there are small differences in the colours, even within a single brick.

slide-4
SLIDE 4

Invariant Image

  • Goal is to produce an image that is invariant

to effects of illumination.

  • Motivation:
  • Add our own illumination.
  • Remove shadows! Almost every

presentation prior to this one has talked about how shadows are problematic.

slide-5
SLIDE 5

Cameras/Sensors

  • RGB colour at a pixel results from an

integral over the visible wavelength

Rk = σ

  • E(λ)S(λ)Qk(λ)dλ, k = R, G, B

(1) σ – Lambertian shading E(λ) – illumination spectral power distribution S(λ) – surface spectral reflectance Qk(λ) – camera sensitivity

slide-6
SLIDE 6

Cameras/Sensors

  • For convenience we assume that camera

sensitivity is exactly a Dirac delta function

  • is the strength of the sensor.
  • So (1) reduces to

Qk(λ) = qkδ(λ − λk) qk = Qk(λk) Rk = σE(λk)S(λk)qk

slide-7
SLIDE 7

More Approximations

  • Supposing that lighting can be

approximated by Planck’s law, with Wien’s approximation [4] we get

  • k1, k2 are constants, temperature T

characterizes the lighting colour and I gives the overall light intensity.

Rk = σIk1λ−5

k e− k2

T λ S(λk)qk

(2)

slide-8
SLIDE 8

Removing I and σ

  • We can effectively remove the effect of

Lambertian shading and illumination from (2) by dividing to get the band-ratio 2-vector chromaticities c, where p is one of the channels and k=1,2 indexes over the remaining responses.

ck = Rk/Rp,

slide-9
SLIDE 9

Log Chromaticities

  • Log chromaticities are independent of

illumination intensity, and translate under change of illumination colour.

  • (ln R/G,ln B/G) under one light becomes (ln

R/G,ln B/G)+(a,b) under a second light.

  • More importantly, the translational term for

different illuminants can always be written as (αa,αb) where a,b are constants and α depends on illumination.

slide-10
SLIDE 10

Invariance, finally

  • Illumination change translates log

chromaticities in the same direction.

  • Therefore, the coordinate axis orthogonal to

the direction of illumination variation, y = -(a/b)x, records only illuminant invariant information.

slide-11
SLIDE 11

Example (simulated)

  • Fig. 6.

Perfect Dirac delta camera data (sensitivities anchored

  • Fig. 7.

Perfect Dirac delta camera data (sensitivities anchored

Measured log chromaticities After rotation

Figures from [3]

slide-12
SLIDE 12

Great in theory, but...

  • There are a number of problems with this

approach.

  • Cameras do not have Dirac delta

responses.

  • Noise!
  • How do we determine how much to rotate.
slide-13
SLIDE 13

Narrowband, not Dirac

Actual measurements from a SONY DXC-930 camera Rotated

So we are still doing pretty well.

Figures from [3]

slide-14
SLIDE 14

How to calibrate

  • We can carefully calibrate our cameras to

determine the best rotation angle through inspection of log chromaticities.

(a)

−0.4 −0.2 0.2 0.4 0.6 0.8 1 1.2 1.4 −1.6 −1.4 −1.2 −1 −0.8 −0.6 −0.4 −0.2 log( R/G) log(B/G)

(b)

−0.8 −0.6 −0.4 −0.2 0.2 0.4 0.6 0.8 1 −1.4 −1.2 −1 −0.8 −0.6 −0.4 −0.2 0.2 log(R/G) log(B/G)

(c)

  • Fig. 2. (a): Macbeth ColorChecker Chart image under a Planckian light. (b): Log-chromaticities
  • f the 24 patches. (c): Median chromaticities for 6 patches, imaged under 14 different Planckian

illuminants.

Figure and caption from [1]

slide-15
SLIDE 15

How to calibrate

  • Manual calibration is time-consuming, and

requires numerous images under various lighting conditions.

  • We would like to find a way to find the

desired parameters from just one image, without even knowing the camera that was used.

slide-16
SLIDE 16

Intuition

And so what might be a good way to determine the best invariant direction? (Hint: we learned about it in this course)

log(G/R) log(B/R)

Invariant direction Greyscale image

log(B/R)

Greyscale image Wrong invariant direction

log(G/R)

Figures from [1]

slide-17
SLIDE 17

Entropy to the Rescue

log(G/R) log(B/R)

Invariant direction Greyscale image

log(B/R)

Greyscale image Wrong invariant direction

log(G/R)

Low Entropy High Entropy

Figures from [1]

slide-18
SLIDE 18

Entropy Minimization

Algorithm:

  • 1. Form a 2D log-chromaticity representation
  • f the image.
  • 2. for θ = 1..180

a) Rotate by θ and take projection onto x- axis b) Calculate entropy c) Keep track of θ that minimizes entropy

slide-19
SLIDE 19

Problems/Solutions

  • How to calculate entropy?

Solution: Create a histogram, compute bin widths using Scott’s Rule:

bin_width = 3.49 std(projected_data) N1/3

  • Noise in the data?

Solution: Use only the middle 90% of the projected data.

  • How to go back from rotated data to a

usable image? Solution: See the paper, not easy!

slide-20
SLIDE 20

Problems/Solutions

  • How to calculate entropy?

Solution: Create a histogram, compute bin widths using Scott’s Rule:

bin_width = 3.49 std(projected_data) N1/3

  • Noise in the data?

Solution: Use only the middle 90% of the projected data.

  • How to go back from rotated data to a

usable image? Solution: See the paper, not easy!

slide-21
SLIDE 21

Problems/Solutions

  • How to calculate entropy?

Solution: Create a histogram, compute bin widths using Scott’s Rule:

bin_width = 3.49 std(projected_data) N1/3

  • Noise in the data?

Solution: Use only the middle 90% of the projected data.

  • How to go back from rotated data to a

usable image? Solution: See the paper, not easy!

slide-22
SLIDE 22

Problems/Solutions

  • How to calculate entropy?

Solution: Create a histogram, compute bin widths using Scott’s Rule:

bin_width = 3.49 std(projected_data) N1/3

  • Noise in the data?

Solution: Use only the middle 90% of the projected data.

  • How to go back from rotated data to a

usable image? Solution: See the paper, not easy!

slide-23
SLIDE 23

50 100 150 200 4 4.5 5 5.5 6 Angle Entropy

Original Image Min-Entropy Projection

Example

Figures from [1]

slide-24
SLIDE 24

Removing Shadows

  • Now that we have an image without

shadows, how can we use this to remove shadows from the original image?

Image from http://collectibles.about.com/library/priceguides/blpgDSpeterpan903.htm

slide-25
SLIDE 25

Removing Shadows

  • Need to reintegrate the illumination invariant

image into the original image.

  • Create an edge map for the Mean-Shift

processed original image as well as the invariant image.

  • If the magnitude of the gradient in the

invariant image is close to zero where the gradient in log response in the original image is high, then this is evidence of a shadow edge.

slide-26
SLIDE 26

Removing Shadows

Left to right, Edges in the original image, edges in the invariant image, recovered shadow edge.

Figures from [2]

slide-27
SLIDE 27

Removing Shadows

  • All edges in the image that are not shadow

edges are indicative of material changes. There are no sharp changes due to illumination and so shadows have been removed.

  • Reintegrating the gradient gives a log

response image which does not have

  • shadows. For details, see the paper.
  • To get back to a realistic image, we simply

have to add artificial illumination.

slide-28
SLIDE 28

Results (Paper)

20 40 60 80 100 120 140 160 180 4.8 5 5.2 5.4 5.6 5.8 6 6.2 6.4 Angle Entropy 20 40 60 80 100 120 140 160 180 11 11.5 12 12.5 Angle Entropy 20 40 60 80 100 120 140 160 180 5.95 6 6.05 6.1 6.15 6.2 6.25 6.3 6.35 6.4 6.45 Angle Entropy

Figures from [3]

slide-29
SLIDE 29

Results (Paper)

20 40 60 80 100 120 140 160 180 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 Angle Entropy 20 40 60 80 100 120 140 160 180 7.25 7.3 7.35 7.4 7.45 7.5 7.55 7.6 7.65 7.7 7.75 Angle Entropy 20 40 60 80 100 120 140 160 180 4.4 4.6 4.8 5 5.2 5.4 5.6 5.8 6 Angle Entropy 20 40 60 80 100 120 140 160 180 4.35 4.4 4.45 4.5 4.55 4.6 4.65 4.7 4.75 4.8 Angle Entropy

Figures from [3]

slide-30
SLIDE 30

Results (Mine)

  • The cameras that were used by the authors
  • f the paper are professional quality. They

claim in the paper that the methods work on all of the cameras that they tested, but the question is whether they actually tested consumer-grade cameras.

  • So I went out on a sunny day and snapped

a few shots with my Pentax Optio WPi 6.0 megapixel camera.

slide-31
SLIDE 31

Results (Mine)

  • My results weren’t quite as spectacular.
slide-32
SLIDE 32

Results (Mine)

slide-33
SLIDE 33

Questions?

“If he thought at all, but I don't believe he ever thought, it was that he and his shadow, when brought near each other, would join like drops of water, and when they did not he was appalled. He tried to stick it on with soap from the bathroom, but that also failed. A shudder passed through Peter, and he sat on the floor and cried.” “Peter Pan : The Story of Peter and Wendy”

  • J. M. Barrie
slide-34
SLIDE 34

References

  • [1] Graham D. Finlayson, Mark S. Drew, and Cheng Lu, "Intrinsic Images by

Entropy Minimization", European Conference on Computer Vision, Prague, May 2004. Springer Lecture Notes in Computer Science, Vol. 3023, pp. 582-595, 2004. http://www.cs.sfu.ca/~mark/ftp/Eccv04/.

  • [2] Graham D. Finlayson, Steven D. Hordley, and Mark S. Drew, "Removing

Shadows from Images", European Conference on Computer Vision, ECCV'02 Vol.4, Lecture Notes in Computer Science Vol. 2353, pp. 823-836,

  • 2002. http://www.cs.sfu.ca/~mark/ftp/Eccv02/shadowless.pdf
  • [3] Graham D. Finlayson and Steven D. Hordley, “Color constancy at a

pixel”, Journal of the Optical Society of America, Optics, Image Science, and Vision, Volume 18, Issue 2, February 2001, pp.253-264.

  • [4] G. Wyszecki and W.S. Stiles, “Color Science: Concepts and Methods,

Quantitative Data and Formulas”, Wiley, New York, 2nd edition, 1982.