CS148: Introduction to Computer Graphics and Imaging Final Review Session.
-
date post
21-Dec-2015 -
Category
Documents
-
view
225 -
download
1
Transcript of CS148: Introduction to Computer Graphics and Imaging Final Review Session.
CS148: Introduction to Computer Graphics and Imaging
Final Review Session
CS148 Midterm Review Pat Hanrahan, Winter 2007
Outline
Final InfoReview of Topics
DisplaysExposure & Tone ReproductionMattes & CompositingFilteringSamplingCompressionDigital VideoModeling
CS148 Midterm Review Pat Hanrahan, Winter 2007
Final Exam Info
Time: Wed, Mar 21st at 12:15pmLocation: Building 300, Rm 300Duration: 2 hours
Closed bookConsists of a few (4 or 5) multi-part questionsAll material through modeling lecture
Emphasis: second half of classStrongly emphasized: material on assignmentsFocus on: material from lecturesAlso covered: material from readings
This review covers the second half, see the midterm review for the first half of the material
CS148 Midterm Review Pat Hanrahan, Winter 2007
Displays
Resolution - Spatial, temporal, and color/intensity
Interlaced vs. Non-Interlaced (Progressive scan)
Calibration – not all displays have the same colors, calibrate to match standard (e.g. sRGB)
CS148 Midterm Review Pat Hanrahan, Winter 2007
Displays
CRT – electron beam + phosphorsPlasma – ionized gas forms plasmaLCD – twisted nematic cellsDLP – fast twitching micromirrorsLaser ProjectionOLEDElectronic Ink
CS148 Midterm Review Pat Hanrahan, Winter 2007
Exposure & Tonemapping
Contrast: Max:MinWorld:
Possible 100,000,000,000:1Typical 100,000:1
People: 100:1Media:
Printed Page: 10:1Displays: 80:1 (400:1)Typical Viewing: 5:1
10000
1000
100
10
1
.1
.01
.001
.0001
candela/m2
100
Eye
1
Sun
Moon
Stars
CS148 Midterm Review Pat Hanrahan, Winter 2007
Exposure & Tonemapping
CS148 Midterm Review Pat Hanrahan, Winter 2007
Exposure & Tonemapping
Create HDR Image – Weighted log-average based on input images, shutter speeds, and response curve
Gamma – display intensity is non-linear response to voltage (monitor gamma ~ 2.5)
Perception – non-linear as well ( ~ 1/3)
Tone Reproduction – map HDR to displayable rangeLinear mapRemap through response/gammaLog L – L / (1+L)More complicated techniques (separate luminance/color)
CS148 Midterm Review Pat Hanrahan, Winter 2007
Mattes & Compositing
Combine foreground and background objectsα = Coverage
= Area= Opacity= 1 – Transparency
CF – foreground color, CB – background color
C = α * CF + (1 – α) * CB
Premultiplied α: C’ = αC = (αr, αg, αb, α)
“Pulling a matte” – blue screen, image processing
α
CS148 Midterm Review Pat Hanrahan, Winter 2007
Mattes & Compositing
Blue screen matte extraction
Given:C – Observed colorCB – Backing color (possibly per pixel)
Compute:CF = (αFRF, αFGF, αFBF, αF)
Matte Equation:C = CF + (1 – αF)CB
3 Equations, 4 Unknowns – must make some assumptions
CS148 Midterm Review Pat Hanrahan, Winter 2007
Convolution
Convolution – integration/summation of translated filter with signal
n
nmgnfmgf )()())(*(
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform
Expresses any signal as sum of sin and cos functions
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform
Spatial Domainf(x,y)
Frequency DomainF(ωx, ωy)
Fourier Transform
InverseFourier
Transform
Convolution Multiplication
Multiplication Convolution
Sinc Box
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform – Low Pass
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform – High Pass
CS148 Midterm Review Pat Hanrahan, Winter 2007
Fourier Transform – Band Pass
CS148 Midterm Review Pat Hanrahan, Winter 2007
Sampling
Imagers sample continuous functionssensors integrate over their area
Examples of imagersretina photoreceptorsdigital camera CCD or CMOS array
Digitally – record value of signal periodically (samples)
CS148 Midterm Review Pat Hanrahan, Winter 2007
Nyquist Frequency
Nyquist Frequency – ½ the sampling frequency
A periodic signal with a frequency above the Nyquist frequency cannot be distinguished from a periodic signal below the Nyquist frequency
These indistinguishable signals are called aliases
CS148 Midterm Review Pat Hanrahan, Winter 2007
Sampling – Spatial Domain
CS148 Midterm Review Pat Hanrahan, Winter 2007
Sampling – Frequency Domain
CS148 Midterm Review Pat Hanrahan, Winter 2007
Undersampling – Frequency Domain
CS148 Midterm Review Pat Hanrahan, Winter 2007
Reconstruction – Frequency Domain
CS148 Midterm Review Pat Hanrahan, Winter 2007
Reconstruction – Spatial Domain
CS148 Midterm Review Pat Hanrahan, Winter 2007
Compression
Kolmogorov Complexity – smallest program to generate data
Lossless CodingRun length coding – exploit obvious redundancyHuffman Coding – variable length code, highly probable characters -> shorter codes
Transform Coding – perform invertible transform on data to make it more amenable to compression (applies to lossless and lossy!)
CS148 Midterm Review Pat Hanrahan, Winter 2007
Bases
e1
e2
b1b2
a*e1 + b*e2
(a,b) in this basis
m*b1 + n*b2
(m,n) in this basis
Any vector can be expressed as linear combination of either basis (pair of vectors)
CS148 Midterm Review Pat Hanrahan, Winter 2007
Lossy Image Compression (JPEG)
Image
DiscreteCosine
TransformTransformed
Image
Quantization
(Lossy Step)
Reorder+
Coding CompressedData Stream
JPEG2000 is similar but uses the wavelet transform.Exploit human perception – quantize high frequencies more heavily since we are less sensitive to them.
CS148 Midterm Review Pat Hanrahan, Winter 2007
Wavelet Transform
Just another invertible transform (expresses signal in different basis)
Generated in steps by calculating smoothed (approximate) values and detail (corrective) values
Resulting basis functions have compact support – they are only non-zero over a limited range – error in coefficient causes localized error
CS148 Midterm Review Pat Hanrahan, Winter 2007
Wavelet Transform
6 8 5 9 5 5 6 6
6.25 0 -1 -2 0 0
Full Transform
High Resolution DetailsMedium Resolution DetailsLow Resolution DetailsAverage Value
-.5.75
CS148 Midterm Review Pat Hanrahan, Winter 2007
Video
Raster scan – convert 2D signal to 1DSynchronize vertical refresh to swap buffers
Television – Amplitude modulation (next)Color TV – use amplitude modulation to place
luminance and chrominance signals at different frequenciesLess responsive to high frequencies in color
CompressionI-Frames – JPEG CompressionP,B-Frames – Motion predictions + encode difference
CS148 Midterm Review Pat Hanrahan, Winter 2007
Amplitude Modulation
CS148 Midterm Review Pat Hanrahan, Winter 2007
Modeling
RepresentationsDense Polygonal MeshesBicubic surfacesSubdivision Surfaces
OperationsInstancingTransformation – linear and non-linearCompression, simplificationDeform, skin, morph, animateSmoothSet operations
CS148 Midterm Review Pat Hanrahan, Winter 2007
Bezier Curve
CS148 Midterm Review Pat Hanrahan, Winter 2007
Subdivision Surfaces
Loop subdivision algorithmExtraordinary pointsSemi-regular meshes