parallelize curve application

This commit is contained in:
2021-07-01 14:02:46 +02:00
parent 67f561d1a4
commit b5249be51e

View File

@ -50,12 +50,5 @@ void applyCurve(cv::Mat image, cv::Mat curve)
assert(curve.type() == CV_32FC1);
assert(curve.rows == 2);
for(int y = 0; y < image.rows; y++)
{
float* col = image.ptr<float>(y);
for(int x = 0; x < image.cols; ++x)
{
col[x]=applyCurve(col[x], curve);
}
}
image.forEach<float>([&curve](float &p, const int * position){p = applyCurve(p, curve);});
}