match greens feature produces white noise
Green equalization results in many white dots appearing on the image. They are very well visible on high iso pictures, but also can be seen in dark areas of low iso photos. Tested on 7D and 400D. Here's an example:
Raw file: http://paraf.in/junk/IMG_5874.CR2
Green eq off: http://paraf.in/junk/green_eq_off.png
Green eq on: http://paraf.in/junk/green_eq_on.png
#7 Updated by Pascal de Bruijn over 7 years ago
While I don't fully grasp the lavg green eq code, with the following commit it seems the white dots problem is gone now:
But it seems the above change also slightly reduces sharpness.
That said, it still doesn't work on higher ISO images, which seems mostly related to the static threshold of 0.01.
#8 Updated by Pascal de Bruijn over 7 years ago
Now we're scaling the local green-eq treshhold along with image ISO:
We do this because a high threshold on a low iso image produces aliasing artifacts.
And a low threshold on a high iso iamge means green-eq stops working at all.
#9 Updated by Igor Kuzmin over 7 years ago
White dots are gone, yes, but now local average results in lost of details and some nasty aliasing artifacts. So I still consider green eq being quite broken.
Is full average alone enough to fix green eq problem? I mean why do we have 3 options? Because no-one knows which one is the correct way?
#10 Updated by Pascal de Bruijn over 7 years ago
So the previous fix was far from perfect :)
green_eq_lavg: bring back and fix old algorithm
green_eq_lavg: minor cleanup
These two bring back the old algorithm but guard against corner-cases which produced hot pixels.
The problem was that (in dark area's) m2 could be very small, and when m1 was divided by m2, that resulted in a very high multiplication factor, which resulted into output values well beyond 10.0f in some cases.