Beep6581 / RawTherapee

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

Random bright pixels appear when using CIECAM02 and a wide gamut color space #1822

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 1838

Hot/Dead pixel doesnt work with CIECAM02 mode.

Pretty simple, when I use CIECAM02 Hot/Dead pixel detection doesnt work (its like if
there was automatic "switch off if CIECAM02 on"). Tested on KM-7D and Fuji S5 Pro.
Otherwise Im very happy with CIECAM02 mode. 
Screenshots provided. I can provide RAW if you wish, but its camera independent. On
100% view its like starfield.

Branch: default
Version: 4.0.10.36
Changeset: fe7d3e8bed3a
Compiler: gcc 4.7.1
Processor: generic x86
System: Windows
Bit depth: 64 bits
Gtkmm: V2.22.0
Build type: RELEASE
Build flags:  -mtune=generic -fopenmp -O3 -DNDEBUG -funroll-loops -mstackrealign
Link flags: -mwindows -mtune=generic -s
OpenMP support: ON
MMAP support: ON

Win 7 x64 SP1

http://www.ulozisko.sk/obrazky/605178/CIECAM02_OFF.jpg
http://www.ulozisko.sk/obrazky/605179/CIECAM02_On.jpg

Reported by Mescalamba on 2013-04-13 00:50:55

Beep6581 commented 9 years ago
DrSlony

I'ill commit this afternoon if nobody opposes.

but my english is too bad to updated the manual

;)

Reported by jdesmis on 2013-04-27 05:16:09

Beep6581 commented 9 years ago
Jacques, thank you for changing this into slider, it works great!
Just three more questions:)
In my images from Nex5r the hot/bad pixels induced by CIECAM Lightness curve are mostly
1. white
2. purple
3. blue 
My questions: 
A. Is it the same with your test images, or do you see other colors also?
B. if colors are the same, may be blurring could be limited to these hues only?
C. Could clipping of black solves this also?

Reported by michaelezra000 on 2013-04-27 13:15:09

Beep6581 commented 9 years ago
No there are other colors like green ...

Anyway the median, as Gaussian acts on channel "ac" and "bc" (equivalent to "a" and
"b" in Lab) eg : green-red / blue-yellow

Of course act on "raw black point" has an effect, but this solution was not accepted
because complex (see #12 and after).

I think the current patch is a good compromise...

Reported by jdesmis on 2013-04-27 14:51:47

Beep6581 commented 9 years ago
I was just able to get the green pixels also. Thanks for the explanation.
If blurring is acting on color components, how is the brightness of the hot pixels
being reduced?

Reported by michaelezra000 on 2013-04-27 14:58:30

Beep6581 commented 9 years ago
In the process to remove the "hot/bad" pixels:
1) I act "Q brightness"(with a suitable gaussian)
2) I act on "ac" and "bc" with either a median or with a gaussian (different from 1))

Reported by jdesmis on 2013-04-27 15:03:23

Beep6581 commented 9 years ago
:) thanks, it is clear now. Please commit when you get a chance!

Reported by michaelezra000 on 2013-04-27 15:21:00

Beep6581 commented 9 years ago
commit to default :)

Reported by jdesmis on 2013-04-27 17:24:48

Beep6581 commented 9 years ago
Hi Jacques, I just tried once again the auto adaptation scene luminosity and there is
a little issue. the problem is that although the value in UI is automatically calculated
and is seen in the slider, it does not always take effect in the preview and in the
final output.
Test case: 
1. open image with pp3 where CIECAM is enabled, 'auto adaptation scene luminosity'
(ASL) enabled. 
2. see the value ASL=x. 
3. uncheck 'auto' for ASL, 

4a. set ASL to 0.001
4b. see that preview color is changed (less saturated)

5a. enable 'auto' for ASL
5b. in UI ASL=x, 
5c. PROBLEM: the preview does not change, it remains desaturated. final output - the
same issue.

6a. disable and then enable 'auto' for ASL/
6b. in UI ASL=x
6c. preview is saturated again, the ASL=x actually has an effect now.

Reported by michaelezra000 on 2013-05-08 01:16:56

Beep6581 commented 9 years ago
I'll look in a few days. Currently I am busy with my two little son, are on vacation

:)

Reported by jdesmis on 2013-05-08 19:50:26

Beep6581 commented 9 years ago
thanks! enjoy the spring:)

Reported by michaelezra000 on 2013-05-08 22:58:44

Beep6581 commented 9 years ago
Here is a patch that fixes the bug (I hope)  :)

Reported by jdesmis on 2013-05-11 05:19:44


Beep6581 commented 9 years ago
Great, this fixes the bug!

Interesting that with ASL = 0.001 the random bright pixels disappear (without using
the hot/bad pixel filter)

Reported by michaelezra000 on 2013-05-11 11:34:31

Beep6581 commented 9 years ago
Michael, thank's

if no other remarks, I'll commit tomorrow :)

Reported by jdesmis on 2013-05-11 11:37:43

Beep6581 commented 9 years ago
commit to default :)

Reported by jdesmis on 2013-05-12 05:39:12

Beep6581 commented 9 years ago

Reported by entertheyoni on 2013-05-14 22:54:53

Beep6581 commented 9 years ago
Good work guys!

Now I just need someone who will compile version x64 for Windows so I could actually
use it. :)

Reported by Mescalamba on 2013-05-14 23:11:22