Histograms and Color Balancing

Similar documents
Motion illusion, rotating snakes

Capturing Light in man and machine

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

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

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

Capturing Light in man and machine

Capturing Light in man and machine

Capturing light and color

Frequencies and Color

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

Capturing Light in man and machine

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

CSCI 1290: Comp Photo

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

Capturing Light in man and machine

CS 1699: Intro to Computer Vision. Color. Prof. Adriana Kovashka University of Pittsburgh September 22, 2015

Color image processing

Computers and Imaging

Color Image Processing

Color. Used heavily in human vision. Color is a pixel property, making some recognition problems easy

Prof. Feng Liu. Winter /09/2017

Color. Used heavily in human vision. Color is a pixel property, making some recognition problems easy

Imaging Process (review)

Today. Color. Color and light. Color and light. Electromagnetic spectrum 2/7/2011. CS376 Lecture 6: Color 1. What is color?

Color April 16 th, 2015

Visual Perception. Overview. The Eye. Information Processing by Human Observer

Interactive Computer Graphics

Color. April 16 th, Yong Jae Lee UC Davis

Color: Readings: Ch 6: color spaces color histograms color segmentation

CMPSCI 670: Computer Vision! Color. University of Massachusetts, Amherst September 15, 2014 Instructor: Subhransu Maji

Color. Some slides are adopted from William T. Freeman

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

Color images C1 C2 C3

Chapter 3 Part 2 Color image processing

Lecture: Color. Juan Carlos Niebles and Ranjay Krishna Stanford AI Lab. Lecture 1 - Stanford University

IMAGE PROCESSING >COLOR SPACES UTRECHT UNIVERSITY RONALD POPPE

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

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

What will be on the final exam?

Digital Image Processing. Lecture # 8 Color Processing

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

Mahdi Amiri. March Sharif University of Technology

Multimedia Systems Color Space Mahdi Amiri March 2012 Sharif University of Technology

COLOR and the human response to light

EE482: Digital Signal Processing Applications

Color and Perception. CS535 Fall Daniel G. Aliaga Department of Computer Science Purdue University

Color Reproduction. Chapter 6

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

Color & Graphics. Color & Vision. The complete display system is: We'll talk about: Model Frame Buffer Screen Eye Brain

Wireless Communication

Image Processing: An Overview

Color image Demosaicing. CS 663, Ajit Rajwade

COLOR. and the human response to light

Color and More. Color basics

ENEE408G Multimedia Signal Processing

International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 ISSN

Color Image Processing

Lecture Notes 11 Introduction to Color Imaging

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

LECTURE 07 COLORS IN IMAGES & VIDEO

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

Sampling and Reconstruction. Today: Color Theory. Color Theory COMP575

Digital Image Processing Color Models &Processing

CIE tri-stimulus experiment. Color Value Functions. CIE 1931 Standard. Color. Diagram. Color light intensity for visual color match

Figure 1: Energy Distributions for light

Reading instructions: Chapter 6

Graphics and Image Processing Basics

BBM 413! Fundamentals of! Image Processing!

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

VU Rendering SS Unit 8: Tone Reproduction

Vision Review: Image Processing. Course web page:

Introduction to Multimedia Computing

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

Camera Image Processing Pipeline: Part II

Color II: applications in photography

Templates and Image Pyramids

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

University of British Columbia CPSC 414 Computer Graphics

Measure of image enhancement by parameter controlled histogram distribution using color image

Templates and Image Pyramids

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Announcements. Color. Last time. Today: Color. Color and light. Review questions

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

Color Transformations

Stamp Colors. Towards a Stamp-Oriented Color Guide: Objectifying Classification by Color. John M. Cibulskis, Ph.D. November 18-19, 2015

The Science Seeing of process Digital Media. The Science of Digital Media Introduction

Color. Phillip Otto Runge ( )

Image processing. Image formation. Brightness images. Pre-digitization image. Subhransu Maji. CMPSCI 670: Computer Vision. September 22, 2016

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

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

Color II: applications in photography

Digital Image Processing COSC 6380/4393. Lecture 20 Oct 25 th, 2018 Pranav Mantini

Camera Image Processing Pipeline: Part II

Assignment: Light, Cameras, and Image Formation

IMAGE ENHANCEMENT - POINT PROCESSING

Announcements. The appearance of colors

Color Cameras: Three kinds of pixels

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

Color II: applications in photography

Transcription:

Histograms and Color Balancing 09/14/17 Empire of Light, Magritte Computational Photography Derek Hoiem, University of Illinois

Administrative stuff Project 1: due Monday Part I: Hybrid Image Part II: Enhance Contrast/Color

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

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

. Physiology of Color Vision Three kinds of cones: 440 530 560 nm. RELATIVE ABSORBANCE (%) 100 S M L 50 400 450 500 550 600 650 WAVELENGTH (nm.) Why are M and L cones so close? Why are there 3? Stephen E. Palmer, 2002

Color spaces: RGB Default color space 0,1,0 R (G=0,B=0) 1,0,0 G (R=0,B=0) 0,0,1 Some drawbacks Strongly correlated channels Non-perceptual B (R=0,G=0) Image from: http://en.wikipedia.org/wiki/file:rgb_color_solid_cube.png

Trichromacy and CIE-XYZ Perceptual equivalents with RGB Perceptual 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) Luminance = brightness Chrominance = color b (L=65,a=0)

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

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 Fast to compute, good for compression, used by TV Y=0 Y=0.5 Y (Cb=0.5,Cr=0.5) Cr Cb Y=1 Cb (Y=0.5,Cr=0.5) Cr (Y=0.5,Cb=05)

Contrast enhancement http://en.wikipedia.org/wiki/histogram_equalization

Color balancing Photos: http://www.kenrockwell.com/tech/whitebalance.htm

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 Simple idea: multiply R, G, and B values by separate constants r g b = α r 0 0 0 α g 0 0 0 α b How to choose the constants? Gray world assumption: average value should be gray White balancing: choose a reference as the white or gray color Better to balance in camera s RGB (linear) than display RGB (non-linear) r g b

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 L display L 1 world L world

Reinhart Operator Darkest 0.1% scaled to display device

Simple Point Processing Some figs from A. Efros slides

Negative

Log

Power-law transformations s = r γ

Image Enhancement

Matlab example

Contrast Stretching

Histogram equalization Basic idea: reassign values so that the number of pixels with each value is more evenly distributed Histogram: a count of how many pixels have each value h i = j pixels 1(p j == i) Cumulative histogram: count of number of pixels less than or equal to each value c i = c i 1 + h i

Image Histograms Cumulative Histograms

Histogram Equalization

Algorithm for global histogram equalization Goal: Given image with pixel values 0 p j 255, j = 0.. N specify function f(i) that remaps pixel values, so that the new values are more broadly distributed 1. Compute cumulative histogram: c i, i = 0.. 255 h(i) = j pixels 1(p j == i), c(i) = c(i 1) + h(i) 2. f i = α c i N 255 + 1 α i Blends between original image and image with uniform histogram

Locally weighted histograms Compute cumulative histograms in nonoverlapping 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

Matlab Example 2

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: texture synthesis and transfer