parallelize curve application
This commit is contained in:
@ -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);});
|
||||
}
|
||||
|
Reference in New Issue
Block a user