Steps From Levels?

Discussion in 'Digital SLR' started by Wilba, Aug 16, 2009.

  1. Wilba

    Wilba Guest

    Probably a dumb question to most of you, but I don't know the answer.

    If I'm looking at an image in something like Photoshop (in which I can
    easily read the RGB levels for any pixel), how can I measure or determine
    the number of exposure steps between two pixels or areas in the image?
    Wilba, Aug 16, 2009
    1. Advertisements

  2. You can't without knowing the details of all the transformations
    between the original luminance levels in the sensor image and the RGB
    levels you're looking at. Not only are there likely to have been
    several, but some of them are non linear and some are local. In other
    words you can't.
    Chris Malcolm, Aug 16, 2009
    1. Advertisements

  3. Wilba

    Wilba Guest

    That's kinda what I was thinking, thanks.
    Wilba, Aug 16, 2009
  4. Wilba

    Wilba Guest

    On second thoughts, I'm not so sure ... :- )

    Forget the original. Put it this way - in the image itself as it is, if a
    pixel has the value r, g, b, can I determine the RGB values for one step up
    or down from that?
    Wilba, Aug 18, 2009
  5. Only if you know the parameters noted in my above remark. If you
    usually restrict yourself to editing which keeps those parameters the
    same, then you could build up a table or formula which you could apply
    to all your photographs. But if like me you frequently adjust the
    contrast, use local dynamic range adjustments, or even worse, fiddle
    with the "curves", then the values will differ for each image, and to
    a lesser extent, each part of each image.

    If you want to carry out some specific experiments on a particular
    image, then your easiest way of bypassing all the mathematical model
    fitting would be the good old fashioned method of taking a photograph
    and making careful notes at the time of specific important light
    values by doing spot measurements with a light meter or the
    camera. Then you can simply see how the light values have translated
    into pixel luminance values, and also how those change with your
    editing, camera settings, and so on.

    Some of the work you're interested in may already have been done and
    explained in scientifically minded tutorials on the zone exposure
    Chris Malcolm, Aug 18, 2009
  6. Wilba

    Wilba Guest

    You're still thinking about an original scene, which is irrelevant to what
    I'm trying to work out. But the zone system clue lead me to Norman Koren
    (, and the Matlab equation
    (bottom of the page), which is pretty much what I was looking for. It uses a
    gamma corrected sine curve to give the levels for 9 zones from black to
    white, and the result looks fine to my eye.

    I worked backwards to get a zone number for any arbitrary level, and from
    there it's easy enough to work out the level for a number of zones/steps
    from there.

    I'm not sure whether that's any good for anything, but it was interesting to
    do. Thanks for the clue. :- )
    Wilba, Aug 23, 2009
  7. But note that what you've found applies in specific conditions, which
    although conventionally standard, are changed by any kind of unusual
    parameter settings in camera or image editing. So if you know nothing
    about how the image was produced you don't know whether your equations
    apply, although they probably roughly do for most unedited jpegs on
    simple default settings straight out of the camera. I say "simple
    default settings" because my camera like some others has a standard
    default setting of doing some local dynamic range optimisation for the
    in-camera jpeg conversion, and that makes those equations invalid if
    the lighting conditions etc. call for that opimisation to make more
    than insignificant adjustments.
    Chris Malcolm, Aug 24, 2009
  8. Wilba

    Wilba Guest

    I don't see how any of that has anything to do with the "normalized screen
    luminance" that the equations work with. There is no camera involved, no
    JPEG conversion, no image editing, no lighting conditions, just grey pixels
    with specific values.
    Wilba, Aug 24, 2009
  9. First of all let me remind you of your original question which is
    still quoted at the start of this message.

    "If I'm looking at an image in something like Photoshop (in which I
    can easily read the RGB levels for any pixel), how can I measure or
    determine the number of exposure steps between two pixels or areas in
    the image?"

    The "number of exposure steps" derives directly from the original
    light levels in the original scene and what kind of lens etc. was used
    to capture the image.

    Secondly let me remind you that the equations you have found, which
    deal only only with screen luminance levels, do so in a context
    derived from the exposing and printing of photographs according to a
    simplified version of Ansel Adams' Zone System.

    Your questions, and what you say is one of the most interesting
    partial answers you have found, have photography exposure values built
    solidly into their foundations. They escape from explicitly dealing
    with these by normalising and abstracting from them. My point is that
    that normalisation and abstraction only holds provided the translations
    involved are normal in the ways assumed, which in today's
    sophisticated world of digital photography they often aren't.
    Chris Malcolm, Aug 25, 2009
  10. Wilba

    Wilba Guest

    OK, but as I've been saying over and over, that's not what I meant. There's
    no point insisting on answering a question I'm not asking. :- )
    Exactly! It's all about the final image. It's the apparent lightness of
    tones in the final image I'm interested in, not the actual lightness of
    tones in a scene. I only want to know how to determine the levels a number
    of steps lighter or darker than an area in a final image (and the other way

    That image could be entirely created in software, as is Norman's "Zone
    system chart for gamma = 2.2 (PC's, sRGB color space)"
    ( When I look at that chart I
    can see that zone 4 is one step darker than zone 5, 7 is two steps lighter
    than 5, and so on, and I want to be able to determine via measurement that,
    "this area is about X steps darker or lighter than that area ...", in an
    image on my monitor.

    Knowing what I know now I might put the question this way - If I'm looking
    at an image in something like Photoshop (in which I can easily read the RGB
    levels for any pixel), how can I measure or determine the number of zones*
    between two pixels or areas in the image?

    * See Norman Koren's "Zone system chart for gamma = 2.2 (PC's, sRGB color
    space)" at
    If I'm viewing an image on a well-calibrated PC monitor with gamma = 2.2 and
    sRGB colour space, what translations are involved?
    Wilba, Aug 26, 2009
  11. Only if more is known. For example how the RGB values are
    translated --- linear, gamma, monitor proofed? Or are they
    printed on paper with a (simple case) pure black-and-white (*not*
    grayscale, *no* dithering) printer, resulting in exactly black
    and white, where it depends on how black the black ink is, how
    much is sprayed/painted/transferred onto the paper, how white the
    paper is (is it greyish recycling paper or a superwhite one with
    optical brighteners?) etc.

    Or maybe you are putting the image on transparent film via laser
    writer and chemical development. Then it not only depends on how
    transparent and how black the film can be made, but also on how
    bright the projection lamp is and how reflective the projection
    screen will be.

    Maybe you are viewing it on a monitor. Is that a flatscreen
    or a good old CRT display? If it's a flatscreen, at what angle
    are you looking at it? Is the environment dark, or is it in the
    bright sun, where the same reflects in the monitor and renders
    even pure black and white near identical and maybe a quarter stop
    apart from each other, if you are lucky?

    Say, you could be developing the photos --- what graduation
    will you use with the paper? Rather soft (so everything's more
    grayish and 2 given RGB values are usually closer to each other
    in luminosity) or rather hard (so things seem crisper, but details
    can be lost in the shadows (everything pure black) and highlights
    (everything pure white) and 2 given RGB values might be identical
    or further from each other in luminosity)?

    And of course, each medium will have different distances
    between black and white, and hence different answers for 'one
    stop more' ...

    Wolfgang Weisselberg, Aug 28, 2009
  12. Wilba

    Wilba Guest

    Windows, gamma 2.2, sRGB, on a CRT calibrated under ambient light from an
    open south-facing window (in the southern hemisphere). And I'm wearing light
    grey underpants. :- )

    The curve given by the Matlab equation on Norman Koren's Simplified Zone
    System page ( give me everything
    I want. The levels it gives for the zones are 0, 31, 55, 86, 126, 170, 212,
    244, 255, and those tones look fine. (Contrast with the linear levels - 0,
    32, 64, 96, 128, 160, 192, 224, 255. Here's a graphic that shows both sets - It's easy enough to
    work the maths to get an arbitrary offset from any level.
    Wilba, Aug 29, 2009
  13. You should try bleaching them. :)
    OK, but why not 0, 55, 126, 212, 255? Why exactly 8 zones?
    Does your monitor show exactly 2^8 times the luminance at 255
    than at 0? Doesn't that change when the ambient light (which
    adds the same amount to 0 and 255, but since 0 is near zero,
    has great impact with 0 and much less with 255) changes, say,
    from bright blue sky to dreary overcast to night?

    Wolfgang Weisselberg, Aug 29, 2009
  14. Wilba

    Wilba Guest

    I prefer Bart Simpson's idea.
    See the "Zones" section at "Each
    zone represents a doubling or halving of the luminance" on a "properly
    calibrated monitor". You'd have to ask someone like Norman if you want to
    know more about that.
    It doesn't matter what my monitor shows, since I'm measuring values from the
    image data. Judgment by eye is not involved.
    No. Monitor illumination is irrelevant to the values measured from the image
    data, e.g. using the Info window in Photoshop.

    All I want is a rough idea (a rule of thumb), about what the levels might be
    like X steps from what's under the cursor. Or the other way around - roughly
    how many steps are there between two points? That doesn't require laboratory
    quality calibration and control of ambient illumination for every data
    Wilba, Aug 30, 2009
  15. Norman says it matters, you just quoted him exactly on this!
    Understand what you quote, it's important. :)
    So it doesn't matter what your monitor shows, because you
    don't look at your shots?
    Ah, you really don't look at your shots, (nor do you print them
    or anything, they are just blobs of data!) and, in addition,
    your monitor is not properly calibrated anyway, since it does
    not exhibit the behaviour Norman says it should have for a
    "properly calibrated monitor".

    Why do you bother having a monitor at all, much less calibrating
    it? A teletype (of the printer type) would do just as well for
    looking at the data values!
    2^X or 1/2^X times as bright in luminance. Easy.
    As a phptographer you surely have developed an eye that can
    roughly judge the contrast range in stops ...
    (it's not st*e*ps, it's st*o*ps. As in "Waterhouse stop".)
    One for each doubling or halving of luminance. Easy.
    As a "rule of thumb" using just roughly ±30 on 8bit
    gamma-2.2-encoded data works well enough, no need
    to bother with formulas at all.

    Wolfgang Weisselberg, Sep 1, 2009
  16. You'll have to excuse this resident Wolfgang troll. He's not aware that the
    data in the image file is independent of the luminosity displayed on a
    monitor. He's trying to invent and guess ways that he might manipulate
    people into nonsense arguments with him. A value of 127 for an R, G, or B
    value in a file will read the same value in any good editor on anyone's
    monitor. Though it might be represented to the eye in varying levels of
    luminosity. This does not, however, change the value stored in the file and
    it will be read the same with whatever "color picker" tool that you use to
    read those values.

    Wolfgang's not too bright, nor does he have any real experience with
    photography and editors, though he desperately tries to sound like he knows
    about these things. He reveals his troll's utter stupidity like this often,
    if you read carefully enough.
    Troll Spotter, Sep 1, 2009
  17. Wilba

    Wilba Guest

    [Snip heaps of irrelevant insolent trolling.]
    As a PHP toe grapher? No. :- )

    I'm not sure that I do have that ability at a good level. I'm sure I had
    something like that in my monochrome wet darkroom days, but that's a long
    time ago, and I doubt that I can do it accurately with colour images. And
    without some objective measure, how would I know if I can?
    Only apertures stop, and when one does it stops in steps, as does every
    other way of changing exposure. Stop is an aperture-specific step, so
    although it's conventional to do so, it's misleading to talk about stops of
    shutter speed, ISO, or exposure compensation.
    It sounds easy until you want to measure it from the levels in an image, and
    you don't know how to do that. That's where this thread started, and it's
    the only point of it.
    If you knew the answer all along, why didn't you just give it at an
    appropriate time? :- )

    32 levels represents a linear set of zones, and is not a bad approximation
    up to about the third lightest zone. I don't intend to use the formula, but
    it enabled me to produce the chart I posted
    (, which is handy as a
    ROT, and gives me a way to calibrate my eye. Hmm, I should do one with
    colours ....
    Wilba, Sep 1, 2009
  18. Wilba

    Wilba Guest

    Thanks. I worked out Wolfy as soon as he appeared here. It's fun to taunt
    him occasionally. But it has been beneficial for me to think through some of
    the sensible ideas that his nonsense brings to mind.
    Wilba, Sep 1, 2009
  19. Troll spotted! "Troll spotter" is a resident troll that does
    nothing than denounce regulars as trolls.
    For an idiot you are doing badly with your guessing.
    Even if the monitor is broken, powerless, disconnected *and*
    switched off. As I said, for an idiot ...
    Obviously, a value of 127 for R, G, or B will show up as 0 or 1
    or maybe 2, once it is translated from a 12 bit RAW to 8bit sRGB.
    As I said, for an idiot ...
    It only appears so to trolls and idiots. Thinking people can
    follow my arguments. Well, what did you expect?

    Wolfgang Weisselberg, Sep 2, 2009
  20. You forgot insubordination, King "goalpost shifter" Wilba.
    Then you should relearn it.
    You happen to have a camera, probably with a center or spot mode.
    It can be used as a light meter with enough accuracy for that task.
    Stepless aperture systems have long been invented. Look at
    your eye.
    Stepless exposure times also have been invented. In fact,
    the old method of a hat over the lens is stepless.
    If you say so. Source? Or is that just your personal opinion?

    You point your light meter to the parts of the image.
    Because you wanted to measure, nothing about roughly --- and my
    point still stands: will your image in it's later representation
    have 8 stops of range? Can your prints even deliver 8 ranges?

    So what is the difference between 0 and 255 in the *final*
    represenation of the image?

    Wolfgang Weisselberg, Sep 2, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.