43 #include<visp3/core/vpPixelMeterConversion.h>
44 #include<visp3/core/vpCameraParameters.h>
45 #include<visp3/core/vpException.h>
46 #include<visp3/core/vpMath.h>
47 #include<visp3/core/vpDebug.h>
53 const double &rho_p,
const double &theta_p,
54 double &rho_m,
double &theta_m)
56 double co = cos(theta_p) ;
57 double si = sin(theta_p) ;
64 "division by zero")) ;
66 theta_m = atan2(si*cam.py, co*cam.px) ;
67 rho_m = (rho_p - cam.u0*co-cam.v0*si)/sqrt(d) ;
82 for (
unsigned int k=0; k<order; k++)
84 for (
unsigned int p=0 ; p<order; p++)
85 for (
unsigned int q=0; q<order; q++)
89 for(
unsigned int r=0; r<=p; r++)
90 for(
unsigned int t=0; t<=q; t++)
95 * pow(xc, (
int)(p-r)) * pow(yc, (
int)(q-t))
103 for (
unsigned int k=0; k<order; k++)
104 for (
unsigned int p=0 ; p<order; p++)
105 for (
unsigned int q=0; q<order; q++)
108 m[p][q] *= pow(cam.inv_px,(
int)(1+p)) * pow(cam.inv_py,(
int)(1+q));
111 for (
unsigned int k=0; k<order; k++)
112 for (
unsigned int p=0 ; p<order; p++)
113 for (
unsigned int q=0; q<order; q++)
116 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)