39 #ifndef vpWireFrameSimulator_HH
40 #define vpWireFrameSimulator_HH
46 #include <visp3/core/vpConfig.h>
54 #include <visp3/core/vpConfig.h>
55 #include <visp3/core/vpImage.h>
56 #include <visp3/core/vpHomogeneousMatrix.h>
57 #include <visp3/core/vpDisplay.h>
58 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
59 # include <visp3/core/vpList.h>
61 #include <visp3/core/vpImagePoint.h>
62 #include <visp3/robot/vpImageSimulator.h>
63 #include <visp3/robot/vpWireFrameSimulatorTypes.h>
181 } vpSceneDesiredObject;
187 } vpCameraTrajectoryDisplayType;
250 std::string scene_dir;
262 cameraTrajectory.clear();
267 void displayTrajectory(
const vpImage<vpRGBa> &I,
const std::list<vpHomogeneousMatrix> &list_cMo,
const std::list<vpHomogeneousMatrix> &list_fMo,
const vpHomogeneousMatrix &camMf);
279 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
280 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
298 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
299 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
329 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
330 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
348 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
349 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
375 for(std::list<vpHomogeneousMatrix>::const_iterator it=poseList.begin(); it!=poseList.end(); ++it){
376 cMo_history.push_back(rotz*(*it));
392 void get_fMo_History(std::list<vpHomogeneousMatrix>& fMo_history) {fMo_history = fMoList;}
394 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
395 void initScene(
const char* obj,
const char* desiredObject);
396 void initScene(
const vpSceneObject &obj);
397 void initScene(
const char* obj);
399 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject,
const std::list<vpImageSimulator> &imObj);
400 void initScene(
const char* obj,
const char* desiredObject,
const std::list<vpImageSimulator> &imObj);
401 void initScene(
const vpSceneObject &obj,
const std::list<vpImageSimulator> &imObj);
402 void initScene(
const char* obj,
const std::list<vpImageSimulator> &imObj);
488 this->camMf = rotz * cam_Mf;
490 this->camMf.extract (T);
492 f2Mf = camMf2.inverse()*this->camMf;
493 extCamChanged =
true;
501 this->thickness_ = thickness;
bool displayImageSimulator
The object displayed at the desired position is the same than the scene object defined in vpSceneObje...
A cylinder of 80cm length and 10cm radius.
void deleteCameraPositionHistory()
A tire represented by 2 circles with radius 10cm and 15cm.
vpCameraParameters getInternalCameraParameters(const vpImage< vpRGBa > &I) const
unsigned int getWidth() const
Three parallel lines with equation y=-5, y=0, y=5.
A plane represented by a 56cm by 56cm plate with a grid of 49 squares inside.
Implementation of an homogeneous matrix and operations on such kind of matrices.
A plate with 8 points at coordinates (0.05,0,0), (0.15,0.05,0), (0.2,0.2,0), (-0.05,0.2,0), (-0.15,-0.1,0), (-0.1,-0.1,0), (-0.05,0.05,0) and (0.5,0,0). ach point is represented by a circle with 2cm radius.
void setCameraColor(const vpColor &col)
void setDesiredViewColor(const vpColor &col)
A 40cm by 40cm plate with 4 points at coordinates (-0.1,-0.1,0), (0.1,-0.1,0), (0.1,0.1,0), (0.1,0.1,0). Each point is represented by a circle with 2cm radius.
void set_fMo(const vpHomogeneousMatrix &fMo_)
Class to define colors available for display functionnalities.
void setNbPtTrajectory(const unsigned int nbPt)
void get_cMo_History(std::list< vpHomogeneousMatrix > &cMo_history)
void setCameraPositionRelWorld(const vpHomogeneousMatrix &fMc_)
std::list< vpImageSimulator > objectImage
void setCurrentViewColor(const vpColor &col)
std::list< vpImagePoint > cameraTrajectory
void setExternalCameraPosition(const vpHomogeneousMatrix &cam_Mf)
A 40cm by 40cm plate with 4 points at coordinates (-0.05,0.05,0), (0.05,0.05,0), (0.05,-0.05,0), (-0.05,-0.05,0). Each point is represented by a circle with 2cm radius.
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
void setGraphicsThickness(unsigned int thickness)
std::list< vpHomogeneousMatrix > fMoList
static Type maximum(const Type &a, const Type &b)
void setCameraTrajectoryDisplayType(const vpCameraTrajectoryDisplayType &camTraj_type)
void setCameraTrajectoryColor(const vpColor &col)
4 points at coordinates (-0.03,-0.03,0), (0.03,-0.03,0), (0.03,0.03,0), (0.03,0.03,0). Each point is represented by a circle with 1cm radius.
vpCameraParameters getExternalCameraParameters(const vpImage< unsigned char > &I) const
vpHomogeneousMatrix get_fMo() const
The object displayed at the desired position is a circle.
A 40cm by 40cm plate with 4 points at coordinates (-0.025,-0.05,0), (-0.075,0.05,0), (0.075,0.05,0), (0.025,-0.05,0). Each point is represented by a circle with 2cm radius.
Generic class defining intrinsic camera parameters.
bool displayDesiredObject
static Type minimum(const Type &a, const Type &b)
A 40cm by 40cm plate with 3 points at coordinates (0,0,0), (0.1,0,0), (0,0.1,0). Each point is repres...
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
vpCameraParameters getInternalCameraParameters(const vpImage< unsigned char > &I) const
void setExternalCameraParameters(const vpCameraParameters &cam)
vpCameraTrajectoryDisplayType camTrajType
A 40cm by 40cm plate with 4 points at coordinates (-0.07,-0.05,0), (0.07,0.05,0), (0...
vpCameraParameters getExternalCameraParameters(const vpImage< vpRGBa > &I) const
void setCameraPositionRelObj(const vpHomogeneousMatrix &cMo_)
vpSceneDesiredObject desiredObject
A 40cm by 40cm plate with 4 points at coordinates (0,-0.1,0), (0.1,0,0), (0,0.1,0), (-0.1,0,0). Each point is represented by a circle with 2cm radius.
bool displayCameraTrajectory
vpHomogeneousMatrix camMf
Three parallel lines representing a road.
vpHomogeneousMatrix inverse() const
vpHomogeneousMatrix get_cMo() const
void setInternalCameraParameters(const vpCameraParameters &cam)
vpCameraTrajectoryDisplayType
void setDisplayCameraTrajectory(const bool &do_display)
void get_fMo_History(std::list< vpHomogeneousMatrix > &fMo_history)
vpHomogeneousMatrix refMo
A pipe represented by a cylinder of 25 cm length and 15cm radius.
unsigned int getHeight() const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Class that consider the case of a translation vector.
void setCameraSizeFactor(const float factor)
std::list< vpHomogeneousMatrix > poseList
vpTranslationVector buildFrom(const double tx, const double ty, const double tz)
vpHomogeneousMatrix getExternalCameraPosition() const
vpHomogeneousMatrix camMf2