Pages: [1]   Go Down

Author Topic: Digital vs Film Characteristic Curves  (Read 13132 times)

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« on: June 12, 2006, 02:39:30 pm »

I undertook these experiments to evaluate the characteristic curve a typical transparency film to that of a Nikon D200 camera RAW image rendered with Adobe Camera Raw and default settings, except for a shadow setting of zero, rather than the default of 5.

The camera sensor is linear, whereas film responds to light in a log fashion. The characteristic H&D curve for film is a log-log plot. The log of the exposure (in Lux-seconds) is plotted on the x-axis and the resultant film density is plotted on the y-axis. Norman Koren's excellent program Imitest automates the production of a characteristic curve from a single exposure of a Stouffer stepwedge. Note that for a log-log curve, one must plot the log of the pixel value, rather than the pixel value itself.

Here is the characteristic curve of the D200 without any gamma correction or tone curve as plotted by Imitest. The curve is linear as expected, except for shadow areas which are affected by flare light and are lightened.

[attachment=688:attachment]

Here is the characteristic curve of an ACR conversion with the above parameters:

[attachment=689:attachment]

The characteristic curve for Kodak E100G transparency film was taken from the Kodak web site and flipped in Photoshop so that the axes are shown in the same fashion as imitest:

[attachment=690:attachment]

Finally, here is the characteristic curve for the ACR conversion imported into Excel and scaled so that the proportions are similar to the film curve:

[attachment=691:attachment]

As is evident, the curves for film and the digital camera are quite similar. Both have a knee and shoulder and a central linear segment. The digital capture has a wider dynamic range, giving meaningful values from log exp of 0 to -3.5, whereas the film flattens out at about log exposure of -2.5 or so. The concepts that we learned for exposure of transparency film carry over into digital.
Logged

dlashier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 518
    • http://www.lashier.com/
Digital vs Film Characteristic Curves
« Reply #1 on: June 12, 2006, 08:57:25 pm »

> As is evident, the curves for film and the digital camera are quite similar

The reason being, of course, that the goal is to look like film, but differences arise when clipping is involved.

I plotted the TRC's of a couple converters years ago:
http://www.lashier.com/home.cfm?dir_cat=14477

- DL
« Last Edit: June 12, 2006, 08:58:40 pm by dlashier »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« Reply #2 on: June 12, 2006, 10:39:45 pm »

Quote
> As is evident, the curves for film and the digital camera are quite similar

The reason being, of course, that the goal is to look like film, but differences arise when clipping is involved.

I plotted the TRC's of a couple converters years ago:
http://www.lashier.com/home.cfm?dir_cat=14477

- DL
[{POST_SNAPBACK}][/a]

DL,

You plotted a TRC, but these differ from a characteristic curve. It looks S shaped but there are differences from a characteristic curve. Firstly, for a characteristic curve, one must plot the log of the pixel value rather than its nominal value. Also, you did not take into account the gamma of your working space where you divided pixel values of 0..255 into eight zones. The values for those zones will vary according to the gamma of the working space. For example, you can take a picture of a Kodak Q14 step wedge (which has 20 steps) and the resulting pixel values will vary with the gamma as shown in this plot by Julia Borg:

