histmatching: slightly improved match for the shadows part of the tone curve
This commit is contained in:
parent
ffbd97960f
commit
c04150be35
@ -86,12 +86,19 @@ void mappingToCurve(const std::vector<int> &mapping, std::vector<double> &curve)
|
||||
curve.clear();
|
||||
|
||||
const int npoints = 8;
|
||||
int idx = 1;
|
||||
int idx = 15;
|
||||
for (; idx < int(mapping.size()); ++idx) {
|
||||
if (mapping[idx] >= idx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx == int(mapping.size())) {
|
||||
for (idx = 1; idx < int(mapping.size()); ++idx) {
|
||||
if (mapping[idx] >= idx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int step = max(int(mapping.size())/npoints, 1);
|
||||
|
||||
auto coord = [](int v) -> double { return double(v)/255.0; };
|
||||
|
Loading…
x
Reference in New Issue
Block a user