Noise and ISO. CS 178, Spring Marc Levoy Computer Science Department Stanford University

Similar documents
Lecture 30: Image Sensors (Cont) Computer Graphics and Imaging UC Berkeley CS184/284A

Camera Image Processing Pipeline

Why is sports photography hard?

Astronomy 341 Fall 2012 Observational Astronomy Haverford College. CCD Terminology

Optical image stabilization (IS)

Camera Image Processing Pipeline: Part II

What will be on the midterm?

Optical image stabilization (IS)

Camera Image Processing Pipeline: Part II

Digital camera. Sensor. Memory card. Circuit board

Optical image stabilization (IS)

The Noise about Noise

Digital photography , , Computational Photography Fall 2017, Lecture 2

Camera Test Protocol. Introduction TABLE OF CONTENTS. Camera Test Protocol Technical Note Technical Note

Focusing and Metering

Image acquisition. In both cases, the digital sensing element is one of the following: Line array Area array. Single sensor

Last class. This class. CCDs Fancy CCDs. Camera specs scmos

Control of Noise and Background in Scientific CMOS Technology

NOTES/ALERTS. Boosting Sensitivity

Image stabilization (IS)

The Raw Deal Raw VS. JPG

Digital photography , , Computational Photography Fall 2018, Lecture 2

Sampling and pixels. CS 178, Spring Marc Levoy Computer Science Department Stanford University. Begun 4/23, finished 4/25.

Everything you always wanted to know about flat-fielding but were afraid to ask*

How to capture the best HDR shots.

Focusing & metering. CS 448A, Winter Marc Levoy Computer Science Department Stanford University

Properties of a Detector

Photons and solid state detection

High dynamic range imaging and tonemapping

PentaVac Vacuum Technology

Photography Basics. Exposure

Cameras. Shrinking the aperture. Camera trial #1. Pinhole camera. Digital Visual Effects Yung-Yu Chuang. Put a piece of film in front of an object.

Photography Help Sheets

ASTROPHOTOGRAPHY (What is all the noise about?) Chris Woodhouse ARPS FRAS

Presented to you today by the Fort Collins Digital Camera Club

High Dynamic Range (HDR) Photography in Photoshop CS2

What is a Raw file? How a RAW file differs from a JPEG

Signal to Noise: Understanding it, Measuring it, and Improving it (Part 1)

CAMERA BASICS. Stops of light

Aperture & Shutter Speed Review

Chapter 2-Digital Components

2013 LMIC Imaging Workshop. Sidney L. Shaw Technical Director. - Light and the Image - Detectors - Signal and Noise

CS 89.15/189.5, Fall 2015 ASPECTS OF DIGITAL PHOTOGRAPHY COMPUTATIONAL. Image Processing Basics. Wojciech Jarosz

Astrophotography. An intro to night sky photography

CS 89.15/189.5, Fall 2015 ASPECTS OF DIGITAL PHOTOGRAPHY COMPUTATIONAL. Sensors & Demosaicing. Wojciech Jarosz

Cameras and Sensors. Today. Today. It receives light from all directions. BIL721: Computational Photography! Spring 2015, Lecture 2!

To Denoise or Deblur: Parameter Optimization for Imaging Systems

Get the Shot! Photography + Instagram Workshop September 21, 2013 BlogPodium. Saturday, 21 September, 13

The ultimate camera. Computational Photography. Creating the ultimate camera. The ultimate camera. What does it do?

A Digital Camera Glossary. Ashley Rodriguez, Charlie Serrano, Luis Martinez, Anderson Guatemala PERIOD 6

EE 392B: Course Introduction

Aperture & Shutter Speed Review

Short-course Compressive Sensing of Videos

CCD Characteristics Lab

Dynamic Range. H. David Stein

Light Microscopy for Biomedical Research

Deconvolution , , Computational Photography Fall 2018, Lecture 12

SHAW ACADEMY. Lesson 8 Course Notes. Diploma in Photography

Cameras. Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/2/26. with slides by Fredo Durand, Brian Curless, Steve Seitz and Alexei Efros

Lenses, exposure, and (de)focus

Aperture. The lens opening that allows more, or less light onto the sensor formed by a diaphragm inside the actual lens.

Mastering Y our Your Digital Camera

ONE OF THE MOST IMPORTANT SETTINGS ON YOUR CAMERA!

Acquisition. Some slides from: Yung-Yu Chuang (DigiVfx) Jan Neumann, Pat Hanrahan, Alexei Efros

DIGITAL CAMERA SENSORS

TRUESENSE SPARSE COLOR FILTER PATTERN OVERVIEW SEPTEMBER 30, 2013 APPLICATION NOTE REVISION 1.0

Setting Up Your Camera Overview

CCD reductions techniques

High Dynamic Range Imaging

