#include <iostream>
#include <visp3/core/vpImageDraw.h>
#include <visp3/core/vpFont.h>
#include <visp3/io/vpImageIo.h>
int main(int argc ,char *argv[])
{
bool save = false;
for (int i = 1; i < argc; i++) {
if (std::string(argv[i]) == "--save") {
save = true;
}
else if (std::string(argv[i]) == "--help" || std::string(argv[i]) == "-h") {
std::cout << "\nUsage: " << argv[0]
<< " [--save] [--help] [-h]\n"
<< std::endl;
return 0;
}
}
std::cout << "Save: " << save << std::endl;
{
int w = 60;
int h = 50;
std::vector<vpImagePoint> polygon;
polygon.clear();
if (save) {
std::string filename = "canvas_color.png";
std::cout << "Save " << filename << std::endl;
}
}
{
unsigned char color = 255;
font.
drawText(I,
"Test...", iP1, color);
font.
drawText(I,
"Test...", iP1, 0, 255);
int w = 60;
int h = 50;
std::vector<vpImagePoint> polygon;
polygon.clear();
if (save) {
std::string filename = "canvas_gray.png";
std::cout << "Save " << filename << std::endl;
}
}
return EXIT_SUCCESS;
}