fix bugs in tests, set device for each test case

Signed-off-by: yao <bitwangyaoyao@gmail.com>
This commit is contained in:
yao
2012-08-06 15:51:27 +08:00
parent 505cda43d1
commit 7d97e8112a
5 changed files with 17 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ void blendLinearGold(const cv::Mat& img1, const cv::Mat& img2, const cv::Mat& we
PARAM_TEST_CASE(Blend, cv::Size, MatType/*, UseRoi*/)
{
//cv::gpu::DeviceInfo devInfo;
std::vector<cv::ocl::Info> oclinfo;
cv::Size size;
int type;
bool useRoi;
@@ -45,7 +45,8 @@ PARAM_TEST_CASE(Blend, cv::Size, MatType/*, UseRoi*/)
type = GET_PARAM(1);
/*useRoi = GET_PARAM(3);*/
//cv::gpu::setDevice(devInfo.deviceID());
int devnums = getDevice(oclinfo, OPENCV_DEFAULT_OPENCL_DEVICE);
CV_Assert(devnums > 0);
}
};