FOCUS, EXPOSURE (& METERING) BVCC May 2018

Film Cameras Digital SLR Cameras Point and Shoot Bridge Compact Mirror less

6.098 Digital and Computational Photography Advanced Computational Photography. Bill Freeman Frédo Durand MIT - EECS

ALMALENCE SUPER SENSOR. A software component with an effect of increasing the pixel size and number of pixels in the sensor

Computational Photography and Video. Prof. Marc Pollefeys

Introduction to camera usage. The universal manual controls of most cameras

Realistic HDR Histograms Camera Raw

Advanced Camera and Image Sensor Technology. Steve Kinney Imaging Professional Camera Link Chairman

Photoshop and Lightroom for Photographers

Chapter 11-Shooting Action

Examination, TEN1, in courses SK2500/SK2501, Physics of Biomedical Microscopy,

Failure is a crucial part of the creative process. Authentic success arrives only after we have mastered failing better. George Bernard Shaw

F-number sequence. a change of f-number to the next in the sequence corresponds to a factor of 2 change in light intensity,

Fundamentals of CMOS Image Sensors

Understanding Digital Photography

Edmonton Camera Club. Introduction to Exposure. and a few other bits!

Module 10 : Receiver Noise and Bit Error Ratio

Wave or particle? Light has. Wavelength Frequency Velocity

Color , , Computational Photography Fall 2018, Lecture 7

Applications of Flash and No-Flash Image Pairs in Mobile Phone Photography

Why is sports photography hard?

SHAW ACADEMY NOTES. Ultimate Photography Program

LOW LIGHT artificial Lighting

High Resolution BSI Scientific CMOS

PURPOSE OF THIS GUIDE SOME TERMS EXPLAINED. Lunar Astrophotography v (of 9) April 2, 2010

Image Denoising Using Statistical and Non Statistical Method

Digital imaging urban legends debunked

Introduction to HDR Photography with Brian McPhee

Topaz Labs DeNoise 3 Review By Dennis Goulet. The Problem

Aperture & Shutter Speed. Review

Intro to Digital SLR and ILC Photography Week 1 The Camera Body

Transcription:

Noise and ISO CS 178, Spring 2014 Marc Levoy Computer Science Department Stanford University

Outline examples of camera sensor noise don t confuse it with JPEG compression artifacts probability, mean, variance, signal-to-noise ratio (SNR) laundry list of noise sources photon shot noise, dark current, hot pixels, fixed pattern noise, read noise SNR (again), dynamic range (DR), bits per pixel ISO denoising by aligning and averaging multiple shots by image processing will be covered in a later lecture 2

Nokia N95 cell phone at dusk 8 8 blocks are JPEG compression unwanted sinusoidal patterns within each block are JPEG s attempt to compress noisy pixels 3

Canon 5D II at dusk ISO 6400 f/4.0 1/13 sec RAW w/o denoising 4

Canon 5D II at dusk ISO 6400 f/4.0 1/13 sec RAW w/o denoising 5

Canon 5D II at dusk ISO 6400 f/4.0 1/13 sec 6

Photon shot noise the number of photons arriving during an exposure varies from exposure to exposure and from pixel to pixel, even if the scene is completely uniform this number is governed by the Poisson distribution 7

Poisson distribution expresses the probability that a certain number of events will occur during an interval of time applicable to events that occur with a known average rate, and independently of the time since the last event if on average λ events occur in an interval of time, the probability p that k events occur instead is p(k;λ) = λ k e λ k! probability density function 8

Mean and variance the mean of a probability density function p(x) is µ = x p(x)dx the variance of a probability density function p(x) is σ 2 = (x µ) 2 p(x)dx the mean and variance of the Poisson distribution are µ = λ 9 σ 2 = λ the standard deviation is σ = λ Deviation grows slower than the average.

Signal-to-noise ratio (SNR) SNR = mean pixel value standard deviation of pixel value = µ σ µ SNR (db) = 20 log 10 σ example if SNR improves from 100:1 to 200:1, then it improves by 20 log 10 (200) - 20 log 10 (100) = +6 db 10

Photon shot noise (again) photons arrive in a Poisson distribution so µ = λ σ = shot noise scales as square root of number of photons examples λ SNR = µ σ = λ It must seem surprising that SNR could rise as a scene gets brighter (a good thing) even though noise is rising at the same time (a bad thing). Here s a simple example. If on average 9 photons arrive at a pixel during an exposure, the standard deviation of this (according to the Poisson distribution) is sqrt(9) = 3 photons. This means that SNR = mean/stddev = 9/3 = 3:1. Now suppose instead that 100 photons arrive at the pixel, either because the scene got brighter or we increased the exposure time or we switched to a camera with bigger pixels. Now the stddev is sqrt(100) = 10, and SNR = 100/10 = 10:1. The noise got worse (stddev of 10 photons versus 3 photons), but the SNR got better (10:1 versus 3:1). The apparent image quality will be better in the second case. doubling the width and height of a pixel increases its area by 4, hence # of photons by 4, hence SNR by 2 or +6 db opening the aperture by 1 f/stop increases the # of photons by 2, hence SNR by 2 or +3 db 11

