Commit b2a6a257 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

minor modification of gpu video tests

disabled NVidia Visualization test, it's functionality (draw rectangles) doesn't used in gpu module
parent 7a62413c
......@@ -52,9 +52,9 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat&, GpuMat
#else /* !defined (HAVE_CUDA) */
namespace cv { namespace gpu { namespace device
namespace cv { namespace gpu { namespace device
{
namespace gfft
namespace gfft
{
int findCorners_gpu(DevMem2Df eig, float threshold, DevMem2Db mask, float2* corners, int max_count);
void sortCorners_gpu(DevMem2Df eig, float2* corners, int count);
......@@ -67,7 +67,9 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
CV_Assert(qualityLevel > 0 && minDistance >= 0 && maxCorners >= 0);
CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size()));
CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS));
if (!TargetArchs::builtWith(GLOBAL_ATOMICS) || !DeviceInfo().supports(GLOBAL_ATOMICS))
CV_Error(CV_StsNotImplemented, "The device doesn't support global atomics");
ensureSizeIsEnough(image.size(), CV_32F, eig_);
......@@ -106,7 +108,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
{
Point2f p = tmp[i];
bool good = true;
bool good = true;
int x_cell = static_cast<int>(p.x / cell_size);
int y_cell = static_cast<int>(p.y / cell_size);
......@@ -125,7 +127,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
for (int yy = y1; yy <= y2; yy++)
{
for (int xx = x1; xx <= x2; xx++)
{
{
vector<Point2f>& m = grid[yy * grid_width + xx];
if (!m.empty())
......@@ -141,7 +143,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
goto break_out;
}
}
}
}
}
}
......
......@@ -71,7 +71,7 @@ struct NVidiaTest : TestWithParam<cv::gpu::DeviceInfo>
std::string path;
virtual void SetUp()
virtual void SetUp()
{
devInfo = GetParam();
......@@ -86,84 +86,85 @@ struct NCV : NVidiaTest {};
OutputLevel nvidiaTestOutputLevel = OutputLevelNone;
TEST_P(NPPST, Integral)
TEST_P(NPPST, Integral)
{
bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, SquaredIntegral)
TEST_P(NPPST, SquaredIntegral)
{
bool res = nvidia_NPPST_Squared_Integral_Image(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, RectStdDev)
TEST_P(NPPST, RectStdDev)
{
bool res = nvidia_NPPST_RectStdDev(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, Resize)
TEST_P(NPPST, Resize)
{
bool res = nvidia_NPPST_Resize(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, VectorOperations)
TEST_P(NPPST, VectorOperations)
{
bool res = nvidia_NPPST_Vector_Operations(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, Transpose)
TEST_P(NPPST, Transpose)
{
bool res = nvidia_NPPST_Transpose(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, VectorOperations)
TEST_P(NCV, VectorOperations)
{
bool res = nvidia_NCV_Vector_Operations(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeLoader)
TEST_P(NCV, HaarCascadeLoader)
{
bool res = nvidia_NCV_Haar_Cascade_Loader(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeApplication)
TEST_P(NCV, HaarCascadeApplication)
{
bool res = nvidia_NCV_Haar_Cascade_Application(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HypothesesFiltration)
TEST_P(NCV, HypothesesFiltration)
{
bool res = nvidia_NCV_Hypotheses_Filtration(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, Visualization)
TEST_P(NCV, DISABLED_Visualization)
{
// this functionality doesn't used in gpu module
bool res = nvidia_NCV_Visualization(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
INSTANTIATE_TEST_CASE_P(NVidia, NPPST, ALL_DEVICES);
INSTANTIATE_TEST_CASE_P(NVidia, NCV, ALL_DEVICES);
INSTANTIATE_TEST_CASE_P(GPU_NVidia, NPPST, ALL_DEVICES);
INSTANTIATE_TEST_CASE_P(GPU_NVidia, NCV, ALL_DEVICES);
#endif // HAVE_CUDA
This diff is collapsed.
......@@ -122,7 +122,7 @@ Mat readImageType(const string& fname, int type)
cvtColor(src, temp, cv::COLOR_BGR2BGRA);
swap(src, temp);
}
src.convertTo(src, CV_MAT_DEPTH(type));
src.convertTo(src, CV_MAT_DEPTH(type), CV_MAT_DEPTH(type) == CV_32F ? 1.0 / 255.0 : 1.0);
return src;
}
......
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