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>
82 normal_Cam_optim =
new double[3];
83 X0_2_optim =
new double[3];
84 vbase_u_optim =
new double[3];
85 vbase_v_optim =
new double[3];
86 Xinter_optim =
new double[3];
91 cleanPrevImage =
false;
116 normal_obj = text.normal_obj;
117 euclideanNorm_u = text.euclideanNorm_u;
118 euclideanNorm_v = text.euclideanNorm_v;
125 normal_Cam_optim =
new double[3];
126 X0_2_optim =
new double[3];
127 vbase_u_optim =
new double[3];
128 vbase_v_optim =
new double[3];
129 Xinter_optim =
new double[3];
131 colorI = text.colorI;
132 interp = text.interp;
133 bgColor = text.bgColor;
134 cleanPrevImage = text.cleanPrevImage;
144 delete[] normal_Cam_optim;
146 delete[] vbase_u_optim;
147 delete[] vbase_v_optim;
148 delete[] Xinter_optim;
164 bgColor = sim.bgColor;
165 cleanPrevImage = sim.cleanPrevImage;
169 normal_obj = sim.normal_obj;
170 euclideanNorm_u = sim.euclideanNorm_u;
171 euclideanNorm_v = sim.euclideanNorm_v;
191 int nb_point_dessine = 0;
194 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
195 for (
unsigned int i = 0; i < I.
getHeight(); i++)
197 for (
unsigned int j = 0; j < I.
getWidth(); j++)
207 double top = rect.
getTop();
212 unsigned char *bitmap = I.
bitmap;
216 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
218 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
226 unsigned char Ipixelplan = 0;
227 if(getPixel(ip,Ipixelplan))
229 *(bitmap+i*width+j)=Ipixelplan;
236 if(getPixel(ip,Ipixelplan))
238 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
239 *(bitmap+i*width+j)=pixelgrey;
261 int nb_point_dessine = 0;
264 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
265 for (
unsigned int i = 0; i < I.
getHeight(); i++)
267 for (
unsigned int j = 0; j < I.
getWidth(); j++)
277 double top = rect.
getTop();
282 unsigned char *bitmap = I.
bitmap;
286 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
288 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
294 unsigned char Ipixelplan = 0;
295 if(getPixel(Isrc,ip,Ipixelplan))
297 *(bitmap+i*width+j)=Ipixelplan;
321 int nb_point_dessine = 0;
324 unsigned char col = (
unsigned char)(0.2126 * bgColor.
R + 0.7152 * bgColor.
G + 0.0722 * bgColor.
B);
325 for (
unsigned int i = 0; i < I.
getHeight(); i++)
327 for (
unsigned int j = 0; j < I.
getWidth(); j++)
337 double top = rect.
getTop();
342 unsigned char *bitmap = I.
bitmap;
346 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
348 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
356 unsigned char Ipixelplan;
357 if(getPixel(ip,Ipixelplan))
359 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
361 *(bitmap+i*width+j)=Ipixelplan;
363 zBuffer[i][j] = Xinter_optim[2];
370 if(getPixel(ip,Ipixelplan))
372 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
374 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
375 *(bitmap+i*width+j)=pixelgrey;
377 zBuffer[i][j] = Xinter_optim[2];
395 int nb_point_dessine = 0;
398 for (
unsigned int i = 0; i < I.
getHeight(); i++)
400 for (
unsigned int j = 0; j < I.
getWidth(); j++)
411 double top = rect.
getTop();
420 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
422 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
430 unsigned char Ipixelplan;
431 if(getPixel(ip,Ipixelplan))
434 pixelcolor.
R = Ipixelplan;
435 pixelcolor.
G = Ipixelplan;
436 pixelcolor.
B = Ipixelplan;
437 *(bitmap+i*width+j) = pixelcolor;
444 if(getPixel(ip,Ipixelplan))
446 *(bitmap+i*width+j) = Ipixelplan;
467 int nb_point_dessine = 0;
470 for (
unsigned int i = 0; i < I.
getHeight(); i++)
472 for (
unsigned int j = 0; j < I.
getWidth(); j++)
483 double top = rect.
getTop();
492 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
494 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
501 if(getPixel(Isrc,ip,Ipixelplan))
503 *(bitmap+i*width+j) = Ipixelplan;
527 int nb_point_dessine = 0;
530 for (
unsigned int i = 0; i < I.
getHeight(); i++)
532 for (
unsigned int j = 0; j < I.
getWidth(); j++)
542 double top = rect.
getTop();
551 for (
unsigned int i = (
unsigned int)top; i < (
unsigned int)bottom; i++)
553 for (
unsigned int j = (
unsigned int)left; j < (
unsigned int)right; j++)
561 unsigned char Ipixelplan;
562 if(getPixel(ip,Ipixelplan))
564 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
567 pixelcolor.
R = Ipixelplan;
568 pixelcolor.
G = Ipixelplan;
569 pixelcolor.
B = Ipixelplan;
570 *(bitmap+i*width+j) = pixelcolor;
572 zBuffer[i][j] = Xinter_optim[2];
579 if(getPixel(ip,Ipixelplan))
581 if (Xinter_optim[2] < zBuffer[i][j] || zBuffer[i][j] < 0)
583 *(bitmap+i*width+j) = Ipixelplan;
585 zBuffer[i][j] = Xinter_optim[2];
594 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
717 double topFinal = height+1;;
718 double bottomFinal = -1;
719 double leftFinal = width+1;
720 double rightFinal = -1;
724 unsigned int unvisible = 0;
725 for (
unsigned int i = 0; i < nbsimList; i++)
734 nbsimList = nbsimList - unvisible;
743 for (
unsigned int i = 0; i < nbsimList; i++)
746 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
748 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
749 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
750 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
751 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
756 unsigned char *bitmap = I.
bitmap;
759 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
761 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
768 for (
int k = 0; k < (int)nbsimList; k++)
771 if(simList[k]->getPixelDepth(ip,z))
773 if (z < zmin || zmin < 0)
784 unsigned char Ipixelplan = 255;
785 simList[indice]->getPixel(ip,Ipixelplan);
786 *(bitmap+i*width+j)=Ipixelplan;
788 else if (simList[indice]->colorI ==
COLORED)
790 vpRGBa Ipixelplan(255,255,255);
791 simList[indice]->getPixel(ip,Ipixelplan);
792 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
793 *(bitmap+i*width+j)=pixelgrey;
923 double topFinal = height+1;;
924 double bottomFinal = -1;
925 double leftFinal = width+1;
926 double rightFinal = -1;
930 unsigned int unvisible = 0;
931 for (
unsigned int i = 0; i < nbsimList; i++)
940 nbsimList = nbsimList - unvisible;
948 for (
unsigned int i = 0; i < nbsimList; i++)
951 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
953 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
954 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
955 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
956 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
964 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
966 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
973 for (
int k = 0; k < (int)nbsimList; k++)
976 if(simList[k]->getPixelDepth(ip,z))
978 if (z < zmin || zmin < 0)
989 unsigned char Ipixelplan = 255;
990 simList[indice]->getPixel(ip,Ipixelplan);
992 pixelcolor.
R = Ipixelplan;
993 pixelcolor.
G = Ipixelplan;
994 pixelcolor.
B = Ipixelplan;
995 *(bitmap+i*width+j) = pixelcolor;
997 else if (simList[indice]->colorI ==
COLORED)
999 vpRGBa Ipixelplan(255,255,255);
1000 simList[indice]->getPixel(ip,Ipixelplan);
1002 *(bitmap+i*width+j)=Ipixelplan;
1115 std::list<vpImageSimulator> &list,
1122 unsigned int nbsimList = list.size();
1129 double topFinal = height+1;;
1130 double bottomFinal = -1;
1131 double leftFinal = width+1;
1132 double rightFinal = -1;
1134 unsigned int unvisible = 0;
1135 unsigned int indexSimu=0;
1136 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
1139 simList[indexSimu] = sim;
1143 nbsimList = nbsimList - unvisible;
1152 for (
unsigned int i = 0; i < nbsimList; i++)
1155 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
1157 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
1158 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
1159 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
1160 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
1165 unsigned char *bitmap = I.
bitmap;
1168 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
1170 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
1177 for (
int k = 0; k < (int)nbsimList; k++)
1180 if(simList[k]->getPixelDepth(ip,z))
1182 if (z < zmin || zmin < 0)
1193 unsigned char Ipixelplan = 255;
1194 simList[indice]->getPixel(ip,Ipixelplan);
1195 *(bitmap+i*width+j)=Ipixelplan;
1197 else if (simList[indice]->colorI ==
COLORED)
1199 vpRGBa Ipixelplan(255,255,255);
1200 simList[indice]->getPixel(ip,Ipixelplan);
1201 unsigned char pixelgrey = (
unsigned char)(0.2126 * Ipixelplan.
R + 0.7152 * Ipixelplan.
G + 0.0722 * Ipixelplan.
B);
1202 *(bitmap+i*width+j)=pixelgrey;
1315 std::list<vpImageSimulator> &list,
1322 unsigned int nbsimList = list.size();
1329 double topFinal = height+1;;
1330 double bottomFinal = -1;
1331 double leftFinal = width+1;
1332 double rightFinal = -1;
1334 unsigned int unvisible = 0;
1335 unsigned int indexSimu = 0;
1336 for(std::list<vpImageSimulator>::iterator it=list.begin(); it!=list.end(); ++it, ++indexSimu){
1339 simList[indexSimu] = sim;
1344 nbsimList = nbsimList - unvisible;
1352 for (
unsigned int i = 0; i < nbsimList; i++)
1355 simList[i]->getRoi(width,height,cam,simList[i]->pt,simList[i]->rect);
1357 if (topFinal > simList[i]->rect.
getTop()) topFinal = simList[i]->rect.
getTop();
1358 if (bottomFinal < simList[i]->rect.
getBottom()) bottomFinal = simList[i]->rect.
getBottom();
1359 if (leftFinal > simList[i]->rect.
getLeft()) leftFinal = simList[i]->rect.
getLeft();
1360 if (rightFinal < simList[i]->rect.
getRight()) rightFinal = simList[i]->rect.
getRight();
1368 for (
unsigned int i = (
unsigned int)topFinal; i < (
unsigned int)bottomFinal; i++)
1370 for (
unsigned int j = (
unsigned int)leftFinal; j < (
unsigned int)rightFinal; j++)
1377 for (
int k = 0; k < (int)nbsimList; k++)
1380 if(simList[k]->getPixelDepth(ip,z))
1382 if (z < zmin || zmin < 0)
1393 unsigned char Ipixelplan = 255;
1394 simList[indice]->getPixel(ip,Ipixelplan);
1396 pixelcolor.
R = Ipixelplan;
1397 pixelcolor.
G = Ipixelplan;
1398 pixelcolor.
B = Ipixelplan;
1399 *(bitmap+i*width+j) = pixelcolor;
1401 else if (simList[indice]->colorI ==
COLORED)
1403 vpRGBa Ipixelplan(255,255,255);
1404 simList[indice]->getPixel(ip,Ipixelplan);
1406 *(bitmap+i*width+j)=Ipixelplan;
1427 normal_Cam = R * normal_obj;
1431 for(
int i = 0; i < 4; i++)
1448 double angle = pt[0].
get_X()*facenormal[0] + pt[0].
get_Y()*facenormal[1] + pt[0].
get_Z()*facenormal[2] ;
1457 for(
int i = 0; i < 4; i++)
1459 project(X[i],cMt,X2[i]);
1463 vbase_u = X2[1]-X2[0];
1464 vbase_v = X2[3]-X2[0];
1474 for(
unsigned int i = 0; i < 3; i++)
1476 normal_Cam_optim[i] = normal_Cam[i];
1477 X0_2_optim[i] = X2[0][i];
1478 vbase_u_optim[i] = vbase_u[i];
1479 vbase_v_optim[i] = vbase_v[i];
1483 for(
unsigned int i = 0; i < 4; i++)
1485 iPa[i].
set_j(X2[i][0]/X2[i][2]);
1486 iPa[i].
set_i(X2[i][1]/X2[i][2]);
1497 for (
unsigned int i = 0; i < 4; i++)
1506 euclideanNorm_u=(X[1]-X[0]).euclideanNorm();
1507 euclideanNorm_v=(X[3]-X[0]).euclideanNorm();
1594 for(
unsigned int i=0; i<4; ++i){
1596 Xvec[i][0] = _X[i].get_oX();
1597 Xvec[i][1] = _X[i].get_oY();
1598 Xvec[i][2] = _X[i].get_oZ();
1626 for(
unsigned int i=0; i<4; ++i){
1628 Xvec[i][0] = _X[i].get_oX();
1629 Xvec[i][1] = _X[i].get_oY();
1630 Xvec[i][2] = _X[i].get_oZ();
1658 for(
unsigned int i=0; i<4; ++i){
1660 Xvec[i][0] = _X[i].get_oX();
1661 Xvec[i][1] = _X[i].get_oY();
1662 Xvec[i][2] = _X[i].get_oZ();
1671 vpImageSimulator::getPixel(
const vpImagePoint &iP,
unsigned char &Ipixelplan)
1681 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1683 Xinter_optim[0]=iP.
get_u()*z;
1684 Xinter_optim[1]=iP.
get_v()*z;
1692 double u = 0, v = 0;
1694 for(
unsigned int i = 0; i < 3; i++)
1696 diff = (Xinter_optim[i]-X0_2_optim[i]);
1697 u += diff*vbase_u_optim[i];
1698 v += diff*vbase_v_optim[i];
1700 u = u/(euclideanNorm_u*euclideanNorm_u);
1701 v = v/(euclideanNorm_v*euclideanNorm_v);
1703 if( u > 0 && v > 0 && u < 1. && v < 1.)
1710 else if (interp ==
SIMPLE)
1711 Ipixelplan = Ig[(
unsigned int)i2][(
unsigned int)j2];
1730 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1732 Xinter_optim[0]=iP.
get_u()*z;
1733 Xinter_optim[1]=iP.
get_v()*z;
1741 double u = 0, v = 0;
1743 for(
unsigned int i = 0; i < 3; i++)
1745 diff = (Xinter_optim[i]-X0_2_optim[i]);
1746 u += diff*vbase_u_optim[i];
1747 v += diff*vbase_v_optim[i];
1749 u = u/(euclideanNorm_u*euclideanNorm_u);
1750 v = v/(euclideanNorm_v*euclideanNorm_v);
1752 if( u > 0 && v > 0 && u < 1. && v < 1.)
1759 else if (interp ==
SIMPLE)
1760 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1779 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1781 Xinter_optim[0]=iP.
get_u()*z;
1782 Xinter_optim[1]=iP.
get_v()*z;
1790 double u = 0, v = 0;
1792 for(
unsigned int i = 0; i < 3; i++)
1794 diff = (Xinter_optim[i]-X0_2_optim[i]);
1795 u += diff*vbase_u_optim[i];
1796 v += diff*vbase_v_optim[i];
1798 u = u/(euclideanNorm_u*euclideanNorm_u);
1799 v = v/(euclideanNorm_v*euclideanNorm_v);
1801 if( u > 0 && v > 0 && u < 1. && v < 1.)
1808 else if (interp ==
SIMPLE)
1809 Ipixelplan = Ic[(
unsigned int)i2][(
unsigned int)j2];
1828 z = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1830 Xinter_optim[0]=iP.
get_u()*z;
1831 Xinter_optim[1]=iP.
get_v()*z;
1839 double u = 0, v = 0;
1841 for(
unsigned int i = 0; i < 3; i++)
1843 diff = (Xinter_optim[i]-X0_2_optim[i]);
1844 u += diff*vbase_u_optim[i];
1845 v += diff*vbase_v_optim[i];
1847 u = u/(euclideanNorm_u*euclideanNorm_u);
1848 v = v/(euclideanNorm_v*euclideanNorm_v);
1850 if( u > 0 && v > 0 && u < 1. && v < 1.)
1857 else if (interp ==
SIMPLE)
1858 Ipixelplan = Isrc[(
unsigned int)i2][(
unsigned int)j2];
1866 vpImageSimulator::getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan)
1872 Zpixelplan = distance/(normal_Cam_optim[0]*iP.
get_u()+normal_Cam_optim[1]*iP.
get_v()+normal_Cam_optim[2]);
1877 vpImageSimulator::getPixelVisibility(
const vpImagePoint &iP,
1878 double &Visipixelplan)
1884 Visipixelplan = visible_result;
1889 vpImageSimulator::project(
const vpColVector &_vin,
1893 getHomogCoord(_vin,XH);
1894 getCoordFromHomog(_cMt*XH,_vout);
1900 for(
unsigned int i=0;i<3;i++)
1908 for(
unsigned int i=0;i<3;i++)
1909 _v[i]=_vH[i]/_vH[3];
1914 vpImageSimulator::getRoi(
const unsigned int &Iwidth,
1915 const unsigned int &Iheight,
1919 double top = Iheight+1;
1922 double left= Iwidth+1;
1923 for(
int i = 0; i < 4; i++)
1927 if (v < top) top = v;
1928 if (v > bottom) bottom = v;
1929 if (u < left) left = u;
1930 if (u > right) right = u;
1932 if (top < 0) top = 0;
1933 if(top >= Iheight) top = Iheight-1;
1934 if (bottom < 0) bottom = 0;
1935 if(bottom >= Iheight) bottom = Iheight-1;
1936 if(left < 0) left = 0;
1937 if(left >= Iwidth) left = Iwidth-1;
1938 if(right < 0) right = 0;
1939 if(right >= Iwidth) right = Iwidth-1;
void set_j(const double j)
Definition of the vpMatrix class.
unsigned int nbElements(void)
return the number of element in the list
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 ...
void set_i(const double i)
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_ij(const double i, const double j)
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.
void init(const vpImage< unsigned char > &I, vpColVector *_X)
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.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void setRight(double pos)
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
void setCameraPosition(const vpHomogeneousMatrix &_cMt)
static void read(vpImage< unsigned char > &I, const char *filename)
unsigned int getRows() const
Return the number of rows of the matrix.
static const vpColor white
double get_X() const
Get the point X coordinate in the camera frame.
void setBottom(double pos)
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)