1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 12:55:15 +08:00

Fixed OpenCL check behavior

This commit is contained in:
Vladislav Samsonov
2016-07-27 01:28:42 +03:00
parent 55f093a45b
commit 1764f9247a
3 changed files with 11 additions and 4 deletions

View File

@@ -283,7 +283,12 @@ int main( int argc, char** argv )
double startTick, time;
startTick = (double) getTickCount(); // measure time
algorithm->calc(i1, i2, flow);
if (useGpu)
algorithm->calc(i1, i2, flow.getUMat(ACCESS_RW));
else
algorithm->calc(i1, i2, flow);
time = ((double) getTickCount() - startTick) / getTickFrequency();
printf("\nTime [s]: %.3f\n", time);
if(display_images)