Exemplo n.º 1
0
void
vpProjectionDisplay::display(vpImage<unsigned char> &I,
                             const vpHomogeneousMatrix &cextMo,
                             const vpHomogeneousMatrix &cMo,
                             const vpCameraParameters &cam,
                             const vpColor &color,
                             const bool &displayTraj,
                             const unsigned int thickness)
{

  for (std::list<vpForwardProjection *>::const_iterator it = listFp.begin() ; it != listFp.end(); ++it )
    {
      vpForwardProjection *fp = *it ;
      fp->display(I,cextMo, cam, color, thickness) ;
    }

    if(displayTraj)	// display past camera positions
    	for(unsigned int i=0;i<traj.getRows();++i)
    		vpDisplay::displayCircle(I,(int)traj[i][0],(int)traj[i][1],2,vpColor::green,true);

    displayCamera(I, cextMo, cMo, cam, thickness);

    if(displayTraj)	// store current camera position
    {
      const unsigned int n = traj.getRows();
      traj.resize(n+1, 2, false);
    	vpMeterPixelConversion::convertPoint(cam,o.p[0],o.p[1],traj[n][1],traj[n][0]);
    }
}
Exemplo n.º 2
0
void
vpProjectionDisplay::display(vpImage<unsigned char> &I,
			     const vpHomogeneousMatrix &cextMo,
			     const vpHomogeneousMatrix &cMo,
			     const vpCameraParameters &cam,
			     const vpColor color)
{

    for (listFp.front() ; !listFp.outside() ; listFp.next() )
    {
      vpForwardProjection *fp = listFp.value() ;
      fp->display(I,cextMo,cam, color) ;
    }

    displayCamera(I,cextMo,cMo, cam) ;
}