Add new comment

Generic white-balance and color correction when dcraw_process()

I am creating a post-processing pipeline that will deal with a large variety of cameras (makes, models, lenses etc...)

All Formats supported by libraw will likely be encountered at some point.

All of the images will, at some point, call dcraw_process().

But, during testing, i have observed that some images tend to come out "dark", and some have "not ideal" white-balancing.

In search for a comparison, i looked at the images using FastRawViewer and they look EXCELLENT there!

Knowing that FastRawViewer uses Libraw also, i was wondering what could i tweak in order to achieve "universal" good post-processed images (i wouldn't go so far as to try and achieve Excellent outcomes)?

Simply put: i want to show the images as close as possible to how FastRawViewer shows them...

My flow is simple:
libraw->open_file();
libraw->imgdata.params.output_bps = 8;

// camera_wb sometimes give better results than auto, but auto is better in majority of cases
// this is something i would like to maybe automate to get better results from
libraw->imgdata.params.use_auto_wb = 1;
libraw->imgdata.params.use_camera_wb = 0;

libraw->unpack();
libraw->dcraw_process();

// jpeg extraction from here...

Here is one example ( i could find more if needed ):
Raw image: https://drive.google.com/file/d/1rRvgW_CP2YPiNnnCII7ftQlNx58vhlNp/view?u...
processed jpeg: https://drive.google.com/file/d/1oM-XKrdnVLPjU9Y2s__n0IwC_Qsh-Yu5/view?u...

Forums: