fixed GPU_NVidia/NCV.Visualization test
authorVladislav Vinogradov <no@email>
Tue, 24 Apr 2012 12:36:15 +0000 (12:36 +0000)
committerVladislav Vinogradov <no@email>
Tue, 24 Apr 2012 12:36:15 +0000 (12:36 +0000)
modules/gpu/test/nvidia/main_nvidia.cpp
modules/gpu/test/test_nvidia.cpp

index a6719ae..1f1e24a 100644 (file)
@@ -1,5 +1,5 @@
 #pragma warning (disable : 4408 4201 4100)\r
\r
+\r
 #include <cstdio>\r
 \r
 #include "NCV.hpp"\r
@@ -290,11 +290,11 @@ static void devNullOutput(const std::string& msg)
 \r
 bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerII("NPPST Integral Image", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);\r
     NCVTestSourceProvider<Ncv32f> testSrcRandom_32f(2010, -1.0f, 1.0f, 4096, 4096);\r
 \r
@@ -306,7 +306,7 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
 \r
 bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerSII("NPPST Squared Integral Image", outputLevel);\r
@@ -320,11 +320,11 @@ bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, Outp
 \r
 bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
-    \r
+\r
     NCVAutoTestLister testListerRStdDev("NPPST RectStdDev", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);\r
 \r
     generateRectStdDevTests(testListerRStdDev, testSrcRandom_8u, 4096, 4096);\r
@@ -334,7 +334,7 @@ bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outp
 \r
 bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerResize("NPPST Resize", outputLevel);\r
@@ -350,11 +350,11 @@ bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLe
 \r
 bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
-    \r
+\r
     NCVAutoTestLister testListerNPPSTVectorOperations("NPPST Vector Operations", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);\r
 \r
     generateNPPSTVectorTests(testListerNPPSTVectorOperations, testSrcRandom_32u, 4096*4096);\r
@@ -364,11 +364,11 @@ bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLev
 \r
 bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerTranspose("NPPST Transpose", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);\r
     NCVTestSourceProvider<Ncv64u> testSrcRandom_64u(2010, 0, -1, 4096, 4096);\r
 \r
@@ -380,13 +380,13 @@ bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outpu
 \r
 bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
-    \r
+\r
     NCVAutoTestLister testListerVectorOperations("Vector Operations", outputLevel);\r
 \r
     NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);\r
-    \r
+\r
     generateVectorTests(testListerVectorOperations, testSrcRandom_32u, 4096*4096);\r
 \r
     return testListerVectorOperations.invoke();\r
@@ -394,11 +394,11 @@ bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel
 \r
 bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerHaarLoader("Haar Cascade Loader", outputLevel);\r
-    \r
+\r
     generateHaarLoaderTests(testListerHaarLoader);\r
 \r
     return testListerHaarLoader.invoke();\r
@@ -406,13 +406,13 @@ bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLev
 \r
 bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
-    \r
+\r
     NCVAutoTestLister testListerHaarAppl("Haar Cascade Application", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv8u> testSrcFacesVGA_8u(path + "group_1_640x480_VGA.pgm");\r
-    \r
+\r
     generateHaarApplicationTests(testListerHaarAppl, testSrcFacesVGA_8u, 1280, 720);\r
 \r
     return testListerHaarAppl.invoke();\r
@@ -420,11 +420,11 @@ bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, Outp
 \r
 bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
-    \r
+\r
     NCVAutoTestLister testListerHypFiltration("Hypotheses Filtration", outputLevel);\r
-    \r
+\r
     NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);\r
 \r
     generateHypothesesFiltrationTests(testListerHypFiltration, testSrcRandom_32u, 1024);\r
@@ -434,14 +434,14 @@ bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputL
 \r
 bool nvidia_NCV_Visualization(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-       path = test_data_path;\r
+    path = test_data_path;\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerVisualize("Visualization", outputLevel);\r
 \r
     NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);\r
-    NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);\r
-    \r
+    NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, RAND_MAX, 4096, 4096);\r
+\r
     generateDrawRectsTests(testListerVisualize, testSrcRandom_8u, testSrcRandom_32u, 4096, 4096);\r
     generateDrawRectsTests(testListerVisualize, testSrcRandom_32u, testSrcRandom_32u, 4096, 4096);\r
 \r
index 4c4aa6d..1b9879c 100644 (file)
@@ -156,7 +156,7 @@ TEST_P(NCV, HypothesesFiltration)
     ASSERT_TRUE(res);\r
 }\r
 \r
-TEST_P(NCV, DISABLED_Visualization)\r
+TEST_P(NCV, Visualization)\r
 {\r
     // this functionality doesn't used in gpu module\r
     bool res = nvidia_NCV_Visualization(path, nvidiaTestOutputLevel);\r