HDR Imaging Introduction dr. Francesco Banterle - - PowerPoint PPT Presentation

hdr imaging introduction
SMART_READER_LITE
LIVE PREVIEW

HDR Imaging Introduction dr. Francesco Banterle - - PowerPoint PPT Presentation

HDR Imaging Introduction dr. Francesco Banterle francesco.banterle@isti.cnr.it Who I am 2007 2010 2004 2007 2009 Reference material High Dynamic Range Imaging, Reinhard et al. 2010, Morgan Kaufmann Advanced High Dynamic


slide-1
SLIDE 1

HDR Imaging Introduction

  • dr. Francesco Banterle

francesco.banterle@isti.cnr.it

slide-2
SLIDE 2

Who I am

2004 2007 2009 2010 2007

slide-3
SLIDE 3

Reference material

  • “High Dynamic Range Imaging”, Reinhard et
  • al. 2010, Morgan Kaufmann
  • “Advanced High Dynamic Range Imaging”,

Banterle et al. 2011, CRC press

  • “High Dynamic Range Imaging”, Mantiuk et al.

2015, Wiley (free):

  • http://pages.bangor.ac.uk/~eesa0c/pdfs/mantiuk15hdri.pdf
  • “Inverse Tone Mapping” (Chapter 1 and 2)

Banterle 2009 (free):

  • http://wrap.warwick.ac.uk/55447/
slide-4
SLIDE 4

Exam

  • Writing an essay on a topic from a few papers
  • Programming project:
  • MATLAB extending HDR Toolbox + report
  • C++ extending Piccante + report
slide-5
SLIDE 5

and now we start…

slide-6
SLIDE 6

Photography

  • There are imaging sensors everywhere:
  • Mobile phones
  • Point-and-shoot
  • DSLR
  • Drones
slide-7
SLIDE 7

Photography

slide-8
SLIDE 8

Photography

slide-9
SLIDE 9

Photography

  • I bought a reflex, nice, am I a photographer?

Henri Cartier-Bresson Rome

MISSING MISSING

slide-10
SLIDE 10

Photography

  • I bought a reflex, nice, am I a photographer?
  • I have some doubts…
slide-11
SLIDE 11

Photography

  • I bought a reflex, nice, am I a photographer?
  • I have some doubts…
slide-12
SLIDE 12

Photography

  • How do I become a photographer?
  • Knowledge of the scene structure/geometry
  • Knowledge of my gear
  • Knowledge of light
  • It takes ages….
slide-13
SLIDE 13

Photography

  • How do I become a photographer?
  • Knowledge of the scene structure/geometry
  • Knowledge of my gear
  • Knowledge of light
  • It takes ages….
slide-14
SLIDE 14

Exposure time

slide-15
SLIDE 15

Exposure time

under-exposed

slide-16
SLIDE 16

Exposure time

under-exposed

  • ver-exposed
slide-17
SLIDE 17

Exposure time

Ca’ Foscari, Venezia

slide-18
SLIDE 18

All exposures

Gustave Le Gray Bring upon the water

MISSING MISSING

slide-19
SLIDE 19

The Film

32 more intensities levels of paper

MISSING

slide-20
SLIDE 20

The Film

Ansel Adams The Tetons and the Snake River

MISSING MISSING

slide-21
SLIDE 21

Digital Photography

slide-22
SLIDE 22

Lies of Digital Photography

  • Manufacturer racing on reaching more pixel rather

than “better pixel”

  • 8-bit for each color channel:
  • red, green, and blue
  • Total 24-bit —> 16M colors
  • Are 16M colors a lot?
  • Not really, we are missing a key point: intensities!
slide-23
SLIDE 23

Lies of Digital Photography

  • A digital camera can capture only 8-bit; more or

less 256:1

  • Three more intensities than paper
  • The human visual system (HVS) can:
  • perceive 10,000:1 at the same time
  • perceive 1,000,000:1 in total with adaptation
slide-24
SLIDE 24

High Dynamic Range Imaging

  • To extend the range (high) that can be captured in

a scene of current digital cameras

  • To match what can the HVS can perceive and

