44 #include <visp3/core/vpCameraParameters.h> 45 #include <visp3/core/vpDebug.h> 46 #include <visp3/core/vpException.h> 47 #include <visp3/core/vpMath.h> 48 #include <visp3/core/vpPixelMeterConversion.h> 52 double &rho_m,
double &theta_m)
54 double co = cos(theta_p);
55 double si = sin(theta_p);
62 theta_m = atan2(si * cam.py, co * cam.px);
63 rho_m = (rho_p - cam.u0 * co - cam.v0 * si) / sqrt(d);
74 for (
unsigned int k = 0; k < order; k++)
76 for (
unsigned int p = 0; p < order; p++)
77 for (
unsigned int q = 0; q < order; q++)
81 for (
unsigned int r = 0; r <= p; r++)
82 for (
unsigned int t = 0; t <= q; t++)
85 pow(xc, (
int)(p - r)) * pow(yc, (
int)(q - t)) * moment_pixel[r][t];
90 for (
unsigned int k = 0; k < order; k++)
91 for (
unsigned int p = 0; p < order; p++)
92 for (
unsigned int q = 0; q < order; q++)
94 m[p][q] *= pow(cam.inv_px, (
int)(1 + p)) * pow(cam.inv_py, (
int)(1 + q));
97 for (
unsigned int k = 0; k < order; k++)
98 for (
unsigned int p = 0; p < order; p++)
99 for (
unsigned int q = 0; q < order; q++)
101 moment_meter[p][q] = m[p][q];
Implementation of a matrix and operations on matrices.
error that can be emited by ViSP classes.
static double sqr(double x)
Generic class defining intrinsic camera parameters.
static void convertMoment(const vpCameraParameters &cam, unsigned int order, const vpMatrix &moment_pixel, vpMatrix &moment_meter)
static long double comb(unsigned int n, unsigned int p)
static void convertLine(const vpCameraParameters &cam, const double &rho_p, const double &theta_p, double &rho_m, double &theta_m)
line coordinates conversion (rho,theta)