Needables
  • Canon EOS 7D 18 MP CMOS Digital SLR Camera with 3-inch LCD (Body Only)
    Canon EOS 7D 18 MP CMOS Digital SLR Camera with 3-inch LCD (Body Only)
    Canon
  • Canon EOS Rebel T2i 18 MP CMOS APS-C Digital SLR Camera with 3.0-Inch LCD (Body Only)
    Canon EOS Rebel T2i 18 MP CMOS APS-C Digital SLR Camera with 3.0-Inch LCD (Body Only)
    Canon
  • Redrock Micro Captain Stubling DSLR Bundle, with Baseplate & Lens Gear Size A 32 Pitch, Black
    Redrock Micro Captain Stubling DSLR Bundle, with Baseplate & Lens Gear Size A 32 Pitch, Black
    Redrock Micro
  • Canon EOS 5D Mark II 21.1MP Full Frame CMOS Digital SLR Camera (Body Only)
    Canon EOS 5D Mark II 21.1MP Full Frame CMOS Digital SLR Camera (Body Only)
    Canon
  • Canon EOS 1D Mark IV 16.1 MP CMOS Digital SLR Camera with 3-Inch LCD and 1080p HD Video (Body Only)
    Canon EOS 1D Mark IV 16.1 MP CMOS Digital SLR Camera with 3-Inch LCD and 1080p HD Video (Body Only)
    Canon
  • The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    by Stu Maschwitz
  • Panasonic DMC-LX3S 10.1MP Digital Camera with 2.5x Wide Angle MEGA Optical Image Stabilized Zoom (Silver)
    Panasonic DMC-LX3S 10.1MP Digital Camera with 2.5x Wide Angle MEGA Optical Image Stabilized Zoom (Silver)
    Panasonic
  • Zoom H4n Handy Portable Digital Recorder
    Zoom H4n Handy Portable Digital Recorder
    Zoom
  • Adobe After Effects CS4 Visual Effects and Compositing Studio Techniques
    Adobe After Effects CS4 Visual Effects and Compositing Studio Techniques
    by Mark Christiansen
clicking makes us strong
Saturday
14May2005

log is the new lin

This the the Kodak DLAD image (Marcie) in log space, right?



This is the same image, linearized. Right?



Wrong, on both counts.

There are many misconceptions about Cineon files and the color spaces known colloquially as log and linear. The first is that Cineon files are stored in a log color space. It’s not that this is entirely false, it’s just that it’s not that simple. The pixel values in a Cineon file are represent dye densities on color negative film, and the relationships of these density measurements from one step to the next on the 10-bit scale are the same.

So while we say all the time that the Marcie Cineon file is “log,” what we really mean is that it is in Kodak's Cineon 10-bit encoding of negative densities as seen by the print stock. OK, so maybe I was being over dramatic when I said you were wrong earlier. That’s cool—let’s keep using the term log to describe Cineons, since the densities themselves are in fact logarithmic.

The problem is really with the second image. Many people freely use the term linear to describe images that look correct on their ≈g2.2 monitors. It’s particularly easy to fall into this trap when you are invited by your software to perform a “Log to Linear” conversion on a Cineon file. The standard practice is to use a Cineon conversion gamma equivalent to your monitor gamma and describe the results as linearized. But in truth, the results are gamma-encoded, as any image must be to look correct on a ≈g2.2 display, and are therefor not linear in the least.



As you can see here, a log curve and the gamma 2.2 curve are actually very similar. Gamma 2.2 images (which likely comprise the vast majority of digital images) actually bear more in common with log images than with linear ones. Logarithmic encoding and gamma encoding are both methods of distributing values perceptually, allowing them to be stored at reduced bit depths and to look correct on non-linear displays.

So it would be better to say that we converted the “log” Marcie above to “another kind of log-ish space” than to say that we made her linear. The eLin/ProLost/brave new future term wold be not log, not lin, but vid (like we talked about here).

“But Marcie looks all washed out in the log image and not in the second one (that I still desperately want to call linear).”

OK, I knew you were going to say that. Check this out. Here’s the log Marcie with all the values below 95 and above 685 clipped. Other than that, no color space change:



She's still “log” — all we've done is perform the clipping that happens in a standard Cineon conversion. Looks pretty darn similar to the second image at the top of the article, right?

So log Marcie is more like vid Marcie than linear Marcie. Linear Marcie is too dark to look at, but is the best Marcie for doing image processing operations on. Raw Cineon files look washed out because they contain so much headroom, not because they're log.



So repeat after me: Log is kinda like vid, and vid is not linear!

Reader Comments (6)

I'd just like to thank you Stu for sharing the knowledge. You've made a big difference in my work and increased my understanding of stuff I really should have known a few years ago. So, thanks.

Joe

May 16, 2005 | Unregistered CommenterJoe

Thanks Joe, that means a lot!

May 17, 2005 | Unregistered CommenterStu

I second that.
I check back here every now and then and I always find nice little articles. These about log-lin are very helpful for me. I mostly work on SD and HD video material. This info make me feel more confident on those rare occations when I do get to work on film-scans.

May 18, 2005 | Unregistered CommenterMartin

Thanks very much Stu. It is a great to hear these things clarified by soemone who really understands them. Sharing knowledge for the sake of the whole user comunity is the best contribution someone can make.

March 19, 2006 | Unregistered CommenterAnonymous

Great post Stu,

So for practical real linear compositing, I should eliminate the Log/Gamma correction & do all operations in linear & add a viewing LUT/Adjusment layer (AE land)with a Gamma correction on top ??

January 6, 2008 | Unregistered Commentergindin

Gindin, try http://prolost.blogspot.com/2005/02/using-elin-color-model-in-floating.html" REL="nofollow">this post for more of a description of the workflow.

January 6, 2008 | Unregistered CommenterStu

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Three Way Color Corrector in After Effects | Main | much better »