HDR formats Imaging & Randering
HDR vs. LDR HDR Scene referred standard Tone mapping Usefull for: Many different output devices Postprocessing LDR Output referred standard srgb 1,6 ordes of magnitude Don t cover visible gamut 2
History 1850 Gustav Le Gray combined negatives 1940 s Charles Wyckoff Picture of nuclear explosion 1980 s Film industry proprietary use 1985 First HDR format by Gregory Ward Radiance 1997 Paul Devebec recovering HDR from photograps 1997 The Campanile movie First image editing program: HDRShop lead by Paul Devebec 2004 Valve Software used HDR rendering in Half life 2 3
Uncompressed vs Lossy & Lossless compression Each format is Lossy Thery is only precision or implementation errors Uncompressed formats PFM Lossless compression formats OpenEXR Radiance LogLuv Tiff Lossy compresion formats OpenEXR (Pixar s compression) Future interest 4
Logarithmic vs. Linear & Gamma encoding Logarithmic... Linear... Logarithmic examples LogLuv TIFF Pixar s TIFF Lograithmic exp. examlples Radiance PFM Linear examples scrgb Gamma correction srgb 5
Colorspaces XYZ CIE standard Unreal primaries RGB Negative primaries srgb Gamma correction Luv Luminiscence u,v vectors Convertible to XYZ YCC Y luminiscence Cr Cb correction Convertible to RGB 6
Magnitude & precision Magnitude is 10 based logarithm of delta max value/min value srgb has 1,6 orders of magnitude Human eye can see about 4 orders of magnitude at one time Possible magnitude is about 62 orders of magnitude Precision is size of quantitization step in current magnitude reasonable precision is about 1% Human can detect 2%, but in darker regions about 5% Gama&Linear encoding don t have the same precision over it s magnitude 7
Gamut Spectrum of colors Visible gamut: Human visible spectrum of colors Colorspace covers gamut XYZ srgb with sign Colorospace don t cover gamut srgb 8
Comparison table 9
Comparison magnitudes/bits 10
11
Tagged Image File Format (.tif,.tiff) Aldus Adobe Systems since 2009 TIFF 6.0 TIFF/EP, TIFF/IP, GeoTIFF Part of Exchangeable image file format (Exif) Tag file format container (wrapper) LibTIFF by Sam Lefflare Scanners, Printers, Fax 12
RAW Special unprocessed format of Digital camera No common specification based on chipset of a camera About 4 orders of magnitude (depends on type of camera) Nonlineary image data! 13
Radiance (.pic,.hdr) Gregory Ward (1985) 4 byte per pixel (R_mantisa, G_mantisa, B_mantisa, shared_exponent) 76 orders of magnitude 1% of relative accuracy uncompressed vs. (standart or adaptive) run lenght encoding Header, resolution string, pixel data The oldest and the most popular format XYZE covers gamut, RGBE don t 14
Radiance - header Magic: #?RADIANCE Keywords ended by empty line Format (RGBE vs. XYZE) Exposure Color corection Software version... 15
Radiance - resolution string Inline string 4 values Resolution X & Y In integer (N) Flipping & Rotation (sign) Example -Y N +X N 16
Portable float map (.pfm) Paul Devebec 3 32-bit floating point number or one 32-bit grayscale number Covers visible gamut Without compresion(compression would have bad results) Noise (invisible) Comments starts by # and ends by EOL After magic, or after data section Used by HDRShop 17
PFM - header 4 sequences of ASCII text each ends by white char magic PF (color) or Pf (grayscale) Weight Height Byte order Endian (sign) Scale (value) 18
OpenEXR (.exr) Industrial light&magic (1999,2003 as open src.) First used in films like Men in black II or Harry Potter and Sorcerer s stone Data formats 16, 32 floating point or 32 integer Negative primaries variable image channels Scan-line or tiled (lines of data or random accces to subsquare) Wrapper Aditional information Nvidia & ATI integration of 16-bit fp variant Lossless or lossy compresion Used by : OpenEXR software C/C++ library Multi Thread support Covers visible gamut 10,7 order of magnitude 0,1% of relative precission 19
OpenEXR - data Channels Predefined (R,G,B,A) Data format 16 bit Float 32 bit Float 32 UINT Sampling Subsampling Tiles vs. Scaned lines 20
OpenEXR data tiled files Tiles Faster zooming Random acces Multiple levels resolutions Types ONE_LEVEL MIPMAP_LEVELS RIPMAP_LEVELS Scan lines Easyier Fast sequencial read Possible random acces 21
OpenEXR file structure Header Attributes pixels Basic Display/Data window Pixel Aspect Ratio Channels Compression LineOrder Screen Window Center/screen window resolution tiledescription 22
OpenEXR - compression Lossless PIZ Wavelet transform, Huffman The best (35-55%) ZIP RLE Lossy PXR24 For FLOAT type Reducets 32 to 24 bit Remove noise B44 Only for HALF type Block of 32bytes compressed to 14 (44%) 22% B44A +4 Block of 16 bytes uniform compressed to 3 bytes (44%) Large unifrom areas 23
LogLuv 24/32 Gregory Ward (1998) Logarithmic uv representation (similar to YCC) 24 or 32 bits/pixel (10(16) log Luminiscence,7(8) u,7(8) v ) Sam Leffler s TIFF library Covers visible gamut 38 order of magnitude 0,3% of relative accuracy for 32 4.8 order of magnitude 1,1% of relative accuracy for 24 24
scrgb Microsoft & HP Linear representation Extension of srgb space Either 16-bits per primary 48-bits/pixel using Linear encoding scrgb Or 12-bits per primary using Gamma encoding 36-bits/pixel RGB using Gamma encoding scrgb-nl 36 bits/pixel YCC using Gamma encoding scycc-nl Covers visible gamut Try to be a standard 25
Pixar s log TIFF One of the first HDR encoding (80 s) Logarithmic Part of Sam Leffler s TIFF library 3.5 order of magnitude 0,4% of relative accuracy, but don t cover visible gamut 33 bits per pixel (11R, 11G, 11B) Used by pixar in film recording ZIP lossless compresion 26
Others JPEG-HDR XSI (.map) by Softimage 3D rendering 27
Sources Overal http://www.anyhere.com/gward/hdrenc/hdr_encodings.html http://www.doschdesign.com/e_infobase/hdri.pdf http://www.debevec.org/ http://www.fxguide.com/article268.html http://luxal.dachary.org/webhdr/formats.shtml http://www.wikipedia.org/ Format http://www.openexr.com/ http://radsite.lbl.gov/radiance/ http://gl.ict.usc.edu/hdrshop/pfm/pfm_image_file_format.ht ml 28