camera models and noise -...

43
Camera Models and Noise Stoyan Furnadzhiev

Upload: others

Post on 11-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Camera Models and Noise

Stoyan Furnadzhiev

Page 2: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview

• Light rays travel from the scene, which is represented by a plenoptic function.

• The plenoptic function gives us the radiance of the scene.

• Radiance - amount of light that is emitted from a scene and falls within a given solid angle in a specified direction

Page 3: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview

• Rays travel through the lens system and focus onto the sensor, causing irradiance on a certain pixel.

• Irradiance - power per unit area incident on a surface.

• In discrete sense photons incident on the sensor are collected and converted into measurable voltage.

• This voltage is transformed by analogue-digital-converter (ADC) for the use of the processor.

Page 4: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview

� We want to build a physically-based camera model that accurately computes the irradiance on a film given the incoming radiance from the scene.

� Furthermore, we want to calibrate a CCD sensor to remove the effects of fixed pattern nonuniformity and spatial variation in dark current.

Page 5: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Realistic Camera Model

• Current camera models do not compute properly geometry, depth of field or exposure.

• Let's try to build physically-based camera model.

• Simulate the lens system of a camera.

Page 6: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens System

• What is a lens system?

– A combination of different spherical/aspherical glass or plastic lenses and stops centred on a common axis.

– Aperture stop - limits the angular spread of rays.

Page 7: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Simulating Lens System

• Computing correct image geometry.

– Ideally one point in object space coresponds to one point in image space.

– Unfortunately the world is not perfect.

– Aberrations in the lens system and/or diffraction effects will spread the point.

– A point in object space is represented on the image space using a point spread function (PSF).

Page 8: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Simulating Lens System

• Computing correct image radiometry.

– Ideally lenses focus light evenly on the image plane.

– Guess what?

– Real lenses suffer from an uneven exposure across the backplane.

– This depends as well on the aperture stop.

Page 9: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Depth of Field

• If object is not focused on the focus plane then it is blurred.

• The radius of the blur depends on the size of the aperture.

• Smaller aperture - smaller blur radius - larger depth of field.

• Larger aperture - more light rays come through the lens system.

Page 10: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Depth of Field

Page 11: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

f/4

Page 12: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

f/16

Page 13: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Geometry

• Tracing Rays Through Lens System

– A simple algorithm is used:R = RayFor each element Ei from rear to front,If p is outside clear aperture of Ei

ray is blockedElse if medium is on far side of Ei ≠ medium

on near side compute new direction for R using Snell's law

Page 14: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Geometry

• Thick Lens Approximation

– F & F´ - focal points;

– P & P´ - principal planes;

– Distance from P to P´ is the effective thickness (t).

Page 15: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Geometry

• Focusing

– Done by moving the lens along the axis.

– We can estimate the distance T that we should move the lense:T² + T(2f´ + t - z) + f´² = 0, wherez is the distance form the focusing point to the film plane.

Page 16: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Geometry

• The Exit Pupil

– Defined as the image of the aperture stop as viewed from the image space.

Page 17: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Radiometry

• Exposure at a single pixel:

– H(x´) = E(x´)T

– H(x´) is the exposure at x´

– E(x´) is the irradiance at x´

– T is the exposure duration.

• We have to compute E(x´):

– We integrate the radiance at x´ over the solid angle subtended by the exit pupil.

Page 18: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Radiometry

Page 19: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Lens Radiometry

• Z - axial distance from the film plane to the disc of the exit pupil.

• L - the ray coming from the disc at point x´´.

• A - the area of the disc.

• There are 2 approximations of this formula depending on the solid angle.

Page 20: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Sampling

• We estimate E(x´) by sampling radiance -casting rays from the pixel area towards the lens.

• We sample within the solid angle subtended by the exit pupil.

• Choosing a good sampling pattern is essential.

• Uniformly distributed points in the image plane map to uniformly distributed points on the disk.

Page 21: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Sampling

• One mapping takes sub-rectangles [0, x] × [0, 1] to a chord witch are proportional to x.

Page 22: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Results

Page 23: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

200mmtelephoto lens

50mmdouble-Gauss lens

35mmwide-angle lens

16mmfisheye lens

Page 24: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Images synthesized with a 35mm wide-angle lens using, in order of decreasing accuracy, the full simulation (up), thick approximation (middle), and the standard model (down).

Page 25: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Same scene as previous slide, but the camera is focused on the picture frame.

Page 26: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

An image taken with the fisheye lens. Barel distortion and darkening caused by vignetting are visible.

Page 27: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Camera Calibration and Noise Estimation

• View a CCD (charge-coupled device) sensor from the perspective of machine vision.

• Estimating sensor noise and removing part of it.

• Measuring scene variation, which does not depend on image irradiance.

Page 28: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview of CCD Camera

• CCD measures distribution of light on a thin layer of silicon.

• A photon strikes the silicon photoelectron is generated.

• The photoelectrons are collected in a collection site (potential well) representing one pixel.

• The process of charge coupling is used for transferring the stored charge.

• An output amplifier reads out an entire row.

Page 29: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview of CCD Camera

Page 30: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Overview of CCD Camera

The photoelectrons (blue) are collected in potential wells (yellow) created by applying positive voltage at the gate electrodes (G). Applying positive voltage to the gate electrode in the correct sequence transfers the charge packets.

Page 31: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

The Camera Model

• I - number of electrons at a collection site.

• T - integration time.

• x, y - continuous coordinates on the sensor plane.

• λ - wavelength.

• B - incident spectral irradiance.

• Sr- spatial response of the collection site.

• q - ratio of electrons collected per incident light energy for the device.

Page 32: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Types of Noise

• Fixed pattern noise:

– Spatial nonuniformity caused by processing errors during CCD fabrication.

– KI - electrons collected at a site, where K is a constant associated with the collection site.

• Dark current:

– Free electrons generated by thermal energy.

– Proportional to integration time.

– Temperature dependant.

– NDC - number of dark electrons.

Page 33: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Types of Noise

• Shot noise:

– Characterizes the uncertainty in the number of stored electrons.

– Follows Poisson distribution.

– Cannot be eliminated.

– The variance depends on the number of collected photoelectrons (KI) and dark electrons (NDC).

– NS - zero mean Poisson shot noise.

• The number of electrons per collection site:

– KI + NDC + NS

Page 34: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Types of Noise

• Read noise:

– Generated by the output amplifier.

– Zero mean read noise (NR) is independant of the number of collected electrons.

• Video signal leaving the camera:

– V = (KI + NDC + NS + NR)A,where A is the combined gain of the output amplifier and the camera circuitry.

Page 35: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Types of Noise

• The analogue video signal is quantized to produce digital image, so V is rounded up to a digital value D.

• The quantization process is modeled as the addition of a noise source N

Q

• D = (KI + NDC

+ NS

+ NR)A + N

Q

Page 36: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Modeling Reflectance and Illumination Variation

• Spatial variation in illumination and reflectance leads to spatial variation on the collected charge.

• The collected charge I can be presented like this

– I = S + E, where S holds the mean illumination and reflectance and thus does not depend on the collection cite; E holds the spatial variance of the illumination and of the reflectance of the surface.

Page 37: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Estimating Sensor Noise

• Let's present D in the following way:

– D = µ + N, whereµ = KIA + EDCA, where EDC is the expected value of NDC;N = NI + NC = (NSA) + (NRA + NQ).

– NI is the part of the noise that depends on the number of collected electrons and has Poisson distribution.

– NC does not depend on the number of collected electrons and has Normal distribution.

Page 38: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Camera Calibration

• Estimating Variation in Dark Current.

– We take shots in dark environment so I ≡ 0.

– D = (NDC + NS + NR)A + NQ.

– We average a number of these images.

– We obtain a dark reference image, which we denote by DD.

– This dark image has small variation, which is inverse proportional to the number of taken images.

Page 39: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Camera Calibration

• Estimating Fixed Pattern Variation

– A good estimation for K can be found - K with small variance and high accuracy.

• Let's define a corrected version DC

of an image D.

– DC = (D - DD) ⁄ K

– DC = (I + NS ⁄ K + NR ⁄ K)A + NQ ⁄ K

– Assumption: the errors in the approximations DDand K are small compared to the variance of the remaining noise.

Page 40: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Scene Variation

• Image variance can be separated to camera noise variance and scene variation.

• Scene variation is independent of the image irradiance therefore is useful for scene description and surface identification.

Page 41: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

Conclusion

We have managed to build a realistic physically-based lens system, which delivers correct radiance and geometry to the sensor. Furthermore a calibrated camera model can be used to quantify accurately the noise properties of a CCD sensor.

Page 42: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current

References

• “A realistic Camera Model for Computer Graphics” -Craig Kolb, Don Mitchell, Pat Hanrahan

• “Radiometric CCD Camera Calibration and Noise Estimation” - Glenn E. Healey, Raghava Kondepudy

• Wikipedia

• World Wide Web

Page 43: Camera Models and Noise - people.mpi-inf.mpg.depeople.mpi-inf.mpg.de/~theobalt/courses/Furnadzhiev_Lenses_and_S… · Camera Calibration • Estimating Variation in Dark Current