I'm trying to use libRAW to convert some DNG files into a format readable from Matlab.
I take a number of images with specific exposure times and I need the conversion from DNG to any RGB format to preserve the relative luminosity of the images.
If I do the conversion using the Adobe DNG SDK it works well (I use stage 3 of the conversion, before auto-exposure and other processing).
If I use DCraw_emu from the libRAW Windows binaries, I see that the relative brightness of the images is altered.
I attach a plot of the average pixel value for both the cases. You can see that the SDK gives me a linear average value VS exposure time, as I expect, while libRAW does something to the images. I don't mind if the converted images have a gamma/black level applied to them, but nothing else, and they need to sit on a smooth curve.
For libRAW I run
dcraw_emu -W INPUT