39 #include <visp3/robot/vpImageSimulator.h>
40 #include <visp3/core/vpRotationMatrix.h>
41 #include <visp3/core/vpImageConvert.h>
42 #include <visp3/core/vpPixelMeterConversion.h>
43 #include <visp3/core/vpMeterPixelConversion.h>
44 #include <visp3/core/vpMatrixException.h>
45 #include <visp3/core/vpPolygon3D.h>
47 #ifdef VISP_HAVE_MODULE_IO
48 # include <visp3/io/vpImageIo.h>
61 : cMt(), pt(), ptClipped(), interp(SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(),
62 distance(1.), visible_result(1.), visible(false), X0_2_optim(NULL),
63 euclideanNorm_u(0.), euclideanNorm_v(0.), vbase_u(), vbase_v(),
64 vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), listTriangle(),
65 colorI(col), Ig(), Ic(), rect(), cleanPrevImage(false),
66 setBackgroundTexture(false), bgColor(
vpColor::white), focal(), needClipping(false)
87 normal_Cam_optim =
new double[3];
88 X0_2_optim =
new double[3];
89 vbase_u_optim =
new double[3];
90 vbase_v_optim =
new double[3];
91 Xinter_optim =
new double[3];
101 : cMt(), pt(), ptClipped(), interp(SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(),
102 distance(1.), visible_result(1.), visible(false), X0_2_optim(NULL),
103 euclideanNorm_u(0.), euclideanNorm_v(0.), vbase_u(), vbase_v(),
104 vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), listTriangle(),
105 colorI(GRAY_SCALED), Ig(), Ic(), rect(), cleanPrevImage(false),
106 setBackgroundTexture(false), bgColor(
vpColor::white), focal(), needClipping(false)
109 for(
unsigned int i=0;i<4;i++)
125 normal_obj = text.normal_obj;
126 euclideanNorm_u = text.euclideanNorm_u;
127 euclideanNorm_v = text.euclideanNorm_v;
134 normal_Cam_optim =
new double[3];
135 X0_2_optim =
new double[3];
136 vbase_u_optim =
new double[3];
137 vbase_v_optim =
new double[3];
138 Xinter_optim =
new double[3];
140 colorI = text.colorI;
141 interp = text.interp;
142 bgColor = text.bgColor;
143 cleanPrevImage = text.cleanPrevImage;
144 setBackgroundTexture =
false;
154 delete[] normal_Cam_optim;
156 delete[] vbase_u_optim;
157 delete[] vbase_v_optim;
158 delete[] Xinter_optim;
165 for(
unsigned int i=0;i<4;i++)
174 bgColor = sim.bgColor;
175 cleanPrevImage = sim.cleanPrevImage;
179 normal_obj = sim.normal_obj;
180 euclideanNorm_u = sim.euclideanNorm_u;
181 euclideanNorm_v = sim.euclideanNorm_v;
200 int nb_point_dessine = 0;
201 if (setBackgroundTexture)
208 unsigned char col = (
unsigned char) (0.2126 * bgColor.
R
209 + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
210 for (
unsigned int i = 0; i < I.
getHeight(); i++)
212 for (
unsigned int j = 0; j < I.
getWidth(); j++)
227 double top = rect.
getTop();
232 unsigned char *bitmap = I.
bitmap;
236 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
238 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
246 unsigned char Ipixelplan = 0;
247 if(getPixel(ip,Ipixelplan))
249 *(bitmap+i*width+j)=Ipixelplan;
256 if(getPixel(ip,Ipixelplan))
258 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
259 *(bitmap+i*width+j)=pixelgrey;
281 int nb_point_dessine = 0;
284 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
285 for (
unsigned int i = 0; i < I.
getHeight(); i++)
287 for (
unsigned int j = 0; j < I.
getWidth(); j++)
300 double top = rect.
getTop();
305 unsigned char *bitmap = I.
bitmap;
309 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
311 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
317 unsigned char Ipixelplan = 0;
318 if(getPixel(Isrc,ip,Ipixelplan))
320 *(bitmap+i*width+j)=Ipixelplan;
344 int nb_point_dessine = 0;
347 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
348 for (
unsigned int i = 0; i < I.
getHeight(); i++)
350 for (
unsigned int j = 0; j < I.
getWidth(); j++)
363 double top = rect.
getTop();
368 unsigned char *bitmap = I.
bitmap;
372 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
374 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
382 unsigned char Ipixelplan;
383 if(getPixel(ip,Ipixelplan))
385 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
387 *(bitmap+i*width+j)=Ipixelplan;
389 zBuffer[i][j] = Xinter_optim[2];
396 if(getPixel(ip,Ipixelplan))
398 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
400 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
401 *(bitmap+i*width+j)=pixelgrey;
403 zBuffer[i][j] = Xinter_optim[2];
421 int nb_point_dessine = 0;
424 for (
unsigned int i = 0; i < I.
getHeight(); i++)
426 for (
unsigned int j = 0; j < I.
getWidth(); j++)
440 double top = rect.
getTop();
449 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
451 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
459 unsigned char Ipixelplan;
460 if(getPixel(ip,Ipixelplan))
463 pixelcolor.
R = Ipixelplan;
464 pixelcolor.
G = Ipixelplan;
465 pixelcolor.
B = Ipixelplan;
466 *(bitmap+i*width+j) = pixelcolor;
473 if(getPixel(ip,Ipixelplan))
475 *(bitmap+i*width+j) = Ipixelplan;
496 int nb_point_dessine = 0;
499 for (
unsigned int i = 0; i < I.
getHeight(); i++)
501 for (
unsigned int j = 0; j < I.
getWidth(); j++)
515 double top = rect.
getTop();
524 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
526 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
533 if(getPixel(Isrc,ip,Ipixelplan))
535 *(bitmap+i*width+j) = Ipixelplan;
559 int nb_point_dessine = 0;
562 for (
unsigned int i = 0; i < I.
getHeight(); i++)
564 for (
unsigned int j = 0; j < I.
getWidth(); j++)
577 double top = rect.
getTop();
586 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
588 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
596 unsigned char Ipixelplan;
597 if(getPixel(ip,Ipixelplan))
599 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
602 pixelcolor.
R = Ipixelplan;
603 pixelcolor.
G = Ipixelplan;
604 pixelcolor.
B = Ipixelplan;
605 *(bitmap+i*width+j) = pixelcolor;
607 zBuffer[i][j] = Xinter_optim[2];
614 if(getPixel(ip,Ipixelplan))
616 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
618 *(bitmap+i*width+j) = Ipixelplan;
620 zBuffer[i][j] = Xinter_optim[2];
731 std::list<vpImageSimulator> &list,
738 unsigned int nbsimList = (
unsigned int)list.size();
745 double topFinal = height+1;;
746 double bottomFinal = -1;
747 double leftFinal = width+1;
748 double rightFinal = -1;
750 unsigned int unvisible = 0;
751 unsigned int indexSimu=0;
752 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
755 simList[indexSimu] = sim;
759 nbsimList = nbsimList - unvisible;
768 for (
unsigned int i = 0; i < nbsimList; i++)
770 if(!simList[i]->needClipping)
771 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
773 simList[i]->getRoi(width,height,cam,simList[i]->ptClipped,simList[i]->rect);
775 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
776 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
777 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
778 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
783 unsigned char *bitmap = I.
bitmap;
786 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
788 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
795 for (
int k = 0; k < (int)nbsimList; k++)
798 if(simList[k]->getPixelDepth(ip,z))
800 if (z < zmin || zmin < 0)
811 unsigned char Ipixelplan = 255;
812 simList[indice]->getPixel(ip,Ipixelplan);
813 *(bitmap+i*width+j)=Ipixelplan;
815 else if (simList[indice]->colorI ==
COLORED)
817 vpRGBa Ipixelplan(255,255,255);
818 simList[indice]->getPixel(ip,Ipixelplan);
819 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
820 *(bitmap+i*width+j)=pixelgrey;
933 std::list<vpImageSimulator> &list,
940 unsigned int nbsimList = (
unsigned int)list.size();
947 double topFinal = height+1;;
948 double bottomFinal = -1;
949 double leftFinal = width+1;
950 double rightFinal = -1;
952 unsigned int unvisible = 0;
953 unsigned int indexSimu = 0;
954 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
957 simList[indexSimu] = sim;
962 nbsimList = nbsimList - unvisible;
970 for (
unsigned int i = 0; i < nbsimList; i++)
972 if(!simList[i]->needClipping)
973 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
975 simList[i]->getRoi(width,height,cam,simList[i]->ptClipped,simList[i]->rect);
977 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
978 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
979 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
980 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
988 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
990 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
997 for (
int k = 0; k < (int)nbsimList; k++)
1000 if(simList[k]->getPixelDepth(ip,z))
1002 if (z < zmin || zmin < 0)
1013 unsigned char Ipixelplan = 255;
1014 simList[indice]->getPixel(ip,Ipixelplan);
1016 pixelcolor.
R = Ipixelplan;
1017 pixelcolor.
G = Ipixelplan;
1018 pixelcolor.
B = Ipixelplan;
1019 *(bitmap+i*width+j) = pixelcolor;
1021 else if (simList[indice]->colorI ==
COLORED)
1023 vpRGBa Ipixelplan(255,255,255);
1024 simList[indice]->getPixel(ip,Ipixelplan);
1026 *(bitmap+i*width+j)=Ipixelplan;
1046 needClipping =
false;
1048 normal_Cam = R * normal_obj;
1052 for(
unsigned int i = 0; i < 4; i++)
1059 e1[0] = pt[1].get_X() - pt[0].get_X() ;
1060 e1[1] = pt[1].get_Y() - pt[0].get_Y() ;
1061 e1[2] = pt[1].get_Z() - pt[0].get_Z() ;
1063 e2[0] = pt[2].get_X() - pt[1].get_X() ;
1064 e2[1] = pt[2].get_Y() - pt[1].get_Y() ;
1065 e2[2] = pt[2].get_Z() - pt[1].get_Z() ;
1069 double angle = pt[0].get_X()*facenormal[0] + pt[0].get_Y()*facenormal[1] + pt[0].get_Z()*facenormal[2] ;
1080 for(
unsigned int i = 0; i < 4; i++)
1082 project(X[i],cMt,X2[i]);
1084 if(pt[i].get_Z() < 0)
1085 needClipping =
true;
1088 vbase_u = X2[1]-X2[0];
1089 vbase_v = X2[3]-X2[0];
1100 for(
unsigned int i = 0; i < 3; i++)
1102 normal_Cam_optim[i] = normal_Cam[i];
1103 X0_2_optim[i] = X2[0][i];
1104 vbase_u_optim[i] = vbase_u[i];
1105 vbase_v_optim[i] = vbase_v[i];
1108 std::vector<vpPoint> *ptPtr = &pt;
1114 listTriangle.clear();
1115 for(
unsigned int i = 1 ; i < (*ptPtr).size()-1 ; i++){
1117 ip1.
set_j((*ptPtr)[0].get_x());
1118 ip1.
set_i((*ptPtr)[0].get_y());
1120 ip2.
set_j((*ptPtr)[i].get_x());
1121 ip2.
set_i((*ptPtr)[i].get_y());
1123 ip3.
set_j((*ptPtr)[i+1].get_x());
1124 ip3.
set_i((*ptPtr)[i+1].get_y());
1127 listTriangle.push_back(tri);
1135 for (
unsigned int i = 0; i < 4; i++)
1138 pt[i].setWorldCoordinates(X_[i][0],X_[i][1],X_[i][2]);
1144 euclideanNorm_u=(X[1]-X[0]).euclideanNorm();
1145 euclideanNorm_v=(X[3]-X[0]).euclideanNorm();
1190 #ifdef VISP_HAVE_MODULE_IO
1234 for(
unsigned int i=0; i<4; ++i){
1236 Xvec[i][0] = X_[i].get_oX();
1237 Xvec[i][1] = X_[i].get_oY();
1238 Xvec[i][2] = X_[i].get_oZ();
1266 for(
unsigned int i=0; i<4; ++i){
1268 Xvec[i][0] = X_[i].get_oX();
1269 Xvec[i][1] = X_[i].get_oY();
1270 Xvec[i][2] = X_[i].get_oZ();
1278 #ifdef VISP_HAVE_MODULE_IO
1300 for(
unsigned int i=0; i<4; ++i){
1302 Xvec[i][0] = X_[i].get_oX();
1303 Xvec[i][1] = X_[i].get_oY();
1304 Xvec[i][2] = X_[i].get_oZ();
1314 vpImageSimulator::getPixel(
const vpImagePoint &iP,
unsigned char &Ipixelplan)
1318 bool inside =
false;
1319 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1320 if(listTriangle[i].inTriangle(iP)){
1324 if(!inside)
return false;
1334 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1336 Xinter_optim[0]=iP.
get_u()*z;
1337 Xinter_optim[1]=iP.
get_v()*z;
1345 double u = 0, v = 0;
1347 for(
unsigned int i = 0; i < 3; i++)
1349 diff = (Xinter_optim[i]-X0_2_optim[i]);
1350 u += diff*vbase_u_optim[i];
1351 v += diff*vbase_v_optim[i];
1353 u = u/(euclideanNorm_u*euclideanNorm_u);
1354 v = v/(euclideanNorm_v*euclideanNorm_v);
1356 if( u > 0 && v > 0 && u < 1. && v < 1.)
1363 else if (interp ==
SIMPLE)
1364 Ipixelplan = Ig[(
unsigned int)i2][(
unsigned int)j2];
1376 bool inside =
false;
1377 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1378 if(listTriangle[i].inTriangle(iP)){
1382 if(!inside)
return false;
1391 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1393 Xinter_optim[0]=iP.
get_u()*z;
1394 Xinter_optim[1]=iP.
get_v()*z;
1402 double u = 0, v = 0;
1404 for(
unsigned int i = 0; i < 3; i++)
1406 diff = (Xinter_optim[i]-X0_2_optim[i]);
1407 u += diff*vbase_u_optim[i];
1408 v += diff*vbase_v_optim[i];
1410 u = u/(euclideanNorm_u*euclideanNorm_u);
1411 v = v/(euclideanNorm_v*euclideanNorm_v);
1413 if( u > 0 && v > 0 && u < 1. && v < 1.)
1420 else if (interp ==
SIMPLE)
1421 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1433 bool inside =
false;
1434 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1435 if(listTriangle[i].inTriangle(iP)){
1439 if(!inside)
return false;
1447 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1449 Xinter_optim[0]=iP.
get_u()*z;
1450 Xinter_optim[1]=iP.
get_v()*z;
1458 double u = 0, v = 0;
1460 for(
unsigned int i = 0; i < 3; i++)
1462 diff = (Xinter_optim[i]-X0_2_optim[i]);
1463 u += diff*vbase_u_optim[i];
1464 v += diff*vbase_v_optim[i];
1466 u = u/(euclideanNorm_u*euclideanNorm_u);
1467 v = v/(euclideanNorm_v*euclideanNorm_v);
1469 if( u > 0 && v > 0 && u < 1. && v < 1.)
1476 else if (interp ==
SIMPLE)
1477 Ipixelplan = Ic[(
unsigned int)i2][(
unsigned int)j2];
1491 bool inside =
false;
1492 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1493 if(listTriangle[i].inTriangle(iP)){
1497 if(!inside)
return false;
1503 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1505 Xinter_optim[0]=iP.
get_u()*z;
1506 Xinter_optim[1]=iP.
get_v()*z;
1514 double u = 0, v = 0;
1516 for(
unsigned int i = 0; i < 3; i++)
1518 diff = (Xinter_optim[i]-X0_2_optim[i]);
1519 u += diff*vbase_u_optim[i];
1520 v += diff*vbase_v_optim[i];
1522 u = u/(euclideanNorm_u*euclideanNorm_u);
1523 v = v/(euclideanNorm_v*euclideanNorm_v);
1525 if( u > 0 && v > 0 && u < 1. && v < 1.)
1532 else if (interp ==
SIMPLE)
1533 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1541 vpImageSimulator::getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan)
1544 bool inside =
false;
1545 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1546 if(listTriangle[i].inTriangle(iP)){
1550 if(!inside)
return false;
1554 Zpixelplan = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1559 vpImageSimulator::getPixelVisibility(
const vpImagePoint &iP,
1560 double &Visipixelplan)
1563 bool inside =
false;
1564 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1565 if(listTriangle[i].inTriangle(iP)){
1569 if(!inside)
return false;
1573 Visipixelplan = visible_result;
1578 vpImageSimulator::project(
const vpColVector &_vin,
1582 getHomogCoord(_vin,XH);
1583 getCoordFromHomog(_cMt*XH,_vout);
1589 for(
unsigned int i=0;i<3;i++)
1597 for(
unsigned int i=0;i<3;i++)
1598 _v[i]=_vH[i]/_vH[3];
1603 vpImageSimulator::getRoi(
const unsigned int &Iwidth,
1604 const unsigned int &Iheight,
1606 const std::vector<vpPoint> &point,
1609 double top = Iheight+1;
1612 double left= Iwidth+1;
1614 for(
unsigned int i = 0; i < point.size(); i++)
1618 if (v < top) top = v;
1619 if (v > bottom) bottom = v;
1620 if (u < left) left = u;
1621 if (u > right) right = u;
1623 if (top < 0) top = 0;
1624 if(top >= Iheight) top = Iheight-1;
1625 if (bottom < 0) bottom = 0;
1626 if(bottom >= Iheight) bottom = Iheight-1;
1627 if(left < 0) left = 0;
1628 if(left >= Iwidth) left = Iwidth-1;
1629 if(right < 0) right = 0;
1630 if(right >= Iwidth) right = Iwidth-1;
1638 std::vector<vpColVector>
1641 std::vector<vpColVector> X_;
1642 for (
int i=0; i<4; i++)
Implementation of a matrix and operations on matrices.
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)
Implementation of an homogeneous matrix and operations on such kind of matrices.
unsigned char B
Blue component.
double euclideanNorm() const
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
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 int getCols() const
Return the number of columns of the 2D array.
unsigned char G
Green component.
Class that defines a RGB 32 bits structure.
Implementation of a rotation matrix and operations on such kind of matrices.
void set_i(const double ii)
void setCameraPosition(const vpHomogeneousMatrix &cMt)
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
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
unsigned int getRows() const
Return the number of rows of the 2D array.
vpImageSimulator(const vpColorPlan &col=COLORED)
void set_j(const double jj)
Implementation of column vector and the associated operations.
static double dotProd(const vpColVector &a, const vpColVector &b)
void setRight(double pos)
std::vector< vpColVector > get3DcornersTextureRectangle()
unsigned char R
Red component.
error that can be emited by the vpMatrix class and its derivates
unsigned int getHeight() const
Defines a rectangle in the plane.
static void getClippedPolygon(const std::vector< vpPoint > &ptIn, std::vector< vpPoint > &ptOut, const vpHomogeneousMatrix &cMo, const unsigned int &clippingFlags, const vpCameraParameters &cam=vpCameraParameters(), const double &znear=0.001, const double &zfar=100)
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)
static void read(vpImage< unsigned char > &I, const char *filename)
void setBottom(double pos)
void set_ij(const double ii, const double jj)
void resize(const unsigned int i, const bool flagNullify=true)