Greg Troxel schreef:
<snip>
Anyway, to me it seems, by default we should try to emulate to
manufacturers gamma/linearity as closely as possible.
I think this means using linear profiles and avoiding the whole issue of
ufraw converting into faux sRGB.
This is all far more relevant with a color matrix, which maps the camera
RGB to the sRGB primaries, but the 9 value of the matrix don't address
or affect gamma/linearity at all. The entire notion that the color
matrix is a reasonable approximation to a profile is based on the sensor
being linear and thus gamma 1. Alternatively, since color matrices can
only represent profiles which do not depend on input level, they only
make sense with linear sensors.
Greg, I fully agree.
1. The most likely assumption one can make is that the sensor is linear.
Lots of processing is assuming this and apart from some boundary
conditions the assumption should hold.
If not, chances that it is gamma-like behaving are low anyway.
So the correct thing of doing is mapping camera RGB primaries to sRGB
(or any other working space) primaries.
This can be done with the color matrices (or profiles for that very same
purpose).
2. The resulting image is not looking good though ('foggy') . Granted.
I doubt if there's no blackpoint issue involved, but didn't explore that
path yet.
The general approach taken to improve the image is by doing some
contrast enhancement, and that's where the gamma comes in.
But another contrast enhancement (for instance based on sigmoidal) would
do probably equally well.
Before going back to the gamma function I make a detour to dcraw (still
delivering very fine pictures !).
3. In dcraw everything is linear, based on the matrices. Until the
moment the file is written and where something interesting occurs.
At writing out BT709 gamma is used, rather than sRGB. However, viewers
simply do not take into account BT709 gamma , but sRGB.
So in effect, there's an contrast enhancement based on the difference
between BT709 and sRGB. That's why dcraw looks good.
(alternatively you can have dcraw apply sRGB but then you have the same
'problem' as described : foggy).
4. So I believe to have things 'correct' and nice looking , one should
use the profiles without any gamma (just as a primaries mapping device)
and later on apply some contrast enhancement.
A weird gamma like function based on the diff between sRGB and BT709
would give results as dcraw.
Another weird one based on the diff between ufraw gamma and sRGB would
give results as ufraw.
But probably we shouldn't confine to weird ones. More 'standard'
contrast enhancers would do also at that stage.
A more deep explanation (from my perspective) and a reference
implementation you can play around with could be found on
http://dlraw.sourceforge.net/Processing.shtml
Jos
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
ufraw-devel mailing list
ufraw-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-devel