Ruby script to help create Raw Tone Curves

Posting rules: It shouldn't need saying, but... play nice. Please keep your discussions civil. You can disagree, just don't be disagreeable. And, of course, all of the usual stuff like no spamming. Tex adds: I'll be rigorously enforcing this as we go along. We're probably going to be a small community in a little lifeboat, so we can't have members at each others' throats. This is for the sake of the project as a whole. So when you post, pretend you're speaking in person with your very wealthy auntie who has always treated you wonderfully and currently lists you prominently in her will. I won't be tossing anyone out of the forums because we are all in this together (except spammers: immediate membership cancelation), but I'll delete suspect posts right away.

1 post / 0 new
Ruby script to help create Raw Tone Curves

I've put together a Ruby script that takes in the uncorrected luminosity readings of the Kodak Q13 chart and produces an initial Raw Tone Curve template that corrects the luminosity. The q13rtc.rb script can be found at the github site. Here are the usage comments from the script:


# Obtain a Raw image containing a Kodak Q13 chart. The usual source is
# the DPReview "studio scene", available on the "Compared with (Raw)" page
# in a DPReview review.
# Open that Raw image in LightZone, without any Raw Tone Curve. Add a
# B&W tool and a Blur tool, and set the blur radius somewhere around 10.
# With the upper-right display window set to Sampler, move the cursor over
# the various squares of the Q13 chart and write down the Luminosity
# values (displayed in the upper-right of the Q13 chart) for each square
# from A through B -- don't bother with squares 17-19.
# Run this script supplying those values from A to B. You can skip squares
# 5 and 6, since those aren't visible in many DPReview studio scene shots.
# Route the output to a file; the output is a fully-formed Raw Tone Curve.
# Note: each number must be less than or equal to the prior number, except
# that skipped values can be indicated with 0. This may require some
# fudging of the data.
# Example:
# q13rtc.rb 168 132 107 90 75 42 35 29 23 20 18 14 13 11 10 > somefile.lzt
# Rename the output file as appropriate:
# CameraDefault;CAMERA EXIF ID IN CAPS.lzt
# and move it into your Templates directory.
# Re-open the test image in LightZone and verify that the Raw Tone Curve
# was picked up. If not, check the lightzone.log file to see if you got
# the filename wrong.
# Optional but recommended: remove redundant control points. This script
# produces control point settings for all 15 intermediate points, and
# that's usually unnecessary. Pick a control point that looks like it's
# not changing anything and click the "X" to delete it while watching the
# picture. If the picture doesn't change noticeably, you can leave that
# point out. If the picture *does* change, Undo (Ctrl-Z) to put the
# control point back. Control points at the top are often jammed together,
# and you may need to remove the excess ones using a text editor.
# Re-add the B&W tool and the Blur tools with radius 10 or so.
# Verify that the Q13 chart is now reasonably close to the theoretical
# values. Tweak the Raw Tone Curve as necessary -- you'll need to unlock
# it first, and you should re-lock it when you're done.