Dark current electrons dislodged by random thermal activity increases linearly with exposure time increases exponentially with temperature varies across sensor, and includes its own shot noise don t confuse with photon shot noise 12 Canon 20D, 612 sec exposure (http://theory.uchicago.edu/~ejm/pix/20d/tests/noise/)

Hot pixels electrons leaking into well due to manufacturing defects increases linearly with exposure time increases with temperature, but hard to model changes over time, and every camera has them 13 Canon 20D, 15 sec and 30 sec exposures

Fixing dark current and hot pixels example Aptina MT9P031 (in Nokia N95 cell phone) full well capacity = ~8500 electrons/pix dark current = 25 electrons/pix/sec at 55 C solution #1: chill the sensor Retiga 4000R bioimaging camera Peltier cooled 25 C below ambient full well capacity = 40,000 electrons/pix dark current = 1.64 electrons/pix/sec 14 solution #2: dark frame subtraction available on high-end SLRs compensates for average dark current also compensates for hot pixels and FPN

Fixed pattern noise (FPN) manufacturing variations across pixels, columns, blocks mainly in CMOS sensors doesn t change over time, so read once and subtract 15 Canon 20D, ISO 800, cropped

Read noise thermal noise in readout circuitry again, mainly in CMOS sensors not fixed pattern, so only solution is cooling this image tainted by JPEG artifacts? 16 Canon 1Ds Mark III, cropped

Recap photon shot noise unavoidable randomness in number of photons arriving grows as the square root of the number of photons, so brighter lighting and longer exposures will be less noisy dark current noise grows with exposure time and sensor temperature minimal for most exposure times used in photography correct by subtraction, but only corrects for average dark current hot pixels, fixed pattern noise caused by manufacturing defects, correct by subtraction read noise electronic noise when reading pixels, unavoidable 17 Questions?

Signal-to-noise ratio (with more detailed noise model) SNR = mean pixel value standard deviation of pixel value = µ σ = P Q e t P Q e t + D t + N r 2 SNR changes with scene brightness, aperture, and exposure time where P = incident photon flux (photons/pixel/sec) Qe = quantum efficiency t = exposure time (sec) D = dark current (electrons/pixel/sec), including hot pixels Nr = read noise (rms electrons/pixel), including fixed pattern noise 18 (formula from http://learn.hamamatsu.com/articles/ccdsnr.html)

Signal-to-noise ratio (with more detailed noise model) SNR = mean pixel value standard deviation of pixel value = µ σ 19 examples = P Q e t P Q e t + D t + N r 2 Retiga 4000R = (1000 55%) / (1000 55% + 1.64 + 12 2 ) = 20.8:1 assuming 1000 photons/pixel/sec for 1 second Aptina MT9P031 = (1000 11 69%) / (1000 11 69% + 25 + 2.6 2 ) = 6.5:1 assuming pixels are 1/11 as large as Retiga s for 10 photons/pixel/sec for 100 seconds Retiga = 18.7:1 Aptina = 1.2:1 Don t use your cell phone for astrophotography!

Dynamic range DR = max output swing noise in the dark To reiterate the difference between SNR and DR, signal-to-noise ratio (SNR) tells you how noisy an image will be at a particular light level, and a sensor will have a different SNR for each possible light level, while dynamic range (DR) is a single number giving the maximum possible range between saturation (for bright scenes) and the noise floor (for dark scenes). DR tells you nothing about how noisy a low-light image will be; it just says that it will be (barely) distinguishable from pure noise. So a cell phone might have as large a dynamic range as an SLR, but if its low-light images are very noisy (as they typically are), you wouldn t want to use it for low-light photography. saturation level - D t = 2 D t + N r 20 examples Retiga 4000R = (40,000-1.64) / (1.64 + 12 2 ) = 3,313:1 (11.7 bits) for a 1 second exposure Aptina MT9P031 = (8500-25) / (25 + 2.6 2 ) = 1500:1 (10.5 bits) for a 1 second exposure determines precision required in ADC, and useful # of bits in RAW image full well capacity any less than ~10 bits would be < 8 bits after gamma correction for JPEG encoding, and you would see quantization artifacts 2010 Marc Levoy

Low-light cameras compare to 10.5 bits for Aptina don t use your cell phone for fluorescence microscopy! DR = max output swing noise in the dark saturation level - D t = 2 D t + N r Andor ixon+888 back-illuminated CCD $40,000 performance DR = (80,000-0.001) / (0.001 + 6 2 ) = 13,333:1 (13.7 bits) for a 1 second exposure if cooled to -75º C 21 electron multiplication mode DR = (80,000-0.001) / (0.001 + <1 2 ) 80,000:1 (16.2 bits) can see a black cat in a coal mine can reliably detect a single photon 2010 Marc Levoy

ISO - signal gain 22 doubling ISO doubles the signal linear with light, so same as 2 exposure time, or 1 f/stop implemented as analog amplification on Canon 5D II up to ISO 6400; higher ISOs are implemented using digital multiplication after ADC? you want to amplify as early as possible during readout if you amplify before read noise is added, and RN is independent of signal amplitude, then the amplified signal will have better SNR you especially want to amplify before quantization by ADC if you quantize a low signal, then brighten it in Photoshop, you will see quantization artifacts (contouring) if you quantize a very low signal, you may get zero (black) raising exposure typically improves SNR faster than raising ISO thus, you should maximize exposure time until stopped by object motion blur, camera shake blur, or saturation; if stopped by blur, then raise ISO until stopped by saturation (i.e. don t clip whites)

The signal amplification pipeline raising the ISO is usually implemented as analog amplification (of voltages) before analog-to-digital conversion (ADC), but for high ISOs, some cameras may also perform digital multiplication (of numbers) after ADC analog amplification is better than digital multiplication, for the reasons given on the previous slide To reiterate the recipe I gave in class, here s how to take a picture that minimizes noise: 1. Make your aperture as wide as you want it for depth of field. 2. Make your exposure as long as you dare make it, given handshake or object motion blur. 3. Raise the ISO to ensure an image that fills the range of numbers representable in the RAW or JPEG file, i.e. until the brightest object in the scene that you don t want to appear saturated just reaches white on the histogram. All of these are done in the camera during shooting. Don t use Photoshop to brighten an image (except minor adjustments), because it will enhance noise more than raising the ISO will, and it may introduce quantization artifacts (contouring). 23

SNR and ISO over the years (http://www.dxomark.com/index.php/eng/insights/snr-evolution-over-time) After lecture, Jesse pointed out to me that as displays match and begin to exceed human retinal acuity, it no longer matters how many pixels they have, only how many pixels we can see. This in turn depends on screen size and viewing distance. He s right, but except for a few high-end smartphones that hasn t happened yet, so my metric is still meaningful. SNR has been improving with better sensor designs but total # of megapixels has risen to offset these improvements, making pixels smaller, so SNR in a pixel has remained static display resolutions have not risen as fast as megapixels, so we re increasingly downsizing our images for display if you average 4 camera pixels to produce 1 for display, SNR doubles, so for the same display area, SNR has been improving 24

Effect of downsizing on image noise Implicit in this example is the notion that averaging down 4 pixels to make one pixel has a similar effect on SNR as having a pixel 4x as large. The effect isn t identical, because the contributions by read noise are different, but read noise is less important to SNR than photon shot noise. 25 point sampled averaged down

SNR and ISO over the years (http://www.dxomark.com/index.php/eng/insights/snr-evolution-over-time) 26 SNR has been improving with better sensor designs but total # of megapixels has risen to offset these improvements, making pixels smaller, so SNR in a pixel has remained static display resolutions have not risen as fast as megapixels, so we re increasingly downsizing our images for display if you average 4 camera pixels to produce 1 for display, SNR doubles, so for the same display area, SNR has been improving this allows higher ISOs to be used in everyday photography

Nikon D3S, ISO 3200, photograph by Michael Kass

Nikon D3S, ISO 6400, photograph by Michael Kass

Nikon D3S, ISO 25,600, denoised in Lightroom 3, photograph by Fredo Durand

Nikon D3S, ISO 25,600, denoised in Lightroom 3, photograph by Fredo Durand

RAW image from camera, before denoising in Lightroom

Fredo said it was too dark to read the menu...

tone mapped to show the scene as Fredo might have experienced it

single frame in dark room using iphone 4

average of ~30 frames using SynthCam SNR increases as sqrt(# of frames)

Recap signal-to-noise ratio (SNR) is mean/stddev of pixel value rises with sqrt(brightness and/or exposure time) depends also on dark current and read noise poor for short exposures and very long exposures dynamic range (DR) is max swing / noise in the dark fixed for a particular sensor and exposure time determines # of useful bits in RAW image ISO is amplification of signal before conversion to digital maximize exposure time until camera or object blurs, then maximize ISO, making sure not to saturate can combine multiple short-exposure high-iso pictures 36 Questions?

Slide credits Eddy Talvala Filippov, A., How many bits are really needed in the image pixels? (sic), http://www.linuxdevices.com/articles/at9913651997.html 37