42 #include <visp3/core/vpImageDraw.h> 43 #include <visp3/core/vpFont.h> 44 #include <visp3/io/vpImageIo.h> 46 int main(
int argc ,
char *argv[])
49 for (
int i = 1; i < argc; i++) {
50 if (std::string(argv[i]) ==
"--save") {
53 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
54 std::cout <<
"\nUsage: " << argv[0]
55 <<
" [--save] [--help] [-h]\n" 60 std::cout <<
"Save: " << save << std::endl;
156 vpRect rectangle(iP1, iP2);
159 std::vector<vpImagePoint> polygon;
174 std::string filename =
"canvas_color.png";
175 std::cout <<
"Save " << filename << std::endl;
184 unsigned char color = 255;
195 font.drawText(I,
"Test...", iP1, color);
199 font.drawText(I,
"Test...", iP1, 0, 255);
275 vpRect rectangle(iP1, iP2);
278 std::vector<vpImagePoint> polygon;
293 std::string filename =
"canvas_gray.png";
294 std::cout <<
"Save " << filename << std::endl;
static void drawRectangle(vpImage< unsigned char > &I, const vpRect &rectangle, unsigned char color, bool fill=false, unsigned int thickness=1)
Implementation of an homogeneous matrix and operations on such kind of matrices.
static const vpColor black
static void drawCircle(vpImage< unsigned char > &I, const vpImagePoint ¢er, unsigned int radius, unsigned char color, unsigned int thickness=1)
static void drawFrame(vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, unsigned char color, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0))
static void drawArrow(vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
static const vpColor none
static void drawDottedLine(vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1)
static const vpColor green
static const vpColor orange
Implementation of a rotation matrix and operations on such kind of matrices.
static void write(const vpImage< unsigned char > &I, const std::string &filename)
static const vpColor cyan
static void drawPoint(vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned char color, unsigned int thickness=1)
Generic class defining intrinsic camera parameters.
Font drawing functions for image.
static void drawCross(vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, unsigned char color, unsigned int thickness=1)
static void drawPolygon(vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, unsigned char color, unsigned int thickness=1, bool closed=true)
Implementation of a rotation vector as Euler angle minimal representation.
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static const vpColor yellow
static const vpColor white
static void drawLine(vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1)
Class that consider the case of a translation vector.
static const vpColor blue