Any interest in a "film negative" feature in RT ?

I can’t see that magenta, but that’s me, i’m not a photographer, i have a terrible “eye” for these things… to me it looks just less saturated. Which makes sense because the old version applies the camera profile to the inverted image… which is totally wrong, but works somehow :rofl:

Congrats for the blog post, that is a truly in-depth explanation!

Don’t worry about the old method, it won’t go anywhere until the new one is fully fixed :wink:
I want to try a different route, it should be possible to get the same result as before.

1 Like

Just dropping that here, since it’s GPL-licensed…

2 Likes

Thanks for that, @anon41087856.
Well, we can now see a few different approaches for negative inversion. Should we not start a discussion to at least compare theoretical aspects? (Of course, we’d soon dive into workflow comparison, which has strong ties to UX differences, but anyway…)

@anon41087856 Of course i did take a look at the negadoctor source code while moving the RT filmneg code past demosaic :wink:
(BTW: the code is very well commented and clear to understand, thanks for that!)

I noticed you get the log10 first, then multiply and offset the resulting exponent, and finally exp10 to get the output, which should (i think…) be the same as exponentiating and multiplying the input (of course with different values), and in fact i get very similar results between the new RT filmneg and negadoctor.

But there’s one thing i wanted to ask you and never found the time: if i understand correctly, you do the calculation in the user-selected working space (which is Rec2020 by default).
Did you do it in purpose, so that a user can choose to do the non-linear calculation in a different space? For example, choosing ProPhoto gives a noticeably different output (of course after re-selecting the Dmin and neutral spots).
In my implementation i decided to create a dedicated colorspace with three spectral primaries at 650nm, 550nm, 460nm which are approximately the wavelengths of peak sensitivity according to both Kodak and Fujifilm datasheets.
(BTW i’ve used the wonderful tutorial and source code on ninedegreesbelow.com )
Then i’ve converted the image from whatever working profile to this color space, performed the non-linear stuff, and then converted back to the original working space. So that the inversion happens on the same red, green and blue primaries that were actually “recorded” by the film emulsion.
I don’t know, it seemed logical to me… do you think it can make sense? Or i just got everything wrong?

(…sorry about my bad math and explanation skills)
Any opinion or suggestion is appreciated :slight_smile:

1 Like

My coding approach is always to build basic blocks that are as agnostic as possible to pipeline assumption and as immune as possible to developer mistakes/omissions. It reduces the impact of my own stupidity and let room for future improvements without deprecating the code at all since no constants or color-spaces are hard-coded. In case I messed up something, the goal is to give users a kill-switch and fly by instruments.

But…

makes a lot of sense and is a brilliant idea.

It’s so logical I will borrow it if you don’t mind :wink: Do you have an ICC profile of that color space ?

2 Likes

Yes, you’re totally right, i need to fix that, hardcoding it wasn’t a good idea.

Of course you can! :slight_smile:

Sure. Here:

FilmNegRGB_650_550_460-elle-V4-g10.icc (1.1 KB)

I created it by hacking the source code from the ninedegreesbelow tutorial, so i guess there shouldn’t be any licensing issue… (please correct me if i’m wrong)

Here it is compared to Rec2020:
image

… and to ProPhoto:
image

Which might explain the different result :slight_smile:

1 Like

Thank you for calming me saying you won’t remove the old method! I was very worried I will have to keep my VM with current develop forever to continue using the method that gives me great colors! :slight_smile:
It’s great you have in mind some other method, please say when ready, I’m eager to test!

1 Like

@rom9 your process for combining the RGB files is so much easier than the way I was exploring. I was trying to use LibRaw and the Adobe DNK SDK, and I never really managed to get it all working.

2 Likes

Hi! Sorry for the delay.
I admit, my attempt was a quick and dirty hack (i wanted to solve the problem with existing tools), but it seemed to work anyway :slight_smile:

Keep in mind that if you build the filmneg branch of RawTherapee, you can also apply the negative inversion directly to a regular (non-raw) TIFF file. This way you don’t have to create the fake raw file anymore :wink:

Ilya, just wanted to thank you for your article, “Using free RawTherapee for inverting DSLR-digitized color negatives”. It gave me a much better understanding of the tool, and now my colours are richer and more accurate.

2 Likes

Here is a negative I just processed with RawTherapee using your article, except for flat field, as I digitized the negative a few months ago.
Original film: 6x6 cm color negative, don’t know the type. A shot my father took about 1960.
Digitized with Nikon D800 and 60mm f2.8G micro Nikkor.
Your article has definitely improved my processing color negs with RT. Thanks, and many thanks to rom9 for creating such a great tool.

HS3_5424 Long beach 1920|690x654

4 Likes

Thank you, I’m glad it helped! Now let’s hope @rom9 succeeds in keeping the process described in the article in the new version.

1 Like

Is there any advantage to picking neutral spots in the film negative tool for B&W negs?

Hi all :slight_smile:

Yes, i’ve found a solution that should keep perfect backwards compatibility and let the user choose between old method (invert before input profile) and new method (invert after input profile).
Unfortunately i’m progressing very slowly since it’s been a crazy time at work lately. Next week i’ll be on vacation so i should have some time at last :wink:

Frankly, i don’t know if i would even use the filmneg tool at all with B&W negs. The tool doesn’t do anything specific for B&W, so it could inadvertently “amplify” some slight color tint coming from the backlight.
I would simply enable the B&W tool (to neutralize any color tint) , then use Tone Curve 1 for inverted level adjustment (straight segment from max to min) and Tone Curve 2 for tonal adjustments (s-curve) … and that’s it :wink:
If you prefer to use the filmneg tool, the best thing to do should be to set both red and blue ratios to exactly 1.0, without picking any neutral spot… at least in theory :thinking:

BTW: very nice picture! The quality that you can get out of a ~60 years old negative is outstanding!

2 Likes

I just tried your suggestion of using the filmneg tool, setting red and blue ratios to 1.0, and also the reference exponent to 1.0. As well, I set the tone curves as suggested by Ilya, with curve 1 to define the right and left of the histogram and curve 2 to set a curve. It seemed to work very well and it seemed easier to avoid blowing the highlights than before, while keeping a pleasing tonal range.
6x6 B&W negative, shot in Puerto Vallarta 1953
Digitized using Nikon D850 with Nikkor 60mm f2.8G micro lens!

4 Likes

That’s great to hear! Looking forward to test it!

1 Like

Hello @rom9

Thanks a lot for reviving your work on this feature.
It would be super cool to have it ready for the next stable version of RawTherapee.
Just hinting, take your time and do enjoy your well-deserved summer holidays :slight_smile:

2 Likes

Here’s a colour negative test I did on a 6x6 cm Kodak (don’t know the film type) transparency. I processed the shot on the right back in January 2020 using the film negative tool of RawTherapee, but not really understanding it well. The shot on the left was from the tool on a recent developer version of RT, and after I had a better understanding of the tool from the great tips in this thread. The colours are much richer now, and I didn’t apply any saturation. The shot was taken by my dad in 1970 on Mt Robson as the Ralph Forster Hut was being built. Ralph is on the left.

4 Likes

Correction: The original Kodak film was a negative, not a transparency.

Hi! Sorry for the delay, can you try the filmneg branch again?
When you open a .pp3 file saved with the previous dev version, you should now get an almost identical result as before: the negative inversion will be performed in camera colorspace, but still after demosaic, so you get the best of both worlds: old behavior and new speedup :wink:

WARNING: please make a backup copy of the original pp3 files, otherwise you won’t be able to use them again with the previous dev version after opening them in the new version.

Let me know what you think :slight_smile: