Film Digital Image Synthesis Yung-Yu Chuang 11/5/2008 with slides by Pat Hanrahan and Matt Pharr.

Slides:



Advertisements
Similar presentations
Multispectral Format from Perspective of Remote Sensing
Advertisements

Digital Image Processing
Visualization and graphics research group CIPIC May 25, 2004Realistic Image Synthesis1 Tone Mapping Presented by Lok Hwa.
High Dynamic Range Imaging Samu Kemppainen VBM02S.
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
Digital Image Processing
Computer graphics & visualization HDRI. computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization.
Recap of Previous Lecture Matting foreground from background Using a single known background (and a constrained foreground) Using two known backgrounds.
Capturing and optimising digital images for research Gilles Couzin.
Computational Photography Prof. Feng Liu Spring /15/2015.
Apparent Greyscale: A Simple and Fast Conversion to Perceptually Accurate Images and Video Kaleigh SmithPierre-Edouard Landes Joelle Thollot Karol Myszkowski.
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Fall 2005 …with a lot of slides stolen from Paul Debevec and Yuanzhen Li,
High Dynamic Range Images : Rendering and Image Processing Alexei Efros.
Digital Image Processing
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Fall 2006 …with a lot of slides stolen from Paul Debevec and Yuanzhen Li,
Graphics and Still Images John H. Krantz Hanover College.
Image Enhancement.
Digital Audio, Image and Video Hao Jiang Computer Science Department Sept. 6, 2007.
Gradient Domain High Dynamic Range Compression
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
Dye Sublimation Color Management
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
Perception-motivated High Dynamic Range Video Encoding
Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005.
Image Processing.  a typical image is simply a 2D array of color or gray values  i.e., a texture  image processing takes as input an image and outputs.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Page 18/30/2015 CSE 40373/60373: Multimedia Systems 4.2 Color Models in Images  Colors models and spaces used for stored, displayed, and printed images.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
IDL GUI for Digital Halftoning Final Project for SIMG-726 Computing For Imaging Science Changmeng Liu
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
1 Image Basics Hao Jiang Computer Science Department Sept. 4, 2014.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
High Dynamic Range Images cs195g: Computational Photography James Hays, Brown, Spring 2010 slides from Alexei A. Efros and Paul Debevec.
Spatial Tone Mapping in High Dynamic Range Imaging Zhaoshi Zheng.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
CS654: Digital Image Analysis Lecture 17: Image Enhancement.
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
1 Chapter 2: Color Basics. 2 What is light?  EM wave, radiation  Visible light has a spectrum wavelength from 400 – 780 nm.  Light can be composed.
03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Image-based Lighting Design Frederik Anrys Philip Dutré Computer Graphics Group 8 Sept
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Spring 2010 …with a lot of slides stolen from Paul Debevec © Alyosha Efros.
Cameras Digital Image Synthesis Yung-Yu Chuang 10/26/2006 with slides by Pat Hanrahan and Matt Pharr.
High dynamic range imaging Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8 with slides by Fedro Durand, Brian Curless, Steve Seitz and Alexei.
Histograms and Color Balancing Computational Photography Derek Hoiem, University of Illinois 09/13/11 “Empire of Light”, Magritte.
Digital Image Processing EEE415 Lecture 3
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Advanced Computer Graphics CSE 190 [Winter 2016], Lecture 2 Ravi Ramamoorthi
Lightness filtering in color images with respect to the gamut School of Electrical Engineering and Computer Science Kyungpook National Univ. Fourteenth.
Colors. Color Systems In computer graphics, we use RGB colors. But… –Can it represent all colors? –Is it linear? For example, (1.0, 1.0, 1.0) is white.
03/04/05© 2005 University of Wisconsin Last Time Tone Reproduction –Histogram method –LCIS and improved filter-based methods.
03/03/03© 2003 University of Wisconsin Last Time Subsurface scattering models Sky models.
Tone mapping Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/3/13 with slides by Fredo Durand, and Alexei Efros.
Digital Image Processing Image Enhancement in Spatial Domain
Color and Radiometry Digital Image Synthesis Yung-Yu Chuang 10/25/2007 with slides by Pat Hanrahan and Matt Pharr.
Cameras Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr.
Image: Susanne Rafelski, Marshall lab Introduction to Digital Image Analysis Part I: Digital Images Kurt Thorn NIC UCSF.
Introduction to Digital Image Analysis Kurt Thorn NIC.
Images, Display, Perception
Advanced Computer Graphics
Digital 2D Image Basic Masaki Hayashi
Chapter III, Desktop Imaging Systems and Issues: Lesson IV Working With Images
Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8
Digital Image Synthesis Yung-Yu Chuang 11/01/2005
Digital Image Synthesis Yung-Yu Chuang 10/19/2006
Digital Image Synthesis Yung-Yu Chuang 11/8/2007
Presentation transcript:

Film Digital Image Synthesis Yung-Yu Chuang 11/5/2008 with slides by Pat Hanrahan and Matt Pharr

Film Film class simulates the sensing device in the simulated camera. It determines samples’ contributions to the nearby pixels and writes the final floating-point image to a file on disk. Tone mapping operations can be used to display the floating-point image on a display. core/film.*

Film class Film { public: Film(int xres, int yres) : xResolution(xres), yResolution(yres) {} virtual ~Film() {} virtual void AddSample(Sample &sample, Ray &ray, Spectrum &L, float alpha); virtual void WriteImage(); virtual void GetSampleExtent(int *xstart,int *xend, int *ystart, int *yend); // Film Public Data const int xResolution, yResolution; }; Camera uses this to compute raster-to-camera transform

ImageFilm film/image.cpp implements the only film plug-in in pbrt. It simply filters samples and writes the resulting image. ImageFilm::ImageFilm(int xres, int yres,Filter *filt, float crop[4],string &filename, bool premult, int wf) {... pixels = new BlockedArray (xPixelCount, yPixelCount); } useful for debugging, in NDC space write frequency

AddSample grid of pixels sample extent precomputed Filter table find the nearest neighbor in the filter table

WriteImage Called to store the final image or partial images to disk The device-independent RGB is converted to the device-dependent RGB. First, convert to device-independent XYZ. Then, convert to device-dependent RGB according to your display. Here, pbrt uses the HDTV standard. Pbrt uses the EXR format to store image.

12 bytes per pixel, 4 for each channel signexponentmantissa PF Floating Point TIFF similar Text header similar to Jeff Poskanzer’s.ppm image format: Portable floatMap (.pfm)

(145, 215, 87, 149) = (145, 215, 87) * 2^( ) = ( , , ) (145, 215, 87, 103) = (145, 215, 87) * 2^( ) = ( , , ) Ward, Greg. "Real Pixels," in Graphics Gems IV, edited by James Arvo, Academic Press, 1994 Radiance format (.pic,.hdr,.rad) 32 bits/pixel redgreenblueexponent

ILM ’ s OpenEXR (.exr) 6 bytes per pixel, 2 for each channel, compressed signexponentmantissa Several lossless compression options, 2:1 typical Compatible with the “half” datatype in NVidia's Cg Supported natively on GeForce FX and Quadro FX Available at

Tone mapping Converts HDR images to LDR image for display void ApplyImagingPipeline(float *rgb, int xResolution, int yResolution, float *yWeight, float bloomRadius, float bloomWeight, const char *toneMapName, const ParamSet *toneMapParams, float gamma, float dither, int maxDisplayValue) Not called in pbrt, but used by tools. It is possible to write a Film plugin to call tone mapping and store regular image. weights to convert RGB to Y

Image pipeline Possibly apply bloom effect to image Apply tone reproduction to image Handle out-of-gamut RGB values Apply gamma correction to image Map image to display range Dither image

Bloom without bloomwith bloom a much brighter feel blurred glow

Bloom Apply a very wide filter that falls off quickly to obtain a filtered image Blend the original image and the filtered image by a user-specified weight to obtain the final image

Tone mapping Two categories: –Spatially uniform (global): find a monotonic mapping to map pixel values to the display’s dynamic range –Spatially varying (local): based on the fact that human eye is more sensitive to local contrast than overall luminance core/tonemap.h, tonemaps/* class ToneMap { public: // ToneMap Interface virtual ~ToneMap() { } virtual void Map(const float *y,int xRes,int yRes, float maxDisplayY, float *scale) const = 0; }; display’s limitscale factor for each pixel input radiance array

Maximum to white class MaxWhiteOp : public ToneMap { public: // MaxWhiteOp Public Methods void Map(const float *y, int xRes, int yRes, float maxDisplayY, float *scale) const { // Compute maximum luminance of all pixels float maxY = 0.; for (int i = 0; i < xRes * yRes; ++i) maxY = max(maxY, y[i]); float s = maxDisplayY / maxY; for (int i = 0; i < xRes * yRes; ++i) scale[i] = s; } }; 1. Does not consider HVS, two images different in scales will be rendered the same 2. A small number of bright pixels can cause the overall image too dark to see

Results input max-to-white

Contrast-based scale Developed by Ward (1994); compress the range but maintain the JND (just noticeable difference) If the radiance is Y a, the difference larger than ΔY is noticeable. Find s so that ; it gives We calculate the log average radiance as display radiance real radiance

Results input contrast-based

Varying adaptation luminance It computes a local adaptation luminance that smoothly varies over the image. The local adaptation luminance is then used to compute a scale factor. How to compute a local adaptation luminance? Find most blurred value Bs(x,y ) so that the local contrast lc(x,y ) is smaller than a threshold.

Varying adaptation luminance With the smooth local adaptation luminance image, the scale can be computed in a similar way to contrast-based method. target display luminance capacity function (intensity levels in terms of JND)

Results with fixed radius base on local contrast

Spatially varying nonlinear scale Empirical approach which works very well in practice. Similar to Reinhard not the luminance Y, but the y component in XYZ space

Results input nonlinear scale

Final stages Handle out-of-range gamut: scale by the maximum of three channels for each pixel (if the max > 1.0) Apply gamma correction: inverse gamma mapping for CRT‘s gamma mapping Map to display range: scaled by maxDisplayValue (usually 255) Dither image: add some noise in pixel values