From: Vladislav Vinogradov Date: Tue, 11 Dec 2012 10:38:08 +0000 (+0400) Subject: fixed remap and warp gpu tests X-Git-Tag: submit/tizen_ivi/20141117.190038~2^2~1214^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87e0eee92b98a16980c66414cf0b2536b0da21fc;p=profile%2Fivi%2Fopencv.git fixed remap and warp gpu tests --- diff --git a/modules/gpu/test/interpolation.hpp b/modules/gpu/test/interpolation.hpp index f8aed1a..8e723c5 100644 --- a/modules/gpu/test/interpolation.hpp +++ b/modules/gpu/test/interpolation.hpp @@ -42,6 +42,9 @@ #ifndef __OPENCV_TEST_INTERPOLATION_HPP__ #define __OPENCV_TEST_INTERPOLATION_HPP__ +#include "opencv2/core/core.hpp" +#include "opencv2/imgproc/imgproc.hpp" + template T readVal(const cv::Mat& src, int y, int x, int c, int border_type, cv::Scalar borderVal = cv::Scalar()) { if (border_type == cv::BORDER_CONSTANT) @@ -113,7 +116,7 @@ template struct CubicInterpolator for (float cx = xmin; cx <= xmax; cx += 1.0f) { const float w = bicubicCoeff(x - cx) * bicubicCoeff(y - cy); - sum += w * readVal(src, cvFloor(cy), cvFloor(cx), c, border_type, borderVal); + sum += w * readVal(src, (int) floorf(cy), (int) floorf(cx), c, border_type, borderVal); wsum += w; } }