Fix L*a*b* curves histogram and pipette scaling
Use correct horizontal scale for chroma histogram. Fix pipette values for chroma, a*, and b*.
This commit is contained in:
parent
6a11c59b79
commit
24f0bff0ab
@ -4176,9 +4176,6 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const float histLFactor = pW != 1 ? histLCurve.getSize() / 100.f : 1.f;
|
|
||||||
const float histCFactor = pW != 1 ? histCCurve.getSize() / 48000.f : 1.f;
|
|
||||||
|
|
||||||
float adjustr = 1.0f;
|
float adjustr = 1.0f;
|
||||||
|
|
||||||
// if(params->labCurve.avoidclip ){
|
// if(params->labCurve.avoidclip ){
|
||||||
@ -4200,6 +4197,9 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
adjustr = 1.8f;
|
adjustr = 1.8f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const float histLFactor = pW != 1 ? histLCurve.getSize() / 100.f : 1.f;
|
||||||
|
const float histCFactor = pW != 1 ? histCCurve.getSize() * adjustr / 65536.f : 1.f;
|
||||||
|
|
||||||
// reference to the params structure has to be done outside of the parallelization to avoid CPU cache problem
|
// reference to the params structure has to be done outside of the parallelization to avoid CPU cache problem
|
||||||
const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated
|
const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated
|
||||||
const int chromaticity = params->labCurve.chromaticity;
|
const int chromaticity = params->labCurve.chromaticity;
|
||||||
@ -4359,11 +4359,11 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
|
|
||||||
if (editPipette) {
|
if (editPipette) {
|
||||||
if (editID == EUID_Lab_aCurve) { // Lab a pipette
|
if (editID == EUID_Lab_aCurve) { // Lab a pipette
|
||||||
float chromapipa = lold->a[i][j] + (32768.f * 1.28f);
|
float chromapipa = lold->a[i][j] + 32768.f;
|
||||||
editWhatever->v(i, j) = LIM01<float> ((chromapipa) / (65536.f * 1.28f));
|
editWhatever->v(i, j) = LIM01<float> ((chromapipa) / (65536.f));
|
||||||
} else if (editID == EUID_Lab_bCurve) { //Lab b pipette
|
} else if (editID == EUID_Lab_bCurve) { //Lab b pipette
|
||||||
float chromapipb = lold->b[i][j] + (32768.f * 1.28f);
|
float chromapipb = lold->b[i][j] + 32768.f;
|
||||||
editWhatever->v(i, j) = LIM01<float> ((chromapipb) / (65536.f * 1.28f));
|
editWhatever->v(i, j) = LIM01<float> ((chromapipb) / (65536.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4602,7 +4602,7 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
// I have placed C=f(C) after all C treatments to assure maximum amplitude of "C"
|
// I have placed C=f(C) after all C treatments to assure maximum amplitude of "C"
|
||||||
if (editPipette && editID == EUID_Lab_CCurve) {
|
if (editPipette && editID == EUID_Lab_CCurve) {
|
||||||
float chromapip = sqrt(SQR(atmp) + SQR(btmp) + 0.001f);
|
float chromapip = sqrt(SQR(atmp) + SQR(btmp) + 0.001f);
|
||||||
editWhatever->v(i, j) = LIM01<float> ((chromapip) / (48000.f));
|
editWhatever->v(i, j) = LIM01<float> ((chromapip) / (65536.f / adjustr));
|
||||||
}//Lab C=f(C) pipette
|
}//Lab C=f(C) pipette
|
||||||
|
|
||||||
if (ccut) {
|
if (ccut) {
|
||||||
@ -4669,7 +4669,7 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
|
|
||||||
if (editPipette && editID == EUID_Lab_LCCurve) {
|
if (editPipette && editID == EUID_Lab_LCCurve) {
|
||||||
float chromapiplc = sqrt(SQR(atmp) + SQR(btmp) + 0.001f);
|
float chromapiplc = sqrt(SQR(atmp) + SQR(btmp) + 0.001f);
|
||||||
editWhatever->v(i, j) = LIM01<float> ((chromapiplc) / (48000.f));
|
editWhatever->v(i, j) = LIM01<float> ((chromapiplc) / (65536.f / adjustr));
|
||||||
}//Lab L=f(C) pipette
|
}//Lab L=f(C) pipette
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user