I use ImageMagick for touching up digital photos.  I've noticed a
couple of problems when brightening up underexposed images...
  1) colours change
  2) really dim images end up as black-and-white when brightened

  I did some thinking about this, and I believe I know the root cause of
the problem.  The problem is that with my current algorithms, the R and
G and B colour channels are brightened *INDEPENDANTLY OF EACH OTHER*.
E.g.  if a pixel is 0xffa060 (Q8), the red channel won't get brightened,
but the green and blue will.  This will obviously change the colour.
And since dimmer channels will tend to "catch-up" to brighter channels,
the final result will be closer to monochrome than the original.  In the
extreme case, you end up with something resembling a black-and-white
photo.

  The obvious solution is to brighten all 3 channels by the same ratio.
In order to avoid "blown highlights", I suggest the following
meta-algorithm on top of whatever brightening algorithm is used...

  - find the brightest of the 3 colour channels
  - calculate the percentage brightening that your algorithm would use
    for the brightest channel
  - apply that same percentage brightening to all 3 channels

  Is there a quick way of doing this, or are we looking at an extremely
ugly f(x) expression?

-- 
Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to