44 #include <visp/vpImageSimulator.h>
45 #include <visp/vpRotationMatrix.h>
46 #include <visp/vpImageIo.h>
47 #include <visp/vpImageConvert.h>
48 #include <visp/vpPixelMeterConversion.h>
49 #include <visp/vpMeterPixelConversion.h>
50 #include <visp/vpMatrixException.h>
62 : cMt(), interp(SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(),
63 distance(1.), visible_result(1.), visible(false), X0_2_optim(NULL),
64 euclideanNorm_u(0.), euclideanNorm_v(0.), vbase_u(), vbase_v(),
65 vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), T1(), T2(),
66 colorI(col), Ig(), Ic(), rect(), cleanPrevImage(false),
67 setBackgroundTexture(false), bgColor(
vpColor::white), focal()
88 normal_Cam_optim =
new double[3];
89 X0_2_optim =
new double[3];
90 vbase_u_optim =
new double[3];
91 vbase_v_optim =
new double[3];
92 Xinter_optim =
new double[3];
100 : cMt(), interp(SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(),
101 distance(1.), visible_result(1.), visible(false), X0_2_optim(NULL),
102 euclideanNorm_u(0.), euclideanNorm_v(0.), vbase_u(), vbase_v(),
103 vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), T1(), T2(),
104 colorI(GRAY_SCALED), Ig(), Ic(), rect(), cleanPrevImage(false),
105 setBackgroundTexture(false), bgColor(
vpColor::white), focal()
123 normal_obj = text.normal_obj;
124 euclideanNorm_u = text.euclideanNorm_u;
125 euclideanNorm_v = text.euclideanNorm_v;
132 normal_Cam_optim =
new double[3];
133 X0_2_optim =
new double[3];
134 vbase_u_optim =
new double[3];
135 vbase_v_optim =
new double[3];
136 Xinter_optim =
new double[3];
138 colorI = text.colorI;
139 interp = text.interp;
140 bgColor = text.bgColor;
141 cleanPrevImage = text.cleanPrevImage;
142 setBackgroundTexture =
false;
152 delete[] normal_Cam_optim;
154 delete[] vbase_u_optim;
155 delete[] vbase_v_optim;
156 delete[] Xinter_optim;
172 bgColor = sim.bgColor;
173 cleanPrevImage = sim.cleanPrevImage;
177 normal_obj = sim.normal_obj;
178 euclideanNorm_u = sim.euclideanNorm_u;
179 euclideanNorm_v = sim.euclideanNorm_v;
198 int nb_point_dessine = 0;
199 if (setBackgroundTexture)
206 unsigned char col = (
unsigned char) (0.2126 * bgColor.
R
207 + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
208 for (
unsigned int i = 0; i < I.
getHeight(); i++)
210 for (
unsigned int j = 0; j < I.
getWidth(); j++)
222 double top = rect.
getTop();
227 unsigned char *bitmap = I.
bitmap;
231 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
233 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
241 unsigned char Ipixelplan = 0;
242 if(getPixel(ip,Ipixelplan))
244 *(bitmap+i*width+j)=Ipixelplan;
251 if(getPixel(ip,Ipixelplan))
253 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
254 *(bitmap+i*width+j)=pixelgrey;
276 int nb_point_dessine = 0;
279 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
280 for (
unsigned int i = 0; i < I.
getHeight(); i++)
282 for (
unsigned int j = 0; j < I.
getWidth(); j++)
292 double top = rect.
getTop();
297 unsigned char *bitmap = I.
bitmap;
301 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
303 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
309 unsigned char Ipixelplan = 0;
310 if(getPixel(Isrc,ip,Ipixelplan))
312 *(bitmap+i*width+j)=Ipixelplan;
336 int nb_point_dessine = 0;
339 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
340 for (
unsigned int i = 0; i < I.
getHeight(); i++)
342 for (
unsigned int j = 0; j < I.
getWidth(); j++)
352 double top = rect.
getTop();
357 unsigned char *bitmap = I.
bitmap;
361 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
363 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
371 unsigned char Ipixelplan;
372 if(getPixel(ip,Ipixelplan))
374 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
376 *(bitmap+i*width+j)=Ipixelplan;
378 zBuffer[i][j] = Xinter_optim[2];
385 if(getPixel(ip,Ipixelplan))
387 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
389 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
390 *(bitmap+i*width+j)=pixelgrey;
392 zBuffer[i][j] = Xinter_optim[2];
410 int nb_point_dessine = 0;
413 for (
unsigned int i = 0; i < I.
getHeight(); i++)
415 for (
unsigned int j = 0; j < I.
getWidth(); j++)
426 double top = rect.
getTop();
435 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
437 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
445 unsigned char Ipixelplan;
446 if(getPixel(ip,Ipixelplan))
449 pixelcolor.
R = Ipixelplan;
450 pixelcolor.
G = Ipixelplan;
451 pixelcolor.
B = Ipixelplan;
452 *(bitmap+i*width+j) = pixelcolor;
459 if(getPixel(ip,Ipixelplan))
461 *(bitmap+i*width+j) = Ipixelplan;
482 int nb_point_dessine = 0;
485 for (
unsigned int i = 0; i < I.
getHeight(); i++)
487 for (
unsigned int j = 0; j < I.
getWidth(); j++)
498 double top = rect.
getTop();
507 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
509 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
516 if(getPixel(Isrc,ip,Ipixelplan))
518 *(bitmap+i*width+j) = Ipixelplan;
542 int nb_point_dessine = 0;
545 for (
unsigned int i = 0; i < I.
getHeight(); i++)
547 for (
unsigned int j = 0; j < I.
getWidth(); j++)
557 double top = rect.
getTop();
566 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
568 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
576 unsigned char Ipixelplan;
577 if(getPixel(ip,Ipixelplan))
579 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
582 pixelcolor.
R = Ipixelplan;
583 pixelcolor.
G = Ipixelplan;
584 pixelcolor.
B = Ipixelplan;
585 *(bitmap+i*width+j) = pixelcolor;
587 zBuffer[i][j] = Xinter_optim[2];
594 if(getPixel(ip,Ipixelplan))
596 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
598 *(bitmap+i*width+j) = Ipixelplan;
600 zBuffer[i][j] = Xinter_optim[2];
609 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
732 double topFinal = height+1;;
733 double bottomFinal = -1;
734 double leftFinal = width+1;
735 double rightFinal = -1;
739 unsigned int unvisible = 0;
740 for (
unsigned int i = 0; i < nbsimList; i++)
749 nbsimList = nbsimList - unvisible;
758 for (
unsigned int i = 0; i < nbsimList; i++)
761 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
763 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
764 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
765 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
766 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
771 unsigned char *bitmap = I.
bitmap;
774 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
776 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
783 for (
int k = 0; k < (int)nbsimList; k++)
786 if(simList[k]->getPixelDepth(ip,z))
788 if (z < zmin || zmin < 0)
799 unsigned char Ipixelplan = 255;
800 simList[indice]->getPixel(ip,Ipixelplan);
801 *(bitmap+i*width+j)=Ipixelplan;
803 else if (simList[indice]->colorI ==
COLORED)
805 vpRGBa Ipixelplan(255,255,255);
806 simList[indice]->getPixel(ip,Ipixelplan);
807 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
808 *(bitmap+i*width+j)=pixelgrey;
938 double topFinal = height+1;;
939 double bottomFinal = -1;
940 double leftFinal = width+1;
941 double rightFinal = -1;
945 unsigned int unvisible = 0;
946 for (
unsigned int i = 0; i < nbsimList; i++)
955 nbsimList = nbsimList - unvisible;
963 for (
unsigned int i = 0; i < nbsimList; i++)
966 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
968 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
969 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
970 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
971 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
979 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
981 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
988 for (
int k = 0; k < (int)nbsimList; k++)
991 if(simList[k]->getPixelDepth(ip,z))
993 if (z < zmin || zmin < 0)
1004 unsigned char Ipixelplan = 255;
1005 simList[indice]->getPixel(ip,Ipixelplan);
1007 pixelcolor.
R = Ipixelplan;
1008 pixelcolor.
G = Ipixelplan;
1009 pixelcolor.
B = Ipixelplan;
1010 *(bitmap+i*width+j) = pixelcolor;
1012 else if (simList[indice]->colorI ==
COLORED)
1014 vpRGBa Ipixelplan(255,255,255);
1015 simList[indice]->getPixel(ip,Ipixelplan);
1017 *(bitmap+i*width+j)=Ipixelplan;
1129 std::list<vpImageSimulator> &list,
1136 unsigned int nbsimList = (
unsigned int)list.size();
1143 double topFinal = height+1;;
1144 double bottomFinal = -1;
1145 double leftFinal = width+1;
1146 double rightFinal = -1;
1148 unsigned int unvisible = 0;
1149 unsigned int indexSimu=0;
1150 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
1153 simList[indexSimu] = sim;
1157 nbsimList = nbsimList - unvisible;
1166 for (
unsigned int i = 0; i < nbsimList; i++)
1169 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
1171 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
1172 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
1173 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
1174 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
1179 unsigned char *bitmap = I.
bitmap;
1182 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
1184 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
1191 for (
int k = 0; k < (int)nbsimList; k++)
1194 if(simList[k]->getPixelDepth(ip,z))
1196 if (z < zmin || zmin < 0)
1207 unsigned char Ipixelplan = 255;
1208 simList[indice]->getPixel(ip,Ipixelplan);
1209 *(bitmap+i*width+j)=Ipixelplan;
1211 else if (simList[indice]->colorI ==
COLORED)
1213 vpRGBa Ipixelplan(255,255,255);
1214 simList[indice]->getPixel(ip,Ipixelplan);
1215 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
1216 *(bitmap+i*width+j)=pixelgrey;
1329 std::list<vpImageSimulator> &list,
1336 unsigned int nbsimList = (
unsigned int)list.size();
1343 double topFinal = height+1;;
1344 double bottomFinal = -1;
1345 double leftFinal = width+1;
1346 double rightFinal = -1;
1348 unsigned int unvisible = 0;
1349 unsigned int indexSimu = 0;
1350 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
1353 simList[indexSimu] = sim;
1358 nbsimList = nbsimList - unvisible;
1366 for (
unsigned int i = 0; i < nbsimList; i++)
1369 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
1371 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
1372 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
1373 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
1374 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
1382 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
1384 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
1391 for (
int k = 0; k < (int)nbsimList; k++)
1394 if(simList[k]->getPixelDepth(ip,z))
1396 if (z < zmin || zmin < 0)
1407 unsigned char Ipixelplan = 255;
1408 simList[indice]->getPixel(ip,Ipixelplan);
1410 pixelcolor.
R = Ipixelplan;
1411 pixelcolor.
G = Ipixelplan;
1412 pixelcolor.
B = Ipixelplan;
1413 *(bitmap+i*width+j) = pixelcolor;
1415 else if (simList[indice]->colorI ==
COLORED)
1417 vpRGBa Ipixelplan(255,255,255);
1418 simList[indice]->getPixel(ip,Ipixelplan);
1420 *(bitmap+i*width+j)=Ipixelplan;
1441 normal_Cam = R * normal_obj;
1445 for(
int i = 0; i < 4; i++)
1462 double angle = pt[0].
get_X()*facenormal[0] + pt[0].
get_Y()*facenormal[1] + pt[0].
get_Z()*facenormal[2] ;
1472 for(
int i = 0; i < 4; i++)
1474 project(X[i],cMt,X2[i]);
1478 vbase_u = X2[1]-X2[0];
1479 vbase_v = X2[3]-X2[0];
1489 for(
unsigned int i = 0; i < 3; i++)
1491 normal_Cam_optim[i] = normal_Cam[i];
1492 X0_2_optim[i] = X2[0][i];
1493 vbase_u_optim[i] = vbase_u[i];
1494 vbase_v_optim[i] = vbase_v[i];
1498 for(
unsigned int i = 0; i < 4; i++)
1500 iPa[i].
set_j(X2[i][0]/X2[i][2]);
1501 iPa[i].
set_i(X2[i][1]/X2[i][2]);
1512 for (
unsigned int i = 0; i < 4; i++)
1521 euclideanNorm_u=(X[1]-X[0]).euclideanNorm();
1522 euclideanNorm_v=(X[3]-X[0]).euclideanNorm();
1609 for(
unsigned int i=0; i<4; ++i){
1611 Xvec[i][0] = X_[i].get_oX();
1612 Xvec[i][1] = X_[i].get_oY();
1613 Xvec[i][2] = X_[i].get_oZ();
1641 for(
unsigned int i=0; i<4; ++i){
1643 Xvec[i][0] = X_[i].get_oX();
1644 Xvec[i][1] = X_[i].get_oY();
1645 Xvec[i][2] = X_[i].get_oZ();
1673 for(
unsigned int i=0; i<4; ++i){
1675 Xvec[i][0] = X_[i].get_oX();
1676 Xvec[i][1] = X_[i].get_oY();
1677 Xvec[i][2] = X_[i].get_oZ();
1686 vpImageSimulator::getPixel(
const vpImagePoint &iP,
unsigned char &Ipixelplan)
1696 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1698 Xinter_optim[0]=iP.
get_u()*z;
1699 Xinter_optim[1]=iP.
get_v()*z;
1707 double u = 0, v = 0;
1709 for(
unsigned int i = 0; i < 3; i++)
1711 diff = (Xinter_optim[i]-X0_2_optim[i]);
1712 u += diff*vbase_u_optim[i];
1713 v += diff*vbase_v_optim[i];
1715 u = u/(euclideanNorm_u*euclideanNorm_u);
1716 v = v/(euclideanNorm_v*euclideanNorm_v);
1718 if( u > 0 && v > 0 && u < 1. && v < 1.)
1725 else if (interp ==
SIMPLE)
1726 Ipixelplan = Ig[(
unsigned int)i2][(
unsigned int)j2];
1745 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1747 Xinter_optim[0]=iP.
get_u()*z;
1748 Xinter_optim[1]=iP.
get_v()*z;
1756 double u = 0, v = 0;
1758 for(
unsigned int i = 0; i < 3; i++)
1760 diff = (Xinter_optim[i]-X0_2_optim[i]);
1761 u += diff*vbase_u_optim[i];
1762 v += diff*vbase_v_optim[i];
1764 u = u/(euclideanNorm_u*euclideanNorm_u);
1765 v = v/(euclideanNorm_v*euclideanNorm_v);
1767 if( u > 0 && v > 0 && u < 1. && v < 1.)
1774 else if (interp ==
SIMPLE)
1775 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1794 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1796 Xinter_optim[0]=iP.
get_u()*z;
1797 Xinter_optim[1]=iP.
get_v()*z;
1805 double u = 0, v = 0;
1807 for(
unsigned int i = 0; i < 3; i++)
1809 diff = (Xinter_optim[i]-X0_2_optim[i]);
1810 u += diff*vbase_u_optim[i];
1811 v += diff*vbase_v_optim[i];
1813 u = u/(euclideanNorm_u*euclideanNorm_u);
1814 v = v/(euclideanNorm_v*euclideanNorm_v);
1816 if( u > 0 && v > 0 && u < 1. && v < 1.)
1823 else if (interp ==
SIMPLE)
1824 Ipixelplan = Ic[(
unsigned int)i2][(
unsigned int)j2];
1843 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1845 Xinter_optim[0]=iP.
get_u()*z;
1846 Xinter_optim[1]=iP.
get_v()*z;
1854 double u = 0, v = 0;
1856 for(
unsigned int i = 0; i < 3; i++)
1858 diff = (Xinter_optim[i]-X0_2_optim[i]);
1859 u += diff*vbase_u_optim[i];
1860 v += diff*vbase_v_optim[i];
1862 u = u/(euclideanNorm_u*euclideanNorm_u);
1863 v = v/(euclideanNorm_v*euclideanNorm_v);
1865 if( u > 0 && v > 0 && u < 1. && v < 1.)
1872 else if (interp ==
SIMPLE)
1873 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1881 vpImageSimulator::getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan)
1887 Zpixelplan = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1892 vpImageSimulator::getPixelVisibility(
const vpImagePoint &iP,
1893 double &Visipixelplan)
1899 Visipixelplan = visible_result;
1904 vpImageSimulator::project(
const vpColVector &_vin,
1908 getHomogCoord(_vin,XH);
1909 getCoordFromHomog(_cMt*XH,_vout);
1915 for(
unsigned int i=0;i<3;i++)
1923 for(
unsigned int i=0;i<3;i++)
1924 _v[i]=_vH[i]/_vH[3];
1929 vpImageSimulator::getRoi(
const unsigned int &Iwidth,
1930 const unsigned int &Iheight,
1934 double top = Iheight+1;
1937 double left= Iwidth+1;
1938 for(
int i = 0; i < 4; i++)
1942 if (v < top) top = v;
1943 if (v > bottom) bottom = v;
1944 if (u < left) left = u;
1945 if (u > right) right = u;
1947 if (top < 0) top = 0;
1948 if(top >= Iheight) top = Iheight-1;
1949 if (bottom < 0) bottom = 0;
1950 if(bottom >= Iheight) bottom = Iheight-1;
1951 if(left < 0) left = 0;
1952 if(left >= Iwidth) left = Iwidth-1;
1953 if(right < 0) right = 0;
1954 if(right >= Iwidth) right = Iwidth-1;
1962 std::vector<vpColVector>
1965 std::vector<vpColVector> X_;
1966 for (
int i=0; i<4; i++)
Definition of the vpMatrix class.
unsigned int nbElements(void)
return the number of element in the list
void init(const vpImage< unsigned char > &I, vpColVector *X)
virtual ~vpImageSimulator()
unsigned int getWidth() const
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
unsigned char B
Blue component.
Provide simple list management.
Type * bitmap
points toward the bitmap
void getImage(vpImage< unsigned char > &I, const vpCameraParameters &cam)
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Point coordinates conversion from normalized coordinates in meter to pixel coordinates ...
Class to define colors available for display functionnalities.
error that can be emited by ViSP classes.
Type getValue(double i, double j) const
void track(const vpHomogeneousMatrix &cMo)
bool inTriangle(const vpImagePoint &iP, double threshold=0.00001)
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
unsigned char G
Green component.
Class that defines a RGB 32 bits structure.
void next(void)
position the current element on the next one
Class that defines what is a point.
The vpRotationMatrix considers the particular case of a rotation matrix.
void set_i(const double ii)
void setCameraPosition(const vpHomogeneousMatrix &cMt)
void front(void)
Position the current element on the first element of the list.
type & value(void)
return the value of the current element
vpImageSimulator & operator=(const vpImageSimulator &sim)
Generic class defining intrinsic camera parameters.
Class which enables to project an image in the 3D space and get the view of a virtual camera...
void extract(vpRotationMatrix &R) const
double get_Y() const
Get the point Y coordinate in the camera frame.
vpImageSimulator(const vpColorPlan &col=COLORED)
double get_Z() const
Get the point Z coordinate in the camera frame.
void set_j(const double jj)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void setRight(double pos)
std::vector< vpColVector > get3DcornersTextureRectangle()
double euclideanNorm() const
unsigned char R
Red component.
unsigned int getCols() const
Return the number of columns of the matrix.
static double dotProd(const vpColVector &a, const vpColVector &b)
Dot Product.
void buildFrom(const vpImagePoint &iP1, const vpImagePoint &iP2, const vpImagePoint &iP3)
error that can be emited by the vpMatrix class and its derivates
unsigned int getHeight() const
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 vpColVector crossProd(const vpColVector &a, const vpColVector &b)
normalise the vector
static void read(vpImage< unsigned char > &I, const char *filename)
unsigned int getRows() const
Return the number of rows of the matrix.
double get_X() const
Get the point X coordinate in the camera frame.
void setBottom(double pos)
void set_ij(const double ii, const double jj)
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...
void resize(const unsigned int i, const bool flagNullify=true)