From 0036cabaf25fbab9630769abcbefc52d5d9d9b23 Mon Sep 17 00:00:00 2001
From: Alexey Spizhevoy <no@email>
Date: Tue, 7 Dec 2010 07:56:30 +0000
Subject: [PATCH] fixed total FPS evaluation in the GPU HOG sample

---
 samples/gpu/hog.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/gpu/hog.cpp b/samples/gpu/hog.cpp
index de2b9ca52..89f2e1f4b 100644
--- a/samples/gpu/hog.cpp
+++ b/samples/gpu/hog.cpp
@@ -288,8 +288,6 @@ void App::RunOpencvGui()
                 rectangle(img_to_show, r.tl(), r.br(), CV_RGB(0, 255, 0), 3);
             }
 
-            WorkEnd();
-
             // Show results
             putText(img_to_show, GetPerformanceSummary(), Point(5, 25), FONT_HERSHEY_SIMPLEX, 1.0, Scalar(0, 0, 255), 2);
             imshow("opencv_gpu_hog", img_to_show);
@@ -299,6 +297,8 @@ void App::RunOpencvGui()
             {
                 vc >> frame;
             }
+
+            WorkEnd();
         }
     }
 }