Well, that's a bit complicated.
First: for drawn¶metric mask the invert option is part of the
"combine mask" feature. I could have taken mask inversion into a
separate combobox but that would have added a further gui element.
The polarity is closely related to how we combine mask contributions,
exclusive or incluse, respectively.
Let's say that m1, m2, ... are the individual mask contributions like
L-channel, a-channel, b-channel plust the drawn mask. The final mask M
is then generated like the following.
For exclusive combination:
M = m1 * m2 * m3 * ...
For inclusive combination:
(1 - M) = (1 - m1) * (1 - m2) * (1 - m3) * ...
In exclusive mode if one of the contributing mask is zero for a given
pixel then M is zero as well regardless of the other contributions. You
can easily exclude image parts by excluding them step by step with the
contributing masks. In inclusive mode you can likewise easily include
parts of the image like selecting all image parts with a given range of
L values and another part of the image with a certain range of a values.
Inclusive mode is a bit less easy to handle practically because by
default all pixels are already selected in the respective gradient sliders.
This is a different thing than inverting the final mask because you can
apply polarity to the individual mask elements (parametric mask channels
and drawn mask) at your liking. If you toggle all polarities, then
that's the same as inverting the final mask. The ying-yang toggle does
exactly this.
Ulrich
Am 16.11.18 um 08:25 schrieb Heiko Bauke:
Hi,
I am thinking about how to simplify the UI elements and will probably
implement something in the direction of
https://github.com/darktable-org/darktable/pull/1831#issuecomment-439291491
although I also agree with
https://github.com/darktable-org/darktable/pull/1831#issuecomment-439299588
I am wondering why we have a "polarity button" for drawn masks _and_ an
"invert mask" option? The latter is only available "drawn mask" is
selected but not if "drawn & parametric mask" is selected. Is this just
for historical reasons or is there a deep reason. To me the "invert
mask" option seems to be redundant (even after reading the corresponding
sections in the manual again).
Heiko
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org