Logarithmic RAW images

Discussion in 'Digital Photography' started by Alfred Molon, Mar 4, 2004.

  1. Alfred Molon

    Alfred Molon Guest

    As far as I know images are A/D converted with a square root shaped
    transfer function. But it would be better if (at least RAW) images were
    captured with a logarithmic scale. Cameras could output 12 bit
    logarithmic RAW images, which could then be converted with a PS plugin
    or similar (standard JPEG files would still use the classic gamma
    transfer function). The logarithmic transfer function would have the
    benefit of better capturing the range of brightness values in an image.
    --

    Alfred Molon
    ------------------------------
    http://groups.yahoo.com/group/Olympus_405060/
    Olympus 5050 resource - http://www.molon.de/5050.html
    Olympus 5060 resource - http://www.molon.de/5060.html
    Alfred Molon, Mar 4, 2004
    #1
    1. Advertising

  2. Alfred Molon

    JoeT Guest

    While this may be true the logistics of translating the data inside the
    camera so it can be viewed in the camera may make this approach difficult in
    terms of real-time throughput. In general its not the A/D conversion or
    encoding that limits the brightness values so much as the CCD sensors
    themselves ... they have a fairly limited range and like all electronic
    devices need to get over the energy hump to actually work (i.e. enough
    photons to get the smallest signal possible). This means then that the
    sensitivity is related to this threshold in the CCD rather than the way the
    data is encoded from the A/D.

    Correct me if I'm wrong ... I've worked with many A/D's and such but never
    specifically in interfacing a CCD ... I've only read about this process ...

    Joe

    "Alfred Molon" <> wrote in message
    news:...
    > As far as I know images are A/D converted with a square root shaped
    > transfer function. But it would be better if (at least RAW) images were
    > captured with a logarithmic scale. Cameras could output 12 bit
    > logarithmic RAW images, which could then be converted with a PS plugin
    > or similar (standard JPEG files would still use the classic gamma
    > transfer function). The logarithmic transfer function would have the
    > benefit of better capturing the range of brightness values in an image.
    > --
    >
    > Alfred Molon
    > ------------------------------
    > http://groups.yahoo.com/group/Olympus_405060/
    > Olympus 5050 resource - http://www.molon.de/5050.html
    > Olympus 5060 resource - http://www.molon.de/5060.html
    JoeT, Mar 4, 2004
    #2
    1. Advertising

  3. Alfred Molon <> wrote in
    news::

    > As far as I know images are A/D converted with a square root shaped
    > transfer functiion.


    The A/D conversion is linear.

    When you convert to 8 bit data you use a gamma function

    value_cooked = 255 * (value_raw^(1/gamma))

    Typical gammas are 1.8 and 2.2 (sRGB).

    > But it would be better if (at least RAW) images were
    > captured with a logarithmic scale.


    A logarithmic scale would be very nice indeed.


    /Roland
    Roland Karlsson, Mar 4, 2004
    #3
  4. Alfred Molon

    Paul H. Guest

    "Alfred Molon" <> wrote in message
    news:...
    > As far as I know images are A/D converted with a square root shaped
    > transfer function. But it would be better if (at least RAW) images were
    > captured with a logarithmic scale. Cameras could output 12 bit
    > logarithmic RAW images, which could then be converted with a PS plugin
    > or similar (standard JPEG files would still use the classic gamma
    > transfer function). The logarithmic transfer function would have the
    > benefit of better capturing the range of brightness values in an image.
    > --
    >
    > Alfred Molon


    The output of the photodiodes comprising the CCD is linear, so why would you
    want an ADC with a square-root or logarithmic transfer function? Far from
    extending the dynamic range, such a scheme would introduce even more
    quantization errors into an already noisy and futzed-up signal, particularly
    so at the low end of the scale.

    I say make the RAW image as "raw" as possible, i.e., a straighforward
    bitwise digital representation of the linear output of the CCD, and let the
    post-camera processor deal with the issue of dynamic range. You can't
    affect the linear character and/or range of the data by simply changing the
    representation of the data in-camera with a logarithmic ADC conversion
    scheme. If you want real improvment, concentrate of extending the width in
    bits of the ADC in the analog front-end ASIC of the digital camera.
    Paul H., Mar 4, 2004
    #4
  5. "Alfred Molon" <> wrote in message
    news:...
    > As far as I know images are A/D converted with a square root shaped
    > transfer function. But it would be better if (at least RAW) images were
    > captured with a logarithmic scale. Cameras could output 12 bit
    > logarithmic RAW images, which could then be converted with a PS plugin
    > or similar (standard JPEG files would still use the classic gamma
    > transfer function). The logarithmic transfer function would have the
    > benefit of better capturing the range of brightness values in an image.
    > --
    >
    > Alfred Molon


    You might need more than 12 bits, though. At least 8 bits for the matissa
    to get sufficient accuracy, plus what dynamic range? Probably 16-bit logs
    would do, 24-bits would almost certainly be fine.

    It has some important implications for the processing as well - all those
    pesky multiplications and divisions get replaced by simple additions and
    subtractions. Of course, add and subtract are now a little more complex.

    Back in the late 1960s a colleague of mine actually built a sound
    processor using log encoded data.

    I think to get the best benefit, though, you would need to replace _all_
    elements in the processing chain, though. No JPEGs or TIFFs!

    Cheers,
    David
    David J Taylor, Mar 4, 2004
    #5
  6. "Paul H." <> wrote in message
    news:...
    >

    []
    > The output of the photodiodes comprising the CCD is linear, so why would

    you
    > want an ADC with a square-root or logarithmic transfer function? Far

    from
    > extending the dynamic range, such a scheme would introduce even more
    > quantization errors into an already noisy and futzed-up signal,

    particularly
    > so at the low end of the scale.


    So to make the most of using logs, you would want a sensor with a log and
    not a linear response. Just think of the dynamic range in the shadows!

    David
    David J Taylor, Mar 4, 2004
    #6
  7. Alfred Molon

    DJ Guest

    David, with respect I think you may be confusing logarthmic response with
    floating point :)

    dj

    On Thu, 04 Mar 2004 20:11:16 GMT, "David J Taylor"
    <-this-bit> wrote:

    >"Alfred Molon" <> wrote in message
    >news:...
    >> As far as I know images are A/D converted with a square root shaped
    >> transfer function. But it would be better if (at least RAW) images were
    >> captured with a logarithmic scale. Cameras could output 12 bit
    >> logarithmic RAW images, which could then be converted with a PS plugin
    >> or similar (standard JPEG files would still use the classic gamma
    >> transfer function). The logarithmic transfer function would have the
    >> benefit of better capturing the range of brightness values in an image.
    >> --
    >>
    >> Alfred Molon

    >
    >You might need more than 12 bits, though. At least 8 bits for the matissa
    >to get sufficient accuracy, plus what dynamic range? Probably 16-bit logs
    >would do, 24-bits would almost certainly be fine.
    >
    >It has some important implications for the processing as well - all those
    >pesky multiplications and divisions get replaced by simple additions and
    >subtractions. Of course, add and subtract are now a little more complex.
    >
    >Back in the late 1960s a colleague of mine actually built a sound
    >processor using log encoded data.
    >
    >I think to get the best benefit, though, you would need to replace _all_
    >elements in the processing chain, though. No JPEGs or TIFFs!
    >
    >Cheers,
    >David
    >
    DJ, Mar 4, 2004
    #7
  8. "DJ" <> wrote in message
    news:...
    > David, with respect I think you may be confusing logarthmic response

    with
    > floating point :)
    >


    Quite possibly, but the question is/was how many bits do you use to
    represent the logs. If you are handling logs, then you are really
    handling floating point numbers but with a different representation.
    Perhaps you could consider the problem as being how to divide your integer
    and fractional part of the log, and how many bits to allow for each. It's
    really the same issue as the number of bits for the exponent and the
    matissa in floating point numbers. Broadly, one determines the dynamic
    range and the other the accuracy. It will depend on the base you choose
    for your logs.

    My argument is that 12 bits would no longer be sufficient for the required
    accuracy (around 1%) and dynamic range (offers open as to what range).

    A secondary thread is whether a sensor can be made with a built-in log
    response.

    Cheers,
    David
    David J Taylor, Mar 5, 2004
    #8
  9. Alfred Molon

    DJ Guest

    On Fri, 05 Mar 2004 10:48:15 GMT, "David J Taylor"
    <-this-bit> wrote:

    >"DJ" <> wrote in message
    >news:...
    >> David, with respect I think you may be confusing logarthmic response

    >with
    >> floating point :)
    >>

    >
    >Quite possibly, but the question is/was how many bits do you use to
    >represent the logs. If you are handling logs, then you are really
    >handling floating point numbers but with a different representation.
    >Perhaps you could consider the problem as being how to divide your integer
    >and fractional part of the log, and how many bits to allow for each. It's
    >really the same issue as the number of bits for the exponent and the
    >matissa in floating point numbers. Broadly, one determines the dynamic
    >range and the other the accuracy. It will depend on the base you choose
    >for your logs.


    A logarithmic representation might be viewed as an extreme form of fp number
    where the mantissa is fixed at unity and the exponent is applied to some fixed
    number, usually neither 2 nor 10. In practice I submit that they work quite
    differently. I have BTW written fp packages for 2 different microprocessors, one
    in ~1973 (PACE processor) and once in 1998 (68HC05).

    >My argument is that 12 bits would no longer be sufficient for the required
    >accuracy (around 1%) and dynamic range (offers open as to what range).


    I once designed a logarithmic light level sensor for room lighting, with a
    digital output. I defined the log sensitivity as 1% percent per bit, i.e. each
    count represented a 1% change in light level.

    In such a system with 1% per step a 12 bit (4096 step) output would give a
    dynamic range of 1.01^4096 = 5E+17, which is huge, way, way more than the S/N
    ratio of the detectors in a camera. A 10 bit converter would give a dynamic
    range of 26,000:1. For a linear converter to handle the same range it would need
    just under 15 bits resolution.

    >A secondary thread is whether a sensor can be made with a built-in log
    >response.


    Interestingly enough, a photo-diode used in photo-voltaic mode rather than
    photo-current mode is inherently logarithmic. The catch is that existing imaging
    devices integrate the photo-current over the duration of the exposure by using
    it to charge a capacitor. The corresponding operation on a photo-voltage would
    be incredibly difficult by comparison.
    DJ, Mar 5, 2004
    #9
  10. "DJ" <> wrote in message
    news:...
    []
    > I once designed a logarithmic light level sensor for room lighting, with

    a
    > digital output. I defined the log sensitivity as 1% percent per bit,

    i.e. each
    > count represented a 1% change in light level.
    >
    > In such a system with 1% per step a 12 bit (4096 step) output would give

    a
    > dynamic range of 1.01^4096 = 5E+17, which is huge, way, way more than

    the S/N
    > ratio of the detectors in a camera. A 10 bit converter would give a

    dynamic
    > range of 26,000:1. For a linear converter to handle the same range it

    would need
    > just under 15 bits resolution.


    Agreed - using the log rather than the floating point representation
    allows this. Thanks for doing the sums!

    >
    > >A secondary thread is whether a sensor can be made with a built-in log
    > >response.

    >
    > Interestingly enough, a photo-diode used in photo-voltaic mode rather

    than
    > photo-current mode is inherently logarithmic. The catch is that existing

    imaging
    > devices integrate the photo-current over the duration of the exposure by

    using
    > it to charge a capacitor. The corresponding operation on a photo-voltage

    would
    > be incredibly difficult by comparison.


    Too much of a sensitivity loss - throwing away that integration!

    Cheers,
    David
    David J Taylor, Mar 5, 2004
    #10
  11. Alfred Molon

    Alfred Molon Guest

    In article <M512c.9282$>, david-
    -this-bit says...

    > > Interestingly enough, a photo-diode used in photo-voltaic mode rather

    > than
    > > photo-current mode is inherently logarithmic. The catch is that existing

    > imaging
    > > devices integrate the photo-current over the duration of the exposure by

    > using
    > > it to charge a capacitor. The corresponding operation on a photo-voltage

    > would
    > > be incredibly difficult by comparison.

    >
    > Too much of a sensitivity loss - throwing away that integration!


    Well, you'd have to integrate a number of measurements over time. Don't
    know how sensitivity would be affected, but such a logarithmic
    photodiode sensor would have a HUGE dynamic range - in the region of 120
    dB (10^6:1 or 1000000:1).
    --

    Alfred Molon
    ------------------------------
    http://groups.yahoo.com/group/Olympus_405060/
    Olympus 5050 resource - http://www.molon.de/5050.html
    Olympus 5060 resource - http://www.molon.de/5060.html
    Alfred Molon, Mar 5, 2004
    #11
  12. Alfred Molon

    John Navas Guest

    [POSTED TO rec.photo.digital - REPLY ON USENET PLEASE]

    In <> on Fri, 05 Mar 2004
    19:30:40 GMT, Alfred Molon <> wrote:

    >In article <M512c.9282$>, david-
    >-this-bit says...
    >
    >> > Interestingly enough, a photo-diode used in photo-voltaic mode rather than
    >> > photo-current mode is inherently logarithmic. The catch is that existing imaging
    >> > devices integrate the photo-current over the duration of the exposure by using
    >> > it to charge a capacitor. The corresponding operation on a photo-voltage would
    >> > be incredibly difficult by comparison.

    >>
    >> Too much of a sensitivity loss - throwing away that integration!

    >
    >Well, you'd have to integrate a number of measurements over time. Don't
    >know how sensitivity would be affected, but such a logarithmic
    >photodiode sensor would have a HUGE dynamic range - in the region of 120
    >dB (10^6:1 or 1000000:1).


    You would still be limited by the fundamental physics of the device. Current
    devices have excellent quantum efficiency, so there's not much room for
    improvement.

    --
    Best regards,
    John Navas
    [PLEASE NOTE: Ads belong *only* in rec.photo.marketplace.digital, as per
    <http://bobatkins.photo.net/info/charter.htm> <http://rpdfaq.50megs.com/>]
    John Navas, Mar 5, 2004
    #12
  13. Alfred Molon

    Alfred Molon Guest

    In article <8952c.6104$>, spamfilter0
    @navasgroup.com says...

    > You would still be limited by the fundamental physics of the device. Current
    > devices have excellent quantum efficiency, so there's not much room for
    > improvement.


    Not so excellent quantum efficiencies - in the region of 20-30% (only
    back illuminated CCDs have QEs of 80-90%).
    But what I'm talking about is the dynamic range, not the quantum
    efficiency.
    --

    Alfred Molon
    ------------------------------
    http://groups.yahoo.com/group/Olympus_405060/
    Olympus 5050 resource - http://www.molon.de/5050.html
    Olympus 5060 resource - http://www.molon.de/5060.html
    Olympus 8080 resource - http://www.molon.de/8080.html
    Alfred Molon, Mar 5, 2004
    #13
  14. Alfred Molon

    Paul H. Guest

    "David J Taylor" <-this-bit> wrote in
    message news:57M1c.8674$...
    > "Paul H." <> wrote in message
    > news:...
    > >

    > []
    > > The output of the photodiodes comprising the CCD is linear, so why would

    > you
    > > want an ADC with a square-root or logarithmic transfer function? Far

    > from
    > > extending the dynamic range, such a scheme would introduce even more
    > > quantization errors into an already noisy and futzed-up signal,

    > particularly
    > > so at the low end of the scale.

    >
    > So to make the most of using logs, you would want a sensor with a log and
    > not a linear response. Just think of the dynamic range in the shadows!
    >
    > David


    Exactly right. A *native* log-response sensor would be the digital
    photographers dream!
    Paul H., Mar 5, 2004
    #14
  15. Alfred Molon

    John Navas Guest

    [POSTED TO rec.photo.digital - REPLY ON USENET PLEASE]

    In <> on Fri, 05 Mar 2004
    20:39:05 GMT, Alfred Molon <> wrote:

    >In article <8952c.6104$>, spamfilter0
    >@navasgroup.com says...
    >
    >> You would still be limited by the fundamental physics of the device. Current
    >> devices have excellent quantum efficiency, so there's not much room for
    >> improvement.

    >
    >Not so excellent quantum efficiencies - in the region of 20-30% (only
    >back illuminated CCDs have QEs of 80-90%).


    Quantum efficiency of current conventional sensors is in the range of 70-90%.

    >But what I'm talking about is the dynamic range, not the quantum
    >efficiency.


    That's limited by practical issues like quantum efficiency.

    --
    Best regards,
    John Navas
    [PLEASE NOTE: Ads belong *only* in rec.photo.marketplace.digital, as per
    <http://bobatkins.photo.net/info/charter.htm> <http://rpdfaq.50megs.com/>]
    John Navas, Mar 5, 2004
    #15
  16. Alfred Molon

    Alfred Molon Guest

    QE of CCDs, was Re: Logarithmic RAW images

    In article <9M62c.6122$>, spamfilter0
    @navasgroup.com says...

    > >Not so excellent quantum efficiencies - in the region of 20-30% (only
    > >back illuminated CCDs have QEs of 80-90%).

    >
    > Quantum efficiency of current conventional sensors is in the range of 70-90%.


    That would be the quantum efficiency of back-illuminated CCDs, i.e. CCDs
    which have been thinned to about 10 micrometers and which are exposed to
    light from the back side.
    Standard CCDs used in digital cameras are not thinned and receive the
    light from the front side (front-illuminated). There the light is
    obstructed by gates and other silicon, which reduce the quantum
    efficiency.

    I did a web search for a page which would clearly explain this and
    found:
    http://www.ccd.com/ccd101.html

    Note that in standard front-illuminated CCDs the quantum efficiency (QE)
    varies between a 5% and 40% in the 400-700 nm range of visible light. QE
    is much higher for back-illuminated devices and varies between 65-85% in
    the 400-700 nm range.
    --

    Alfred Molon
    ------------------------------
    http://groups.yahoo.com/group/Olympus_405060/
    Olympus 5050 resource - http://www.molon.de/5050.html
    Olympus 5060 resource - http://www.molon.de/5060.html
    Olympus 8080 resource - http://www.molon.de/8080.html
    Alfred Molon, Mar 7, 2004
    #16
  17. Alfred Molon

    John Navas Guest

    Re: QE of CCDs, was Re: Logarithmic RAW images

    [POSTED TO rec.photo.digital - REPLY ON USENET PLEASE]

    In <> on Sun, 07 Mar 2004
    10:00:42 GMT, Alfred Molon <> wrote:

    >In article <9M62c.6122$>, spamfilter0
    >@navasgroup.com says...
    >
    >> >Not so excellent quantum efficiencies - in the region of 20-30% (only
    >> >back illuminated CCDs have QEs of 80-90%).

    >>
    >> Quantum efficiency of current conventional sensors is in the range of 70-90%.

    >
    >That would be the quantum efficiency of back-illuminated CCDs, i.e. CCDs
    >which have been thinned to about 10 micrometers and which are exposed to
    >light from the back side.
    >Standard CCDs used in digital cameras are not thinned and receive the
    >light from the front side (front-illuminated). There the light is
    >obstructed by gates and other silicon, which reduce the quantum
    >efficiency.
    >
    >I did a web search for a page which would clearly explain this and
    >found:
    >http://www.ccd.com/ccd101.html
    >
    >Note that in standard front-illuminated CCDs the quantum efficiency (QE)
    >varies between a 5% and 40% in the 400-700 nm range of visible light. QE
    >is much higher for back-illuminated devices and varies between 65-85% in
    >the 400-700 nm range.


    See <http://space.mit.edu/ACIS/cal_report/node83.html> and
    <http://www.src.le.ac.uk/instrumentation/solid_state/ccd/efficiency.html>,
    which support what I wrote.

    See also "CCDs Promise 85 Percent Peak Quantum Efficiency"
    <http://www.photonics.com/spectra/minimag/XQ/ASP/minimagid.123/QX/read.htm>:

    "... peak quantum efficiency reaches 85 percent for full-frame,
    front-illuminated CCD imagers that combine an ITO gate material with
    microlens technology ..."

    --
    Best regards,
    John Navas
    [PLEASE NOTE: Ads belong *only* in rec.photo.marketplace.digital, as per
    <http://bobatkins.photo.net/info/charter.htm> <http://rpdfaq.50megs.com/>]
    John Navas, Mar 7, 2004
    #17
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jonathan

    logarithmic cameras (SLR or otherwise)

    jonathan, Dec 15, 2003, in forum: Digital Photography
    Replies:
    6
    Views:
    918
    jonathan
    Dec 30, 2003
  2. Editor  www.nutritionsoftware.org

    How raw is RAW format?

    Editor www.nutritionsoftware.org, Dec 21, 2003, in forum: Digital Photography
    Replies:
    4
    Views:
    555
    David Dyer-Bennet
    Dec 22, 2003
  3. Vlad Gunko

    Adobe PS RAW convertor vs Nikon RAW convertor

    Vlad Gunko, Jan 25, 2005, in forum: Digital Photography
    Replies:
    8
    Views:
    462
    Brian C. Baird
    Jan 25, 2005
  4. Alan Browne

    [Maxxum 7D] Dimage RAW Viewer v. Adobe Raw Plugin

    Alan Browne, Mar 9, 2005, in forum: Digital Photography
    Replies:
    3
    Views:
    425
    papaboop
    Mar 12, 2005
  5. greymfm

    RAW Viewer for wide range of RAW formats

    greymfm, Jun 14, 2006, in forum: Digital Photography
    Replies:
    0
    Views:
    370
    greymfm
    Jun 14, 2006
Loading...

Share This Page