StudioPetrikas / Saulala

Issue tracker for Saulala
https://www.saulala.com
13 stars 1 forks source link

DNG from Huawei phone imported into Saulala produces weird result #11

Closed EaryChow closed 7 months ago

EaryChow commented 7 months ago

IMG_20230512_181009.dng.txt

Delete the .txt at the end. I have to do this since GitHub doesn't support uploading DNG files.

This is what it looks like in the APP: 655c3658a289647cb173586500fc29d7

And what it looks like in Darktable: Darktable_HuaweiDNG

BTW. Can you provide an APK installation file on the official website? Huawei phones are banned from installing Google Play (Chinese people don't use Google Play at all even before this but anyways), I have a Samsung phone with Google Play in it but that phone doesn't produce DNG file. So I ultimately have to use Huawei Phone's Camera to produce the DNG file, bring it to Samsung phone for Saulala. I might as well just use Darktable if I have to go through the transmission between devices.

StudioPetrikas commented 7 months ago

So there are a few reason why these differ:

  1. Saulala does not have GainMap implemented. (In Darktable, go to "raw black/white point" module and select "none" for flat field correction.) This is something that I cannot implement due to lack of knowledge.
  2. Darktable boosts exposure by default. Disable that module.
  3. Darktable uses 'colour calibration', Saulala is using Camera White Balance. So disable "colour calibration" module and in the "white balance" module, select "As Shot" (click on the camera button)
  4. "Filmic" also applies a curve that might be different from the one in AgX.

If you've done all that, you should be getting a pretty similar result: screens

Lastly, I would really love to avoid posting the .apk on the website. Google provides good analytics, automatic updates, ability to take down or roll back applications that are already installed. I would love to retain that control.

I'm sure websites exist that index cache these APKs straight off the Google Store, find the one you feel is trustworthy and use the apk from there. (Hopefully they update it as soon as I push an update to the store). Sorry about that.

EaryChow commented 7 months ago

I followed your steps and it still seems completely different, Saulala gives me almost a Log encoding kind of less chroma laden result. image

I am using Windows Phone Link to put them on the same screen for the screenshot. The Phone Link screen looks exactly the same as what I see directly on my phone, so it's reliable.

I'm sure websites exist that index cache these APKs straight off the Google Store, find the one you feel is trustworthy and use the apk from there. (Hopefully they update it as soon as I push an update to the store). Sorry about that.

I might be able to do that, but if that's the case, it will be significantly harder for me to tell my friends in China about it and tell them to install Saulala. Kind of sad.

StudioPetrikas commented 7 months ago

Is "Sauce" set to AgX? Have you tried exporting and comparing the output?

Since I'm getting a "close enough" match on my end, I'd be interested to troubleshoot what is causing the issue on yours.

EaryChow commented 7 months ago

Is "Sauce" set to AgX?

Yes

Have you tried exporting and comparing the output?

Here is exported from Saulala: IMG_20230512_181009_Sol_202401201619

StudioPetrikas commented 7 months ago

I think "completely different" is a bit of an exaggeration. It would be best to compare stock AgX (Just the inset version) in something like Blender, to the output.

test

There's is an additional curve applied in attempt to smoothen out clipped-at-the-sensor areas, as default AgX doesn't have to deal with that, since it's meant for 3D renders, and not tiny-sensor phone cameras that get pointed at the sun.

If you are unhappy with the 'default' processing (which you should, as the main goal of the app is for you to develop your own photos), you are always welcome to move the sliders and save presets.

EaryChow commented 7 months ago

If you are unhappy with the 'default' processing

I don't understand why your default is different from my default. Your default looks fine to me, while my default looks less chroma laden compared with yours. Our slider values are completely the same, how come we are having different result? I made sure to install the update before posting this issue, so it's probably not due to different versions.

image

StudioPetrikas commented 7 months ago

Yes, you're right. I cannot get the result you've posted. I suspected an error in 'Sauce' loading (since it feels like the reds are rotated towards orange like they are in "Saulala" sauce), but I cannot get that result with any sauce.

Are you on v0.2.10.0? (you can check in the About page)

I will look into this, thanks for the report.

EaryChow commented 7 months ago

Are you on v0.2.10.0? (you can check in the About page)

Yes it's 0.2.10.0 from 2024.01.12

StudioPetrikas commented 7 months ago

Can you post an output jpg as a txt? The one you posted appears to be processed by GitHub. Thanks.

The screenshot you're referring to is a screenshot of my AdobeRGB monitor, then converted to sRGB. I was just showing that the result to Darktable should be similar, so it will appear more chrome-laden.

What is important to me that all apps on all phones produce identical image.

Here's the actual difference. My output from Saulala with AgX on the left, your attached picture on the right.

2024-01-20 17_23_18 tiff

EaryChow commented 7 months ago

Can you post an output jpg as a txt? The one you posted appears to be processed by GitHub. Thanks.

Sure, here it is: IMG_20230512_181009_Sol_202401201619.jpg.txt

StudioPetrikas commented 7 months ago

Just an update - we've pinpointed the problem and I'm now looking for a solution. At some point the raw file reader stopped (or never did) handed off sRGB array for processing and handed off camera primaries. On PC it was working as intended.

Such a good catch by the way! There have been many points where I compared outputs and had perfect matches. At some point something happened out of my control and it never occurred to me that I need to periodically check if everything is still in order.

Live and learn. Thanks for the bug reports, hopefully it's fixed in the next release.

EaryChow commented 7 months ago

Thanks for the bug reports, hopefully it's fixed in the next release.

Tested the latest release, it's fixed!

BTW I managed to get an APK, but was unable to get it opened in Huawei, it seems Huawei's HarmonyOS is based on an older version of Android, this is probably why I still cannot install Saulala on Huawei. Judging by the other issue page here about older Android version, Saulala won't be supporting it. I am sad, but I guess sometimes that's how things go.

EaryChow commented 7 months ago

closing this issue since it's fixed