-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raw over exposed indication broken #12193
Comments
Indeed, looks strange ! |
I think this just wrong white point setting so probably no bug. Arw files are notorious for that... |
Additional comment: The raw files include a 'white-point' defining the maximum processed value. That value is read from exif data by the rawspeed decoders. If that value is wrong, clipped data are not calculated as clipped so the clipped visualizing is wrong. That's exactly what you see here, so for me not a bug in the mentioned part of the code. It might be reported as a rawspeed bug or as only some cameras / images are affected a sony firmware problem. (Sony raw are notorious for that, it also leads to problems handling highlights btw) |
@jenshannoschwalm
The white point in the cameras.xml/that dt uses is 16383. |
That exactly is the problem.! |
So - why not "dig into this" deeper and try to fix it. I have not seen pr's by you so far but this might be a starting point to contribute to the dt project :-) And - it would help many Sony users :-) |
I am. I try to figure out how to make sure the proprietary values parsed by exiftools are reliable enough to fix it that way in rawspeed. @TurboGit You want to close this issue? (Because you added it to the milestone) |
A quick reminder, we will need to take care of old edits somehow. That might be a bit tricky as we have to make dt aware of other coeffs here. Don't know how to make sure about this but we will find a way :-) |
isn't whitelevel saved in rawprepare iop params for old edits? |
I hoped that dt would keep the settings of the raw b/wp module and sets the value only on import or history reset. I skimmed over some issues from rawspeed and some code from other raw software. I think one needs to inspect a variety of raw files shot with different settings first. It smells like there are more factors than just ISO that influence the black and white points. E.g. as I mentioned in chat the other day, the A6400 likes to switch between 12 and 14 bit with different settings. |
Yes, you're right @parafin those are saved so we can safely change the value which will be used for new edits or if the history stack is reset. |
Not sure to understand. I did add a milestone to have a target release for the fix. The issue will be closed only if we decide to take no action or if a fix is merged. |
@TurboGit @aurelienpierre and others. https://discuss.pixls.us/t/highlight-reconstruction-darktable-vs-rawtherapee/31790/7 I think this is an issue we have to fix asap. can this be related to moving away from adobe coeffs? EDIT: a first lookup shows colordata.cpp to contain a maximum value (whitepoint?) If we use that data, are we sure that rawprepare takes parameters in the same way as rawprepare uses them? |
Maybe change the issue title to get more attention? |
I further checked the mentioned cr2 file and also here the whitepoint is simply wrong.
|
The uploaded Sony raw contains two different White Level tags :
Using the value from the MakerNotes in raw black/white point the indicator is working as expected.
Edit: I checked a complete folder (129 images) of ARW files from my old Sony SLT-A77. For all files dt used a white point of 16596 in raw black/white point while the value reported by |
I tested a NEF image with dt 3.4 & 4.0 : An indeed I don't have the exact same area displayed. So something has changed, maybe the move to rawspeed adobe coefs indeed. EDIT: 4.0 with 60a65ac reverted: (close to what we had in 3.4). |
Indeed. I compared a bunch of ARWs from my 6400. In 14bit mode 0xC61D is always 16383 (14bit int max), but in 12bit mode it's always 16380. Anyway, the Sony specific value in 0x787F is always 15360, even in high ISO modes. For the moment 15360 looks more correct than maxint. But I don't know how to proof this is the absolute correct white level to use. Other findings: The black level switches from 512 to 2048 (all four) on ISO 64000 and above. Though "64000" is read from exif data and not the actual camera setting. |
I'm not sure about this, my understanding is that would have also made a visible change on images. This has happened for some cameras (very limited number as far as I know) where there was discrepancies between the old coefs recorded in dt and the ones now used from rawprepare. |
Just some random thoughts from a non-coder... I learned, the wrong whitepoint is set already since long time, just the effect is more clearly visible recently. Can that be due to so "door openings" during libraw integration? This thought wouldn't finally solve the correct pick up, but maybe helps something for analysis or comprehensive understanding? |
I don't think so since the API for this library is only called when no rawspeed support is found for a specific image format. You can check which module to load the RAW has been used by looking at the |
I checked a bit further.
Questions for me now:
|
That's what @jandren changed and i think that's correct. The visualizing is not the issue for me ... |
I'm not saying that it is not correct, just that it may explain the difference we see between 3.8 & 4.0. |
4.0 with 60a65ac reverted: (close to what we had in 3.4). |
And the OP picture with 60a65ac reverted: |
That would be an issue for Rawspeed, to read exif white if any. Hacking it in rawprepare.c is a nasty workaround. |
Yes, unfortunately we just have a wrong whitepoint for such images. |
I looked up exiv2 code and unfortunately there a no whitepoint tags in makernotes implemented (so far) so rawspeed can't do anything here too. Probably it can be done via exiftool & lua. |
rawspeed itself doesn’t use exiv2, does it? It parses necessary tags itself I think. |
No it doesn't, but it uses tags "known" being safe thus in exiv2 i guess. |
Yes @TurboGit the changes I introduced will make the issue with an incorrect white point surface. The reason is simple. We previously multiplied the channels with the white balance values before checking for clipping. The constants were generally >1 and thus pushed these (and unclipped) pixels above the threshold. |
DT4.0 Windows. |
@andrewk8 it was me pointing you here. When you read above, the wrong whitepoint isn't picked up by dt, but by the independent library called rawspeed. Hence invalid, as it is not a dt bug. Whether an upstream issue has been opened, I donno... |
Do I understand this right, that this rawspeed-PR is related? |
Is this really two different issues that need to be split?
|
Tools like Rawtherapee fix this by having a big json file with all supported cameras, and their black- and white-levels depending on camera-model and ISO (camconst.json). But there might be more variables that determine black/white levels. For my Sony a7-m2, I just have a preset now that auto-applies to set the white-level to 15360. And in a whole folder of images, I often do a quick exiftool check to see if there are any files NOT having 15360. But I hardly see them (and I hardly change shooting modes on my camera, so that might be related 😉 ). But when toying around and/or helping with playraw files over at discuss.pixls.us, the first thing I do is always compare the (specular) white-level reported by exiftool vs what Darktable has set by default, because that very often fixes problems people are having with 'recovering highlights' in more modern Canons (and older Sony's). |
Rawspeed does not use exiv2.
For "more modern" Canons (I'm assuming we're talking exclusively CR3 output here), dt uses LibRaw instead of rawspeed, so we should check if specular white is available for those only. (LibRaw also parses metadata on its own.) Edit: For CR3s, we already try to get to correct specular white as provided by LibRaw? If not correct, please suggest a fix. |
No, it's also there in CR2s. For instance, the 5D Mark IV. Older canons in my book are mostly from the 5D Mark3 and before era, where Canon uses a different AD-converter step outside the sensor (causing their notorious read-noise reputation). To be honest, I don't even know if the problem is 'only' on 'modern' Canons. That are all just my words. |
Probably you are right. We just got aware of this issue because we have two recent algos for highlights and the new algo to show data above clip. |
This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue. |
This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed. |
Describe the bug/issue
The raw over exposed indication with its default settings does not mark the whole areas that are over exposed but its edges only.
To Reproduce
See sample zipped arw file.
nosky.zip
Screenshot with default settings
Expected behavior
Screenshot with threshold 0.99
Which commit introduced the error
I saw it with 4.0 release first.
Platform
The text was updated successfully, but these errors were encountered: