Commit 52dbbae8 authored by yao's avatar yao

some cleanup, remove some commented codes

parent abe2ea59
...@@ -125,10 +125,6 @@ PARAM_TEST_CASE(ArithmTestBase, MatType, bool) ...@@ -125,10 +125,6 @@ PARAM_TEST_CASE(ArithmTestBase, MatType, bool)
val = cv::Scalar(rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0)); val = cv::Scalar(rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0));
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
......
...@@ -33,20 +33,14 @@ void blendLinearGold(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &we ...@@ -33,20 +33,14 @@ void blendLinearGold(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &we
PARAM_TEST_CASE(Blend, cv::Size, MatType/*, UseRoi*/) PARAM_TEST_CASE(Blend, cv::Size, MatType/*, UseRoi*/)
{ {
//std::vector<cv::ocl::Info> oclinfo;
cv::Size size; cv::Size size;
int type; int type;
bool useRoi; bool useRoi;
virtual void SetUp() virtual void SetUp()
{ {
//devInfo = GET_PARAM(0);
size = GET_PARAM(0); size = GET_PARAM(0);
type = GET_PARAM(1); type = GET_PARAM(1);
/*useRoi = GET_PARAM(3);*/
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
} }
}; };
...@@ -59,12 +53,9 @@ TEST_P(Blend, Accuracy) ...@@ -59,12 +53,9 @@ TEST_P(Blend, Accuracy)
cv::Mat weights1 = randomMat(size, CV_32F, 0, 1); cv::Mat weights1 = randomMat(size, CV_32F, 0, 1);
cv::Mat weights2 = randomMat(size, CV_32F, 0, 1); cv::Mat weights2 = randomMat(size, CV_32F, 0, 1);
cv::ocl::oclMat gimg1(size, type), gimg2(size, type), gweights1(size, CV_32F), gweights2(size, CV_32F); cv::ocl::oclMat gimg1(img1), gimg2(img2), gweights1(weights1), gweights2(weights2);
cv::ocl::oclMat dst(size, type); cv::ocl::oclMat dst;
gimg1.upload(img1);
gimg2.upload(img2);
gweights1.upload(weights1);
gweights2.upload(weights2);
cv::ocl::blendLinear(gimg1, gimg2, gweights1, gweights2, dst); cv::ocl::blendLinear(gimg1, gimg2, gweights1, gweights2, dst);
cv::Mat result; cv::Mat result;
cv::Mat result_gold; cv::Mat result_gold;
......
...@@ -47,27 +47,16 @@ ...@@ -47,27 +47,16 @@
#include "precomp.hpp" #include "precomp.hpp"
#include <iomanip> #include <iomanip>
///////////////////////////////////////////////////////////////////////////////
/// ColumnSum
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
//////////////////////////////////////////////////////////////////////// PARAM_TEST_CASE(ColumnSum, cv::Size)
// ColumnSum
PARAM_TEST_CASE(ColumnSum, cv::Size, bool )
{ {
cv::Size size; cv::Size size;
cv::Mat src; cv::Mat src;
bool useRoi;
//std::vector<cv::ocl::Info> oclinfo;
virtual void SetUp() virtual void SetUp()
{ {
size = GET_PARAM(0); size = GET_PARAM(0);
useRoi = GET_PARAM(1);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
} }
}; };
...@@ -99,8 +88,7 @@ TEST_P(ColumnSum, Accuracy) ...@@ -99,8 +88,7 @@ TEST_P(ColumnSum, Accuracy)
} }
} }
INSTANTIATE_TEST_CASE_P(GPU_ImgProc, ColumnSum, testing::Combine( INSTANTIATE_TEST_CASE_P(GPU_ImgProc, ColumnSum, DIFFERENT_SIZES);
DIFFERENT_SIZES, testing::Values(Inverse(false), Inverse(true))));
#endif #endif
...@@ -285,7 +285,7 @@ PARAM_TEST_CASE(LaplacianTestBase, MatType, int) ...@@ -285,7 +285,7 @@ PARAM_TEST_CASE(LaplacianTestBase, MatType, int)
//src mat with roi //src mat with roi
cv::Mat mat_roi; cv::Mat mat_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -304,10 +304,6 @@ PARAM_TEST_CASE(LaplacianTestBase, MatType, int) ...@@ -304,10 +304,6 @@ PARAM_TEST_CASE(LaplacianTestBase, MatType, int)
mat = randomMat(rng, size, type, 5, 16, false); mat = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -388,7 +384,7 @@ PARAM_TEST_CASE(ErodeDilateBase, MatType, int) ...@@ -388,7 +384,7 @@ PARAM_TEST_CASE(ErodeDilateBase, MatType, int)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -518,7 +514,7 @@ PARAM_TEST_CASE(Sobel, MatType, int, int, int, int) ...@@ -518,7 +514,7 @@ PARAM_TEST_CASE(Sobel, MatType, int, int, int, int)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -540,11 +536,6 @@ PARAM_TEST_CASE(Sobel, MatType, int, int, int, int) ...@@ -540,11 +536,6 @@ PARAM_TEST_CASE(Sobel, MatType, int, int, int, int)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -622,7 +613,6 @@ PARAM_TEST_CASE(Scharr, MatType, int, int, int) ...@@ -622,7 +613,6 @@ PARAM_TEST_CASE(Scharr, MatType, int, int, int)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -645,10 +635,6 @@ PARAM_TEST_CASE(Scharr, MatType, int, int, int) ...@@ -645,10 +635,6 @@ PARAM_TEST_CASE(Scharr, MatType, int, int, int)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -729,7 +715,6 @@ PARAM_TEST_CASE(GaussianBlur, MatType, cv::Size, int) ...@@ -729,7 +715,6 @@ PARAM_TEST_CASE(GaussianBlur, MatType, cv::Size, int)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -752,10 +737,6 @@ PARAM_TEST_CASE(GaussianBlur, MatType, cv::Size, int) ...@@ -752,10 +737,6 @@ PARAM_TEST_CASE(GaussianBlur, MatType, cv::Size, int)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
......
...@@ -53,13 +53,12 @@ PARAM_TEST_CASE(Gemm, int, cv::Size, int) ...@@ -53,13 +53,12 @@ PARAM_TEST_CASE(Gemm, int, cv::Size, int)
int type; int type;
cv::Size mat_size; cv::Size mat_size;
int flags; int flags;
//vector<cv::ocl::Info> info;
virtual void SetUp() virtual void SetUp()
{ {
type = GET_PARAM(0); type = GET_PARAM(0);
mat_size = GET_PARAM(1); mat_size = GET_PARAM(1);
flags = GET_PARAM(2); flags = GET_PARAM(2);
//cv::ocl::getDevice(info);
} }
}; };
......
...@@ -63,7 +63,6 @@ struct getRect ...@@ -63,7 +63,6 @@ struct getRect
PARAM_TEST_CASE(HaarTestBase, int, int) PARAM_TEST_CASE(HaarTestBase, int, int)
{ {
//std::vector<cv::ocl::Info> oclinfo;
cv::ocl::OclCascadeClassifier cascade, nestedCascade; cv::ocl::OclCascadeClassifier cascade, nestedCascade;
cv::CascadeClassifier cpucascade, cpunestedCascade; cv::CascadeClassifier cpucascade, cpunestedCascade;
// Mat img; // Mat img;
...@@ -82,11 +81,6 @@ PARAM_TEST_CASE(HaarTestBase, int, int) ...@@ -82,11 +81,6 @@ PARAM_TEST_CASE(HaarTestBase, int, int)
cout << "ERROR: Could not load classifier cascade" << endl; cout << "ERROR: Could not load classifier cascade" << endl;
return; return;
} }
//int devnums = getDevice(oclinfo);
//CV_Assert(devnums>0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
//cv::ocl::setBinpath("E:\\");
} }
}; };
......
...@@ -327,7 +327,7 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType, MatType, MatType, MatType, MatType, bo ...@@ -327,7 +327,7 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType, MatType, MatType, MatType, MatType, bo
cv::Mat mask_roi; cv::Mat mask_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
cv::Mat dst1_roi; //bak cv::Mat dst1_roi; //bak
//std::vector<cv::ocl::Info> oclinfo;
//ocl mat //ocl mat
cv::ocl::oclMat clmat1; cv::ocl::oclMat clmat1;
cv::ocl::oclMat clmat2; cv::ocl::oclMat clmat2;
...@@ -352,10 +352,6 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType, MatType, MatType, MatType, MatType, bo ...@@ -352,10 +352,6 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType, MatType, MatType, MatType, MatType, bo
cv::RNG &rng = TS::ptr()->get_rng(); cv::RNG &rng = TS::ptr()->get_rng();
cv::Size size(MWIDTH, MHEIGHT); cv::Size size(MWIDTH, MHEIGHT);
double min = 1, max = 20; double min = 1, max = 20;
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
if(type1 != nulltype) if(type1 != nulltype)
{ {
...@@ -720,7 +716,7 @@ PARAM_TEST_CASE(WarpTestBase, MatType, int) ...@@ -720,7 +716,7 @@ PARAM_TEST_CASE(WarpTestBase, MatType, int)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -740,10 +736,6 @@ PARAM_TEST_CASE(WarpTestBase, MatType, int) ...@@ -740,10 +736,6 @@ PARAM_TEST_CASE(WarpTestBase, MatType, int)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -905,9 +897,6 @@ PARAM_TEST_CASE(Remap, MatType, MatType, MatType, int, int) ...@@ -905,9 +897,6 @@ PARAM_TEST_CASE(Remap, MatType, MatType, MatType, int, int)
interpolation = GET_PARAM(3); interpolation = GET_PARAM(3);
bordertype = GET_PARAM(4); bordertype = GET_PARAM(4);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
cv::RNG &rng = TS::ptr()->get_rng(); cv::RNG &rng = TS::ptr()->get_rng();
cv::Size srcSize = cv::Size(MWIDTH, MHEIGHT); cv::Size srcSize = cv::Size(MWIDTH, MHEIGHT);
cv::Size map1Size = cv::Size(MWIDTH, MHEIGHT); cv::Size map1Size = cv::Size(MWIDTH, MHEIGHT);
...@@ -1051,7 +1040,6 @@ PARAM_TEST_CASE(Resize, MatType, cv::Size, double, double, int) ...@@ -1051,7 +1040,6 @@ PARAM_TEST_CASE(Resize, MatType, cv::Size, double, double, int)
int dstx; int dstx;
int dsty; int dsty;
//std::vector<cv::ocl::Info> oclinfo;
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
...@@ -1090,10 +1078,6 @@ PARAM_TEST_CASE(Resize, MatType, cv::Size, double, double, int) ...@@ -1090,10 +1078,6 @@ PARAM_TEST_CASE(Resize, MatType, cv::Size, double, double, int)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, dsize, type, 5, 16, false); dst = randomMat(rng, dsize, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -1181,7 +1165,7 @@ PARAM_TEST_CASE(Threshold, MatType, ThreshOp) ...@@ -1181,7 +1165,7 @@ PARAM_TEST_CASE(Threshold, MatType, ThreshOp)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -1199,11 +1183,6 @@ PARAM_TEST_CASE(Threshold, MatType, ThreshOp) ...@@ -1199,11 +1183,6 @@ PARAM_TEST_CASE(Threshold, MatType, ThreshOp)
mat1 = randomMat(rng, size, type, 5, 16, false); mat1 = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -1288,7 +1267,6 @@ PARAM_TEST_CASE(meanShiftTestBase, MatType, MatType, int, int, cv::TermCriteria) ...@@ -1288,7 +1267,6 @@ PARAM_TEST_CASE(meanShiftTestBase, MatType, MatType, int, int, cv::TermCriteria)
cv::ocl::oclMat gdst; cv::ocl::oclMat gdst;
cv::ocl::oclMat gdstCoor; cv::ocl::oclMat gdstCoor;
//std::vector<cv::ocl::Info> oclinfo;
//ocl mat with roi //ocl mat with roi
cv::ocl::oclMat gsrc_roi; cv::ocl::oclMat gsrc_roi;
cv::ocl::oclMat gdst_roi; cv::ocl::oclMat gdst_roi;
...@@ -1311,10 +1289,6 @@ PARAM_TEST_CASE(meanShiftTestBase, MatType, MatType, int, int, cv::TermCriteria) ...@@ -1311,10 +1289,6 @@ PARAM_TEST_CASE(meanShiftTestBase, MatType, MatType, int, int, cv::TermCriteria)
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
dstCoor = randomMat(rng, size, typeCoor, 5, 16, false); dstCoor = randomMat(rng, size, typeCoor, 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -1436,7 +1410,6 @@ PARAM_TEST_CASE(histTestBase, MatType, MatType) ...@@ -1436,7 +1410,6 @@ PARAM_TEST_CASE(histTestBase, MatType, MatType)
cv::ocl::oclMat gdst_hist; cv::ocl::oclMat gdst_hist;
//ocl mat with roi //ocl mat with roi
cv::ocl::oclMat gsrc_roi; cv::ocl::oclMat gsrc_roi;
// std::vector<cv::ocl::Info> oclinfo;
virtual void SetUp() virtual void SetUp()
{ {
...@@ -1447,10 +1420,6 @@ PARAM_TEST_CASE(histTestBase, MatType, MatType) ...@@ -1447,10 +1420,6 @@ PARAM_TEST_CASE(histTestBase, MatType, MatType)
src = randomMat(rng, size, type_src, 0, 256, false); src = randomMat(rng, size, type_src, 0, 256, false);
// int devnums = getDevice(oclinfo);
// CV_Assert(devnums > 0);
//if you want to use undefault device, set it here
//setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
......
...@@ -62,7 +62,6 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho ...@@ -62,7 +62,6 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho
cv::Size templ_size; cv::Size templ_size;
int cn; int cn;
int method; int method;
//std::vector<cv::ocl::Info> oclinfo;
virtual void SetUp() virtual void SetUp()
{ {
...@@ -70,8 +69,6 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho ...@@ -70,8 +69,6 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho
templ_size = GET_PARAM(1); templ_size = GET_PARAM(1);
cn = GET_PARAM(2); cn = GET_PARAM(2);
method = GET_PARAM(3); method = GET_PARAM(3);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
} }
}; };
...@@ -114,8 +111,6 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::Size, TemplateSize, Channels, TemplateMeth ...@@ -114,8 +111,6 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::Size, TemplateSize, Channels, TemplateMeth
templ_size = GET_PARAM(1); templ_size = GET_PARAM(1);
cn = GET_PARAM(2); cn = GET_PARAM(2);
method = GET_PARAM(3); method = GET_PARAM(3);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
} }
}; };
......
...@@ -72,7 +72,7 @@ PARAM_TEST_CASE(ConvertToTestBase, MatType, MatType) ...@@ -72,7 +72,7 @@ PARAM_TEST_CASE(ConvertToTestBase, MatType, MatType)
//src mat with roi //src mat with roi
cv::Mat mat_roi; cv::Mat mat_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -90,11 +90,6 @@ PARAM_TEST_CASE(ConvertToTestBase, MatType, MatType) ...@@ -90,11 +90,6 @@ PARAM_TEST_CASE(ConvertToTestBase, MatType, MatType)
mat = randomMat(rng, size, type, 5, 16, false); mat = randomMat(rng, size, type, 5, 16, false);
dst = randomMat(rng, size, type, 5, 16, false); dst = randomMat(rng, size, type, 5, 16, false);
//std::vector<cv::ocl::Info> oclinfo;
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -175,7 +170,7 @@ PARAM_TEST_CASE(CopyToTestBase, MatType, bool) ...@@ -175,7 +170,7 @@ PARAM_TEST_CASE(CopyToTestBase, MatType, bool)
cv::Mat mat_roi; cv::Mat mat_roi;
cv::Mat mask_roi; cv::Mat mask_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -197,10 +192,6 @@ PARAM_TEST_CASE(CopyToTestBase, MatType, bool) ...@@ -197,10 +192,6 @@ PARAM_TEST_CASE(CopyToTestBase, MatType, bool)
cv::threshold(mask, mask, 0.5, 255., CV_8UC1); cv::threshold(mask, mask, 0.5, 255., CV_8UC1);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -301,7 +292,7 @@ PARAM_TEST_CASE(SetToTestBase, MatType, bool) ...@@ -301,7 +292,7 @@ PARAM_TEST_CASE(SetToTestBase, MatType, bool)
//src mat with roi //src mat with roi
cv::Mat mat_roi; cv::Mat mat_roi;
cv::Mat mask_roi; cv::Mat mask_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gmat_whole; cv::ocl::oclMat gmat_whole;
...@@ -322,10 +313,6 @@ PARAM_TEST_CASE(SetToTestBase, MatType, bool) ...@@ -322,10 +313,6 @@ PARAM_TEST_CASE(SetToTestBase, MatType, bool)
cv::threshold(mask, mask, 0.5, 255., CV_8UC1); cv::threshold(mask, mask, 0.5, 255., CV_8UC1);
val = cv::Scalar(rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0)); val = cv::Scalar(rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0), rng.uniform(-10.0, 10.0));
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -417,7 +404,7 @@ PARAM_TEST_CASE(convertC3C4, MatType, cv::Size) ...@@ -417,7 +404,7 @@ PARAM_TEST_CASE(convertC3C4, MatType, cv::Size)
//src mat with roi //src mat with roi
cv::Mat mat1_roi; cv::Mat mat1_roi;
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -430,13 +417,6 @@ PARAM_TEST_CASE(convertC3C4, MatType, cv::Size) ...@@ -430,13 +417,6 @@ PARAM_TEST_CASE(convertC3C4, MatType, cv::Size)
type = GET_PARAM(0); type = GET_PARAM(0);
ksize = GET_PARAM(1); ksize = GET_PARAM(1);
//dst = randomMat(rng, size, type, 5, 16, false);
//int devnums = getDevice(oclinfo);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[1]);
} }
void random_roi() void random_roi()
......
...@@ -65,15 +65,6 @@ PARAM_TEST_CASE(PyrDown, MatType, int) ...@@ -65,15 +65,6 @@ PARAM_TEST_CASE(PyrDown, MatType, int)
{ {
type = GET_PARAM(0); type = GET_PARAM(0);
channels = GET_PARAM(1); channels = GET_PARAM(1);
//int devnums = getDevice(oclinfo);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
}
void Cleanup()
{
} }
}; };
...@@ -97,8 +88,6 @@ TEST_P(PyrDown, Mat) ...@@ -97,8 +88,6 @@ TEST_P(PyrDown, Mat)
char s[1024] = {0}; char s[1024] = {0};
EXPECT_MAT_NEAR(dst, dst_cpu, dst.depth() == CV_32F ? 1e-4f : 1.0f, s); EXPECT_MAT_NEAR(dst, dst_cpu, dst.depth() == CV_32F ? 1e-4f : 1.0f, s);
Cleanup();
} }
} }
......
...@@ -50,19 +50,7 @@ using namespace cvtest; ...@@ -50,19 +50,7 @@ using namespace cvtest;
using namespace testing; using namespace testing;
using namespace std; using namespace std;
//#define DUMP
/////////////////////////////////////////////////////////////////////////////////////////////////
// BroxOpticalFlow
extern string workdir; extern string workdir;
#define BROX_OPTICAL_FLOW_DUMP_FILE "opticalflow/brox_optical_flow.bin"
#define BROX_OPTICAL_FLOW_DUMP_FILE_CC20 "opticalflow/brox_optical_flow_cc20.bin"
/////////////////////////////////////////////////////////////////////////////////////////////////
// PyrLKOpticalFlow
//IMPLEMENT_PARAM_CLASS(UseGray, bool)
PARAM_TEST_CASE(Sparse, bool, bool) PARAM_TEST_CASE(Sparse, bool, bool)
{ {
......
...@@ -58,12 +58,9 @@ PARAM_TEST_CASE(PyrUp, MatType, int) ...@@ -58,12 +58,9 @@ PARAM_TEST_CASE(PyrUp, MatType, int)
{ {
int type; int type;
int channels; int channels;
//std::vector<cv::ocl::Info> oclinfo;
virtual void SetUp() virtual void SetUp()
{ {
//int devnums = cv::ocl::getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
type = GET_PARAM(0); type = GET_PARAM(0);
channels = GET_PARAM(1); channels = GET_PARAM(1);
} }
......
...@@ -87,7 +87,7 @@ PARAM_TEST_CASE(MergeTestBase, MatType, int) ...@@ -87,7 +87,7 @@ PARAM_TEST_CASE(MergeTestBase, MatType, int)
//dst mat with roi //dst mat with roi
cv::Mat dst_roi; cv::Mat dst_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst_whole; cv::ocl::oclMat gdst_whole;
...@@ -112,10 +112,6 @@ PARAM_TEST_CASE(MergeTestBase, MatType, int) ...@@ -112,10 +112,6 @@ PARAM_TEST_CASE(MergeTestBase, MatType, int)
mat4 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false); mat4 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false);
dst = randomMat(rng, size, CV_MAKETYPE(type, channels), 5, 16, false); dst = randomMat(rng, size, CV_MAKETYPE(type, channels), 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
...@@ -252,7 +248,7 @@ PARAM_TEST_CASE(SplitTestBase, MatType, int) ...@@ -252,7 +248,7 @@ PARAM_TEST_CASE(SplitTestBase, MatType, int)
cv::Mat dst2_roi; cv::Mat dst2_roi;
cv::Mat dst3_roi; cv::Mat dst3_roi;
cv::Mat dst4_roi; cv::Mat dst4_roi;
//std::vector<cv::ocl::Info> oclinfo;
//ocl dst mat for testing //ocl dst mat for testing
cv::ocl::oclMat gdst1_whole; cv::ocl::oclMat gdst1_whole;
cv::ocl::oclMat gdst2_whole; cv::ocl::oclMat gdst2_whole;
...@@ -280,10 +276,6 @@ PARAM_TEST_CASE(SplitTestBase, MatType, int) ...@@ -280,10 +276,6 @@ PARAM_TEST_CASE(SplitTestBase, MatType, int)
dst3 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false); dst3 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false);
dst4 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false); dst4 = randomMat(rng, size, CV_MAKETYPE(type, 1), 5, 16, false);
//int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
//CV_Assert(devnums > 0);
////if you want to use undefault device, set it here
////setDevice(oclinfo[0]);
} }
void random_roi() void random_roi()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment