computational photography
play

Computational Photography Si Lu Spring 2018 - PowerPoint PPT Presentation

Computational Photography Si Lu Spring 2018 http://web.cecs.pdx.edu/~lusi/CS510/CS510_Computati onal_Photography.htm 04/12/2018 Last Time o Filters o De-noise 2 Today o Color o Color to Gray 3 Light and Color o The frequency, f , of light


  1. Computational Photography Si Lu Spring 2018 http://web.cecs.pdx.edu/~lusi/CS510/CS510_Computati onal_Photography.htm 04/12/2018

  2. Last Time o Filters o De-noise 2

  3. Today o Color o Color to Gray 3

  4. Light and Color o The frequency, f , of light determines its “color” n Wavelength, λ , is related: n Energy also related o Describe incoming light by a spectrum n Intensity of light at each frequency n A graph of intensity vs. frequency o We care about wavelengths in the visible spectrum: between the infra-red (700nm) and the ultra-violet (400nm) 4

  5. Normal Daylight # Photons Wavelength (nm) 400 500 600 700 o Note the hump at short wavelengths - the sky is blue 5

  6. Color and Wavelength 6

  7. Color Spaces o The principle of trichromacy means that the colors displayable are all the linear combination of primaries o Taking linear combinations of R, G and B defines the RGB color space n the range of perceptible colors generated by adding some part each of R, G and B o If R, G and B correspond to a monitor’s phosphors (monitor RGB), then the space is the range of colors displayable on the monitor 7

  8. RGB Color Space 8

  9. L*a*b* Color Space o RGB n Perceptually non-uniform o L*a*b* n More perceptually uniform n Look into Opencv or Matlab http://en.wikipedia.org/wiki/Lab_color_space 9

  10. Seeing in Color o The eye contains rods and cones n Rods work at low light levels and do not see color That is, their response depends only on how many photons, not their o wavelength Cones come in three types (experimentally and genetically proven), n each responds in a different way to frequency distributions 10

  11. Color receptors o Each cone type has a different sensitivity curve Experimentally determined n in a variety of ways o For instance, the L-cone responds most strongly to red light o “Response” in your eye means nerve cell firings o How you interpret those firings is not so simple … 11

  12. Color Perception o How your brain interprets nerve impulses from your cones is an open area of study, and deeply mysterious o Colors may be perceived differently: n Affected by other nearby colors n Affected by adaptation to previous views Affected by “state of mind” n o Experiment: n Subject views a colored surface through a hole in a sheet, so that the color looks like a film in space n Investigator controls for nearby colors, and state of mind 12

  13. The Same Color? 13

  14. The Same Color? 14

  15. Color Deficiency o Some people are missing one type of receptor Most common is red-green color blindness in men n Red and green receptor genes are carried on the X chromosome n - most red-green color blind men have two red genes or two green genes o Other color deficiencies n Anomalous trichromacy, Achromatopsia, Macular degeneration Deficiency can be caused by the central nervous system, by n optical problems in the eye, injury, or by absent receptors 15

  16. Color Deficiency 16

  17. Color Transformation o Re-coloring o Color to Gray 17

  18. Color2Gray: Salience-Preserving Color Removal Amy Gooch Sven Olsen Jack Tumblin Bruce Gooch

  19. New Algorithm Color Grayscale

  20. Isoluminant Colors Color Grayscale

  21. Traditional Methods: Luminance Channels CIE CAM 97 Photoshop LAB CIE XYZ YCrCb

  22. Traditional Methods: Luminance Channels Problem can not be solved by CIE CAM 97 Photoshop LAB simply switching to a different space CIE XYZ YCrCb

  23. Traditional Methods • Contrast enhancement & Gamma Correction – Doesn’t help with isoluminant values Photoshop Grayscale PSGray + Auto Contrast New Algorithm

  24. Goals • Dimensionality Reduction – From tristimulus values to single channel Loss of information • Maintain salient features in color image – Human perception

  25. Relative differences Color Illusion by Lotto and Purves http://www.lottolab.org

  26. Relative differences Color Illusion by Lotto and Purves http://www.lottolab.org

  27. Relative differences Color Illusion by Lotto and Purves http://www.lottolab.org

  28. Challenge 1: Influence of neighboring pixels

  29. Challenge 2: Dimension and Size Reduction 120, 120 100 0 -120, -120

  30. Challenge 3: Many Color2Gray Solutions Original . . .

  31. Algorithm Overview • Convert to Perceptually Uniform Space – CIE L*a*b* • Initialize image, g , with L channel • For every pair of pixel i and j – Compute Luminance distance d ij – Compute Chrominance distance • Adjust g to incorporate both luminance and chrominance differences

  32. Color2Grey Algorithm Optimization: i+ m min S S ( (g i - g j ) - d i,j ) 2 j=i- m i

  33. Parameters m : Radius of neighboring pixels a : Max chrominance offset q : Map chromatic difference to increases or decreases in luminance values

  34. m : Neighborhood Size q = 300 o a = 10 m = entire image m = 2 m = 16 q = 49 o a = 10

  35. m : Neighborhood Size m = entire image m = 16

  36. Perceptual Distance D L ij = L i - L j • Luminance Distance: • Chrominance Distance: || D C ij || Problem: || D C ij || is unsigned

  37. Map chromatic difference to increases or decreases in luminance values +b* C 2 -a* +a* Color C 1 Space

  38. + D b* Color +D C 1,2 v q = (cos q , sin q ) Difference Space + - v q q - D a* + D a* + - sign ( || D C i,j || ) = sign ( D C i,j . v q ) - D b*

  39. q = 45 q = 225 Photoshop Grayscale

  40. q = 135 q = 45 q = 0 Grayscale

  41. How to Combine Chrominance and Luminance d ij = D L ij (Luminance)

  42. How to Combine Chrominance and Luminance (Luminance) if | D L ij | > || D C ij || D L ij d ij = || D C ij || (Chrominance)

  43. How to Combine Chrominance and Luminance D L ij if | D L ij | > || D C ij || d(a,q) ij = if D C ij . n q ≥ 0 || D C ij || -|| D C ij || otherwise . . . Grayscale

  44. How to Combine Chrominance and Luminance D L ij if | D L ij | > crunch(|| D C ij ||) d(a,q) ij = if D C ij . n q ≥ 0 crunch(|| D C ij ||) crunch(-|| D C ij ||) otherwise . . . Grayscale

  45. a : Chromatic variation maps to luminance variation a -a crunch(x) = a * tanh(x/ a ) a = 5 a = 10 a = 25

  46. Color2Grey Algorithm Optimization: i+ m min S S ( (g i - g j ) - d i,j ) 2 j=i- m i

  47. Results Photoshop Color2Grey Original Color2Grey Grey + Color

  48. Original PhotoshopGrey Color2Grey

  49. Original PhotoshopGrey Color2Grey+Color

  50. Original PhotoshopGrey Color2Grey

  51. Original PhotoshopGrey Color2Grey

  52. Implementation Performance • Image of size S x S – O( m 2 S 2 ) or O(S 4 ) for full neighborhood case • 12.7s 100x100 image • 65.6s 150x150 image Athlon 64 3200 CPU • 204.0s 200x200 image – GPU implementation • O(S 2 ) ideal, really O(S 3 ) – 2.8s 100x100 NVIDIA GeForce GT6800 – 9.7s 150x150 – 25.7s 200x200

  53. Future Work • Faster – Multiscale • Smarter – Remove need to specify q • New optimization function designed to match both signed and unsigned difference terms – Image complexity measures • Animations/Video

  54. Validate "Salience Preserving" Original PhotoshopGrey Color2Grey Apply Contrast Attention model by Ma and Zhang 2003

  55. Validate "Salience Preserving" Original PhotoshopGrey Color2Grey

  56. Thank you • SIGGRAPH Reviewers • NSF • Helen and Robert J. Piros Fellowship • Northwestern Graphics Group • MidGraph2004 Participants – especially Feng Liu • (sorry I spelled your name wrong in the acknowledgements)

  57. Next Time o Re-lighting 57

  58. Original Color2Grey Color2Grey+Color

  59. Original Color2Grey Color2Grey+Color

  60. Color2Grey Original Color2Grey+Color

  61. Original PhotoshopGrey Color2Grey

  62. Original Color2Grey Color2Grey+Color

  63. Original PhotoshopGrey Color2Grey

  64. Original Color2Grey Color2Grey+Color

  65. Next Time o Re-lighting 66

Recommend


More recommend