40 #include <visp3/core/vpImageConvert.h> 41 #include <visp3/core/vpMatrixException.h> 42 #include <visp3/core/vpMeterPixelConversion.h> 43 #include <visp3/core/vpPixelMeterConversion.h> 44 #include <visp3/core/vpPolygon3D.h> 45 #include <visp3/core/vpRotationMatrix.h> 46 #include <visp3/robot/vpImageSimulator.h> 48 #ifdef VISP_HAVE_MODULE_IO 49 #include <visp3/io/vpImageIo.h> 63 : cMt(), pt(), ptClipped(), interp(SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(), distance(1.),
64 visible_result(1.), visible(false), X0_2_optim(NULL), frobeniusNorm_u(0.), fronbniusNorm_v(0.), vbase_u(),
65 vbase_v(), vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), listTriangle(), colorI(col), Ig(), Ic(),
66 rect(), cleanPrevImage(false), setBackgroundTexture(false), bgColor(
vpColor::white), focal(), needClipping(false)
68 for (
int i = 0; i < 4; i++)
71 for (
int i = 0; i < 4; i++)
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];
100 : cMt(), pt(), ptClipped(), interp(
SIMPLE), normal_obj(), normal_Cam(), normal_Cam_optim(), distance(1.),
101 visible_result(1.), visible(false), X0_2_optim(NULL), frobeniusNorm_u(0.), fronbniusNorm_v(0.), vbase_u(),
102 vbase_v(), vbase_u_optim(NULL), vbase_v_optim(NULL), Xinter_optim(NULL), listTriangle(), colorI(
GRAY_SCALED), Ig(),
103 Ic(), rect(), cleanPrevImage(false), setBackgroundTexture(false), bgColor(
vpColor::white), focal(),
107 for (
unsigned int i = 0; i < 4; i++) {
112 for (
int i = 0; i < 4; i++)
122 normal_obj = text.normal_obj;
123 frobeniusNorm_u = text.frobeniusNorm_u;
124 fronbniusNorm_v = text.fronbniusNorm_v;
130 normal_Cam_optim =
new double[3];
131 X0_2_optim =
new double[3];
132 vbase_u_optim =
new double[3];
133 vbase_v_optim =
new double[3];
134 Xinter_optim =
new double[3];
136 colorI = text.colorI;
137 interp = text.interp;
138 bgColor = text.bgColor;
139 cleanPrevImage = text.cleanPrevImage;
140 setBackgroundTexture =
false;
150 delete[] normal_Cam_optim;
152 delete[] vbase_u_optim;
153 delete[] vbase_v_optim;
154 delete[] Xinter_optim;
159 for (
unsigned int i = 0; i < 4; i++) {
167 bgColor = sim.bgColor;
168 cleanPrevImage = sim.cleanPrevImage;
172 normal_obj = sim.normal_obj;
173 frobeniusNorm_u = sim.frobeniusNorm_u;
174 fronbniusNorm_v = sim.fronbniusNorm_v;
191 if (setBackgroundTexture)
195 if (cleanPrevImage) {
196 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
197 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
198 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
211 double top = rect.
getTop();
216 unsigned char *bitmap = I.
bitmap;
219 int nb_point_dessine = 0;
221 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
222 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
228 unsigned char Ipixelplan = 0;
229 if (getPixel(ip, Ipixelplan)) {
230 *(bitmap + i * width + j) = Ipixelplan;
233 }
else if (colorI ==
COLORED) {
235 if (getPixel(ip, Ipixelplan)) {
236 unsigned char pixelgrey =
237 (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
238 *(bitmap + i * width + j) = pixelgrey;
258 if (cleanPrevImage) {
259 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
260 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
261 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
272 double top = rect.
getTop();
277 unsigned char *bitmap = I.
bitmap;
280 int nb_point_dessine = 0;
282 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
283 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
288 unsigned char Ipixelplan = 0;
289 if (getPixel(Isrc, ip, Ipixelplan)) {
290 *(bitmap + i * width + j) = Ipixelplan;
317 " zBuffer must have the same size as the image I ! "));
319 if (cleanPrevImage) {
320 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
321 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
322 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
333 double top = rect.
getTop();
338 unsigned char *bitmap = I.
bitmap;
341 int nb_point_dessine = 0;
343 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
344 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
350 unsigned char Ipixelplan;
351 if (getPixel(ip, Ipixelplan)) {
352 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0) {
353 *(bitmap + i * width + j) = Ipixelplan;
355 zBuffer[i][j] = Xinter_optim[2];
358 }
else if (colorI ==
COLORED) {
360 if (getPixel(ip, Ipixelplan)) {
361 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0) {
362 unsigned char pixelgrey =
363 (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
364 *(bitmap + i * width + j) = pixelgrey;
366 zBuffer[i][j] = Xinter_optim[2];
384 if (cleanPrevImage) {
385 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
386 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
398 double top = rect.
getTop();
406 int nb_point_dessine = 0;
408 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
409 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
415 unsigned char Ipixelplan;
416 if (getPixel(ip, Ipixelplan)) {
418 pixelcolor.
R = Ipixelplan;
419 pixelcolor.
G = Ipixelplan;
420 pixelcolor.
B = Ipixelplan;
421 *(bitmap + i * width + j) = pixelcolor;
424 }
else if (colorI ==
COLORED) {
426 if (getPixel(ip, Ipixelplan)) {
427 *(bitmap + i * width + j) = Ipixelplan;
447 if (cleanPrevImage) {
448 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
449 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
461 double top = rect.
getTop();
469 int nb_point_dessine = 0;
471 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
472 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
478 if (getPixel(Isrc, ip, Ipixelplan)) {
479 *(bitmap + i * width + j) = Ipixelplan;
506 " zBuffer must have the same size as the image I ! "));
508 if (cleanPrevImage) {
509 for (
unsigned int i = 0; i < I.
getHeight(); i++) {
510 for (
unsigned int j = 0; j < I.
getWidth(); j++) {
521 double top = rect.
getTop();
529 int nb_point_dessine = 0;
531 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++) {
532 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++) {
538 unsigned char Ipixelplan;
539 if (getPixel(ip, Ipixelplan)) {
540 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0) {
542 pixelcolor.
R = Ipixelplan;
543 pixelcolor.
G = Ipixelplan;
544 pixelcolor.
B = Ipixelplan;
545 *(bitmap + i * width + j) = pixelcolor;
547 zBuffer[i][j] = Xinter_optim[2];
550 }
else if (colorI ==
COLORED) {
552 if (getPixel(ip, Ipixelplan)) {
553 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0) {
554 *(bitmap + i * width + j) = Ipixelplan;
556 zBuffer[i][j] = Xinter_optim[2];
676 unsigned int nbsimList = (
unsigned int)list.size();
683 double topFinal = height + 1;
685 double bottomFinal = -1;
686 double leftFinal = width + 1;
687 double rightFinal = -1;
689 unsigned int unvisible = 0;
690 unsigned int indexSimu = 0;
691 for (std::list<vpImageSimulator>::iterator it = list.begin(); it != list.end(); ++it, ++indexSimu) {
694 simList[indexSimu] = sim;
698 nbsimList = nbsimList - unvisible;
705 for (
unsigned int i = 0; i < nbsimList; i++) {
706 if (!simList[i]->needClipping)
707 simList[i]->getRoi(width, height, cam, simList[i]->pt, simList[i]->rect);
709 simList[i]->getRoi(width, height, cam, simList[i]->ptClipped, simList[i]->rect);
711 if (topFinal > simList[i]->rect.
getTop())
712 topFinal = simList[i]->rect.
getTop();
713 if (bottomFinal < simList[i]->rect.
getBottom())
714 bottomFinal = simList[i]->rect.
getBottom();
715 if (leftFinal > simList[i]->rect.
getLeft())
716 leftFinal = simList[i]->rect.
getLeft();
717 if (rightFinal < simList[i]->rect.
getRight())
718 rightFinal = simList[i]->rect.
getRight();
723 unsigned char *bitmap = I.
bitmap;
726 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++) {
727 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++) {
733 for (
int k = 0; k < (int)nbsimList; k++) {
735 if (simList[k]->getPixelDepth(ip, z)) {
736 if (z < zmin || zmin < 0) {
744 unsigned char Ipixelplan = 255;
745 simList[indice]->getPixel(ip, Ipixelplan);
746 *(bitmap + i * width + j) = Ipixelplan;
747 }
else if (simList[indice]->colorI ==
COLORED) {
748 vpRGBa Ipixelplan(255, 255, 255);
749 simList[indice]->getPixel(ip, Ipixelplan);
750 unsigned char pixelgrey =
751 (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
752 *(bitmap + i * width + j) = pixelgrey;
873 unsigned int nbsimList = (
unsigned int)list.size();
880 double topFinal = height + 1;
882 double bottomFinal = -1;
883 double leftFinal = width + 1;
884 double rightFinal = -1;
886 unsigned int unvisible = 0;
887 unsigned int indexSimu = 0;
888 for (std::list<vpImageSimulator>::iterator it = list.begin(); it != list.end(); ++it, ++indexSimu) {
891 simList[indexSimu] = sim;
896 nbsimList = nbsimList - unvisible;
903 for (
unsigned int i = 0; i < nbsimList; i++) {
904 if (!simList[i]->needClipping)
905 simList[i]->getRoi(width, height, cam, simList[i]->pt, simList[i]->rect);
907 simList[i]->getRoi(width, height, cam, simList[i]->ptClipped, simList[i]->rect);
909 if (topFinal > simList[i]->rect.
getTop())
910 topFinal = simList[i]->rect.
getTop();
911 if (bottomFinal < simList[i]->rect.
getBottom())
912 bottomFinal = simList[i]->rect.
getBottom();
913 if (leftFinal > simList[i]->rect.
getLeft())
914 leftFinal = simList[i]->rect.
getLeft();
915 if (rightFinal < simList[i]->rect.
getRight())
916 rightFinal = simList[i]->rect.
getRight();
924 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++) {
925 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++) {
931 for (
int k = 0; k < (int)nbsimList; k++) {
933 if (simList[k]->getPixelDepth(ip, z)) {
934 if (z < zmin || zmin < 0) {
942 unsigned char Ipixelplan = 255;
943 simList[indice]->getPixel(ip, Ipixelplan);
945 pixelcolor.
R = Ipixelplan;
946 pixelcolor.
G = Ipixelplan;
947 pixelcolor.
B = Ipixelplan;
948 *(bitmap + i * width + j) = pixelcolor;
949 }
else if (simList[indice]->colorI ==
COLORED) {
950 vpRGBa Ipixelplan(255, 255, 255);
951 simList[indice]->getPixel(ip, Ipixelplan);
954 *(bitmap + i * width + j) = Ipixelplan;
973 needClipping =
false;
975 normal_Cam = R * normal_obj;
979 for (
unsigned int i = 0; i < 4; i++)
986 e1[0] = pt[1].get_X() - pt[0].get_X();
987 e1[1] = pt[1].get_Y() - pt[0].get_Y();
988 e1[2] = pt[1].get_Z() - pt[0].get_Z();
990 e2[0] = pt[2].get_X() - pt[1].get_X();
991 e2[1] = pt[2].get_Y() - pt[1].get_Y();
992 e2[2] = pt[2].get_Z() - pt[1].get_Z();
996 double angle = pt[0].get_X() * facenormal[0] + pt[0].get_Y() * facenormal[1] + pt[0].get_Z() * facenormal[2];
1005 for (
unsigned int i = 0; i < 4; i++) {
1006 project(X[i], cMt, X2[i]);
1008 if (pt[i].get_Z() < 0)
1009 needClipping =
true;
1012 vbase_u = X2[1] - X2[0];
1013 vbase_v = X2[3] - X2[0];
1022 for (
unsigned int i = 0; i < 3; i++) {
1023 normal_Cam_optim[i] = normal_Cam[i];
1024 X0_2_optim[i] = X2[0][i];
1025 vbase_u_optim[i] = vbase_u[i];
1026 vbase_v_optim[i] = vbase_v[i];
1029 std::vector<vpPoint> *ptPtr = &pt;
1035 listTriangle.clear();
1036 for (
unsigned int i = 1; i < (*ptPtr).size() - 1; i++) {
1038 ip1.
set_j((*ptPtr)[0].get_x());
1039 ip1.
set_i((*ptPtr)[0].get_y());
1041 ip2.
set_j((*ptPtr)[i].get_x());
1042 ip2.
set_i((*ptPtr)[i].get_y());
1044 ip3.
set_j((*ptPtr)[i + 1].get_x());
1045 ip3.
set_i((*ptPtr)[i + 1].get_y());
1048 listTriangle.push_back(tri);
1055 for (
unsigned int i = 0; i < 4; i++) {
1057 pt[i].setWorldCoordinates(X_[i][0], X_[i][1], X_[i][2]);
1063 frobeniusNorm_u = (X[1] - X[0]).frobeniusNorm();
1064 fronbniusNorm_v = (X[3] - X[0]).frobeniusNorm();
1109 #ifdef VISP_HAVE_MODULE_IO 1150 if (X_.size() != 4) {
1154 for (
unsigned int i = 0; i < 4; ++i) {
1156 Xvec[i][0] = X_[i].get_oX();
1157 Xvec[i][1] = X_[i].get_oY();
1158 Xvec[i][2] = X_[i].get_oZ();
1182 if (X_.size() != 4) {
1186 for (
unsigned int i = 0; i < 4; ++i) {
1188 Xvec[i][0] = X_[i].get_oX();
1189 Xvec[i][1] = X_[i].get_oY();
1190 Xvec[i][2] = X_[i].get_oZ();
1198 #ifdef VISP_HAVE_MODULE_IO 1217 if (X_.size() != 4) {
1221 for (
unsigned int i = 0; i < 4; ++i) {
1223 Xvec[i][0] = X_[i].get_oX();
1224 Xvec[i][1] = X_[i].get_oY();
1225 Xvec[i][2] = X_[i].get_oZ();
1234 bool vpImageSimulator::getPixel(
const vpImagePoint &iP,
unsigned char &Ipixelplan)
1238 bool inside =
false;
1239 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1240 if (listTriangle[i].inTriangle(iP)) {
1256 z = distance / (normal_Cam_optim[0] * iP.
get_u() + normal_Cam_optim[1] * iP.
get_v() + normal_Cam_optim[2]);
1258 Xinter_optim[0] = iP.
get_u() * z;
1259 Xinter_optim[1] = iP.
get_v() * z;
1260 Xinter_optim[2] = z;
1268 double u = 0, v = 0;
1269 for (
unsigned int i = 0; i < 3; i++) {
1270 double diff = (Xinter_optim[i] - X0_2_optim[i]);
1271 u += diff * vbase_u_optim[i];
1272 v += diff * vbase_v_optim[i];
1274 u = u / (frobeniusNorm_u * frobeniusNorm_u);
1275 v = v / (fronbniusNorm_v * fronbniusNorm_v);
1277 if (u > 0 && v > 0 && u < 1. && v < 1.) {
1283 else if (interp ==
SIMPLE)
1284 Ipixelplan = Ig[(
unsigned int)i2][(
unsigned int)j2];
1293 bool inside =
false;
1294 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1295 if (listTriangle[i].inTriangle(iP)) {
1309 z = distance / (normal_Cam_optim[0] * iP.
get_u() + normal_Cam_optim[1] * iP.
get_v() + normal_Cam_optim[2]);
1311 Xinter_optim[0] = iP.
get_u() * z;
1312 Xinter_optim[1] = iP.
get_v() * z;
1313 Xinter_optim[2] = z;
1321 double u = 0, v = 0;
1322 for (
unsigned int i = 0; i < 3; i++) {
1323 double diff = (Xinter_optim[i] - X0_2_optim[i]);
1324 u += diff * vbase_u_optim[i];
1325 v += diff * vbase_v_optim[i];
1327 u = u / (frobeniusNorm_u * frobeniusNorm_u);
1328 v = v / (fronbniusNorm_v * fronbniusNorm_v);
1330 if (u > 0 && v > 0 && u < 1. && v < 1.) {
1335 Ipixelplan = Isrc.
getValue(i2, j2);
1336 else if (interp ==
SIMPLE)
1337 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1346 bool inside =
false;
1347 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1348 if (listTriangle[i].inTriangle(iP)) {
1361 z = distance / (normal_Cam_optim[0] * iP.
get_u() + normal_Cam_optim[1] * iP.
get_v() + normal_Cam_optim[2]);
1363 Xinter_optim[0] = iP.
get_u() * z;
1364 Xinter_optim[1] = iP.
get_v() * z;
1365 Xinter_optim[2] = z;
1373 double u = 0, v = 0;
1374 for (
unsigned int i = 0; i < 3; i++) {
1375 double diff = (Xinter_optim[i] - X0_2_optim[i]);
1376 u += diff * vbase_u_optim[i];
1377 v += diff * vbase_v_optim[i];
1379 u = u / (frobeniusNorm_u * frobeniusNorm_u);
1380 v = v / (fronbniusNorm_v * fronbniusNorm_v);
1382 if (u > 0 && v > 0 && u < 1. && v < 1.) {
1388 else if (interp ==
SIMPLE)
1389 Ipixelplan = Ic[(
unsigned int)i2][(
unsigned int)j2];
1400 bool inside =
false;
1401 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1402 if (listTriangle[i].inTriangle(iP)) {
1413 z = distance / (normal_Cam_optim[0] * iP.
get_u() + normal_Cam_optim[1] * iP.
get_v() + normal_Cam_optim[2]);
1415 Xinter_optim[0] = iP.
get_u() * z;
1416 Xinter_optim[1] = iP.
get_v() * z;
1417 Xinter_optim[2] = z;
1425 double u = 0, v = 0;
1426 for (
unsigned int i = 0; i < 3; i++) {
1427 double diff = (Xinter_optim[i] - X0_2_optim[i]);
1428 u += diff * vbase_u_optim[i];
1429 v += diff * vbase_v_optim[i];
1431 u = u / (frobeniusNorm_u * frobeniusNorm_u);
1432 v = v / (fronbniusNorm_v * fronbniusNorm_v);
1434 if (u > 0 && v > 0 && u < 1. && v < 1.) {
1439 Ipixelplan = Isrc.
getValue(i2, j2);
1440 else if (interp ==
SIMPLE)
1441 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1447 bool vpImageSimulator::getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan)
1450 bool inside =
false;
1451 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1452 if (listTriangle[i].inTriangle(iP)) {
1461 Zpixelplan = distance / (normal_Cam_optim[0] * iP.
get_u() + normal_Cam_optim[1] * iP.
get_v() + normal_Cam_optim[2]);
1465 bool vpImageSimulator::getPixelVisibility(
const vpImagePoint &iP,
double &Visipixelplan)
1468 bool inside =
false;
1469 for (
unsigned int i = 0; i < listTriangle.size(); i++)
1470 if (listTriangle[i].inTriangle(iP)) {
1479 Visipixelplan = visible_result;
1486 getHomogCoord(_vin, XH);
1487 getCoordFromHomog(_cMt * XH, _vout);
1492 for (
unsigned int i = 0; i < 3; i++)
1499 for (
unsigned int i = 0; i < 3; i++)
1500 _v[i] = _vH[i] / _vH[3];
1503 void vpImageSimulator::getRoi(
const unsigned int &Iwidth,
const unsigned int &Iheight,
const vpCameraParameters &cam,
1504 const std::vector<vpPoint> &point,
vpRect &rectangle)
1506 double top = Iheight + 1;
1509 double left = Iwidth + 1;
1511 for (
unsigned int i = 0; i < point.size(); i++) {
1512 double u = 0, v = 0;
1529 if (bottom >= Iheight)
1530 bottom = Iheight - 1;
1537 if (right >= Iwidth)
1548 std::vector<vpColVector> X_;
1549 for (
int i = 0; i < 4; i++)
Implementation of a matrix and operations on matrices.
double frobeniusNorm() const
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.
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpImageSimulator &)
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)
Class to define RGB colors available for display functionnalities.
error that can be emited by ViSP classes.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
unsigned int getCols() const
unsigned char G
Green component.
Implementation of a rotation matrix and operations on such kind of matrices.
Type getValue(unsigned int i, unsigned int j) const
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
unsigned int getRows() const
vpImageSimulator(const vpColorPlan &col=COLORED)
void resize(unsigned int i, bool flagNullify=true)
void set_ij(double ii, 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)