I am processing RAW images (.nef) from a Nikon camera. If I process these images in Adobe Lightroom I can adjust the highlights and shadows to avoid clipping any data. Histogram looks like this.
Values appear to be clipped at both ends of the histogram. Applying ImageAdjust does not recover the data at the ends. It appears that importing a RAW file clips the data during the import process. The result is much like the defaults in Lightroom before adjusting the highlight and shadow sliders.
How can I import RAW images and get all the data without clipping?
So, what was the source of the problem? Was is too rough default binning by ImageHistogram (default is 128 bins)?
Apparently imported image contains no out-of range values:
ImageData[img] // MinMax
(* => {0., 1.} *)
But a naive attempt to obtain it directly from the "Data" element by applying Rescale to each color channel separately produces a slightly different image: