Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.76k stars 313 forks source link

Haze removal artifacts - Samsung Galaxy Note 9 simple to reproduce #5311

Open niedrogo opened 5 years ago

niedrogo commented 5 years ago
  1. open image
  2. click "haze removal"
  3. you can now see artifacts visible in the sky

RAW file here: https://filebin.net/chb8iyyvyhf0cqe4/rawtherapeebug001.7z?t=j6y2cnk2

screenshot here: obraz

-------
Version: 5.5
Branch: 5.5
Commit: d9ac23555
Commit date: 2018-12-17
Compiler: gcc 8.2.1
Processor: generic x86
System: Windows
Bit depth: 64 bits
Gtkmm: V3.22.3
Lensfun: V0.3.2.0
Build type: release
Build flags:  -m64 -mwin32 -msse2 -mfpmath=sse -mthreads -Wno-aggressive-loop-optimizations -Wno-parentheses -std=c++11 -mtune=generic -Werror=unused-label -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas  -DNDEBUG  -O3 -ftree-vectorize
Link flags: -m64  -mthreads  -static-libgcc   -mtune=generic  -s  -O3  -fno-use-linker-plugin
OpenMP support: ON
MMAP support: ON
-------
Windows 7 home premium sp1  64bit
i7-870
niedrogo commented 5 years ago

Checked on the latest version 5.6 - the problem exists.

niedrogo commented 5 years ago

Reporting - found a simple workaround:

  1. open file
  2. click haze removal (problem exists)
  3. click retinex (problem dissapears)
TooWaBoo commented 5 years ago

Tick Clip out-of gamut colors and Highlight reconstruction should fix that too and it's the better way to do it. grafik

niedrogo commented 5 years ago

Thank you for your suggestion. I've checked it and .. Nope - does not help. Tried all 4 combinations of switching the two checkboxes :)

Also screen from 5.6 version.

obraz

niedrogo commented 5 years ago

Playing a little bit I've found that area of artifacts have something to do with a thing called "depth map" which is black in all the artifact areas .. look here

obraz

TooWaBoo commented 5 years ago

Change the Raw White Points

grafik

niedrogo commented 5 years ago

It worked. Thank You. Reporting the screen after correction. I guess - Galaxy Note 9 is a new camera and needs such internal adjustments ? (I just read rawpedia and it mentions that "It is unlikely you will ever need to use the Raw White Points tool other than for diagnostic purposes. " .. :) )

obraz

TooWaBoo commented 5 years ago

"It is unlikely you will ever need to use the Raw White Points tool other than for diagnostic purposes. "

That's true in 99.9% except if you heavily boost the contrast and color like in Retinex or Haze removal. :-)

niedrogo commented 5 years ago

Thank you. See you till next issue.

Thanks for amazing free photo developing tool.

Dnia 27 kwietnia 2019 09:45:32 CEST, TooWaBoo notifications@github.com napisał(a):

"It is unlikely you will ever need to use the Raw White Points tool other than for diagnostic purposes. "

That's true in 99.9% except if you heavily boost the contrast and color like in Retinex or Haze removal. :-)

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Beep6581/RawTherapee/issues/5311#issuecomment-487264574

-- Wysłane za pomocą K-9 Mail.

heckflosse commented 5 years ago

@niedrogo You can help us to get correct white levels for files of your Galaxy Note 9 by following this instructions and providing as the raw files:

https://github.com/Beep6581/RawTherapee/blob/dev/rtengine/camconst.json#L134

Edit: you don't need to analyze the files. Just provide us the overexposed raw files. That's enough

niedrogo commented 5 years ago

OK, I'm trying to do what is specified in the file. @heckflosse Here are the raw files.

https://filebin.net/chb8iyyvyhf0cqe4/20190428_RT_WhitePoint.7z?t=yz02ufzo

If something needs to be corrected - please specify.

Additional note. Samsung Note 9 has TWO SENSORS - wide and portrait with (possibly) different characteristics. But I was unable to create a raw file from the portrait sensor - all files appears to be only from wide sensor.

niedrogo commented 5 years ago

OK, playing with rawdigger, "substract black" disabled. All iso, all wb, all apertures looks like this: 1023 1023 1023 1023 Now - how to convert this per channel integers to one number in the json file... :)

obraz

Beep6581 commented 5 years ago

I added a color matrix to camconst.json. It fixes the color issue when these files are converted using Adobe DNG Converter. It does not fix the Haze Removal artifacts.

Settings whites in camconst.json has no effect in RT (no difference between 500, 1023 or 4096). Are these ignored for DNG files?