40 #include <visp3/core/vpFont.h>
41 #include <visp3/core/vpImageDraw.h>
42 #include <visp3/io/vpImageIo.h>
44 int main(
int argc,
char *argv[])
46 #ifdef ENABLE_VISP_NAMESPACE
50 for (
int i = 1; i < argc; i++) {
51 if (std::string(argv[i]) ==
"--save") {
54 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
55 std::cout <<
"\nUsage: " << argv[0] <<
" [--save] [--help] [-h]\n" << std::endl;
59 std::cout <<
"Save: " << save << std::endl;
61 const std::string
visp =
"ViSP: Open source Visual Servoing Platform";
172 vpRect rectangle(iP1, iP2);
175 std::vector<vpImagePoint> polygon;
190 std::string filename =
"canvas_color.png";
191 std::cout <<
"Save " << filename << std::endl;
200 unsigned char color = 255;
211 font.drawText(I,
"Test...", iP1, color);
215 font.drawText(I,
"...tse", iP1, color);
219 font.drawText(I,
"&é(-è_çà)", iP1, color);
223 font.drawText(I,
"Test...", iP1, 0, 255);
228 font2.drawText(I,
visp, textPos, 255);
305 vpRect rectangle(iP1, iP2);
308 std::vector<vpImagePoint> polygon;
323 std::string filename =
"canvas_gray.png";
324 std::cout <<
"Save " << filename << std::endl;
Generic class defining intrinsic camera parameters.
static const vpColor white
static const vpColor cyan
static const vpColor none
static const vpColor orange
static const vpColor darkRed
static const vpColor blue
static const vpColor darkGreen
static const vpColor yellow
static const vpColor black
static const vpColor green
Font drawing functions for image.
Implementation of an homogeneous matrix and operations on such kind of matrices.
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 void drawRectangle(vpImage< unsigned char > &I, const vpRect &rectangle, unsigned char color, bool fill=false, unsigned int thickness=1)
static void drawCircle(vpImage< unsigned char > &I, const vpImageCircle &circle, unsigned char color, unsigned int thickness=1)
static void drawLine(vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1)
static void drawPoint(vpImage< unsigned char > &I, const vpImagePoint &ip, 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 drawPolygon(vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, unsigned char color, unsigned int thickness=1, bool closed=true)
static void drawCross(vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, unsigned char color, unsigned int thickness=1)
static void drawDottedLine(vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1)
static void write(const vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Defines a rectangle in the plane.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as Euler angle minimal representation.
Class that consider the case of a translation vector.