Skip to content
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

LA - Move colortoning labgrid from rgb to lab - issue #6132 #6173

Merged
merged 2 commits into from
Mar 23, 2021
Merged

Conversation

Desmis
Copy link
Collaborator

@Desmis Desmis commented Mar 19, 2021

@Thanatomanic @chaimav
I made the same modification as for shadows-highlight (main) and local contrast (main).
Move the "lab" code from rgbproc to Lab

jacques

@@ -346,7 +346,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
//------------------------------------------------------------------------
// LAB grid
auto m = ProcEventMapper::getInstance();
EvColorToningLabGridValue = m->newEvent(RGBCURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE");
// EvColorToningLabGridValue = m->newEvent(RGBCURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE");
EvColorToningLabGridValue = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I change the event..otherwise it doesn't work

In Rgbproc ==> event RGBCURVE
in Lab ==> event LUMINANCECURVE

@Thanatomanic
Copy link
Contributor

I don't quite understand the changes here, and my first impression is that shifting this tool in the pipeline breaks backward compatibility. No? In fact, have we been considering backward compatibility with all the recent pipeline changes?

Also, why is this specific to the LabGrid method and not the other methods from the color toning panel?

@Desmis
Copy link
Collaborator Author

Desmis commented Mar 19, 2021

@Thanatomanic
No it does not break compatibility, no chnages to pp3, only the placement and "event"

Why this one, because it use Lab..in RGB
It's the same problem as Local contrast, and Shadows/highlight

jacques

@@ -3565,9 +3565,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
for (int i = 0; i < tH; i++) {
Color::RGB2Lab(tmpImage->r(i), tmpImage->g(i), tmpImage->b(i), lab->L[i], lab->a[i], lab->b[i], toxyz, tW);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the changes below, do we still need to perform this loop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes because, It create Lab for after :)

@@ -3184,9 +3184,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
Color::RGB2Lab(&rtemp[ti * TS], &gtemp[ti * TS], &btemp[ti * TS], &(lab->L[i][jstart]), &(lab->a[i][jstart]), &(lab->b[i][jstart]), toxyz, tW - jstart);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this loop with the commented out section below?

@@ -1171,6 +1171,10 @@ void Crop::update(int todo)
bool cclutili = parent->cclutili;

LUTu dummy;
bool hasColorToningLabGrid = params.colorToning.enabled && params.colorToning.method == "LabGrid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why create a new variable? This could be directly part of the if () statement below.

@@ -1286,6 +1286,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
nprevl->CopyFrom(oprevl);
histCCurve.clear();
histLCurve.clear();
bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment. No variable needed imo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can remove, I keep only for visibility..with "old" version.
This change is in - dcrop, improccoordinator, rtthumbnail, simpleprocess

You can modified and push this chnage if you want :)

Jacques

@@ -1438,6 +1438,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve,
params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 16);


bool hasColorToningLabGrid = params.colorToning.enabled && params.colorToning.method == "LabGrid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here about the variable

@@ -1347,6 +1347,12 @@ class ImageProcessor
CurveFactory::complexsgnCurve(autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve,
params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1);


bool hasColorToningLabGrid = params.colorToning.enabled && params.colorToning.method == "LabGrid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here about the variable

@Desmis
Copy link
Collaborator Author

Desmis commented Mar 19, 2021

@Thanatomanic
As I said before,
"Yes we can remove, I keep only for visibility..with "old" version.
This change is in - dcrop, improccoordinator, rtthumbnail, simpleprocess

You can modified and push this change if you want :)

But no problem , I can do it :)

jacques

@Thanatomanic
Copy link
Contributor

@Desmis For me the original bug is fixed, but when the Color Toning module is off, changing the L*a*b* color correction grid still triggers the progress bar. A non-active tool should not do that. Is there a fix for that?

@Desmis
Copy link
Collaborator Author

Desmis commented Mar 23, 2021

@Thanatomanic
This problem is not specific to "ColorToning labgrid". There is the same thing with "ColorToning color corrections".
It's a GUI problem (it's code implemented some years ago by Alberto), I don't think I can solve this problem

As you said, we really need a GUI specialist
Now what do we do? I merge or not ?
This behavior has been going on for several years...

Jacques

@Desmis
Copy link
Collaborator Author

Desmis commented Mar 23, 2021

If no objections I will merge tomorrow :)

@Thanatomanic
Copy link
Contributor

It's a GUI problem (it's code implemented some years ago by Alberto), I don't think I can solve this problem

This behavior has been going on for several years...

Oh interesting. Could be a faulty listener or something. That's something for another issue. No objection for a merge of this PR 👍
@chaimav, you are also satisfied, correct?

@chaimav
Copy link

chaimav commented Mar 23, 2021

The fixed the Labgrid error, so it it fine from that perspective. The DCP []Tone curve and []Look table aspect of the bug still remains. And based on the pervasiveness of the bug, I suspect it may show up elsewhere as well. You can either merge now, or keep the branch open until the bug is totally gone. (Sorry, I am not a dev so I don't know what standard practice is in a case like this)

@Desmis Desmis merged commit 3ad7867 into dev Mar 23, 2021
@Desmis Desmis deleted the lamovelagrid branch March 29, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants