40 #ifndef vpImageSimulator_h
41 #define vpImageSimulator_h
133 #include <visp3/core/vpCameraParameters.h>
134 #include <visp3/core/vpColVector.h>
135 #include <visp3/core/vpConfig.h>
136 #include <visp3/core/vpHomogeneousMatrix.h>
137 #include <visp3/core/vpImage.h>
138 #include <visp3/core/vpPoint.h>
139 #include <visp3/core/vpRect.h>
140 #include <visp3/core/vpTriangle.h>
149 typedef enum {
COLORED, GRAY_SCALED } vpColorPlan;
151 typedef enum { SIMPLE, BILINEAR_INTERPOLATION } vpInterpolationType;
157 std::vector<vpPoint> pt;
158 std::vector<vpPoint> ptClipped;
160 vpInterpolationType interp;
168 double *normal_Cam_optim;
172 double visible_result;
179 double frobeniusNorm_u, fronbniusNorm_v;
185 double *vbase_u_optim;
186 double *vbase_v_optim;
190 double *Xinter_optim;
193 std::vector<vpTriangle> listTriangle;
202 bool setBackgroundTexture;
222 #ifdef VISP_HAVE_MODULE_IO
227 #ifdef VISP_HAVE_MODULE_IO
228 void init(
const char *file_image,
const std::vector<vpPoint> &X);
249 std::vector<vpColVector> get3DcornersTextureRectangle();
251 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpImageSimulator & );
266 cleanPrevImage = clean;
278 setBackgroundTexture =
true;
288 bool isVisible() {
return visible; }
293 bool getPixel(
const vpImagePoint &iP,
unsigned char &Ipixelplan);
297 bool getPixelDepth(
const vpImagePoint &iP,
double &Zpixelplan);
298 bool getPixelVisibility(
const vpImagePoint &iP,
double &Zpixelplan);
307 void getRoi(
const unsigned int &Iwidth,
const unsigned int &Iheight,
const vpCameraParameters &cam,
308 const std::vector<vpPoint> &point,
vpRect &rect);
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
static const vpColor white
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Class which enables to project an image in the 3D space and get the view of a virtual camera.
void setBackGroundTexture(const vpImage< unsigned char > &Iback)
void setCleanPreviousImage(const bool &clean, const vpColor &color=vpColor::white)
void setInterpolationType(const vpInterpolationType interplt)
Implementation of a matrix and operations on matrices.
Defines a rectangle in the plane.