-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Canon EOS D60 files are extremely green #9285
Comments
I've checked with sample file available on raw.pixls.us - https://raw.pixls.us/getfile.php/2010/nice/Canon%20-%20EOS%20D60%20-%20RAW%20(3:2).CRW and it doesn't exhibit same problems as your files. for some reason your files read "as shot" wb coefficients as 1,1,1 which is kinda bonkers. sample file on raw.pixls.us has 2.624,1,1.098 wb coeffs for "as shot"... I wonder what's more different about your shots than the sample on raw.pixls.us... Enabling camera reference (d65) mode + color calibration also causes same problem: green everything. but if you choose wb out of say white walls on the house it figures out correct. So there IS a workaround in darktable itself... |
I guess a wrong whitebalance field is being read for some reason. |
Perhaps it might in that photo, but it doesn't really. The dark tones are still heavily shifted green, even after adjusting the white balance. I should look for another photo which shows this more prominently. I've been setting white balance and adjusting things with color balance to try to overcome it, but it doesn't really work. An interesting thing is that other raw converters handle the files from my old D60 correctly. (But I don't want to use other raw convertors... I ❤️ darktable and want to use it for all my cameras.) |
OK, then we need couple CC0 samples from D60 that exhibit the issue and figure out why the sample from RPU doesn't exhibit the problem :) |
I looked quickly for an underexposed raw file and a better exposed one and found these two. Try changing the white balance on the underexposed one. It's still sorely green, and a raw file that's underexposed like that should be salvageable. The other, more properly exposed file is mostly OK, especially after a white balance adjustment. (It still has some issues, but it's subtle.) License: CC0 for these raw files as well as the ones above. Here's what the underexposed file looks like with defaults: I did use the D60 to take a picture of my ColorChecker Passport when I first got one, but I didn't know what I was doing with it so much and also converted it as a DNG (and don't have the CRW, at least easily available... if it still exsits), so it's probably not useful. I'll look for more examples. |
This penguins photo is in daylight and largely monochromatic. While penguins aren't pure black and white, they're close enough. It's exposed about right and adjusting the balance gets it 90% of the way there in this photo. But it's still not right. darktable default: darktable white balance only (look at the waveform in the right on the bottom and how the red channel isn't aligned properly): darktable, with color balance tweaked, with highlights, dark tones, mid tones all selected from the penguins (again, look at the waveform in the top right and compare to the previous waveform): RawTherapee defaults for comparison (it's a bit darker than darktable, but the color is right from the beginning): THM sidecar JPEG: Penguins raw file with XMP and THM sidecars. Two XMP files are included; one for the default, the other with the modification, including the tweaked color balance module: |
Here a few more examples, including one underexposed with blown highlights (and the silver should be mainly neutral, which it isn't after a white balance), one with a grey card in the shade in a forest, and two flowers where the one with a bee is wrong, but somehow, the one by itself (CRW_7289) seems fine with the defaults. Same camera for all. Preview: Files: Again, I'm licensing all of these under CC0. Whichever ones you think are most useful, we can upload to the raw db. |
I ran I'm assuming that the example in the DB (the first one in this list) is in daylight. Most of mine are in normal daylight too, although some are in the shade. Shouldn't the multipliers be similar? Could it be that different D60 cameras reported different multipliers? Is it possible that the multipliers are user-set? And perhaps darktable is or isn't taking these into account, but other raw editors are... or aren't? Here's the list (daylight is the same for all, but the camera multipliers are different):
|
I think we already have the underlying problem, as @johnny-bit mentioned, the coefficients should not be 1,1,1 ! So either the decoder reads wrong numbers or the file is wrong. Could it be, you used other software on those files, that might write a modified raw file? On the phone so I can't test myself but does exiftool give any hint here? |
Exiftool output differs - the sample from raw.pixls.us HAS for example here's one of garett's images:
and here's RPU sample:
|
So I guess we know why it's greenish. Maybe there was a camera firmware change later that includes that data? Or exiftool or other software had been used wrongfully writing crap? I did that a long time ago on some images. We could ensure data via adobe-coeffs I guess. You can assign me for 3.8 as there is more stuff for that with dng files pending if you want. |
The firmware is the same - 1.0.4. |
Same with my D30 #7366 and if I remember it right, also with my D60. I can take Auto, Daylight, Shade, Cloudy, Tungsten, Fluorescent and Flash with a Spydercheckr and D60 if you want. |
@jenshannoschwalm, @johnny-bit: Thank you both so much for looking into this (and for everything you both do in darktable)! @PeterWem: (an aside) Oh? You have a D60 still? Awesome! Would you mind making a noise profile too? https://pixls.us/articles/how-to-create-camera-noise-profiles-for-darktable/ |
If I remember it right I never succeded to take the noise profile samples for D30 and D60. I couldn't clip all channels in the highlights no matter what (or darktable never showed that all channels were clipped). Especially at higher ISO. I will check again next week and create a new issue. |
Don't do noise profiles until the wb problem is fixed - it'll skew results. @PeterWem - please simply do the wb shots with checker on D60 and licence them CC0. Would probably help in analyzing why the data isn't where rawspeed's looking. Make sure to transfer files directly to PC, so we know it's purely what camera writes to the card. |
Aha! I was looking at the results from the exiftool on one of the problematic images and noticed the following field:
But darktable wasn't using these in the raw white/black point module; it was using (This random file happened to be a photo of my sister's graduation, which I'm not sharing here. But the same idea should apply to other files. I'll try this out on the broken ones I posted.) |
Using the default in modern white balance mode on an otherwise fresh darktable install, I changed just the black levels. exiftool reported:
I changed them from |
Ah, it doesn't fix it for the penguins in modern mode, unless I manually set the white balance too. So it's indeed both a white balance and a black level issue. But setting the white balance to auto and manually setting the white balance fixes the penguins picture. |
CC0 https://drive.google.com/file/d/1JrHKJE7lq0Gbv9yUFlAeI18di6xRN7uC/view?usp=sharing |
@PeterWem: Interesting. Some of my photos are worse than others, but sometimes they'd look OK. But it's related to most of them not having the "WB RGGB Levels" (without a type) and also darktable not using the same black levels as exiftool reports. However, I downloaded your files, opened them in darktable and also ran exiftool on them to find the "Black Levels":
They don't match up between exiftool and darktable, but they aren't as far off as some of my files, so I think your files might be very subtly problematic? What would happen if you intentionally underexposed a photo and push the exposure up in darktable? Also, I checked for the WB RGGB values:
It looks like CRW_7022.CRW is missing the "WB RGGB Levels" without a modifier (Auto, Daylight, etc.), like most of my problematic files. Did you do anything special when taking that photo? Sure enough, that one file has issues in darktable (brand new config with all defaults, made for the directory; legacy whitebalance) here... |
The green one was custom white balance, so I guess it should be green. |
When using my D60, I do remember I would often use a custom white balance based on a grey card, as its auto balance wasn't so great. I guess that could be a reason why a lot of my files have this problem? In my case should've been set to a proper WB and not green, however. (And other raw processors get this right.) It still has issues with the wrong black/white point outside of the whitebalance, but custom WB is probably part of the mystery behind this bug and why it shows up in some files and not others (such as the example file in the raw repository)? |
Perhaps my mistake. Check the thumbnail that I included, the THM file. It is not green. |
@PeterWem - Plz open separate issue with noise profiles. Some cameras can't saturate some colours at super low iso. So it might be the case for that. And rawfiner could look at the profiles, diagrams etc and diagnose out proper codes. |
CC0 https://drive.google.com/file/d/1s45wL5UBZqjTZxKsteiAiGePu6OMMJNW/view?usp=sharing |
Yeah, that's consistent. None of my THM files are green either... it's just the raw file in darktable. I'm happy to see it's definitely not just some weird thing with my old specific D60. 😁 |
Would it be possible to fix this with two PRs?
Manual white balance changing is pretty easy, especially when there's something neutral (or close to it) in the scene. However, black point being incorrect isn't obvious and it is a pain to find the raw file, read the values from exiftool, and manually change the values in darktable to those that exiftool reports. If we can't get both in for the next version of darktable (as it's late in the cycle), I'd really love the black point reading to be fixed at least, as that's the more difficult one to deal with when editing the files. |
@garrett - code freeze is in couple hours for release 3.6, so it's more likely that if the fix will be there, it'll be part of 3.8 release. Or 3.6 point release - you never know. |
🎉 Awesome to hear! I didn't realize we're so close. I've switched to nightlies lately, and this is going to be an awesome release (as always).
I hope so! Point releases usually seem to include bugfixes and camera support, and I think (and hope) this qualifies. |
This issue did not get any activity in the past 30 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. |
Would the fix in #10008 (comment) be similar to the one needed here? It had an incorrect black point as well. |
Never passed through, but that will solve the green cast and the wrong black level. |
Is the black level part of the problem the same as darktable-org/rawspeed#717? |
The problem with D60 is that the whole left optical black area is used when you only should use around 90% of it. Just decrease the area that is measured and there will be no problem, see the links. The problem with 2000D is that the left columns that are black in some 2000D models aren't black at all with at least one 2000D. Solution is to not use the most left columns. |
To Reproduce
A Canon D60 is a very old camera, but I used it a several years and would love all of my photo library to work in darktable. 😉
Expected behavior
Images should have natural colors. Opening in other raw editors, such as RawTherapee, gives expected results.
It's not a color balance issue, as greens persist in the dark parts of an image even after a color balance attempt to fix.
Also, I should note that I have had a handful of cameras since, both from Canon (5DmkII) and Fuji cameras, and colors are fine from default. And I also know not to expect raws to look like out of camera JPEGs and that different raw processors handle things differently, but darktable with a D60 is something else (clearly a bug somewhere).
Screenshots
darktable, with modern defaults (Filmic & new color module for white balance):
RawTherapee with defaults:
Another one; darktable:
RawTherapee defaults:
Platform
Additional context
Canon D60 raw files had sidecar JPEG previews when raws were taken. Here's the raw and the ".thm" sidecar:
CRW_1456.zip
And the .thm renamed to a JPEG so GitHub accepts it:
And the same for the bird photo:
CRW_2869.zip
Can you reproduce with another darktable version(s)? Yes, 3.4. I am pretty sure it worked fine a while ago, but didn't work in 3.4 and possibly not 3.2... but I think it worked before that?
Can you reproduce with a RAW or Jpeg or both? Most D60 raws have this issue to one degree or another.
Are the steps above reproducible with a fresh edit (i.e. after discarding history)? Yes
If the issue is with the output image, attach an XMP file if (you'll have to change the extension to
.txt
)Is the issue still present using an empty/new config-dir (e.g. start darktable with --configdir "/tmp")? Yes
Do you use lua scripts? Yes, but it happens with a fresh config, with no Lua scripts enabled.
Changing the color balance does help somewhat, especially with some photos, but it never fixes the problem. And some photos are worse than others, but underexposed photos or those with details at the dark end are especially affected (even after white balance correction).
Additionally, I am happy to license these raw files as CC0 and would cheerfully submit more raw files that were taken under different conditions, if it helps. Unfortunately, I gave this camera to my sister (who used it to shoot in JPEG) many years ago, so I only have my existing collection.
The text was updated successfully, but these errors were encountered: