44 #ifndef vpMeterPixelConversion_H
45 #define vpMeterPixelConversion_H
54 #include <visp/vpCameraParameters.h>
55 #include<visp/vpException.h>
56 #include<visp/vpMath.h>
57 #include<visp/vpImagePoint.h>
97 const double &x,
const double &y,
101 switch(cam.projModel){
103 convertPointWithoutDistortion(cam,x,y,u,v);
106 convertPointWithDistortion(cam,x,y,u,v);
136 const double &x,
const double &y,
140 switch(cam.projModel){
142 convertPointWithoutDistortion(cam,x,y,iP);
145 convertPointWithDistortion(cam,x,y,iP);
161 const double &x,
const double &y,
162 double &u,
double &v)
165 u = x * cam.px + cam.u0 ;
166 v = y * cam.py + cam.v0 ;
181 const double &x,
const double &y,
185 iP.
set_u( x * cam.px + cam.u0 );
186 iP.
set_v( y * cam.py + cam.v0 );
205 const double &x,
const double &y,
206 double &u,
double &v)
209 double r2 = 1.+cam.kud*(x*x+y*y);
210 u = cam.u0 + cam.px*x*r2;
211 v = cam.v0 + cam.py*y*r2;
231 const double &x,
const double &y,
235 double r2 = 1.+cam.kud*(x*x+y*y);
236 iP.
set_u( cam.u0 + cam.px*x*r2 );
237 iP.
set_v( cam.v0 + cam.py*y*r2 );
242 const double &rho_m,
const double &theta_m,
243 double &rho_p,
double &theta_p) ;
Perspective projection without distortion model.
static void convertPointWithoutDistortion(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Point coordinates conversion without distortion from normalized coordinates in meter to pixel coordi...
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP)
Point coordinates conversion from normalized coordinates in meter to pixel coordinates.
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 ...
static void convertPointWithDistortion(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Point coordinates conversion with distortion from normalized coordinates in meter to pixel coordinat...
void set_u(const double u)
static void convertPointWithDistortion(const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP)
Point coordinates conversion with distortion from normalized coordinates in meter to pixel coordinat...
void set_v(const double v)
Generic class defining intrinsic camera parameters.
Perspective projection with distortion model.
Conversion from normalized coordinates in meter to pixel coordinates .
static void convertPointWithoutDistortion(const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP)
Point coordinates conversion without distortion from normalized coordinates in meter to pixel coordi...
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...