1 #include <visp3/core/vpIoTools.h> 2 #include <visp3/core/vpDisplay.h> 3 #include <visp3/io/vpImageIo.h> 5 #include "record_helper.h" 15 bool record_helper(
const std::string &opt_seqname,
int opt_record_mode,
18 static bool start_record =
false;
19 static std::string text_record_mode = std::string(
"Record mode: ") + (opt_record_mode ? std::string(
"single") :
std::string(
"continuous"));
21 if (! opt_seqname.empty()) {
22 if (! opt_record_mode) {
39 if (! opt_seqname.empty()) {
44 if (! opt_seqname.empty()) {
46 start_record = !start_record;
57 static unsigned int counter = 1;
58 char filename[FILENAME_MAX];
59 sprintf(filename, opt_seqname.c_str(), counter);
62 static bool parent_exists =
false;
63 if (! parent_exists) {
65 if (! parent.empty()) {
75 std::string text = std::string(
"Save: ") + std::string(filename);
77 std::cout << text << std::endl;
79 if (opt_record_mode == 1) {
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
static void write(const vpImage< unsigned char > &I, const std::string &filename)