Huawei DNG files and flat field correction in rawtheapee produces a purple vignette [solved]

Hi Forum,
I am having problems using DNG files from a Huawei P30 Pro in Ratherapee 5.8 running on Linux Mint 19.3.
The problems is that in Rawtherapee the images has washed out dull colours and heavy dark vignetting. Googling around and reading the Rawtherapee manual has not brought me any closer to a solution. Huaweis support staff have been very friendly but simply states that this normal behaviour when shooting in DNG with their phone.
I have looked in the lensfun database but not found a lens profile, however Adobes has one for each camera on the mobile so I used them. They seem to do the job in correcting the actual picture geometry. I have also found camera profiles in Adobe (they have 7 profiles for jpeg and raw front and back) but the colours doesn’t seem to liven up that much.
But the real reason I would like to ask for some help is the dark vignetting which is so strong that the pictures looks straight out of a Family Adams movie. I have made flat field reference pictures and I can get a perfect result using a DNG flat field reference picture onto it self (as per the manual). The dark vignetting disappears completely. So I thought I was there. But when I do the same with a real image and then try the Flat Field reduction the vignette remains but is now purple instead.
I have tried the procedure in rawtherapee 5.3.1 and the latest unstable version plus the 5.8 app image. I have also used Adobe DNG converter to check if it was Huaweis magic that got in the way. No matter what I do the flat field correction leaves this purple vignette instead of the dark vignette I would like to remove.
Any suggestions as what I can try next?
Mint

@Mint
Welcome to the forum.

Please provide the original raw, the flatfield raw and the pp3 file you used.

1 Like

Is the real solution to use an LCP or convert the LCP to a lensfun profile and use that? Not sure what OP meant by “camera profile.”

Hi - Super quick turnaround. Thank you for your time with this. I will try to up load the dng (to process) with pp3 and the FF ref. image also in dng. Plus the 2 camera/lens profiles I have from Adobe DNG Converter.
I have chosen to use dngs which have been converted with adobe as they are smaller in size. I have also included a screenshots of before and after FF correction in rawtherapee to show the dark vignette and the purple vignette. The converted files seems to behave a bit better than the original dngs from the huawei p30 pro. They are huge (80 MB) so I have included these just the screenshots. The purple vignette is pretty funky but I’d rather have a nice FF corrected image.
I will try to upload the files but I got an error for file types and too many attachments.
regards Mint!
dng_cnv_afterFF|482x581 IMG_20200613_100133_CVN.dng.pp3|attachment (11.3 KB) IMG_20200616_103205_CVN.dng (25.3 MB) IMG_20200613_100133_CVN.dng (33.1 MB)

Perhaps I can add some of the other files now?DNGafterFFcorrection HUAWEI P30 Pro Rear Main Camera Adobe Standard.dcp (117.9 KB)

Note that you likely do not have permission to redistribute the dcp file.

@Mint If you want to upload bigger files, you can use a service like https://filebin.net

Also, fair warning, the support for mobile phone RAW files is pretty shaky. There have been more threads posted about this lately: e.g. Adjusting phone colors

Hi Thank you very much for the heads up. I will certainly have a look at the thread because it looks essentially the same base issue - weird dng from a huawei. Weird colors and a cast vignetting
Kind regards Mint

Did you try using Clip control in flat field tool?
http://rawpedia.rawtherapee.com/Flat-Field#Clip_Control

Hi Thank you for the suggestion and the link to the manual!
Yes I tried and in fact it does looked like it worked in removing the purple colour cast vignette but (sigh) it introduced a green cast in the center instead. A sort of reverse vignette in green. Perhaps I did it wrong? I attach 3 screenshots. No FF Clip control, Clip control and a close up of the applied clip control.
Kind regards

clip control.

Hi, Just wondering if anybody had a further take on the purple vignette I am getting on DNG when applying flat field correction. I had a look at ART (appimage 1.4) via the suggestion to look at other threads on colour and DNG in this forum and one thing surprised me straight up. ART recognises the image info (f, shutter, etc) and the camera whereas RT doesn’t and just give Zeros. I was therefore excited to try the FF in ART but while there is no Purple “haze” as in RT there seem to be FF correction at all (as in the dark/shading/cast vignette remains unchanged . Either ART goes straight to ready or never leaves image processing. In fact while RT does a perfect FF correction on a FF field reff image onto it self (without the purple haze, beats me how come, why only on “real” images) then ART does not do anything when I try the same.
So I am still nowhere with this and while the Huawei P30 Pro really takes extremely good mobilephone pictures using its own Jpeg conversion - its just too weird and aggressive for anything but a small screen. So I continue to hope I can find a use for DNG so that even at full view the pictures look like something from this planet.
Kind regards Mint

Hi @Mint. Three things:

  1. try using the git version of ART, not 1.4
  2. make sure you have clicked on the “enabled” field in Flat-field correction. In RT this is not necessary, but in ART it is, otherwise nothing happens.
  3. I have recently fixed a bug in flat-field correction in ART (that’s why I was saying use the git version, not 1.4), here’s what you get now (note the enabled flat-field, circled in red):
2 Likes

I picked the fix from ART

Should work fine now in RT dev as well. Thanks @agriggio for the fix

2 Likes

Uhuuu! Thank you to you all from RT and ART - I can’t wait to try it out! What do I need to do to apply the fix my end?
Kind regards Mint

Have a look here
https://github.com/Beep6581/RawTherapee/releases/tag/nightly
and wait for an appimage which has a version number >= 5.8.2152

Edit: Or try building RT yourself. It’s not that hard.
http://rawpedia.rawtherapee.com/Linux

1 Like

I will (have a look) and try to build it myself or wait for the appimage. thank you again!!
Kind regards Mint

Sigh… I have one of those Linux thing happening - no cmake compiler - tried installing build essentials but … so I will wait for the appimage :slight_smile:

Thanks for the work, I had a similar issue trying to correct the peripheral color shift in the BMPCC OG with KIEV-16U Mir-11M 12mm F2 lens on it with flatfields. I will give this version a try.

Just one question - which perhaps is silly seeing the >= 5.8.2152 - does the build RawTherapee_dev_5.8-2178-gocc9537_20200620.Applmage 108 MB include the fix
Kind regards Mint

yes