From 4e52df75a7469ef0103b1a6d235d19ea2a5ca046 Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Mon, 22 Nov 2010 16:46:49 +0000 Subject: [PATCH] fixed compiling bug under g++ in gpi HOG sample --- samples/gpu/gpu_hog.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/samples/gpu/gpu_hog.cpp b/samples/gpu/gpu_hog.cpp index 0703828..ed8823e 100644 --- a/samples/gpu/gpu_hog.cpp +++ b/samples/gpu/gpu_hog.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "opencv2/gpu/gpu.hpp" #include "opencv2/highgui/highgui.hpp" @@ -39,7 +40,7 @@ public: /** Describes aplication logic */ class App { -public: +public: /** Initializes application */ App(const Settings& s); @@ -86,7 +87,7 @@ int main(int argc, char** argv) { if (argc < 2) { - cout << "Usage:\nsample_hog\n" + cout << "Usage:\nsample_hog\n" << " -src \n" << " [-src_is_video ] # says to interp. src as img or as video\n" << " [-make_gray ] # convert image to gray one or not\n" @@ -216,7 +217,7 @@ void App::RunOpencvGui() { VideoCapture vc; Mat frame; - + if (settings.src_is_video) { vc.open(settings.src.c_str()); @@ -353,7 +354,7 @@ void App::HandleKey(char key) inline void App::HogWorkBegin() { hog_work_begin = getTickCount(); } -inline void App::HogWorkEnd() +inline void App::HogWorkEnd() { int64 delta = getTickCount() - hog_work_begin; double freq = getTickFrequency(); @@ -367,7 +368,7 @@ inline double App::HogWorkFps() const { return hog_work_fps; } inline void App::WorkBegin() { work_begin = getTickCount(); } -inline void App::WorkEnd() +inline void App::WorkEnd() { int64 delta = getTickCount() - work_begin; double freq = getTickFrequency(); @@ -378,10 +379,10 @@ inline void App::WorkEnd() inline double App::WorkFps() const { return work_fps; } -inline const string App::GetPerformanceSummary() const -{ +inline const string App::GetPerformanceSummary() const +{ stringstream ss; ss << (use_gpu ? "GPU" : "CPU") << " HOG FPS: " << setiosflags(ios::left) << setprecision(4) << setw(7) << HogWorkFps() << " Total FPS: " << setprecision(4) << setw(7) << WorkFps(); return ss.str(); -} \ No newline at end of file +} -- 2.7.4