1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

added gpu::columnSum, fixed compile error (if there is no cuda), refactored

This commit is contained in:
Alexey Spizhevoy
2010-12-08 15:06:10 +00:00
parent b1c5b9293e
commit fa322bf46f
6 changed files with 73 additions and 21 deletions
+9 -9
View File
@@ -97,15 +97,15 @@ struct CV_GpuMatchTemplateTest: CvTest
F(cout << "gpu_block: " << clock() - t << endl;)
if (!check(dst_gold, Mat(dst), 0.25f * h * w * 1e-5f)) return;
gen(image, n, m, CV_32F);
gen(templ, h, w, CV_32F);
F(t = clock();)
matchTemplate(image, templ, dst_gold, CV_TM_CCORR);
F(cout << "cpu:" << clock() - t << endl;)
F(t = clock();)
gpu::matchTemplate(gpu::GpuMat(image), gpu::GpuMat(templ), dst, CV_TM_CCORR);
F(cout << "gpu_block: " << clock() - t << endl;)
if (!check(dst_gold, Mat(dst), 0.25f * h * w * 1e-5f)) return;
//gen(image, n, m, CV_32F);
//gen(templ, h, w, CV_32F);
//F(t = clock();)
//matchTemplate(image, templ, dst_gold, CV_TM_CCORR);
//F(cout << "cpu:" << clock() - t << endl;)
//F(t = clock();)
//gpu::matchTemplate(gpu::GpuMat(image), gpu::GpuMat(templ), dst, CV_TM_CCORR);
//F(cout << "gpu_block: " << clock() - t << endl;)
//if (!check(dst_gold, Mat(dst), 0.25f * h * w * 1e-5f)) return;
}
}
catch (const Exception& e)