beyond:

  • Picard and Mann 1995
  • Debevec and Malik 1997
slide-25
SLIDE 25

High Dynamic Range Imaging

  • How?
  • As Le Gray achieved it:
  • more photographs of the same scene
  • combine these photographs in a single one
slide-26
SLIDE 26

High Dynamic Range Imaging

slide-27
SLIDE 27

High Dynamic Range Imaging

slide-28
SLIDE 28

High Dynamic Range Imaging

slide-29
SLIDE 29

High Dynamic Range Imaging

slide-30
SLIDE 30

What can we see?

Luminance Range Illumination Range Log scale cd/m

2

  • 6
  • 2

4 8

~

slide-31
SLIDE 31

High Dynamic Range Imaging

  • HDR technology allows to
  • capture all intensities in a real-world scene
  • compress them in an efficient way
  • manipulate them
  • visualize them on different displaying

technologies

slide-32
SLIDE 32

HDR Imaging: what do we need to know?

  • We need to know:
  • what we are measuring
  • what color spaces are
  • how a display works
  • how a camera roughly works
slide-33
SLIDE 33

a now, something completely different…

slide-34
SLIDE 34

A bit of Radiometry

  • Radiometry is the science of “measuring light”
  • Light is radiant energy (Q):
  • measured in Joules (J)
  • The flow of radiant energy, Radiant Power (P):
  • measured in Watt (W = J/s)
slide-35
SLIDE 35

Irradiance

  • Power incident upon unit area dA:

E = dP dA W/m2 Unit Definition

slide-36
SLIDE 36

Irradiance

  • Power incident upon unit area dA:

E = dP dA W/m2 Unit Definition dA

slide-37
SLIDE 37

Irradiance

  • Power incident upon unit area dA:

E = dP dA W/m2 Unit Definition dA

slide-38
SLIDE 38

Radiance

  • Power incident on a unit surface area dA from a

unit set of directions dω Unit Definition L = d2P dA cos θdω W/m2/sr

slide-39
SLIDE 39

Radiance

  • Power incident on a unit surface area dA from a

unit set of directions dω Unit Definition L = d2P dA cos θdω W/m2/sr dA

slide-40
SLIDE 40

Radiance

  • Power incident on a unit surface area dA from a

unit set of directions dω Unit Definition L = d2P dA cos θdω W/m2/sr dA dω

slide-41
SLIDE 41

Radiance

  • Power incident on a unit surface area dA from a

unit set of directions dω Unit Definition L = d2P dA cos θdω W/m2/sr dA dω

slide-42
SLIDE 42

Radiant Exitance

  • Power emitted emitted per unit area

W/m2 Unit Definition M = dP dA

slide-43
SLIDE 43

Radiant Exitance

  • Power emitted emitted per unit area

W/m2 Unit Definition M = dP dA

slide-44
SLIDE 44

Radiant Exitance

  • Power emitted emitted per unit area

W/m2 Unit Definition M = dP dA

slide-45
SLIDE 45

Radiant Intensity

  • Power per solid angle dω

Unit Definition W/sr I = dP dω

slide-46
SLIDE 46

Radiant Intensity

  • Power per solid angle dω

Unit Definition W/sr I = dP dω

slide-47
SLIDE 47

Radiant Intensity

  • Power per solid angle dω

Unit Definition W/sr I = dP dω dω

slide-48
SLIDE 48

Radiant Intensity

  • Power per solid angle dω

Unit Definition W/sr I = dP dω dω

slide-49
SLIDE 49

A bit of Photometry

  • It is basically Radiometry taking into account the

human eye response at different wavelength

  • V(λ) is the spectral sensitivity curve proposed by

the Commission Internationale de l’Eclairage (CIE)

  • Basically, each quantity is weighted V(λ):

Lv = Z 830

380

Le(λ)V (λ)dλ

slide-50
SLIDE 50

Photometry

400 450 500 550 600 650 700 750 800 0.2 0.4 0.6 0.8 1

Wavelength (nm) Normalized response

CIE standard observer photopic luminous efficiency curve

