1 #include <visp3/core/vpConfig.h>
3 #include <visp3/gui/vpDisplayGDI.h>
4 #include <visp3/gui/vpDisplayX.h>
5 #include <visp3/core/vpHomogeneousMatrix.h>
9 #ifdef ENABLE_VISP_NAMESPACE
17 #if defined(VISP_HAVE_X11)
19 #elif defined(VISP_HAVE_GDI)
27 double dOffset = 0.25;
28 std::string axisName[3] = {
"x",
"y",
"z" };
29 double px = 600;
double py = 600;
30 double u0 = 320;
double v0 = 240;
38 for (
unsigned int idAxis = 0; idAxis < 3; idAxis++) {
39 unsigned int tOffset = 0;
40 for (
double theta = -180; theta < 180; theta += dTheta) {
43 t[0] = t[0] + tOffset * dOffset;
48 std::stringstream ss_name;
50 ss_name << static_cast<int>(theta);
52 ss_name << axisName[idAxis];
55 vpDisplay::displayFrame(I, cMo, cam, 0.1,
vpColor::none, 1,
vpImagePoint(), ss_name.str(),
vpColor::yellow,
vpImagePoint(40, 40));
61 std::cout <<
"A click to quit..." << std::endl;
65 std::cout <<
"Catch an exception: " << e.
getMessage() << std::endl;
Generic class defining intrinsic camera parameters.
void initPersProjWithoutDistortion(double px, double py, double u0, double v0)
static const vpColor none
static const vpColor yellow
Display for windows using GDI (available on any windows 32 platform).
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void displayFrame(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0), const std::string &frameName="", const vpColor &textColor=vpColor::black, const vpImagePoint &textOffset=vpImagePoint(15, 15))
static void setTitle(const vpImage< unsigned char > &I, const std::string &windowtitle)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
const char * getMessage() const
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix & buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static double rad(double deg)
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.