40 #ifndef vpMeterPixelConversion_H 41 #define vpMeterPixelConversion_H 49 #include <visp3/core/vpCameraParameters.h> 50 #include <visp3/core/vpCircle.h> 51 #include <visp3/core/vpException.h> 52 #include <visp3/core/vpImagePoint.h> 53 #include <visp3/core/vpMath.h> 70 double &mu20_p,
double &mu11_p,
double &mu02_p);
72 static void convertLine(
const vpCameraParameters &cam,
const double &rho_m,
const double &theta_m,
double &rho_p,
100 switch (cam.projModel) {
102 convertPointWithoutDistortion(cam, x, y, u, v);
105 convertPointWithDistortion(cam, x, y, u, v);
136 switch (cam.projModel) {
138 convertPointWithoutDistortion(cam, x, y, iP);
141 convertPointWithDistortion(cam, x, y, iP);
146 #ifndef DOXYGEN_SHOULD_SKIP_THIS 156 inline static void convertPointWithoutDistortion(
const vpCameraParameters &cam,
const double &x,
const double &y,
157 double &u,
double &v)
159 u = x * cam.px + cam.u0;
160 v = y * cam.py + cam.v0;
173 inline static void convertPointWithoutDistortion(
const vpCameraParameters &cam,
const double &x,
const double &y,
176 iP.
set_u(x * cam.px + cam.u0);
177 iP.
set_v(y * cam.py + cam.v0);
196 inline static void convertPointWithDistortion(
const vpCameraParameters &cam,
const double &x,
const double &y,
197 double &u,
double &v)
199 double r2 = 1. + cam.kud * (x * x + y * y);
200 u = cam.u0 + cam.px * x * r2;
201 v = cam.v0 + cam.py * y * r2;
220 inline static void convertPointWithDistortion(
const vpCameraParameters &cam,
const double &x,
const double &y,
223 double r2 = 1. + cam.kud * (x * x + y * y);
224 iP.
set_u(cam.u0 + cam.px * x * r2);
225 iP.
set_v(cam.v0 + cam.py * y * r2);
227 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
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 ...
void set_u(const double u)
void set_v(const double v)
Generic class defining intrinsic camera parameters.
Conversion from normalized coordinates in meter to pixel coordinates .
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Class that defines what is a circle.