[a href=\"http://www.pochtar.com/gamut_view/gamma.htm]http://www.pochtar.com/gamut_view/gamma.htm[/url]

To obtain the exposure, you would have to use the gamma equation and work backwards. If you lack a step wedge, it might be easier to take a series of bracketed exposures of a gray card and plot the log of exposure versus the log of the derived pixel value using only gamma correction and no additional tone curve in the converter.

If you plot the linear pixel value versus linear exposure for an exposure rendered in ACR at normal gamma and with a normal tone curve you get this curve, which is not at all sigmoidal. In fact, it is a gamma 2.2 curve.

[attachment=693:attachment]

If you plot linear pixel values versus log exposure, you get this sigmoidal curve which is not symmetrical and not a true characteristic curve:

[attachment=694:attachment]

Here is the log-log plot, which is the proper characteristic curve:

[attachment=695:attachment]

The curves of film and digital are similar not because digital is emulating film, but because the images must be displayed with a gamma of around 2.2 to look natural to the eye, which also has a log respose to light. The sigmoidal shape is added to improve contrast in the midtones.
« Last Edit: June 12, 2006, 10:55:11 pm by bjanes »
Logged

dlashier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 518
    • http://www.lashier.com/
Digital vs Film Characteristic Curves
« Reply #3 on: June 13, 2006, 04:00:40 am »

> You plotted a TRC, but these differ from a characteristic curve.

But you also plotted a TRC. By your own admission the response curve (characteristic curve) of a digital sensor is linear, with perhaps a few anomalies. When I first posted the article a few years ago I got raked over the coals by Jeff Schewe for calling my curve a characteristic curve telling me that it should more correctly be called a tonal response curve imposed by the raw converter. My opinion (and apparantly yours) is that from a practical viewpoint they are the same, so I'm confused that you also argue that they're different.

> for a characteristic curve, one must plot the log of the pixel value rather than its nominal value.

You are overlooking the fact that the log function is accounted for by my methodology.

> Also, you did not take into account the gamma of your working space where you divided pixel values of 0..255 into eight zones.

You are also overlooking the fact that the gamma functions cancel out. Considering the fact that I made so many gross errors in my plots don't you find it remarkable that when I overlay your plot and mine, scaling (linearly) to match the end points, they look remarkably similar even though we used different methodologies and different makes and models of cameras. Here's a plot of the overlay (note that my plot already includes three ACR overlays with varying contrast setting, the green being contrast 0 setting), but I didn't alter BP setting as you did:


> If you plot the linear pixel value versus linear exposure for an exposure rendered in ACR at normal gamma and with a normal tone curve you get this curve, which is not at all sigmoidal. In fact, it is a gamma 2.2 curve.

You mean the curves I plot (minus the ACR interference) at Linear Encoding?

> The curves of film and digital are similar not because digital is emulating film, but because the images must be displayed with a gamma of around 2.2 to look natural to the eye, which also has a log respose to light.

Hum. They're similar just in gross form just by chance, or perhaps because both chemicals and electrons respond in a linear fashion. They're similar in fine form because the designers of raw converter software studied film characteristics and coded to emulate it. It has nothing to do with gamma 2.2. Reversal film may be a different matter - I don't know.

> The sigmoidal shape is added to improve contrast in the midtones.

True, but this is done in the raw converter and has nothing to do with the nature or "characteristic" of the sensor. With film, I don't know if it's the nature of the chemical reaction or by design. Also, the toe and shoulder are introduced not only to provide room for midrange contrast enhancement but also to soften the blow at the ends and prevent harsh blocking of shadows and highlights.

I'll also note that ACR lacks any attempt to emulate film while most other raw converters apply a tone or film curve that attempts to emulate the look of film. This includes at least C1, Rawshooter and Canon's DPP which apply tone curves that maintain a relatively straight portion in the midtones ala classic film characteristic curves. In fact this was always a selling point of C1 - they studied film response and carefully crafted what they call "film curves" to emulate the look. ACR takes a cruder approach and applies a simple ess (S) contrast curve which may be fine if you're of the school that likes to fine tune everything in PS with a curve but doesn't do so well for the photographer who likes to use classic controls (again a selling point used by PhaseOne).

What you really plotted was the response curve of ACR at whatever setting you used, not the characteristic curve of the sensor.

Regards,

- DL
« Last Edit: June 13, 2006, 05:38:55 am by dlashier »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« Reply #4 on: June 13, 2006, 11:05:05 am »

Quote
> You plotted a TRC, but these differ from a characteristic curve.

But you also plotted a TRC. By your own admission the response curve (characteristic curve) of a digital sensor is linear, with perhaps a few anomalies. When I first posted the article a few years ago I got raked over the coals by Jeff Schewe for calling my curve a characteristic curve telling me that it should more correctly be called a tonal response curve imposed by the raw converter. My opinion (and apparantly yours) is that from a practical viewpoint they are the same, so I'm confused that you also argue that they're different.

[{POST_SNAPBACK}][/a]

I don't know how Jeff Schewe defines a characteristic curve, but he can be a bit dogmatic and overbearing. IMHO, a characteristic curve is a special type of TRC in which the log of exposure is on the X-axis and the log of the pixel value is on the Y-axis. Since your graphs are unlabled and not scaled, I have no idea what data are being plotted or if you are using log-log or lin-lin or some combination thereof. If you would label and scale the axes, then we could continue the discussion. Since the sensor is linear, one can substitute the raw pixel value for exposure.

With film, I am informed that the silver halide responds linearly to light, just like the sensor in the digital camera and the log response is produced by development. When we plot a H&D curve, we are measuring the response of the film plus development and not merely the film response, whearas with digital we can separate the two phases, exposure and development.

I don't use capture one, but ACR and Nikon Capture have a curve feature that is applied on top of the data after the gamma correction has already been applied, similar to the curves in Photoshop. Input pixel values are on the X-axis and output pixel values are on the Y-axis with linear scaling. They usually start out with a slope of 1.0 and originate at 0, 0 and terminate at 255, 255.

This latter condition is what you demonstrate on your web page, where the TRC appears to be superimposed on the gamma curve. My graphs go from the raw data (exposure or raw pixel value) to the final gamma corrected pixel value.

[a href=\"http://www.lashier.com/home.cfm?dir_cat=25028]http://www.lashier.com/home.cfm?dir_cat=25028[/url]

Here is the TRC of ACR with various contrast settings plotted linearly as raw pixel value on the X-axis and output pixel value on the Y-axis. As you can see there is no S-curve, but merely an upwardly coved convex curve.

[attachment=698:attachment]

Here are the very same data plotted as log-log:

[attachment=697:attachment]
« Last Edit: June 13, 2006, 11:35:37 am by bjanes »
Logged

dlashier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 518
    • http://www.lashier.com/
Digital vs Film Characteristic Curves
« Reply #5 on: June 14, 2006, 04:30:26 pm »

> This latter condition is what you demonstrate on your web page, where the TRC appears to be superimposed on the gamma curve.

But so is your's! That's what plotting with a log axis does! A log-log plot is a way of visualizing data that is changing with a power law and effectively you're applying a gamma conversion. Assuming sensor response is linear, my plots show exactly the same thing as yours as evidenced by the overlay in my previous post. What I didn't do was separate out sensor response both because it is widely reported to be linear but also because it was irrelevant to the goals of my experiment which was to examine the differences in tonal treatment between various raw converters and also the behaviour of various RC tonal controls.

> Since your graphs are unlabled and not scaled, I have no idea what data are being plotted or if you are using log-log or lin-lin or some combination thereof.

I clearly outlined my procedure and it should be evident that both input and output values are gamma encoded in PS's sRGB working space and the plots were constructed directly from working space data using PS's eye-dropper and curve tool. To show such a plot as other than gamma encoded would not make much intuitive sense. It just happens that both my input and output values were already gamma encoded in PS while yours needed the log plot because they weren't. The result is the same.

btw, although I have a lot of respect for Norman Koren and have learned much from his web pages, his page on digital tonality has a certain amount of mis-information, or at best incorrect inferences as to how certain raw converters work.

- DL
« Last Edit: June 14, 2006, 05:35:37 pm by dlashier »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« Reply #6 on: June 16, 2006, 08:47:54 pm »

see next post
« Last Edit: June 16, 2006, 09:25:16 pm by bjanes »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« Reply #7 on: June 16, 2006, 08:54:54 pm »

Quote
but I didn't alter BP setting as you did:

If you had taken the effort to compare the raw pixel values or exposure values with the rendered gamma 2.2 output over a wide luminance range, you would have seen that the black point has a profound influence in the shape of the curve with high contrast subjects. In a raw conversion, tone mapping depends on the subject contrast, since the rendering process has to map a wide contrast ratio in the subject to a more limited contrast ratio that can be displayed or printed.

Here are plots of ACR tone curves of a high contrast Stouffer transmissive step wedge and a lower contrast Kodak Q14 target at default settings, except for the setting of the black point. The default ACR shadow setting is 5, which tends to roll of the shadows rather sharply with high contrast subjects. The departure of the rendered curve from the gamma 2.2 curve represents addtional tone mapping applied by the converter.

The default shadow setting of 5 works fine for the Q14 target, but with the higher contrast ratio of the Stouffer target, the shadows are rolled off rather steeply starting at log exposure of about -2. With the shadow value set to zero (S0, yellow curve), the shadows are preserved and the curve parallels the raw curve and the the gamma 2.2 curve with no additonal tone adjustments.

The default rendering for the lower contrast Q14 target does not superimpose with the Stouffer values with default settings, since a different tone curve was applied for the lower contrast subject.

The contrast ratio of the picture from your monitor would depend on the contrast ratio of the monitor and the viewing conditions (reduced contrast from ambient light) and remains unknown unless you look at the raw data. Generally, the contrast would be expected to be higher than a reflective target (which is limited to a ratio of 100:1 or so, 2 logs) and the Stouffer target (1:10,000, 4 logs). I doubt if your target was able to exercise the full dynamic range of the sensor, and you are studying only the top portion of the characteristic curve and so did not detect the roll off at log exp of -2).

[attachment=706:attachment]
Logged

dlashier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 518
    • http://www.lashier.com/
Digital vs Film Characteristic Curves
« Reply #8 on: June 17, 2006, 03:35:34 am »

> the black point has a profound influence in the shape of the curve with high contrast subjects.

Good point, but if you look at the histograms of my conversions you will see that the potential issue is not BP but WP. I did in fact pick different exposures for various RC's in an attempt to fill the DR, but I perhaps should have at least set the WP if not (slightly) also the BP.

> I doubt if your target was able to exercise the full dynamic range of the sensor, and you are studying only the top portion of the characteristic curve

As above, if anything, I am missing only a bit of the top portion, but nevertheless the projected WP of 255 should provide a reasonably accurate curve.

- DL
« Last Edit: June 17, 2006, 04:02:50 am by dlashier »
Logged

dlashier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 518
    • http://www.lashier.com/
Digital vs Film Characteristic Curves
« Reply #9 on: June 18, 2006, 02:39:14 am »

Just to elaborate a bit more after thinking about this:

One of the reasons I didn't set BP and WP is that not all converters, ACR in particular, have a clear way of doing this and I didn't want to adversely affect the results by using unclear adjustment controls. I left all converters at default tonality settings and instead picked alternate exposures so that all ended up with nearly a full tonal range and they are at least comparative if not absolute. This can be seen in my plots where I also plot an alternate exposure for the Canon converter which, as expected, shows more shadow compression and a somewhat truncated shoulder. In any case the chosen exposures all came very close to absolute black, and although the white ended up a bit below the top it was still ~240 (I'd have to look up the exact figures) which is probably about as far as you normally want to push (at least broad) highlights in real practice, so from a practical standpoint they may be more useful than plots pushed to the limit. Again I was more interested in the differences between the converters and these are quite evident and reflect real world experience.

- DL
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Digital vs Film Characteristic Curves
« Reply #10 on: June 18, 2006, 02:56:28 pm »

Quote
Just to elaborate a bit more after thinking about this:

One of the reasons I didn't set BP and WP is that not all converters, ACR in particular, have a clear way of doing this and I didn't want to adversely affect the results by using unclear adjustment controls. I left all converters at default tonality settings and instead picked alternate exposures so that all ended up with nearly a full tonal range and they are at least comparative if not absolute. This can be seen in my plots where I also plot an alternate exposure for the Canon converter which, as expected, shows more shadow compression and a somewhat truncated shoulder. In any case the chosen exposures all came very close to absolute black, and although the white ended up a bit below the top it was still ~240 (I'd have to look up the exact figures) which is probably about as far as you normally want to push (at least broad) highlights in real practice, so from a practical standpoint they may be more useful than plots pushed to the limit. Again I was more interested in the differences between the converters and these are quite evident and reflect real world experience.

- DL
[a href=\"index.php?act=findpost&pid=68430\"][{POST_SNAPBACK}][/a]

I expanded my plots to include methodology more or less similar to DL's and got results similar to his. All plots were derived from conversions of the same raw file. I plotted the converted pixel value of ACR on the Y-axis against pixel values of a gamma 2.2 curve of the raw data on the X-axis. These latter values were derived from a DCRaw conversion of the raw file; the calculated pixel value = normalized raw pixel value ^ (1/2.2) * 255. The X-axis values were then similar to what DL was plotting. The folowing chart shows the default ACR setting (shadow = 5) along with the default setting plus linear and strong contrast applied in the curve setting. The curves are similar to DL's and differences in the shadow setting are not apparent, since the shadow values are compressed on the graph. The linear plots start from zero on both the X and Y axis, but log-log plots can not include zero.

[attachment=716:attachment]

If one plots the log of pixel value versus the log of the exposure, the curves have a sigmoidal shape only when the shadow value in ACR is set to 0; with the default setting of 5, the shadows are rolled off and the curves have a quite different appearance. While DL's curves show very well the differences between converters and different settings of the same converter, and probably better show the different perceived appearnace of the rendered image, they can be quite different in shape from traditional log log plots of a characteristic curve. The log-log plots are more difficult to relate to the perceived image.

[attachment=717:attachment]

Since our results are similar and no one else appears interested (as shown by lack of any input), I think this should conclude the thread.
Logged
Pages: [1]   Go Up