New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vectorscope: add RYB option #9904
Conversation
Can't build on Windows
|
Sorry, an oversight. Probably the same cause as for Travis error. Let's see if it is happier now. |
rebased |
I'm afraid that everyone will have his own preferences. Histograms and waveform do not suffer being dimmed. From my point of view vectorscopes talk colors and I would prefer them as real as possible. |
the appearance is dependent to the selected theme: the background using a ...gray theme or even the ...dark theme reduces the contrast to the colors (it's quite contrasty in the ...darker theme) |
I can agree about this. EDIT I was not talking about the dark/grey background, but about colors. But I disagree about washing the colors of the wheel (colored background of the vectorscope). |
I agree with @phweyland, it makes the vectorscope mostly unusable. |
Strange that the rebase broke something ! How did you handle this, if you go to this branch and do a "git rebase master" (making sure master is updated to current commit) what happens? Do you have conflicts? If not the rebase should be fine, no? |
And anyway, there is no conflicts on this PR... So if I merge all should be fine. Was the washout colors fixed in this PR? (not tested yet, so asking...) |
No, I've let the current treatment of background vectorscope.
The rebase was just to resolve some conflicts. I don't know if these commits are included. |
Two possibilities. Either you need this PR merged first to apply your changes or you guide me to fix the issue in that PR. What do you prefer ? |
We have to apply the same transformation from RGB to RYB to primary sample and live samples. If I understood correctly the transformation, this part of _lib_histogram_process_vectorscope()
becomes
I tested this code on my local merge (this PR + master) and it works, however, as we repeat three times the same code for the conversion RGB => (JzCzhz / Luv / RYB), we can perhaps compact the code with a macro or a function |
@Mark-64 Great. Thanks for preparing the fix. EDIT: darktable.lib->proxy.colorpicker.live_samples seems to stay empty |
125500c
to
6854030
Compare
I tested this code on my local merge with master and it works. |
Sorry, I'm back and I see I have tested the wrong executable. Yes everything works fine. Sorry again for inconvenience! |
rebased to resolve conflicts |
About colors, different parameters influence the colorfulness of the graph.
So I'm afraid the user cannot expect to rely on the graph's colors to get an immediate feeling of the harmony.
Any thoughts ? |
I think you just put
This all seems a good rundown. I'd add one more, which is the Cairo compositing operation with which the graph is drawn. So long as it is Here's with current code (not this PR), With With The graph will still appear more vivid with a dark theme, due to more color contrast with the background color. Here's with Perhaps shifting around the drawing mode (and tuning some other parameters) could produce something nice? Here's a diff using modified src/libs/histogram.c
@@ -1004,8 +1004,7 @@ static void _lib_histogram_draw_vectorscope(dt_lib_histogram_t *d, cairo_t *cr,
const gboolean display_live_samples = d->vectorscope_samples &&
darktable.lib->proxy.colorpicker.display_samples;
- if(display_primary_sample || display_live_samples)
- cairo_push_group(cr);
+ cairo_push_group(cr);
cairo_set_source(cr, bkgd_pat);
cairo_mask(cr, graph_pat);
cairo_set_operator(cr, CAIRO_OPERATOR_HARD_LIGHT);
@@ -1017,13 +1016,9 @@ static void _lib_histogram_draw_vectorscope(dt_lib_histogram_t *d, cairo_t *cr,
cairo_pattern_destroy(graph_pat);
cairo_surface_destroy(graph_surface);
- if(display_primary_sample || display_live_samples)
- {
- cairo_pop_group_to_source(cr);
- cairo_paint_with_alpha(cr, 0.5);
- }
-
+ cairo_pop_group_to_source(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+ cairo_paint_with_alpha(cr, (display_primary_sample || display_live_samples) ? 0.5 : 1.0);
// overlay central circle
set_color(cr, darktable.bauhaus->graph_grid); |
Thanks @dtorop, I'll take the time to digest this. |
Yes it was the question, thanks. |
Also! I can't guarantee that #9925 hasn't messed up this PR... If so, apologies, but it shouldn't be too difficult to fix. |
No problem, I've rebased and haven't found any issue! |
2c7723c
to
62c4acb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIA.
All done. Thanks ! |
CI got "problematiced" in GCC 11 nofeatures + nosse with :
|
Travelling, I'll check this asap. |
The fix looks trivial, we need to initialize chromaticity as indeed chromaticity[0] is not used afterward and in the RYB case we only set the index 1 and 2. Will merge and add necessary init for GCC 11. |
fixes #9847. See this FR for more details.
This is inspired by "Paint Inspired Color Mixing and Compositing for Visualization" - Gossett.
As the Gossett model is not reversible, we keep his cube hues and use them to transpose the rgb <-> ryb data by spline interpolation.
This model compensates the orange expansion by compressing from green to red unlike the model proposed by Junichi SUGITA & Tokiichiro TAKAHASHI, in "Computational RYB Color Model and its Applications", which compresses mainly the cyan colors. This latest is also reversible and is used in the G'MIC functions.
As we talk of colors harmony I'm embarrassed by the color wash of the presented graph. Example:
compared to:
In the first image, it's impossible to identify the blue... The second image is far more aligned on the real colors of the image.
Thoughts ?