Computer Graphics Image processing mtchics nccu edu tw














































- Slides: 46
Computer Graphics Image processing 紀明德 mtchi@cs. nccu. edu. tw Department of Computer Science, National Chengchi University
Outlines • Color space • Filter – Low / high pass filter – Space / frequency domain – Hybrid images 2
Electromagnetic spectrum
Three-Color Theory • Human visual system has two types of sensors – Rods: monochromatic, night vision�� – Cones�� • Color sensitive�� • Three types of cone�� • Only three values (the tristimulusvalues) are sent to the brain
Additive / Subtractive color Y M C
RGB color space Green Black (0, 0, 0) Red Blue
HSV color space • HSV – hue, – Saturation, – Value, HSV UI
Color Harmonization SIGGRAPH 2006 Harmonic templates on the hue wheel.
Gamut • a certain complete subset of colors. • the subset of colors which can be accurately represented in a given circumstance.
CIELAB color space • Perception uniform L a b
New Algorithm Color Grayscale
Color 2 Gray: Salience-Preserving Color Removal siggraph 2005 Original Photoshop Grey Color 2 Grey + Color
brightness contrast
Checker shadow Illusion
IMAGE PRE-PROCESSING FILTER
• Low-pass filter – Smoothing, denoise • High-pass filter – Gradient operators, edge detection
convolution
Low-pass filter • Mean filter
Gaussian Filtering
Unsharp Masking
3 D Unsharp Masking for Scene Coherent Enhancement SIGGRAPH '08
Naïve Approach: Gaussian Blur input BLUR HALOS smoothed (structure, large scale) residual (texture, small scale) Gaussian Convolution
Impact of Blur and Halos • If the decomposition introduces blur and halos, the final result is corrupted. Sample manipulation: increasing texture (residual 3)
Bilateral Filter: no Blur, no Halos input smoothed (structure, large scale) edge-preserving: Bilateral Filter residual (texture, small scale)
Bilateral Filter Definition: an Additional Edge Term Same idea: weighted average of pixels. new normalization factor not new space weight new range weight I
Illustration a 1 D Image • 1 D image = line of pixels • Better visualized as a plot pixel intensity pixel position
Gaussian Blur and Bilateral Filter Gaussian blur p q space q range Bilateral filter [Aurich 95, Smith 97, Tomasi 98] p normalization space range
Differentiation and convolution • Recall • We could approximate this as • Now this is linear and shift invariant, so must be the result of a convolution. (which is obviously a convolution; it’s not a very good way to do things, as we shall see) Computer Vision - A Modern Approach Set: Linear Filters Slides by D. A. Forsyth
High-pass filter • Sobel operator
The Fourier space image
Fourier space filtering
Fourier space filtering
Hybrid Images siggraph 06
Hybrid Images
Opacity and Transparency • Opaque surfaces permit no light to pass through • Transparent surfaces permit all light to pass • Translucent surfaces pass some light translucency = 1 – opacity ( ) opaque surface =1 38
Chroma-keying (Primatte)
Blending • gl. Blend. Func(Glenum S, Glenum D); – Cf = (Cs*S) + (Cd*D) • gl. Blend. Func(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Compositing F foreground color B alpha matte background plate composite C F C B =0 compositing equation
Compositing F B composite C F C B =1 compositing equation
Order Dependency • Is this image correct? – Probably not – Polygons are rendered in the order they pass down the pipeline – Blending functions are order dependent 43 Angel: Interactive Computer Graphics 5 E © Addison-Wesley 2009
Deferred Shading • A shading algorithm is calculated by dividing it into smaller parts that are written to intermediate buffer storage to be combined later, instead of immediately writing the shader result to the color framebuffer.
Deferred Shading in Killzone 2