Dear Johannes,

Am 12.07.2017 um 10:06 schrieb johannes hanika:
sounds weird, will try to reproduce. the fitting of this function is
using a spline, which may be prone to ringing, in between the colours
you fixed. it has a linear part that fixes this issue for purely b/w,
but may lead to issues for b/w + single colour.

I investigated this issue in more detail. There are two problems with the color look up module.

* The module does not deal properly with the border case that the user has removed all color fields from the UI. In this case no color mappings are defined. Thus the module should not alter the image. This has been fixed in https://github.com/rabauke/darktable/tree/fix_colorchecker

* In constructing the color mapping three linear systems of equations have to be solved with the same coefficient matrix but with different right hand sides (one system for each Lab color channel). In the case, that all target color are identical to their source colors, these systems have the trivial solutions

[0, ..., 0, 1, 0, 0]  for L-channel,
[0, ..., 0, 0, 1, 0]  for a-channel,
[0, ..., 0, 0, 0, 1]  for b-channel,

which establish an identity mapping between source and target image. This has been described by you in more detail in http://www.darktable.org/2016/05/colour-manipulation-with-the-colour-checker-lut-module/ The problem is that if there are only few (in particular less than four) source colors or if many target/source colors have vanishing Lab-channels (e.g. shades of gray) the coefficient matrix may become (close to) singular and the system may have non-unique solutions. In this case the implemented singular-value-decomposition-based solver as implemented in the color look up table module gives a solution, which is not even close to the solutions mentioned above.

I think one should modify the linear system solver to ensure that it always yields the vectors given above if these are valid solutions to the linear system. In the case that these are not valid solutions (e.g. because source and target colors differ) but the system has non-unique solutions the solver should yield valid solutions which are close as possible to the vectors given above.


        Heiko


--
-- Number Crunch Blog @ https://www.numbercrunch.de
--  Cluster Computing @ http://www.clustercomputing.de
--       Professional @ https://www.mpi-hd.mpg.de/personalhomes/bauke
--  Social Networking @ https://www.researchgate.net/profile/Heiko_Bauke
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to