Bug 211625 - Converting bulb RAW image produces unusable results
Summary: Converting bulb RAW image produces unusable results
Status: RESOLVED NOT A BUG
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-RAW (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-24 10:52 UTC by Simon
Modified: 2017-07-31 15:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2009-10-24 10:52:14 UTC
Version:           1.0.0-beta6 (rev.: 1035699) (using 4.3.2 (KDE 4.3.2), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.31-4.slh.1-sidux-686

Just take a look. Totally unusable.

Original NEF file from Nikon D90
http://granjow.net/uploads/temp/DSC_1165.NEF

JPG converted with digikam
http://granjow.net/uploads/temp/DSC_1165digikam.jpeg

JPG converted with Nikon ViewNX 1.4
http://granjow.net/uploads/temp/DSC_1165nikon.JPG

Default settings. I did not mess up any curve or so in digikam.
Comment 1 Johannes Wienke 2009-10-24 11:54:10 UTC
What you see is the auto exposure feature. As a default this is switched on when importing raw files. Try to switch it off and have a look at the converted photo once again, please
Comment 2 Simon 2009-10-24 11:58:40 UTC
Yes, thank you! I just found it too this very moment.
http://granjow.net/uploads/temp/DSC_1165b.jpeg

I wonder whether one could make digikam clever enough to warn the user when auto exposure might fail.
Comment 3 Johannes Wienke 2009-10-24 12:24:04 UTC
But how would you define "fail"? The image was exposed but to your mind a bit to much. ;)
Comment 4 caulier.gilles 2009-10-24 12:28:21 UTC
You just to know how RAW Import tool work.

Anyway, RAW files always needs post processing jobs... It's not JPEG...

Gilles Caulier
Comment 5 Simon 2009-10-24 12:57:50 UTC
Johannes, by fail I mean that there is so much noise that it hurts my eyes and, even more important, that the Moon is just some white undefinable white ugly stain.
Should the Auto Exposure tool be allowed to make grey areas (Cirrostratus clouds around the Moon) blank white? Imho no. If it does, it failed.
I was additionally astonished to see this result whileas the preview image looks perfect.

Gilles, Yes, I know. Not every detail, but I basically know how RAW works. But this overcorrection is kind of unexpected behaviour and I didn't assume the Auto Exposure checkbox being guilty. Or perhaps I just didn't notice this button before.

So ... what about disallowing the Auto Exposure tool to fail? :)
Comment 6 Johannes Wienke 2009-10-24 13:06:19 UTC
For the preview image normally an embedded jpeg in the raw file is used, that was directly produced by the camera.

The auto exposure uses an algorithm that should work fine for normal landscape scenes and so on but not for corner cases like your image with one really predominant color. We (or the exiv2 developers) could spend a lot of time to develop a heuristic that works good on those images or... you could simply turn that feature off once and afterwards this setting is always restored so you will never have to worry about this again ;)

Somewhere else was already a discussion if the auto exposure should be a default setting or not. Maybe we could think about this once more.
Comment 7 Simon 2009-10-24 13:47:17 UTC
Yes, perhaps. 

Although imho it would not be that hard to get it working correctly in this case too. Isn't it as simple as that? If a higher exposure makes some percentage (or number) of pixels #fff (white) then it is too much. This should also hold for landscape pictures. 

I'm not sure whether in this case digikam is using the embedded image. I've got a full-size picture there, as far as I can see (12 MP). Does Nikon embed a full size JPG?
Comment 8 Johannes Wienke 2009-10-24 13:55:01 UTC
No, it's not that simple. For photos of landscape you have no problems with some white pixels in clouds or if you took an image with backlight and want the foreground to be visible and so on.

I don't have a Nikon, but eg. my Olympus camera includes an image with something about 1400px on the longer side inside the raw file. You can decide wether the digikam preview should use this included image somewhere in the album view settings.
Comment 9 Simon 2009-10-24 14:01:44 UTC
Oh, I see.
So then, perhaps, if 90 % of the image is dark, it likely isn't a landscape pic.

If it is really too hard because images differ that much it perhaps would be best to either switch the Auto Exposure off, as you suggested, or place an info message somewhere if AE is on and some parts of the image became #fff.

«Embedded preview loads full-sized image»? Enabled, makes no difference.
Comment 10 Johannes Wienke 2009-10-24 14:05:04 UTC
For this purpose there is an overexpose indicator. Unfortunately it's not working while raw development. I think we need to fix this.

It should make a difference if you use the simple image preview, not in the editor. Or maybe NEFs don't have an embedded preview? I don't know that.

Gilles, do you have an idea about this?
Comment 11 caulier.gilles 2009-10-24 14:16:30 UTC
Preview is... preview, no more. Press F4 and you will see JPEG preview embedded in NEF. Yes Nikon Embedded JPEG preview (more than one depending of NEF version, but not the full image size i think)

All RAW files format use this technic to be able to display RAW on TV or on camera screen without to demosaicing image data !

Raw import tool do not use this technic. It run on real RAW image data, not on JPEG embedded image to display preview in this tool. In fact, Raw import will always display Raw demosaicing result (worked to a 1/4 size of Raw image size - feature from libraw)

Note : Exiv2 is not used there, but libraw...
Comment 12 Johannes Wienke 2009-10-24 14:19:13 UTC
(In reply to comment #11)
> Note : Exiv2 is not used there, but libraw...

Eh sure...