QUOTE (Jonathan Wienke @ Jul 7 2007, 10:48 AM)
If the Bayer interpolation routine was modified so that it took all source images into account simultaneously, slight mis-registration would actually be an advantage, because there would be more than one color channel at each output pixel site. Imagine that when shooting, the +3 exposure was shifted 1 pixel vertically relative to the 0 exposure, and the -3 exposure was shifted 1 pixel horizontally relative to the 0 exposure. After registering the RAW data, the Bayer interpolation now has 2 color channels per pixel to use, either red and green, or green and blue. The exposure scaling would have to be accounted for, but increased color accuracy could be achieved. Some medium format digital backs do this (but not at different exposure levels) to improve color accuracy; 3 exposures are taken, whith the sensor being moved 1 pixel vertically or horizontally between frames.
You can download the complete DNG specification from a link at the bottom of
this page.
Edit: The Bayer interpolation modification wouldn't really be necessary, the color accuracy improvement happens already when the different exposures are blended together. Never mind.
The program I already posted blends the images prior to any gamma correction, as DCRAW is a linear RAW converter (if used in -4 mode, and I did). The improvement of this new DCRAW version is that the blending is applied even before the white balance, which improves even more the accuracy of the threshold set and in addition to this saves some RAW developings. We can say it's more elegant.
This is a comparision between the results of:
1. My previous program and a conservative threshold decision value: still noise on some areas (wall).
2. My previous program and an agressive threshold decision value: noise is almost gone but incorrect colour pixels appear (couch).
3. Modified DCRAW with a conservative threshold decision value: noise is almost gone and more regularly spreaded, and no colour artifacts.
We don't sell software. All we do if for free and for fun. It's not likely that we will achieve the DNG output as it's an effort beyond our intentions, and we love DCRAW! so we trust it. DCRAW is a really VERY good RAW developer itself. But I will check your links to find out, thank you.
"1. The highlights would need to be set so that the brightest value in the darkest image is scaled automatically to the maximum usable value in the output file without clipping."
This requirement would be fine in theory. In practice it is not so much, and the reason is that the least exposed imaged provided to the program is taken as a reference for the output. The improvement of scaling it so it fits the maximum (65535 level) is not worth as almost ALL valid images have some pixels close to blow or directly burnt (this is the usual case). You can use this program of mine:
Histogrammar that plots 16-bit histograms to check this by yourself on any of your images. If you wait a couple of days, I have developed a new version of Histogrammar which reads directly image files (the one currently in the link needs some mess with a PS plugin and translates the image into a text file. horrible but I didn't have the libraries needed to read 16-bit images) and even plots logaritmic histograms like the one I showed before.
However we will introduce an exposure correction parameter into this DCRAW, so that: dcraw -X 4.0 ... *.cr2 for instance will correct by 2 f-stops up (2^2=4.0) the resulting image avoiding level agregation and mathematical rounding errors if that would be done afterwards.
Moreover the white balance can be very agressive. A scaling of more than one complete f-stop in some channel is very usual and this burns pixels; but few of them. So it is strange to find an image that can strictly be exposed up as most of them have something burnt (and if they don't have, is because were heavily underexposed).
The important thing is to have a good exposure gap between the least and the most exposed images. This really fulls with detail all the shadows thanks to the 12-bit to 16-bit conversion. These images can handle really severe toning curves before showing any banding or posterization.
Our program calculates itself the relative exposures between images without looking at the metadata; and handles N images with N from 2 to what your memory can store, taking always for each individual pixel the best possible value from the whole set of images provided. In fact, this relative exposure calculation is more accurate than using the EV values set in the camera since lighting conditions could vary slightly during the shots (for instance a cloud passing by).
Thanks for taking your time, we will let you know when this DCRAW is ready.