Face3d
Main Page
Namespaces
Classes
Files
File List
File Members
Common.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <opencv2/opencv.hpp>
4
#include <string>
5
#include <sstream>
6
7
namespace
Face3D
8
{
14
inline
void
dbgShow
(
const
cv::Mat img,
const
std::string& msg=
""
,
int
id
=0)
15
{
16
#ifdef NDEBUG
17
return
;
18
#else
19
static
int
ctr = 0;
20
++ctr;
21
22
std::stringstream ss;
23
ss <<
"Face3d: "
<< msg <<
"("
<<
id
<<
"), #window: "
<<ctr;
24
cv::imshow(ss.str(), img);
25
cv::waitKey(0);
26
27
//#define DUMP_TO_FILE
28
#ifdef DUMP_TO_FILE
29
std::stringstream fn;
30
fn <<
"out/"
<< ctr <<
".png"
;
31
cv::imwrite(fn.str(),img);
32
#endif
33
#endif
34
}
35
}
36
Face3D::dbgShow
void dbgShow(const cv::Mat img, const std::string &msg="", int id=0)
show intermediate results while debugging - does not do anything when compiled in release mode ...
Definition:
Common.hpp:14
Face3D
Definition:
Common.hpp:7
src
Common.hpp
Generated by
1.8.11