diff --git a/src/uvosunwrap/curve.h b/src/uvosunwrap/curve.h index 4b121b9..17e5d65 100644 --- a/src/uvosunwrap/curve.h +++ b/src/uvosunwrap/curve.h @@ -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(y); - for(int x = 0; x < image.cols; ++x) - { - col[x]=applyCurve(col[x], curve); - } - } + image.forEach([&curve](float &p, const int * position){p = applyCurve(p, curve);}); }