Fix potential bug in histogram matching (#5249)
This commit is contained in:
@@ -179,7 +179,7 @@ void mappingToCurve(const std::vector<int> &mapping, std::vector<double> &curve)
|
||||
return (x - xa) / (xb - xa) * (yb - ya) + ya;
|
||||
};
|
||||
idx = -1;
|
||||
for (size_t i = curve.size()-1; i > 0; i -= 2) {
|
||||
for (ssize_t i = curve.size()-1; i > 0; i -= 2) {
|
||||
if (curve[i] <= 0.f) {
|
||||
idx = i+1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user