37 #include <visp3/core/vpConfig.h>
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 #include <visp3/core/vpMath.h>
41 #include <visp3/core/vpMeterPixelConversion.h>
42 #include <visp3/core/vpPixelMeterConversion.h>
43 #include <visp3/gui/vpPlotGraph.h>
45 #include <visp3/gui/vpDisplayD3D.h>
46 #include <visp3/gui/vpDisplayGDI.h>
47 #include <visp3/gui/vpDisplayGTK.h>
48 #include <visp3/gui/vpDisplayOpenCV.h>
49 #include <visp3/gui/vpDisplayX.h>
55 #if defined(VISP_HAVE_DISPLAY)
57 int laFonctionSansNom(
double delta);
60 vpPlotGraph::vpPlotGraph()
61 : xorg(0.), yorg(0.), zoomx(1.), zoomy(1.), xmax(10), ymax(10), xmin(0), ymin(-10), xdelt(1), ydelt(1), gridx(true),
62 gridy(true), gridColor(), curveNbr(1), curveList(nullptr), scaleInitialized(false), firstPoint(true), nbDivisionx(10),
63 nbDivisiony(10), topLeft(), width(0), height(0), graphZone(), dTopLeft(), dWidth(0), dHeight(0), dGraphZone(),
64 dTopLeft3D(), dGraphZone3D(), cam(), cMo(), cMf(), w_xval(0), w_xsize(0), w_yval(0), w_ysize(0), w_zval(0),
65 w_zsize(0), ptXorg(0), ptYorg(0), ptZorg(0), zoomx_3D(1.), zoomy_3D(1.), zoomz_3D(1.), nbDivisionz(10), zorg(1.),
66 zoomz(1.), zmax(10), zmin(-10), zdelt(1), old_iPr(), old_iPz(), blockedr(false), blockedz(false), blocked(false),
67 epsi(5), epsj(6), dispUnit(false), dispTitle(false), dispLegend(false), gridThickness(1)
69 gridColor.setColor(200, 200, 200);
77 vpPlotGraph::~vpPlotGraph()
79 if (curveList !=
nullptr) {
85 void vpPlotGraph::initGraph(
unsigned int nbCurve)
87 curveList =
new vpPlotCurve[nbCurve];
92 for (
unsigned int i = 0; i < curveNbr; ++i) {
93 (curveList + i)->color = colors[i % 6];
94 (curveList + i)->curveStyle = vpPlotCurve::line;
95 (curveList + i)->pointListx.clear();
96 (curveList + i)->pointListy.clear();
97 (curveList + i)->legend.clear();
101 void vpPlotGraph::initSize(
vpImagePoint top_left,
unsigned int w,
unsigned int h,
unsigned int margei,
104 this->topLeft = top_left;
107 graphZone.setTopLeft(topLeft);
108 graphZone.setWidth(width);
109 graphZone.setHeight(height);
111 this->dTopLeft =
vpImagePoint(topLeft.get_i() + margei, topLeft.get_j() + margej);
112 this->dWidth = width - margej - 10;
113 this->dHeight = height - 2 * margei;
114 dGraphZone.setTopLeft(dTopLeft);
115 dGraphZone.setWidth(dWidth + 1);
116 dGraphZone.setHeight(dHeight + 1);
118 this->dTopLeft3D =
vpImagePoint(topLeft.get_i() + margei, topLeft.get_j() + 10);
119 dGraphZone3D.setTopLeft(dTopLeft3D);
120 dGraphZone3D.setWidth(dWidth + 1);
121 dGraphZone3D.setHeight(dHeight + 1);
123 if (this->dWidth > this->dHeight) {
125 w_xsize = this->dWidth / this->dHeight;
128 w_yval = w_ysize / 2.0;
129 w_xval = w_xsize / 2.0;
130 w_zval = w_zsize / 2.0;
132 else if (this->dWidth == this->dHeight) {
141 else if (this->dWidth < this->dHeight) {
143 w_ysize = this->dHeight / this->dWidth;
146 w_yval = w_ysize / 2.0;
147 w_xval = w_xsize / 2.0;
148 w_zval = w_zsize / 2.0;
151 cam.initPersProjWithoutDistortion(1000, 1000, this->dWidth / 2.0, this->dHeight / 2.0);
155 cMf.buildFrom(0, 0, cMo[2][3], 0, 0, 0);
158 void vpPlotGraph::findPose()
168 iP[1].
set_ij(0, dWidth - 1);
169 iP[2].
set_ij(dHeight - 1, dWidth - 1);
170 iP[3].
set_ij(dHeight - 1, 0);
176 for (
unsigned int i = 0; i < 4; ++i) {
184 void vpPlotGraph::computeGraphParameters()
186 zoomx = dWidth / (xmax - xmin);
187 zoomy = dHeight / (ymax - ymin);
188 xorg = dTopLeft.get_j() - (xmin * zoomx);
189 yorg = dTopLeft.get_i() + (ymax * zoomy);
192 void vpPlotGraph::setCurveColor(
unsigned int curveNum,
const vpColor &color) { (curveList + curveNum)->color = color; }
194 void vpPlotGraph::setTitle(
const std::string &title_)
200 void vpPlotGraph::setUnitX(
const std::string &unit_x)
206 void vpPlotGraph::setUnitY(
const std::string &unit_y)
212 void vpPlotGraph::setUnitZ(
const std::string &unit_z)
218 void vpPlotGraph::setLegend(
unsigned int curveNum,
const std::string &newlegend)
220 (curveList + curveNum)->legend = newlegend;
224 void vpPlotGraph::setCurveThickness(
unsigned int curveNum,
unsigned int thickness)
226 (curveList + curveNum)->thickness = thickness;
229 int laFonctionSansNom(
double delta)
256 computeGraphParameters();
258 xdelt = (xmax - xmin) / nbDivisionx;
259 ydelt = (ymax - ymin) / nbDivisiony;
264 power = laFonctionSansNom(xdelt);
265 for (t = xmin; t <= xmax; t = t + xdelt) {
266 double x = xorg + (zoomx * t);
269 gridColor, gridThickness);
273 if (t + xdelt <= xmax + 1e-10) {
276 ttemp = t * pow(10.0, power);
279 std::stringstream valeur;
282 #if defined(VISP_HAVE_X11)
284 #elif defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
290 std::stringstream ss;
293 #if defined(VISP_HAVE_X11)
296 #elif defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
302 power = laFonctionSansNom(ydelt);
303 for (t = ymin; t <= ymax; t = t + ydelt) {
304 double y = yorg - (zoomy * t);
307 gridColor, gridThickness);
313 ttemp = t * pow(10.0, power);
317 std::stringstream valeur;
320 #if defined(VISP_HAVE_X11)
322 #elif defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
327 std::stringstream ss;
330 #if defined(VISP_HAVE_X11)
333 #elif defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
341 vpColor::black, 4 * gridThickness, 2 * gridThickness, gridThickness);
344 vpColor::black, 4 * gridThickness, 2 * gridThickness, gridThickness);
357 #
if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || \
358 defined(VISP_HAVE_GTK)
363 unsigned int offsetx = vpMath::minimum<unsigned int>((
unsigned int)unitx.size(), dWidth);
365 #if defined(VISP_HAVE_X11)
369 #elif defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
378 double size = (double)title.size();
387 for (
unsigned int i = 0; i < curveNbr; ++i) {
388 size_t offset = epsj * (curveList + i)->legend.size();
391 if (offsetj > dWidth)
394 for (
unsigned int i = 0; i < curveNbr; ++i) {
396 (curveList + i)->legend.c_str(), (curveList + i)->color);
400 void vpPlotGraph::rescalex(
unsigned int side,
double extremity)
404 xmin = (3 * extremity - xmax) / 2;
407 xmax = (3 * extremity - xmin) / 2;
411 xdelt = (xmax - xmin) / (
double)nbDivisionx;
414 void vpPlotGraph::rescaley(
unsigned int side,
double extremity)
418 ymin = (3 * extremity - ymax) / 2;
421 ymax = (3 * extremity - ymin) / 2;
425 ydelt = (ymax - ymin) / (
double)nbDivisiony;
428 void vpPlotGraph::initScale(
vpImage<unsigned char> &I,
double x_min,
double x_max,
int nbDivx,
double y_min,
429 double y_max,
int nbDivy,
bool gx,
bool gy)
437 this->nbDivisionx = nbDivx;
438 this->nbDivisiony = nbDivy;
439 computeGraphParameters();
443 scaleInitialized =
true;
446 void vpPlotGraph::initScale(
vpImage<unsigned char> &I,
double x_min,
double x_max,
int nbDivx,
double y_min,
447 double y_max,
int nbDivy,
double z_min,
double z_max,
int nbDivz,
bool gx,
bool gy)
457 this->nbDivisionx = nbDivx;
458 this->nbDivisiony = nbDivy;
459 this->nbDivisionz = nbDivz;
460 computeGraphParameters();
464 scaleInitialized =
true;
469 if (!scaleInitialized) {
486 scaleInitialized =
true;
487 computeGraphParameters();
491 if (std::fabs(y) <= std::numeric_limits<double>::epsilon())
492 scaleInitialized =
false;
503 double i = yorg - (zoomy * y);
504 double j = xorg + (zoomx * x);
519 computeGraphParameters();
522 i = yorg - (zoomy * y);
523 j = xorg + (zoomx * x);
528 (curveList + curveNb)->plotPoint(I, iP, x, y);
529 #if (!defined VISP_HAVE_X11 && defined FLUSH_ON_PLOT)
539 for (
unsigned int i = 0; i < curveNbr; ++i)
540 (curveList + i)->plotList(I, xorg, yorg, zoomx, zoomy);
549 double x = (iP.
get_j() - xorg) / zoomx;
550 double y = (yorg - iP.
get_i()) / zoomy;
553 std::stringstream ss_x;
558 std::stringstream ss_y;
570 void vpPlotGraph::resetPointList(
unsigned int curveNum)
572 (curveList + curveNum)->pointListx.clear();
573 (curveList + curveNum)->pointListy.clear();
574 (curveList + curveNum)->pointListz.clear();
575 (curveList + curveNum)->nbPoint = 0;
586 if (!iP1In || !iP2In) {
587 double dTopLeft_i = dTopLeft3D.get_i();
588 double dTopLeft_j = dTopLeft3D.get_j();
589 double dBottomRight_i = dTopLeft_i + dHeight;
590 double dBottomRight_j = dTopLeft_j + dWidth;
596 if (!iP1In && !iP2In) {
597 if (iP1.
get_i() < dTopLeft_i && iP2.
get_i() < dTopLeft_i)
599 if (iP1.
get_i() > dBottomRight_i && iP2.
get_i() > dBottomRight_i)
601 if (iP1.
get_j() < dTopLeft_j || iP1.
get_j() > dBottomRight_j)
603 if (iP1.
get_i() < dTopLeft_i)
604 iP1.
set_i(dTopLeft_i);
606 iP1.
set_i(dBottomRight_i);
607 if (iP2.
get_i() < dTopLeft_i)
608 iP2.
set_i(dTopLeft_i);
610 iP2.
set_i(dBottomRight_i);
613 if (iP1.
get_j() < dTopLeft_j)
614 iP1.
set_j(dTopLeft_j);
615 if (iP1.
get_j() > dBottomRight_j)
616 iP1.
set_j(dBottomRight_j);
617 if (iP1.
get_i() < dTopLeft_i)
618 iP1.
set_i(dTopLeft_i);
619 if (iP1.
get_i() > dBottomRight_i)
620 iP1.
set_i(dBottomRight_i);
624 if (iP2.
get_j() < dTopLeft_j)
625 iP2.
set_j(dTopLeft_j);
626 if (iP2.
get_j() > dBottomRight_j)
627 iP2.
set_j(dBottomRight_j);
628 if (iP2.
get_i() < dTopLeft_i)
629 iP2.
set_i(dTopLeft_i);
630 if (iP2.
get_i() > dBottomRight_i)
631 iP2.
set_i(dBottomRight_i);
636 else if (fabs(iP2.
get_i() - iP1.
get_i()) <= 2) {
637 if (!iP1In && !iP2In) {
638 if (iP1.
get_j() < dTopLeft_j && iP2.
get_j() < dTopLeft_j)
640 if (iP1.
get_j() > dBottomRight_j && iP2.
get_j() > dBottomRight_j)
642 if (iP1.
get_i() < dTopLeft_i || iP1.
get_i() > dBottomRight_i)
644 if (iP1.
get_j() < dTopLeft_j)
645 iP1.
set_j(dTopLeft_j);
647 iP1.
set_j(dBottomRight_j);
648 if (iP2.
get_j() < dTopLeft_j)
649 iP2.
set_j(dTopLeft_j);
651 iP2.
set_j(dBottomRight_j);
654 if (iP1.
get_j() < dTopLeft_j)
655 iP1.
set_j(dTopLeft_j);
656 if (iP1.
get_j() > dBottomRight_j)
657 iP1.
set_j(dBottomRight_j);
658 if (iP1.
get_i() < dTopLeft_i)
659 iP1.
set_i(dTopLeft_i);
660 if (iP1.
get_i() > dBottomRight_i)
661 iP1.
set_i(dBottomRight_i);
665 if (iP2.
get_j() < dTopLeft_j)
666 iP2.
set_j(dTopLeft_j);
667 if (iP2.
get_j() > dBottomRight_j)
668 iP2.
set_j(dBottomRight_j);
669 if (iP2.
get_i() < dTopLeft_i)
670 iP2.
set_i(dTopLeft_i);
671 if (iP2.
get_i() > dBottomRight_i)
672 iP2.
set_i(dBottomRight_i);
681 double jtop = (dTopLeft_i - b) / a;
682 double jlow = (dBottomRight_i - b) / a;
684 double ileft = dTopLeft_j * a + b;
685 double iright = (dBottomRight_j)*a + b;
690 if (jtop >= dTopLeft_j && jtop <= dBottomRight_j) {
691 iP[n].
set_ij(dTopLeft_i, jtop);
694 if (jlow >= dTopLeft_j && jlow <= dBottomRight_j) {
695 iP[n].
set_ij(dBottomRight_i, jlow);
698 if (ileft >= dTopLeft_i && ileft <= dBottomRight_i && n < 2) {
699 iP[n].
set_ij(ileft, dTopLeft_j);
702 if (iright >= dTopLeft_i && iright <= dBottomRight_i && n < 2) {
703 iP[n].
set_ij(iright, dBottomRight_j);
710 if (!iP1In && !iP2In) {
715 if (sign ==
vpMath::sign(iP[0].get_j() - iP[1].get_j())) {
728 if (sign ==
vpMath::sign(iP[0].get_i() - iP[1].get_i())) {
742 if (fabs(iP[0].get_j() - iP2.
get_j()) > 5) {
757 if (fabs(iP[0].get_i() - iP2.
get_i()) > 5) {
779 if (fabs(iP[0].get_j() - iP1.
get_j()) > 5) {
794 if (fabs(iP[0].get_i() - iP1.
get_i()) > 5) {
819 if (iP.
get_i() < dTopLeft3D.get_i())
820 iP.
set_i(dTopLeft3D.get_i());
821 else if (iP.
get_i() > dTopLeft3D.get_i() + dHeight)
822 iP.
set_i(dTopLeft3D.get_i() + dHeight - 1);
823 if (iP.
get_j() < dTopLeft3D.get_j())
824 iP.
set_j(dTopLeft3D.get_j());
825 else if (iP.
get_j() > dTopLeft3D.get_j() + dWidth)
826 iP.
set_j(dTopLeft3D.get_j() + dWidth - 1);
832 void vpPlotGraph::computeGraphParameters3D()
834 zoomx_3D = w_xsize / (xmax - xmin);
835 zoomy_3D = w_ysize / (ymax - ymin);
836 zoomz_3D = w_zsize / (zmax - zmin);
837 ptXorg = w_xval - zoomx_3D * xmax;
838 ptYorg = w_yval + zoomy_3D * ymin;
839 ptZorg = w_zval - zoomz_3D * zmax;
858 computeGraphParameters3D();
860 xdelt = (xmax - xmin) / nbDivisionx;
861 ydelt = (ymax - ymin) / nbDivisiony;
862 zdelt = (zmax - zmin) / nbDivisionz;
873 for (
unsigned int i = 0; i < 6; ++i) {
875 double u = 0.0, v = 0.0;
878 iP[i] = iP[i] + dTopLeft3D;
891 power = laFonctionSansNom(xdelt);
894 if (std::fabs(iP[0].get_j() - iP[1].get_j()) >
895 vpMath::maximum(std::fabs(iP[0].get_j()), std::fabs(iP[1].get_j())) * std::numeric_limits<double>::epsilon())
896 pente = fabs((iP[0].get_i() - iP[1].get_i()) / (iP[0].get_j() - iP[1].get_j()));
900 unsigned int count = 1;
901 for (t = xmin; t <= xmax; t = t + xdelt) {
902 double x = ptXorg + (zoomx_3D * t);
905 double u = 0.0, v = 0.0;
908 iPunit = iPunit + dTopLeft3D;
910 getGrid3DPoint(pente, iPunit, ip1, ip2, ip3);
912 if (check3Dline(ip1, ip2)) {
914 if (count % 2 == 1) {
917 ttemp = t * pow(10.0, power);
920 std::stringstream ss;
930 std::stringstream ss;
933 if (check3Dpoint(ip4))
937 power = laFonctionSansNom(ydelt);
940 if (std::fabs(iP[2].get_j() - iP[3].get_j()) >
941 vpMath::maximum(std::fabs(iP[2].get_j()), std::fabs(iP[3].get_j())) * std::numeric_limits<double>::epsilon())
942 pente = fabs((iP[2].get_i() - iP[3].get_i()) / (iP[2].get_j() - iP[3].get_j()));
946 for (t = ymin; t <= ymax; t = t + ydelt) {
947 double y = ptYorg - (zoomy_3D * t);
950 double u = 0.0, v = 0.0;
953 iPunit = iPunit + dTopLeft3D;
955 getGrid3DPoint(pente, iPunit, ip1, ip2, ip3);
957 if (check3Dline(ip1, ip2)) {
959 if (count % 2 == 1) {
962 ttemp = t * pow(10.0, power);
965 std::stringstream ss;
975 std::stringstream ss;
978 if (check3Dpoint(ip4))
982 power = laFonctionSansNom(zdelt);
985 if (std::fabs(iP[4].get_j() - iP[5].get_j()) >
986 vpMath::maximum(std::fabs(iP[4].get_j()), std::fabs(iP[5].get_j())) * std::numeric_limits<double>::epsilon())
987 pente = fabs((iP[4].get_i() - iP[5].get_i()) / (iP[4].get_j() - iP[5].get_j()));
991 for (t = zmin; t <= zmax; t = t + zdelt) {
992 double z = ptZorg + (zoomz_3D * t);
995 double u = 0.0, v = 0.0;
998 iPunit = iPunit + dTopLeft3D;
1000 getGrid3DPoint(pente, iPunit, ip1, ip2, ip3);
1002 if (check3Dline(ip1, ip2)) {
1004 if (count % 2 == 1) {
1007 ttemp = t * pow(10.0, power);
1010 std::stringstream ss;
1020 std::stringstream ss;
1023 if (check3Dpoint(ip4))
1028 if (check3Dline(iP[0], iP[1])) {
1031 iPunit.
set_ij(iP[1].get_i(), iP[1].get_j() - 10 * epsj);
1032 check3Dpoint(iPunit);
1036 if (check3Dline(iP[3], iP[2])) {
1039 iPunit.
set_ij(iP[2].get_i(), iP[2].get_j() - 10 * epsj);
1040 check3Dpoint(iPunit);
1044 if (check3Dline(iP[4], iP[5])) {
1047 iPunit.
set_ij(iP[5].get_i(), iP[5].get_j() - 10 * epsj);
1048 check3Dpoint(iPunit);
1062 if (!scaleInitialized) {
1087 scaleInitialized =
true;
1088 computeGraphParameters3D();
1092 if (std::fabs(y) <= std::numeric_limits<double>::epsilon() ||
1093 std::fabs(z) <= std::numeric_limits<double>::epsilon())
1094 scaleInitialized =
false;
1104 bool changed =
false;
1109 else if (x < xmin) {
1118 else if (y < ymin) {
1127 else if (z < zmin) {
1134 if (changed || move(I, button)) {
1135 computeGraphParameters3D();
1140 pointPlot.
setWorldCoordinates(ptXorg + (zoomx_3D * x), ptYorg - (zoomy_3D * y), ptZorg + (zoomz_3D * z));
1141 pointPlot.
track(cMo);
1142 double u = 0.0, v = 0.0;
1146 iP = iP + dTopLeft3D;
1148 if ((curveList + curveNb)->nbPoint) {
1149 if (check3Dline((curveList + curveNb)->lastPoint, iP))
1151 (curveList + curveNb)->thickness);
1153 #if (defined VISP_HAVE_X11 || defined VISP_HAVE_GDI)
1159 if (iP.
get_i() <= (curveList + curveNb)->lastPoint.get_i()) {
1160 top = iP.
get_i() - 5;
1161 height_ = (curveList + curveNb)->lastPoint.get_i() - top + 10;
1164 top = (curveList + curveNb)->lastPoint.get_i() - 5;
1165 height_ = iP.
get_i() - top + 10;
1167 if (iP.
get_j() <= (curveList + curveNb)->lastPoint.get_j()) {
1168 left = iP.
get_j() - 5;
1169 width_ = (curveList + curveNb)->lastPoint.get_j() - left + 10;
1172 left = (curveList + curveNb)->lastPoint.get_j() - 5;
1173 width_ = iP.
get_j() - left + 10;
1178 (curveList + curveNb)->lastPoint = iP;
1179 (curveList + curveNb)->pointListx.push_back(x);
1180 (curveList + curveNb)->pointListy.push_back(y);
1181 (curveList + curveNb)->pointListz.push_back(z);
1182 (curveList + curveNb)->nbPoint++;
1184 #if (!defined VISP_HAVE_X11 && defined FLUSH_ON_PLOT)
1195 for (
unsigned int i = 0; i < curveNbr; ++i) {
1196 std::list<double>::const_iterator it_ptListx = (curveList + i)->pointListx.begin();
1197 std::list<double>::const_iterator it_ptListy = (curveList + i)->pointListy.begin();
1198 std::list<double>::const_iterator it_ptListz = (curveList + i)->pointListz.begin();
1203 while (k < (curveList + i)->nbPoint) {
1204 double x = *it_ptListx;
1205 double y = *it_ptListy;
1206 double z = *it_ptListz;
1207 pointPlot.
setWorldCoordinates(ptXorg + (zoomx_3D * x), ptYorg - (zoomy_3D * y), ptZorg + (zoomz_3D * z));
1208 pointPlot.
track(cMo);
1209 double u = 0.0, v = 0.0;
1212 iP = iP + dTopLeft3D;
1216 if (check3Dline((curveList + i)->lastPoint, iP))
1221 (curveList + i)->lastPoint = iP;
1232 void vpPlotGraph::rescalez(
unsigned int side,
double extremity)
1236 zmin = (3 * extremity - zmax) / 2;
1239 zmax = (3 * extremity - zmin) / 2;
1243 zdelt = (zmax - zmin) / (
double)nbDivisionz;
1252 bool changed =
false;
1256 if (std::fabs(displacement[2][3]) > std::numeric_limits<double>::epsilon())
1257 cMf = cMf * displacement;
1260 cMo = cMf * displacement * fMo;
1269 bool clicked =
false;
1270 bool clickedUp =
false;
1296 else if (clickedUp) {
1305 if (!(blockedr || blockedz)) {
1317 double diffi = iP.
get_i() - old_iPr.get_i();
1318 double diffj = iP.
get_j() - old_iPr.get_j();
1320 double anglei = diffi * 360 / width_;
1321 double anglej = diffj * 360 / width_;
1330 double diffi = iP.
get_i() - old_iPz.get_i();
1331 mov.buildFrom(0, 0, diffi * 0.01, 0, 0, 0);
1341 #elif !defined(VISP_BUILD_SHARED_LIBS)
1343 void dummy_vpPlotGraph() { };
Class to define RGB colors available for display functionalities.
static const vpColor black
static const vpColor cyan
static const vpColor orange
static const vpColor blue
static const vpColor purple
static const vpColor green
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void displayROI(const vpImage< unsigned char > &I, const vpRect &roi)
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void flushROI(const vpImage< unsigned char > &I, const vpRect &roi)
static bool getClickUp(const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
static void displayArrow(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
static void displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
static bool getPointerPosition(const vpImage< unsigned char > &I, vpImagePoint &ip)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
void track(const vpHomogeneousMatrix &cMo)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
bool inRectangle(const vpRect &rect) const
void set_ij(double ii, double jj)
void set_uv(double u, double v)
unsigned int getWidth() const
unsigned int getHeight() const
static double rad(double deg)
static Type maximum(const Type &a, const Type &b)
static Type minimum(const Type &a, const Type &b)
static int sign(double x)
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
double get_y() const
Get the point y coordinate in the image plane.
void set_oY(double oY)
Set the point oY coordinate in the object frame.
double get_x() const
Get the point x coordinate in the image plane.
void set_oZ(double oZ)
Set the point oZ coordinate in the object frame.
void set_oX(double oX)
Set the point oX coordinate in the object frame.
void setWorldCoordinates(double oX, double oY, double oZ)
Defines a rectangle in the plane.
VISP_EXPORT void sleepMs(double t)