02-Gray Scale Control TTF. A TTF tells us how an imaging device relates the gray level of the input...
-
Upload
clara-cole -
Category
Documents
-
view
213 -
download
0
Transcript of 02-Gray Scale Control TTF. A TTF tells us how an imaging device relates the gray level of the input...
02-Gray Scale Control
17 July 2008 Thursday Afternoon
1:00- 1:30 01-Exposure, Stops, and Photo-Effects
1:30-2:00 Lab 1 - Practice Shoot with D50
2:00-3:30 02-TTF & Gray Scale Control
3:30-4:15 Lab 2 - ImageJ Brightness/Contrast
4:15-5:00 03-Photo Composition
Overnight Lab 3 Take Photos
18 July 2008 Friday Morning
8:30-10:00 04-Video System TTFs
10:00-10:30 Lab 3- Continued - Photo Presentation & Critique
10:30-12:00 05-Jones Plot
17 July 2008 Thursday Afternoon
1:00- 1:30 01-Exposure, Stops, and Photo-Effects
1:30-2:00 Lab 1 - Practice Shoot with D50
2:00-3:30 02-TTF & Gray Scale Control
3:30-4:15 Lab 2 - ImageJ Brightness/Contrast
4:15-5:00 03-Photo Composition
Overnight Lab 3 Take Photos
18 July 2008 Friday Morning
8:30-10:00 04-Video System TTFs
10:00-10:30 Lab 3- Continued - Photo Presentation & Critique
10:30-12:00 05-Jones Plot
TTF
A TTF tells us how an imaging devicerelates the gray level of the inputto the gray level of the output.
P
L
Luminance, L
pixel value, P
Luminance, L
pixel value, P
3c3
2c2c10 LaLaLaaP
The TTF may be in the formof a graph, equation, or Look-Up-Table (LUT).
P
L
L
01020..
100110120
.
.300
P
001..
100110120
.
.255
becomes
pixel value, P(in the camera& sent to monitor)
Original Luminance, Lo
An Imaging System involves Multiple imaging devices (TTFs) and Multiple kinds of images (types of gray)
Luminance &Reflectance
Irradiance, I(at the sensor)
Luminance
Note: We can't see a digital image. we see a copy of the digital image displayed on a monitor or printed on a printer.
TTF(P vs Lo)(camera)
TTF(L vs P)(monitor)
Luminance, L
pixel value, P
P
L
TTFs have many alternative namesDLogH curveCharacteristic curveProfile Tone curveI/O function……etc.
A successful imaging device must be designed with an appropriate TTF.
To understand the TTF of an imaging device, we first need to understand the gray scale properties of images.
x
y
y
x
gray level
A printed, black & white image has gray valuesdescribed as reflectance, R, decimal fractionsfrom 0…1.
A digital image has gray values describedas pixel values, P, typically integers from 0…255.
Luminance, L
pixel value, P
Luminance, L
pixel value, P
Consider a hard copy image with gray values R (reflectance factor) from 0 to 1.Each location in the image (x,y) has a gray value R.
x
y
Gray Value: R = 0.653
Gray ScaleR = 1 is white
R = 0 is black
Gray levels, R, can be represented in a 3D graph.
x
y
y
x
R
However, this 3D graph isn't of much use.
0 1
Number of pixels
R
sort
remove
a
b c d
0.2 0.4 0.6 0.8
So, we re-organize the gray values as follows.
We call this graph a gray level Histogram.
The histogram tells us the properties of the gray level image.
0 1
Number of pixels
R
0 1R
0
1
0
1R R
R too low R too highBalance atR=0.47
For example, the point where the histogram balances isthe "average" gray level of the image.
has an average gray value of R=0.47.
N
Average R = 0.2 Average R = 0.47 Average R = 0.78
0 1
N
0 1 0 1RR R
The average value tells us the lightness/darkness of the image.
Bright ImageDark Image
The width of the histogram tells us the contrast of the image.
Lightness and Contrast are the two most common descriptionsof the gray characteristics of an image.
HighContrast
LowContrast
R
N
0 1 R
N
0 1R
N
0 1
Digital images are described the same way.
Lightness and Contrast are the two most common descriptionsof the gray characteristics of any image.
HighContrast
LowContrast
P
N
0 255 P
N
0 255P
N
0 255
There are many metrics for image contrast. Most are based on the maximum and minimum values in the histogram.There are two ways to show the range between Pmax and Pmin.
N NN
P0 255 P0 255P0 255
Pmin Pmax
(1) The contrast ratio: C = Pmax/Pmin
(2) The contrast difference: P = Pmax - Pmin (also called the "window")
window
Printed images can be described in terms of Reflectance or Density.
Io I
printed image
R ≡ Io/I
and
D ≡ -Log(R)
A Rule of Thumb for Contrast Metrics: A ratio is used for describing things proportional to power. A difference is used for describing things proportional to Log(power)
I is proportional to power.
Printed images can be described in terms of Reflectance or Density.
Io I
printed image
I is proportional to power.
Note that D ≡ Dmax - Dmin = [-Log(Rmin) ] - [-Log(Rmax) ] = Log(Rmax) - Log(Rmin)= Log(Rmax/Rmin)= Log(C)
Two ways to describe image contrast:(1) C = Rmax/Rmin
(2) D = Dmax - Dmin
R ≡ Io/I (R is proportional to power)
and
D ≡ -Log(R) (D is proportional to Log(power) )
"Dynamic Range": Printed Image
Io I
printed imageTwo ways to describe image contrast:
(1) C = Rmax/Rmin
(2) D = Dmax - Dmin
R ≡ Io/I (R is proportional to power)
and
D ≡ -Log(R) (D is proportional to Log(power)
(1) C is often called the "Contrast Ratio"
(2) D is often called the "Dynamic Range" (Dr = D)
L ≡ luminance in cd/m2
Lmax and Lmin
Image contrast is in terms of the maximumand the minimum luminance in the image.
Contrast Ratio: C=Lmax/Lmin
Dynamic Range: Dr = Log(C)
"Dynamic Range": Monitor (soft) Image
Hard Copy Soft CopyOriginal Scene
Contrast metrics of the Scene/Image
Lmax Lmin
Lmax LminDmax
Rmin
Dmin
Rmax
"Image Contrast Ratio" C = Lmax/Lmin or C = Rmax/Rmin
"Image Dynamic Range" Dr = Log(C)
Note: These are contrast metrics of the Images, not the imaging devices that produced them. (See later)
Caution:
There are many other metrics in common use todescribe the gray scale properties of images.Many are industry or profession specific.Many are only loosely defined.
For example, professional photographers often use the term "Key" of an image.
High "Key"Low "Key"
"Key is a characteristic of a "PROPERTLY" exposed image (subjective). Lightness is adjusted until a "PROPER" image is obtained.Then Key can be expressed in terms of the average gray level.
Low "Key"
High "Key"
High "Key"NOT low "Key", but anunder exposed image.
Learn the language of your customers!!Don't tell them they are "wrong" if their favorite metric is subjective.
Tone Characteristics of an Imaging Device
Tone Characteristics of an Imaging Device
An imaging device changes one imageinto another.
original L
copy, P
The tone characteristic of theimaging device is described by the TTF
P
L
TTF of a cameratransforms thethe original histogram intothe copy histogram.
L
N
00
P
N
00
Tone Characteristics of an Imaging DeviceJust as the tone characteristics of an image are fully described bythe histogram……………
original L
copy, P
…the tone characteristicsof the imaging device are fully described by the TTF.
P
L
L
N
00
P
N
00
Tone Characteristics of an Imaging DeviceJust as the tone characteristics of an image arepartially described by metrics extracted from the histogram(contrast ratio, dynamic range, etc.)…
original L
copy, P
…the tone characteristicof the imaging device partially described by metrics extractedfrom the TTF.
P
L
L
N
00
P
N
00
Tone Characteristics of an Imaging Device
original L
copy, P
L
N
00
P
N
00
Metrics of the TTFare defined differently forthe three major types of imaging devices:
(1) Image Capture Devices(camera, scanner, etc.)
(2) Digital Image Processor(computers and chips)
(3) Display Devices(printers, monitors, etc.)
Original Image
Copy Image
A computer is a commonly used DIP. It transformsone digital image intoanother digital image.
Pc0 255
0 255Po
Pc
Po
Po
Pc
(2) Digital Image Processor(DIP)
Original Image
Copy Image
Po
Pc
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
DIPs Commonly providesimple controls for(1) Brightness and(2) contrast
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
= Brightness = Lightness/Darkness = Level
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
= Contrast = Window
The most common TTF that isprovided in DIPs such as ImageJ and PhotoShop is a simplestraight line.
Pc = ∙Po + i or Pc = ∙(Po - j) + 128
Original Image
Copy Image
Po
Pc
0 255Po
0 255Pc
Po
Pc
0 2550
255
Slope andintercept, i
Po
Pc
0 2550
255
Slope andcenter location, j
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
Po
Pc
0 2550
255
Shifting the curve tothe left is a brightness increase.
The left/right location is called either "brightness", "lightness", or "level".
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
Original Image
Copy Image
Po
Pc
0 255Po
0 255Pc
Shifting the curve to the left is equivalent toincreasing the intercept.
Po
Pc
0 2550
255
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
Original Image
Copy Image
Po
Pc
0 1Po
0 1Pc Shifting the curve tothe right is a brightness decrease.
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
The left/right location is called either "brightness", "lightness", or "level".
Po
Pc
0 2550
255
> 1 is a contrast increase.
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
Original Image
Copy Image
Po
Pc
0 1Po
0 1Pc
window
Pc = ∙Po + i or Pc = ∙(Po - j) + 128
The slope is called either "contrast", "window", or "gamma".
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
The common digital TTF is a simplestraight line.
P0 = ∙Pc + i
Po
Pc
0 2550
255
< 1 is a contrast decrease
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
Original Image
Copy Image
Po
Pc
0 1Po
0 1Pc
window
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
The Digital TTF
Also called tone curve, profile, and LUT (look-up-table), point process
Often, a much more complex TTF is needed. In that case,the TTF is not well described by two simple metrics.
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
A B C D
OriginalIncrease
in contrast, tool A
Increasein lightness,
tool C
The Digital TTF
In "Threshold" Mode
Tone Characteristics of an Imaging Device
original L
copy, P
L
N
00
P
N
00
Metrics of the TTFare defined differently forthe three major types of imaging devices:
(1) Image Capture Devices(camera, scanner, etc.)
(2) Digital Image Processor(computers and chips)
(3) Display Devices(printers, monitors, etc.)
Original Image
Copy Image
A printer converts pixel values, P,into reflection image density, D.
D0 3
0 255Po
P
D = -Log(R)
(3) Display Devices(printers, monitors, etc.)
Generate P=0,1,2,3……255 (all possible P values)
D
Use a densitometerto measure all possibleoutput density valuesthe printer can make.
The printer TTF
D
P0 255
Dmin
Dmax
printer convention
monitor convention
P=0,1,2,3……………… 255
The printer TTF
D
P0 255
Dmin
Dmax
Printer Dynamic Range = D = Dmax - Dmin (Looks like an image dynamic range!! But it is NOT the same.)
Note that the printer dynamic range is expressed in terms of the density it CAN produce (Dmin and Dmax).
An image dynamic range is expressed in terms of its individual Dmin and Dmax.
Original Image
Copy Image
A monitor converts pixel values, P,into screen Luminance, L.
L
0 255Po
P
L
(3) Display Devices(printers, monitors, etc.)
Generate P=0,1,2,3……255 (all possible P values)
Measure all possibleoutput Luminance values themonitor can make.
The Monitor TTF
L
P0 255
Lmin
Lmax
L
printer convention
monitor convention
P=0,1,2,3……………… 255
Monitor Contrast Ratio C = Lmax - Lmin
Monitor Dynamic Range = Log(C)(Looks like an image dynamic range!! But it is NOT the same.)
Note that the monitor dynamic range is expressed in terms of the luminance it CAN produce (Lmin and Lmax).
An image dynamic range is expressed in terms of its individual Lmin and Lmax.
The Monitor TTF
L
P0 255
Lmin
Lmax
Tone Characteristics of an Imaging Device
original L
copy, P
L
N
00
P
N
00
Metrics of the TTFare defined differently forthe three major types of imaging devices:
(1) Image Capture Devices(camera, scanner, etc.)
(2) Digital Image Processor(computers and chips)
(3) Display Devices(printers, monitors, etc.)
(1) Image Capture Device(camera, scanner, etc.)
Illuminanceat sensor, I
pixel value, P
The TTF of the camera/scannercan be expressed in many ways:P vs RP vs LP vs I P vs H, where H=I∙tP vs Log(H)
object Rreflected L
R, L, I, H
P
It depends on the type of device and the specifications one wants to express.
(1) Image Capture Device(camera, scanner, etc.)
Illuminanceat sensor, I
pixel value, P
Or in terms of exposure, H = I∙tP vs RP vs LP vs I P vs H
object Rreflected L
R, L, or I
P
Film Camera:
D
Log(H)
Dmax
Dmin
Log(Hmin) Log(Hmax)
Output Density Dynamic Range: D = Dmax - Dmin
Input Detection Contrast Ratio: C = Hmax/Hmin
Input Detection Dynamic Range: Log(C) = Log(Hmax) - Log(Hmin)
exposure, H = I∙t
The definition of Dynamic Range depends on definingDmax, Dmin, Hmax, and Hmin. This means defining appropriatemetrics of system noise. H and D.
D
Log(H)
Dmax
Dmin
Log(Hmin) Log(Hmax)
Output Density Dynamic Range: D = Dmax - Dmin
Input Detection Contrast Ratio: C = Hmax/Hmin
Input Detection Dynamic Range: Log(C) = Log(Hmax) - Log(Hmin)
Hmax, and Hmin
are the limiting values that are "meaningful" beyondthe level of the noise.
Dmax and Dmin
are limitingD the film can make.
Digital Video Camera:
P
L
Pmax = 255
Pmin = 0Lmin Lmax
Output Pixel Range: = Pmax + 1 (number of discrete levels)Bit Depth = Log2(N)
Input Detection Contrast Ratio: C = Lmax/Lmin
Input Detection Dynamic Range: Log(C) = Log(Lmax) - Log(Lmin)
Note: Bit Depth ≠ Camera Dynamic Range
For a digital video camerathe TTF is typically describedas P vs L.
Noise is a part of definingLmin and Lmax.
Digital Still Camera:
P
H
Pmax = 255
Pmin = 0Hmin Hmax
Output Pixel Range: = Pmax + 1 (number of discrete levels)Bit Depth = Log2(N)
Input Detection Contrast Ratio: C = Hmax/Hmin
Input Detection Dynamic Range: Log(C) = Log(Hmax) - Log(Hmin)
For a digital still cameraexposure is H=I∙t, and the TTF is often describedas P vs H.
Noise is a part of definingHmin and Hmax.
Exposure: H=I∙t
Contrast Ratio, C = Wmax/Wmin
Input Detection Dynamic Range: Log(C)
But what kind of Logarithm do you use?
Log is the"Common Logarithm"
Dynamic Range is defined using Logarithms of different bases, K.
recall that LogK(C) = Log(C)/log(K)
Log(C) = the regular base 10 logarithm of x.
ln(C) = Log(C)/Log(e), called the natural log.
Lg2(C) = Log(C)/Log(2)
Db(C) = Log(C)/Log(100.1) called the decibel
Db(C) = 10∙Log(C) (another way to calculate Db)
D(R) = log(R)/Log(0.1)
D(R) = -1∙log(R) (another way to calculate D)
Common Log
Natural Log
Bits & Stops
Decibel
Decibel
Density
Density
10
e=2.718…
2
100.1=1.259…
100.1=1.259…
1/10 = 0.1
1/10 = 0.1
Name How to Calculate The base, K
End