Picture Perfect RGB Rendering Using Spectral Prefiltering and Sharp Color Primaries
-
Upload
nicholas-madden -
Category
Documents
-
view
22 -
download
2
description
Transcript of Picture Perfect RGB Rendering Using Spectral Prefiltering and Sharp Color Primaries
Picture Perfect Picture Perfect RGBRGB Rendering Using Spectral Rendering Using Spectral Prefiltering and Sharp Color Prefiltering and Sharp Color PrimariesPrimaries
Greg Ward Greg Ward Exponent - Failure Analysis Assoc.Exponent - Failure Analysis Assoc.
Elena Eydelberg-VileshinElena Eydelberg-VileshinStanford UniversityStanford University
Presented at the 13th Eurographics Workshop on Rendering in Pisa, Italy, June 2002
Talk OverviewTalk Overview
1.1. Color Rendering TechniquesColor Rendering Techniques
2.2. Getting the Most Out of Getting the Most Out of RGBRGBa)a) Spectral prefilteringSpectral prefiltering
b)b) The von Kries white point transformThe von Kries white point transform
3.3. Three Tristimulus SpacesThree Tristimulus Spaces
4.4. Experimental ResultsExperimental Results
5.5. ConclusionsConclusions
1.1. A Brief Comparison of Color A Brief Comparison of Color Rendering TechniquesRendering Techniques
Spectral RenderingSpectral Rendering N spectrally pure samplesN spectrally pure samples
Component RenderingComponent Rendering M vector basis functionsM vector basis functions
RGBRGB (Tristimulus) Rendering (Tristimulus) Rendering Tristimulus value calculationsTristimulus value calculations
Spectral RenderingSpectral Rendering
1.1. Divide visible spectrum into N Divide visible spectrum into N wavelength sampleswavelength samples
2.2. Process spectral samples separately Process spectral samples separately throughout rendering calculationthroughout rendering calculation
3.3. Compute final display color using CIE Compute final display color using CIE color matching functions and standard color matching functions and standard transformationstransformations
Component RenderingComponent Rendering[Peercy ‘93 SIGGRAPH][Peercy ‘93 SIGGRAPH]
1.1. Divide visible spectrum into M vector Divide visible spectrum into M vector bases using component analysisbases using component analysis
2.2. Process colors using MxM matrix Process colors using MxM matrix multiplication at each interactionmultiplication at each interaction
3.3. Compute final display color with 3xM Compute final display color with 3xM matrix transformmatrix transform
RGBRGB (Tristimulus) Rendering (Tristimulus) Rendering
1.1. Precompute tristimulus valuesPrecompute tristimulus values
2.2. Process 3 samples separately Process 3 samples separately throughout rendering calculationthroughout rendering calculation
3.3. Compute final display color with 3x3 Compute final display color with 3x3 matrix transform (if necessary)matrix transform (if necessary)
Rendering Cost ComparisonRendering Cost Comparison
Pre-Pre-processingprocessing
Multiplies / Multiplies / InteractionInteraction
Post-Post-processingprocessing
SpectralSpectral NoneNone NN
(N (N 9) 9)
N multiplies N multiplies per pixelper pixel
ComponentComponent Vector Vector analysisanalysis
MxMMxM
(M (M 3) 3)
33M per M per pixelpixel
RGBRGB Little or Little or nonenone
33 0 to 9 per 0 to 9 per pixelpixel
Strengths and WeaknessesStrengths and Weaknesses
StrengthsStrengths WeaknessesWeaknesses
SpectralSpectral Potential Potential accuracyaccuracy
Cost, aliasing, Cost, aliasing, data mixingdata mixing
ComponentComponent Optimizes Optimizes cost/benefitcost/benefit
Preprocessing Preprocessing requirementsrequirements
RGBRGB Fast, widely Fast, widely supportedsupported
Limited Limited accuracyaccuracy
Cool white fluorescent spectrum
[Meyer88] suffers worse with only 4 samples
Spectral AliasingSpectral Aliasing
The Data Mixing ProblemThe Data Mixing Problem
Typical situation:Typical situation: Illuminants known to 5 nm resolutionIlluminants known to 5 nm resolution Some reflectances known to 10 nmSome reflectances known to 10 nm Other reflectances given as tristimulusOther reflectances given as tristimulus
Two alternatives:Two alternatives:A.A. Reduce all spectra to lowest resolutionReduce all spectra to lowest resolution
B.B. Interpolate/synthesize spectra Interpolate/synthesize spectra [Smits ‘99][Smits ‘99]
2.2. Getting the Most Out of Getting the Most Out of RGBRGB
A.A. How Does How Does RGBRGB Rendering Work and Rendering Work and When Does It Not?When Does It Not?
B.B. Can Can RGBRGB Accuracy Be Improved? Accuracy Be Improved?
C.C. Useful ObservationsUseful Observations
D.D. Spectral PrefilteringSpectral Prefiltering
E.E. The von Kries White Point TransformThe von Kries White Point Transform
Status Quo RenderingStatus Quo Rendering
White Light Sources White Light Sources E.g., (R,G,B)=(1,1,1)E.g., (R,G,B)=(1,1,1)
RGBRGB material colors obtained by material colors obtained by dubious meansdubious means E.g., “That looks pretty good.”E.g., “That looks pretty good.”
This actually works for fictional scenes!This actually works for fictional scenes!
Color correction with ICC profile if at allColor correction with ICC profile if at all
The Result:The Result: Wrong Wrong CCOOLLOORRSS!!
When Does RGB Rendering When Does RGB Rendering Normally Fail?Normally Fail?
When you start with measured colorsWhen you start with measured colors When you want to simulate color When you want to simulate color
appearance under another illuminantappearance under another illuminant When your illuminant and surface When your illuminant and surface
spectra have sharp peaks and valleysspectra have sharp peaks and valleys
Full spectral rendering(Fluorescent source)
Naïve tristimulus rendering(CIE XYZ)
Given Its Predominance, Can Given Its Predominance, Can We Improve We Improve RGBRGB Rendering? Rendering?
Identify and minimize sources of errorIdentify and minimize sources of error Source-surface interactionsSource-surface interactions Choice of rendering primariesChoice of rendering primaries
Overcome ignorance and inertiaOvercome ignorance and inertia Many people render in Many people render in RGBRGB without really without really
understanding what it means understanding what it means White-balance problem scares casual White-balance problem scares casual
users away from colored illuminantsusers away from colored illuminants
A Few Useful ObservationsA Few Useful Observations
1.1. Direct illumination is the first order in Direct illumination is the first order in any rendering calculationany rendering calculation
2.2. Most scenes contain a single, Most scenes contain a single, dominant illuminant spectrumdominant illuminant spectrum
3.3. Scenes with mixed illuminants will Scenes with mixed illuminants will have a color cast regardlesshave a color cast regardless
Conclusion: Conclusion: Optimize for the Optimize for the DirectDirectDiffuse CaseDiffuse Case
Picture Perfect Picture Perfect RGBRGB Rendering Rendering
1.1. Identify dominant illuminant spectrumIdentify dominant illuminant spectruma)a) Prefilter material spectra to obtain Prefilter material spectra to obtain
tristimulus colors for renderingtristimulus colors for rendering
b)b) Adjust source colors appropriatelyAdjust source colors appropriately
2.2. Perform tristimulus (Perform tristimulus (RGBRGB) rendering) rendering
3.3. Apply white balance transform and Apply white balance transform and convert pixels to display color spaceconvert pixels to display color space
Source and Reflectance Spectra
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
350 400 450 500 550 600 650 700 750
Wavelength (nm)
stillD65
BlueFlower
Color Matching Functions
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
350 400 450 500 550 600 650 700 750
Wavelength (nm)
Relative Sensitivity
xbar
ybar
zbar
Spectral PrefilteringSpectral Prefiltering
€
X = I(λ ) ρ (λ ) x(λ ) dλ∫Y = I(λ ) ρ (λ ) y(λ ) dλ∫Z = I(λ ) ρ (λ ) z(λ ) dλ∫XYZ may then be transformed by 33 matrix to any linear tristimulus space (e.g., sRGB)
To obtain a tristimulus color, To obtain a tristimulus color, you you mustmust know the know the illuminant spectrumilluminant spectrum
Prefiltering vs. Full Spectral Prefiltering vs. Full Spectral RenderingRendering
+ Prefiltering performed once per material Prefiltering performed once per material vs. every rendering interactionvs. every rendering interaction
+ Spectral aliasing and data mixing Spectral aliasing and data mixing problems disappear with prefilteringproblems disappear with prefiltering
- However, mixed illuminants and However, mixed illuminants and interreflections not computed exactlyinterreflections not computed exactly
Regardless which technique you use, Regardless which technique you use, remember to apply white balance to result!remember to apply white balance to result!
Quick ComparisonQuick Comparison
Full spectral,no white balance
Full spectral,white balanced
Prefiltered RGB,white balanced
Prefiltered RGB,no white balance
The von Kries Transform for The von Kries Transform for Chromatic AdaptationChromatic Adaptation
The von Kries transform takes colors from The von Kries transform takes colors from absolute absolute XYZXYZ to adapted equiv. to adapted equiv. XYZ’XYZ’
€
′ X
′ Y
′ Z
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥=MC
−1
Rw′
Rw0 0
0 Gw′
Gw0
0 0 Bw′
Bw
⎡
⎣
⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥
MC
X
Y
Z
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
Where:
Display white point
Scene white point
€
Rw′
Gw′
Bw′
⎡
⎣
⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥
=Mc
Xw′
Yw′
Zw′
⎡
⎣
⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥
€
Rw
Gw
Bw
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥=Mc
Xw
Yw
Zw
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
Chromatic Adaptation MatrixChromatic Adaptation Matrix
The matrix The matrix MMCC transforms transforms XYZXYZ into an into an
“adaptation color space”“adaptation color space” Finding the optimal CAM is an under-Finding the optimal CAM is an under-
constrained problem -- many candidates constrained problem -- many candidates have been suggestedhave been suggested
““Sharper” color spaces tend to perform Sharper” color spaces tend to perform better, and seem to be more “plausible” better, and seem to be more “plausible” [Susstrunk2001] [Finlayson2001][Susstrunk2001] [Finlayson2001]
3. 3. Three Tristimulus Spaces for Three Tristimulus Spaces for Color RenderingColor Rendering
CIE CIE XYZXYZ Covers visible gamut with positive valuesCovers visible gamut with positive values Well-tested standard for color-matchingWell-tested standard for color-matching
sRGBsRGB Common standard for image encodingCommon standard for image encoding Matches typical CRT display primariesMatches typical CRT display primaries
Sharp Sharp RGBRGB Developed for chromatic adaptationDeveloped for chromatic adaptation
XYZXYZ Rendering Process Rendering Process
1.1. Apply prefiltering equation to get Apply prefiltering equation to get absolute absolute XYZXYZ colors for each material colors for each material
a)a) Divide materials by illuminant:Divide materials by illuminant:
b)b) Use absolute Use absolute XYZXYZ colors for sources colors for sources
2.2. Render using tristimulus methodRender using tristimulus method
3.3. Finish w/ CAM and display conversionFinish w/ CAM and display conversion€
Xm* =Xm
Xw
, Ym* =Ym
Yw
, Zm* =Zm
Zw
sRGBsRGB Rendering Process Rendering Process
1.1. Perform prefiltering and von Kries Perform prefiltering and von Kries transform on material colorstransform on material colors
a)a) Model dominant light sources as neutralModel dominant light sources as neutralb)b) For spectrally distinct light sources use:For spectrally distinct light sources use:
2.2. Render using tristimulus methodRender using tristimulus method3.3. Resultant image is Resultant image is sRGBsRGB€
Rs* =Rs
Rw
, Gs* =Gs
Gw
, Bs* =Bs
Bw
Sharp Sharp RGBRGB Rendering Process Rendering Process
1.1. Prefilter material colors and apply von Prefilter material colors and apply von Kries transform to Sharp Kries transform to Sharp RGBRGB space: space:
2.2. Render using tristimulus methodRender using tristimulus method
3.3. Finish up CAM and convert to displayFinish up CAM and convert to display€
Rm*
Gm*
Bm*
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥=
1Rw
0 0
0 1Gw
0
0 0 1Bw
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥MSharp
Xm
Ym
Zm
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
Our Experimental Test SceneOur Experimental Test Scene
Tungsten source Fluorescent source
Macbeth Red Macbeth Blue
Macbeth Green
Macbeth Neutral.8
GoldMacbeth BlueFlower
4. 4. Experimental ResultsExperimental Results
Three lighting conditionsThree lighting conditions Single 2856°K tungsten light sourceSingle 2856°K tungsten light source Single cool white fluorescent light sourceSingle cool white fluorescent light source Both light sources (tungsten & fluorescent)Both light sources (tungsten & fluorescent)
Three rendering methodsThree rendering methods Naïve Naïve RGBRGB (assumes equal-energy white) (assumes equal-energy white) Picture Perfect Picture Perfect RGBRGB Full spectral rendering (380 to 720 nm / 69 samp.)Full spectral rendering (380 to 720 nm / 69 samp.)
Three color spaces (Three color spaces (XYZXYZ, , sRGBsRGB, Sharp , Sharp RGBRGB))
CIE 1998E*
CIE 1998 E* of 5 or above is visible in side-by-side comparisons
Example Comparison Example Comparison ((sRGBsRGB))
Full spectral Picture Perfect
Naive
E* Error Percentiles for All Experiments E* Error Percentiles for All Experiments
Results SummaryResults Summary
Prefiltering has ~1/6 the error of naïve Prefiltering has ~1/6 the error of naïve rendering for single dominant illuminantrendering for single dominant illuminant
Prefiltering errors similar to naïve in Prefiltering errors similar to naïve in scenes with strongly mixed illuminantsscenes with strongly mixed illuminants
CIE CIE XYZXYZ color space has 3 times the color space has 3 times the rendering errors of rendering errors of sRGBsRGB on average on average
Sharp Sharp RGBRGB rendering space reduces rendering space reduces errors to 1/3 that of errors to 1/3 that of sRGBsRGB on average on average
5. Conclusions5. Conclusions
Prefiltering is simple and practically freePrefiltering is simple and practically free Avoids aliasing and data mixing Avoids aliasing and data mixing
problems of full spectral rendering problems of full spectral rendering Error comparable to 3 component Error comparable to 3 component
rendering [Peercy93] at 1/3 the costrendering [Peercy93] at 1/3 the cost Mixed illuminants and specular Mixed illuminants and specular
reflections no worse than naïve reflections no worse than naïve RGBRGB
RadianceRadiance Details Details
Be sure to note different color space Be sure to note different color space used in used in RadianceRadiance materials file materials file
Use “vinfo” to edit picture color space:Use “vinfo” to edit picture color space:PRIMARIES= .6898 .3206 .0736 .9003 .1166 .0374 .3333 .3333PRIMARIES= .6898 .3206 .0736 .9003 .1166 .0374 .3333 .3333
The The ra_xyzera_xyze or or pcondpcond program may program may then be used to convert color spacethen be used to convert color space