Histograms and Color Balancing Computational Photography Derek Hoiem, University of Illinois 09/13/11 “Empire of Light”, Magritte.

Slides:



Advertisements
Similar presentations
Digital Image Processing
Advertisements

Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Robust statistical method for background extraction in image segmentation Doug Keen March 29, 2001.
High Dynamic Range Imaging Samu Kemppainen VBM02S.
Computational Photography: Color perception, light spectra, contrast Connelly Barnes.
Image (and Video) Coding and Processing Lecture 5: Point Operations Wade Trappe.
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
Image Enhancement by Modifying Gray Scale of Individual Pixels
Color spaces CIE - RGB space. HSV - space. CIE - XYZ space.
Computer graphics & visualization HDRI. computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization.
Color Image Processing
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Fall 2014.
Light Light is fundamental for color vision Unless there is a source of light, there is nothing to see! What do we see? We do not see objects, but the.
Computational Photography Prof. Feng Liu Spring /15/2015.
CS443: Digital Imaging and Multimedia Point Operations on Digital Images Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring.
1 Color Segmentation: Color Spaces and Illumination Mohan Sridharan University of Birmingham
Image Processing : Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, and Gonzalez et al.
Capturing Light… in man and machine : Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,
Point Processing : Computational Photography Alexei Efros, CMU, Fall 2008 Some figures from Steve Seitz, and Gonzalez et al.
What is color for?.
Image Enhancement.
Capturing Light… in man and machine : Computational Photography Alexei Efros, CMU, Fall 2010.
Capturing Light… in man and machine : Computational Photography Alexei Efros, CMU, Fall 2008.
A Novel 2D To 3D Image Technique Based On Object- Oriented Conversion.
What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Image Processing I : Rendering and Image Processing Alexei Efros …with most slides shamelessly stolen from Steve Seitz and Gonzalez & Woods.
Light and Color Computational Photography Derek Hoiem, University of Illinois 09/08/11 “Empire of Light”, Magritte.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Lenses: Focus and Defocus A lens focuses light onto the film – There is a specific distance at which objects are “in focus” other points project to a “circle.
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/14/10 “The Double Secret”, Magritte.
Computational Photography Derek Hoiem, University of Illinois
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Computer Science 631 Lecture 7: Colorspace, local operations
Point Processing (Szeliski 3.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Some figures from Alexei Efros, Steve Seitz, and Gonzalez.
1 Chapter 2: Color Basics. 2 What is light?  EM wave, radiation  Visible light has a spectrum wavelength from 400 – 780 nm.  Light can be composed.
Recap from Lecture 2 Pinhole camera model Perspective projections Lenses and their flaws Focus Depth of field Focal length and field of view Chapter 2.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - IMAGES. Processing digital Images digital images are often processed using “digital filters” digital images are.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
CSC361/ Digital Media Burg/Wong
Histograms and Color Balancing Computational Photography Derek Hoiem, University of Illinois 09/10/15 “Empire of Light”, Magritte.
G52IIP, School of Computer Science, University of Nottingham 1 Summary of Topic 2 Human visual system Cones Photopic or bright-light vision Highly sensitive.
Color Processing : Rendering and Image Processing Alexei Efros …with most figures shamelessly stolen from Forsyth & Ponce and Gonzalez & Woods.
The Reason Tone Curves Are The Way They Are. Tone Curves in a common imaging chain.
Pixels and Image Filtering Computer Vision Derek Hoiem, University of Illinois 02/01/11 Graphic:
Autonomous Robots Vision © Manfred Huber 2014.
Digital Image Processing EEE415 Lecture 3
CS 691B Computational Photography
Digital Image Processing CSC331 Image Enhancement 1.
03/03/03© 2003 University of Wisconsin Last Time Subsurface scattering models Sky models.
Capturing Light… in man and machine CS194: Image Manipulation & Computational Photography Alexei Efros, UC Berkeley, Fall 2015.
Digital Image Processing Image Enhancement in Spatial Domain
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Capturing Light… in man and machine
Color Image Processing
Color Image Processing
Color Image Processing
Ido Omer Michael Werman
Capturing Light… in man and machine
Color Image Processing
Pixels and Image Filtering
Color Image Processing
Capturing Light… in man and machine
Color Image Processing
Digital Image Processing
Grey Level Enhancement
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Computational Photography Derek Hoiem, University of Illinois
Histograms and Color Balancing
Presentation transcript:

Histograms and Color Balancing Computational Photography Derek Hoiem, University of Illinois 09/13/11 “Empire of Light”, Magritte

Administrative stuff New office hours: Monday 10-11, 3-4 Project 1 in, more discussion next Tues – Vote for class favorite overall project and result; can vote for multiple projects/results

Review of last class Possible factors: albedo, shadows, texture, specularities, curvature, lighting direction 1.

Review of last class Why is (2) brighter than (1)? Each points to the asphault. 2. Why is (4) darker than (3)? 4 points to the marking. 3. Why is (5) brighter than (3)? Each points to the side of the wooden block. 4. Why isn’t (6) black, given that there is no direct path from it to the sun?

Today’s class How can we represent color? How do we adjust the intensity of an image to improve contrast, aesthetics?

© Stephen E. Palmer, 2002 Three kinds of cones: Physiology of Color Vision Why are M and L cones so close? Why are there 3?

Color spaces: RGB 0,1,0 0,0,1 1,0,0 Image from: Some drawbacks Strongly correlated channels Non-perceptual Default color space R (G=0,B=0) G (R=0,B=0) B (R=0,G=0)

Trichromacy and CIE-XYZ Perceptual equivalents with RGBPerceptual equivalents with CIE-XYZ

Color Space: CIE-XYZ RGB portion is in triangle

Perceptual uniformity

Color spaces: CIE L*a*b* “Perceptually uniform” color space L (a=0,b=0) a (L=65,b=0) b (L=65,a=0) Luminance = brightness Chrominance = color

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

Most information in intensity Only color shown – constant intensity

Most information in intensity Only intensity shown – constant color

Most information in intensity Original image

Color spaces: HSV Intuitive color space H (S=1,V=1) S (H=1,V=1) V (H=1,S=0)

Color spaces: YCbCr Y (Cb=0.5,Cr=0.5) Cb (Y=0.5,Cr=0.5) Cr (Y=0.5,Cb=05) Y=0Y=0.5 Y=1 Cb Cr Fast to compute, good for compression, used by TV

Outline Linear adjustment Tone mapping Global histogram equalization Local histogram equalization Examples: vivid, improve overall contrast, correct for off-white illumination, film noir

Color balancing

Color balancing Photos:

Important ideas Typical images are gray on average; this can be used to detect distortions Larger differences are more visible, so using the full intensity range improves visibility It’s often easier to work in a non-RGB color space

Color balancing via linear adjustment

Tone Mapping Typical problem: compress values from a high range to a smaller range – E.g., camera captures 12-bit linear intensity and needs to compress to 8 bits

Example: Linear display of HDR Scaled for brightest pixels Scaled for darkest pixels

Global operator (Reinhart et al.) Simple solution: map to a non-linear range of values

Darkest 0.1% scaled to display device Reinhart Operator

Simple Point Processing Some figs from A. Efros’ slides

Negative

Log

Power-law transformations

Image Enhancement

Contrast Stretching

Histogram equalization

Image Histograms Cumulative Histograms

Histogram Equalization

Algorithm for global histogram equalization

Locally weighted histograms Compute cumulative histograms in non- overlapping MxM grid For each pixel, interpolate between the histograms from the four nearest grid cells Figure from Szeliski book (Fig. 3.9) Pixel (black) is mapped based on interpolated value from its cell and nearest horizontal, vertical, diagonal neighbors

Other issues Dealing with color images – Often better to split into luminance and chrominance to avoid unwanted color shift Manipulating particular regions – Can use mask to select particular areas for manipulation Useful Matlab functions – rgb2hsv, hsv2rgb, hist, cumsum,

Project 2: due Sept 26 Part I: Alignment Part II: Enhance contrast and color

Examples with Matlab

Things to remember Familiarize yourself with the basic color spaces: RGB, HSV, Lab Simple auto contrast/color adjustments: gray world assumption, histogram equalization When improving contrast in a color image, often best to operate on luminance channel

Next class: finding seams