fixed compiling bug under g++ in gpi HOG sample

This commit is contained in:
Alexey Spizhevoy 2010-11-22 16:46:49 +00:00
parent fbb6b6f90c
commit 4e52df75a7

View File

@ -3,6 +3,7 @@
#include <string>
#include <sstream>
#include <iomanip>
#include <stdexcept>
#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 <path_to_the_source>\n"
<< " [-src_is_video <true/false>] # says to interp. src as img or as video\n"
<< " [-make_gray <true/false>] # 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();
}
}