Dealing with flat field images and non-zero black levels

Is this the intended behaviour when using flatfield images on raw files with non-zero black level? :thinking:

Image with a flat field applied on the left, and without on the right panel. Camera (DJI Mavic Air’s) has black level of 4080, which, I guess, should be subtracted from the flat too, but isn’t. I mostly shoot with a camera with black level of zero, so this is rarely an issue for me, but non-zero black level seem to be common on many cameras.

After having a look at the code I can confirm that the black-level is correctly subtracted.
Please upload your files to filebin.net and post the link here, so I can take a look what’s going wrong or not.

https://filebin.net/rx5ltt6o2ok7ghf2

Thanks for the files. RT uses black level of 0 for this files.
Adding this to your camconst.json file should fix the issue:

    { // Quality C
        "make_model": [ "DJI FC2103" ],
        "ranges": {
            "black": 4080
        }
    },
2 Likes

Hmm, still getting the same result. :thinking:

I pasted the lines onto a new camconst.json under “C:\Users\username\AppData\Local\RawTherapee\camconst.json”, this should be the correct place? At least the options file is there.

Honestly, I don’t know about the exact location for the user defined camconst.json.
But there should be one in the folder of your rawtherapee.exe.
Just insert the lines from above there before this entry:

    { // Quality B
        "make_model": "FUJIFILM GFX 50S",

and don’t use notepad for that, it may make wrong line endings.

I will include it into official camcons.json file for next release/nightly build.

Then please close RT, set
verbose=true
in your options file,
start RT from console and open one of the files.
If the camconst.json is found there should be something like this in console output:

Loading DJI FC2103 image from C:\Users\Ingo Weyrich\Pictures\image.dng...
constants exists for "DJI FC2103" in camconst.json
black levels: R:4080 G1:4080 B:4080 G2:4080 (provided by camconst.json)

http://rawpedia.rawtherapee.com/File_Paths#Config

Place was correct, it was just a syntax error on my side. Now the flat files work as they should.

1 Like