Recent comments

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

Final followup: you probably need to turn off auto-maximum detection via dcraw_emu -c 0

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

You probably need to either use unprocessed raw values or program your own (simple) postprocessing.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

Please define "linear behaviour" and maybe demonstrate with numbers over a grey step wedge what you mean.

DNGs don't have brightness. First, brightness isn't an attribute of a digital image; second, there is no such thing as standard calibration for raw.

This needs to be said, sorry.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

I see, thanks. As I said though, gamma is not really a problem. Even if I set gamma to 1 I do not see the linear behaviour that I'd like to get (https://imgur.com/a/a1C3cfV for just a few images), while I do get it with the DNG SDK and unprocessed_raw.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

Left to right:
dcraw_emu 00.dng
dcraw_emu -W 00.dng
dcraw_emu -W -g 1 0 00.dng
https://www.dropbox.com/s/texnp4rxpwgh8i0/Screenshot%202023-01-05%201908...

If TIFF output used for -g.... one may be fooled by TIFF viewer if the viewer is ICC-aware

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

1) when using dcraw_emu, -g 1 0 doesn't seem to have an effect on top of -W. I actually don't have a problem with having a non-unitary gamma, as long as it is the same on all images. I can compensate for that later in the processing.

2) White Balance is not really a problem neither, I have a neutral area in the target I'm imaging and I will in any case perform white balance using that.

3) I did look at unprocessed_raw and it does give a linear output. However, it returns images before demosaicing, which I'd prefer not to have to code in myself, since I'd assume libRAW has significantly better functionality for this than I can code. I'd rather invest time into trying to get linear output from built-in functionality than having to code demosaicing.

So, what I'd like to find out is if there is something we can do to get rid of that extra processing that happens in dcraw_emu -W, but without going as far back as unprocessed_raw.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

Also, your 'tif' files are not white-balanced, probably you may want to set custom 'Uni-WB' white balance.

Also, if you want to get unscaled/unaltered data extracted: take a look for unprocessed_raw and/or 4channels LibRaw samples.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

>> for half the exposure time I get half the pixel value

If you need 'linear output' you probably may want to set output gamma to 1.0

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

You can find an example dataset here https://drive.google.com/drive/folders/1X4Cqj-hhLXOktWsfFN4e2yfWWZI5BGHK...

There you can find
1) DNG images from the camera
2) JPG images automatically generated by the camera (I use those to get exposure times from EXIF data)
3) TIF images obtained using the stage3 output of the Adobe DNG SDK
4) PPM images obtained using dcraw_emu.exe -W (which should be equivalent to what described in this comment https://www.libraw.org/comment/6511#comment-6511)

I like the TIF images because for half the exposure time I get half the pixel value, across the exposure range. The PPM images are not predictable, which implies that some extra processing is happening. Please see the original attachment for a plot of image average (across all pixels, all channels) VS exposure time.

Reply to: preserving DNG brightness on conversion to RGB   3 weeks 6 days ago

Sorry, I didn’t realize right away that I was already talking with two people.

Could you please formulate your problem not referring to the 'OP'. Also, it would be great to have RAW file(s) in question еo discuss something in specific detail and not in the abstract.

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 1 hour ago

Original post, here https://www.libraw.org/node/2740
He uses -W which is no_auto_bright but has that issue

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 1 hour ago

Sorry, what is 'OP' ?

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 2 hours ago

This creates images like in the OP, with unpredictable gamma.

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 3 hours ago

Yes, this should(*) turn off auto-ETTR/auto-scaling, so this will result into dark(er) images.

(*) we're not responsible for AndroidLibRaw so not absolutely sure set....() calls works as expected.

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 3 hours ago

I use the unofficial Android port https://github.com/dburckh/AndroidLibRaw

openBuffer(bytes, bytes.size)
setAutoBrightness(false)
setAutoScale(false)
decodeBitmap(BitmapFactory.Options())

which should apply the options:
no_auto_bright = true
no_auto_scale = true

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 1 day ago

Could you please clarify: you use LibRaw library from your application, or some LibRaw sample programs 'as is' (as a command-line utility)

Reply to: preserving DNG brightness on conversion to RGB   4 weeks 1 day ago

I'm also struggling with this. Can you point out which command do I need to use to turn it off?

Reply to: Get a proper 0.21.0 tag in GitHub?   1 month 1 week ago

It was tagged while creating release files downloads for this site, export script works on tags.

Github release was created on your request

Reply to: Get a proper 0.21.0 tag in GitHub?   1 month 1 week ago

Great, thank you. It looks like you tagged it earlier today. I use the cmake repo for building so the missing configure is not a big deal.

Reply to: Get a proper 0.21.0 tag in GitHub?   1 month 1 week ago

Already tagged: https://github.com/LibRaw/LibRaw/tree/0.21.0

Official release is available via this site download section: https://www.libraw.org/download

Github release has been created too: https://github.com/LibRaw/LibRaw/releases/tag/0.21.0
(although github release does not contain generated ./configure script)

Reply to: preserving DNG brightness on conversion to RGB   1 month 2 weeks ago

Auto-ETTR is performed on output stage, while converting from linear internal representation to gamma-corrected output in LibRaw::write_tiff_ppm or LibRaw::copy_mem_image

Reply to: preserving DNG brightness on conversion to RGB   1 month 2 weeks ago

Thanks. I tried different combinations of the options in the list you linked, but no luck.
Can you point me to where I can access settings for Auto-ETTR in the source code?

Reply to: Color Information - Documentation   1 month 2 weeks ago

rgb_cam is used to construct camera to output RGB matrix: https://github.com/LibRaw/LibRaw/blob/master/src/postprocessing/postproc...

Cmatrix is the same, it may be copied to rgb_cam if corresponding params option is set and the matrix is not empty: https://github.com/LibRaw/LibRaw/blob/master/src/metadata/identify.cpp#L...

Reply to: dcraw_emu fails with OM-1   1 month 2 weeks ago

Spot on! 0-21 works perfectly.
Thanks!

Reply to: dcraw_emu fails with OM-1   1 month 2 weeks ago

Could you use a more recent LibRaw version?

https://www.libraw.org/news/libraw-0-21

Pages