slide-51
SLIDE 51

A bit of Photometry

  • All previous radiometry terms have photometry

counterparts:

  • Radiant Power —> Luminous Power (Pv) [lm] (lumen)
  • Radiant Energy —> Luminous Energy (Qv) [lm s]
  • Radiant Exitance —> Radiant Exitance (Mv) [lm/m2]
  • Irradiance —> Illuminance (Ev) [lm/m2]
  • Radiant Intensity —> Luminous Intensity (Iv) [lm/sr] = cd (candela)
  • Radiance —> Luminance (Lv) [cd/m2] = Nit
slide-52
SLIDE 52

Notes on measurements

  • Linear: 106 cd/m2
  • Order of magnitude (log10): 6
  • f-stop (log2): 19.93 stops
slide-53
SLIDE 53

A bit of Photometry: Contrast

  • Give a rough idea of relative luminance in the scene
  • useful
  • Formally, a relationship between the darkest and

brightest value in the scene. Different contrasts:

  • Weber:
  • Michelson
  • Ratio:

CW = Lmax − Lmin Lmin CM = Lmax − Lmin Lmax + Lmin CR = Lmax Lmin

slide-54
SLIDE 54

A bit of Photometry: Statistics

  • Another important statistics is geometric mean,

especially in the case of HDR imaging: LH =

N

Y

i=1

  • L(xi) + ✏

1

N =

= exp ✓ 1 N

N

X

i=1

log

  • L(xi) + ✏

◆ ✏ > 0 Lavg = 1 N

N

X

i=1

L(xi)

slide-55
SLIDE 55

A bit of Photometry: Statistics

−4 −3 −2 −1 1 2 1000 2000 3000 4000 5000 6000 7000

Order of magnitude Number of pixels

slide-56
SLIDE 56

A bit of Colorimetry

  • “Assigning numbers to physically defined stimuli”
  • Milestone in colorimetry:
  • most of perceived colors can be matched by

adding light from three suitable “pure stimuli” or “primary stimuli”

  • For each spectral target, the intensity of the

primaries can be adjusted to create a match

slide-57
SLIDE 57

CIE XYZ: matching functions

400 450 500 550 600 650 700 750 800 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

λ (nm) Sensitivity

x y z

¯ ¯ ¯

slide-58
SLIDE 58

CIE XYZ

  • The linear combination of the three spectral functions

can produce a spectral signal which may visually match to a linear combination of the primaries:

I(λ) = x(λ)X + y(λ)Y + z(λ)Z

X = Z 830

380

I(λ)x(λ)dλ Y = Z 830

380

I(λ)y(λ)dλ Z = Z 830

380

I(λ)z(λ)dλ

slide-59
SLIDE 59

CIE XYZ: Chromaticities

x = X X + Y + Z y = Y X + Y + Z

0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

x y D65

slide-60
SLIDE 60

Color Spaces

  • Two messages:
  • Mathematical equations creating a relationship

between a color triplet and a CIE XYZ color triplet

  • Defining a color gamut; i.e. what colors can be

represented (a volume in the color space)

slide-61
SLIDE 61

RGB Color Space

  • Defining a color as a triplet of specific (device dependent) red,

green, and blue primaries with a given white point (wp)

  • For example, the ITU-R BT.709 has:
  • which leads to:

  X Y Z   =   0.412 0.358 0.181 0.213 0.715 0.072 0.019 0.119 0.950     R G B  

Rx,y = (0.64, 0.33) Gx,y = (0.3, 0.6) Bx,y = (0.15, 0.06) WPx,y = (0.3127, 0.329)

slide-62
SLIDE 62

sRGB Color Space

  • LCD and CRT monitors can not display linear

signal; i.e. the relationship, f, between output intensity and input voltage is not linear

  • f is typically modeled as a gamma function

Lv = kV γ

slide-63
SLIDE 63

sRGB Color Space: visualization on CRT/LCD monitors

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.2 0.4 0.6 0.8 1

Normalized pixel value Normalized luminance output

γ encoded values linear values

Linear Gamma

slide-64
SLIDE 64

sRGB Color Space

  • A standard RGB color space for monitors
  • Primaries and white point from ITU-R BT.709
  • Taking into account non-linearity of displays:

CsRGB = ( 12.92Clinear if Clinear ≤ 0.0031308 (1 + 0.055)C

1 2.4

linear − 0.055

  • therwise
slide-65
SLIDE 65

and now…. inside a camera…

slide-66
SLIDE 66

Inside the Camera

  • Main properties of a camera when taking a shot:
  • Focal Length
  • Aperture
  • Shutter speed
  • ISO
slide-67
SLIDE 67

Inside the Camera: Focal Length

  • Focal length is the distance (typically mm) over which

initially collimated rays are brought in focus

  • It is an important feature of an optical system, e.g.

camera’s lens

  • Field of view (FOV) and Focal Length have the

following relationship:

  • where x is the diagonal in mm of the sensor/film

FOV = arctan ✓ x 2f ◆

slide-68
SLIDE 68

Inside the Camera: Focal Length

1 S1 + 1 S2 = 1 f

slide-69
SLIDE 69

Inside the Camera: Focal Length

55mm 35mm 18mm

slide-70
SLIDE 70

Inside the Camera: Aperture

  • f-number N:
  • f is the focal length
  • d is the diameter of the entrance pupil

N = f d

slide-71
SLIDE 71

Inside the Camera: Aperture

f/1.4 f/2 f/2.8 f/4 f/5.6 f/8

slide-72
SLIDE 72

Inside the Camera: Aperture

slide-73
SLIDE 73

Inside the Camera: Aperture

slide-74
SLIDE 74

Inside the Camera: Shutter speed

  • Shutter speed or exposure time: length of time a

camera’s shutter is open; proportional to the amount of light that enters

slide-75
SLIDE 75

Inside the Camera: ISO

  • ISO or film speed is a measure of the sensitivity of a sensor or a film to light. It

can be measured in many scales, a typical scale is ASA firstly proposed by Kodak for film:

  • Asa is arithmetic: 200 ASA is twice 100 ASA
  • Lower ISO values:
  • less noise
  • requiring more light
  • Higher ISO values:
  • more noise
  • requiring less light
slide-76
SLIDE 76

Inside the Camera: ISO

slide-77
SLIDE 77

Inside the Camera: ISO

slide-78
SLIDE 78

Inside the Camera: ISO

slide-79
SLIDE 79

Inside the Camera: E and L

Before light hits the image plane

Scene L Scene Radiance E Image Irradiance

Linear Mapping between L and E

Lens

slide-80
SLIDE 80

Inside the Camera: E and L

After light hits the image plane

E Image Irradiance Camera Electronics Z Pixel value in [0,255]

between E and Z Non linear mapping!

slide-81
SLIDE 81

Inside the: Camera: E and L

Image Plane Scene Surface Image Surface Lens f d

E = Lπ 4 ✓ d f ◆2 cos4 α

α

slide-82
SLIDE 82

Inside the Camera: E and L

  • A small note:
  • Modern camera lenses already take

into account

  • Therefore, this value can be assumed to be

mostly constant, especially for f/8 or smaller apertures

E = Lπ 4 ✓ d f ◆2 cos4 α

slide-83
SLIDE 83

Inside the Camera: Bayer Filter

  • Only in rare cases, cameras have a sensor for each

color channel; red, green, and blue.

  • Why? It is very expensive!
  • Common solution; the bayer pattern:
  • each color is capture with a mask which varies

spatially

slide-84
SLIDE 84

Inside the Camera: Bayer Filter

three sensor solution Bayer sensor solution

slide-85
SLIDE 85

Inside the Camera: Bayer Filter

slide-86
SLIDE 86

Inside the Camera: Bayer Filter

slide-87
SLIDE 87

Inside the Camera: Bayer Filter

Image with Bayer Filter Reconstructed Image

slide-88
SLIDE 88

Inside the Camera: Bayer Filter

Image with Bayer Filter Reconstructed Image

slide-89
SLIDE 89

questions?