Hi Torsten, I just wrote another mail to the mail from Sebastian (szebi). But still some comments below:
On 24.10.2013 16:38, Torsten Bronger wrote: > Hallöchen! > > Dennis Gnad writes: > >> On 19.10.2013 20:40, Torsten Bronger wrote: >> >> [...] >> >> What would be interesting for me, maybe you can take one more shot >> which shows some LCA and still has a bit more different colors in >> the picture if possible. Selectively desaturating the *right* >> parts can be a problem. > > Have a look at these: https://bob.ipv.kfa-juelich.de/bronger/lca2/ Thanks! > They are more critical because they are more colourful in general. > If I set your module parameters to max values, the red patch to the > lower right of the bear face gets desaturated at its edges. > > Similarly, I can desaturate the greenish top crown of the tower by > setting extreme values. > > However, in both cases I can successfully remove almost all LCA > without doing harm to the colours. Sometimes, it was a little bit > fiddly but is is *very* promising. Yeah, but just promising, not really completely working :S Additionally using drawn masks can work for some situations, but I would like it to work with least user interaction as possible. > BTW, what does the "threshold" slider mean? It is for "static" and "local average" just a threshold at which point a pixel gets processed at all, depending on the value of the edge-detected picture. Edge detection is done with "difference of gauss-blurred and original picture" on the A+B layers. For tweaking I then also added saturation, luminosity of the original input picture with 40% as coefficients to this "edge". Not sure at all about what to do here "correctly", kind of heuristic - maybe I should just expose all the options to the GUI and let people play with them to find good defaults, or maybe also start with a machine learning approach,... but that all needs time. For the default option "global average", this still comes from the original Code in Raw Therapee that I used as a starting point, it tries to use the average edge chroma of the whole image as a protection factor, and some magic value again ... The issue in darktable is that never the whole image as a whole is worked on, but only in ROIs (regions of interest) - it still works, but the preview in 100% view can be wrong, you should also know this when playing with it, I forgot to mention that. thresh = user_set_threshold * average_edge_chroma(see above) / MAGIC_THRESHOLD_COEFF; For the "local average" mode I implemented it a bit different, there the average edge chroma gets calculated for each pixel above the (static) threshold with a certain amount of samples around the pixel. This average edge chroma is also used in the calculations to reduce saturation, but also not too much (a kind-of bilateral filter that favours less saturated pixels). >> [...] >> >>> The module works well but I have to set "threshold" to the >>> minimum always. Furthermore, I set the green/magenta slider to >>> the far right, and the "blue/yellow" slider to the far left. >>> After all, the short wavelengths are the problem. >> >> [...] >> >> What I want to remove is the wavelength dependent focal length >> (LCA) issue that Adobe describes like: >> >> "Fringes typically appear purple/magenta when they’re in front of >> the plane of focus, and appear green when they’re behind the >> plane" > > You are absolutely right. I now have understood the physics behind > it. You can see that I have created different fringe colours in the > bear face by having played with the focus. I have also just *after* writing most of the code more looked at the physics and these two websites I linked :D > However, I find the two sliders a little bit confusing. They are > there for selecting one particular colour on the a-b plane, aren't > they? Then, it is difficult to see which colour was selected. > Since the green-magenta slider is supposed to be much more important > for LCA than the blue-yellow slider, maybe the blue-yellow slider > should change its colour bar according to the first one. Or, an a-b > colour square should be displayed where you can select the colour, > possibly with a picker. Yeah, I also just read more about the physics and now know what LCA is, I wrote in the mail to Sebastian (szebi) just some minutes ago, that I probably want to change them to two sliders with "yellow strength" and "green/purple strength", but maybe also three sliders for yellow/green/purple. And purple being a typical red/blue combination. I will hunt around with the color picker. I also don't want too many options - gets too complicated... But as written above, some more values could be exposed for an evaluation phases and then after that set to some defaults internally. In some hours I will push a speed optimized version (could get 4-5x speedup for one of my testcases at least) and with some more internal values exposed, but I will write again on the ML here... Regards, Dennis > Tschö, > Torsten. > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ darktable-devel mailing list darktable-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/darktable-devel