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 if (setBackgroundTexture)
207 unsigned char col = (
unsigned char) (0.2126 * bgColor.
R
208 + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
209 for (
unsigned int i = 0; i < I.
getHeight(); i++)
211 for (
unsigned int j = 0; j < I.
getWidth(); j++)
226 double top = rect.
getTop();
231 unsigned char *bitmap = I.
bitmap;
234 int nb_point_dessine = 0;
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;
283 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
284 for (
unsigned int i = 0; i < I.
getHeight(); i++)
286 for (
unsigned int j = 0; j < I.
getWidth(); j++)
299 double top = rect.
getTop();
304 unsigned char *bitmap = I.
bitmap;
307 int nb_point_dessine = 0;
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;
346 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
347 for (
unsigned int i = 0; i < I.
getHeight(); i++)
349 for (
unsigned int j = 0; j < I.
getWidth(); j++)
362 double top = rect.
getTop();
367 unsigned char *bitmap = I.
bitmap;
370 int nb_point_dessine = 0;
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];
423 for (
unsigned int i = 0; i < I.
getHeight(); i++)
425 for (
unsigned int j = 0; j < I.
getWidth(); j++)
439 double top = rect.
getTop();
447 int nb_point_dessine = 0;
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;
498 for (
unsigned int i = 0; i < I.
getHeight(); i++)
500 for (
unsigned int j = 0; j < I.
getWidth(); j++)
514 double top = rect.
getTop();
522 int nb_point_dessine = 0;
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;
561 for (
unsigned int i = 0; i < I.
getHeight(); i++)
563 for (
unsigned int j = 0; j < I.
getWidth(); j++)
576 double top = rect.
getTop();
584 int nb_point_dessine = 0;
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;
1346 for(
unsigned int i = 0; i < 3; i++)
1348 double diff = (Xinter_optim[i]-X0_2_optim[i]);
1349 u += diff*vbase_u_optim[i];
1350 v += diff*vbase_v_optim[i];
1352 u = u/(euclideanNorm_u*euclideanNorm_u);
1353 v = v/(euclideanNorm_v*euclideanNorm_v);
1355 if( u > 0 && v > 0 && u < 1. && v < 1.)
1362 else if (interp ==
SIMPLE)
1363 Ipixelplan = Ig[(
unsigned int)i2][(
unsigned int)j2];
1375 bool inside =
false;
1376 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1377 if(listTriangle[i].inTriangle(iP)){
1381 if(!inside)
return false;
1390 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1392 Xinter_optim[0]=iP.
get_u()*z;
1393 Xinter_optim[1]=iP.
get_v()*z;
1401 double u = 0, v = 0;
1402 for(
unsigned int i = 0; i < 3; i++)
1404 double diff = (Xinter_optim[i]-X0_2_optim[i]);
1405 u += diff*vbase_u_optim[i];
1406 v += diff*vbase_v_optim[i];
1408 u = u/(euclideanNorm_u*euclideanNorm_u);
1409 v = v/(euclideanNorm_v*euclideanNorm_v);
1411 if( u > 0 && v > 0 && u < 1. && v < 1.)
1418 else if (interp ==
SIMPLE)
1419 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1431 bool inside =
false;
1432 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1433 if(listTriangle[i].inTriangle(iP)){
1437 if(!inside)
return false;
1445 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1447 Xinter_optim[0]=iP.
get_u()*z;
1448 Xinter_optim[1]=iP.
get_v()*z;
1456 double u = 0, v = 0;
1457 for(
unsigned int i = 0; i < 3; i++)
1459 double diff = (Xinter_optim[i]-X0_2_optim[i]);
1460 u += diff*vbase_u_optim[i];
1461 v += diff*vbase_v_optim[i];
1463 u = u/(euclideanNorm_u*euclideanNorm_u);
1464 v = v/(euclideanNorm_v*euclideanNorm_v);
1466 if( u > 0 && v > 0 && u < 1. && v < 1.)
1473 else if (interp ==
SIMPLE)
1474 Ipixelplan = Ic[(
unsigned int)i2][(
unsigned int)j2];
1488 bool inside =
false;
1489 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1490 if(listTriangle[i].inTriangle(iP)){
1494 if(!inside)
return false;
1500 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1502 Xinter_optim[0]=iP.
get_u()*z;
1503 Xinter_optim[1]=iP.
get_v()*z;
1511 double u = 0, v = 0;
1512 for(
unsigned int i = 0; i < 3; i++)
1514 double diff = (Xinter_optim[i]-X0_2_optim[i]);
1515 u += diff*vbase_u_optim[i];
1516 v += diff*vbase_v_optim[i];
1518 u = u/(euclideanNorm_u*euclideanNorm_u);
1519 v = v/(euclideanNorm_v*euclideanNorm_v);
1521 if( u > 0 && v > 0 && u < 1. && v < 1.)
1528 else if (interp ==
SIMPLE)
1529 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1537 vpImageSimulator::getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan)
1540 bool inside =
false;
1541 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1542 if(listTriangle[i].inTriangle(iP)){
1546 if(!inside)
return false;
1550 Zpixelplan = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1555 vpImageSimulator::getPixelVisibility(
const vpImagePoint &iP,
1556 double &Visipixelplan)
1559 bool inside =
false;
1560 for(
unsigned int i = 0 ; i < listTriangle.size() ; i++)
1561 if(listTriangle[i].inTriangle(iP)){
1565 if(!inside)
return false;
1569 Visipixelplan = visible_result;
1574 vpImageSimulator::project(
const vpColVector &_vin,
1578 getHomogCoord(_vin,XH);
1579 getCoordFromHomog(_cMt*XH,_vout);
1585 for(
unsigned int i=0;i<3;i++)
1593 for(
unsigned int i=0;i<3;i++)
1594 _v[i]=_vH[i]/_vH[3];
1599 vpImageSimulator::getRoi(
const unsigned int &Iwidth,
1600 const unsigned int &Iheight,
1602 const std::vector<vpPoint> &point,
1605 double top = Iheight+1;
1608 double left= Iwidth+1;
1610 for(
unsigned int i = 0; i < point.size(); i++)
1614 if (v < top) top = v;
1615 if (v > bottom) bottom = v;
1616 if (u < left) left = u;
1617 if (u > right) right = u;
1619 if (top < 0) top = 0;
1620 if(top >= Iheight) top = Iheight-1;
1621 if (bottom < 0) bottom = 0;
1622 if(bottom >= Iheight) bottom = Iheight-1;
1623 if(left < 0) left = 0;
1624 if(left >= Iwidth) left = Iwidth-1;
1625 if(right < 0) right = 0;
1626 if(right >= Iwidth) right = Iwidth-1;
1634 std::vector<vpColVector>
1637 std::vector<vpColVector> X_;
1638 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.
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)
static void read(vpImage< unsigned char > &I, const std::string &filename)
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)
void setBottom(double pos)
void set_ij(const double ii, const double jj)
void resize(const unsigned int i, const bool flagNullify=true)