47 #include<visp/vpPixelMeterConversion.h>
48 #include<visp/vpCameraParameters.h>
49 #include<visp/vpException.h>
50 #include<visp/vpMath.h>
51 #include<visp/vpDebug.h>
57 const double &rho_p,
const double &theta_p,
58 double &rho_m,
double &theta_m)
60 double co = cos(theta_p) ;
61 double si = sin(theta_p) ;
68 "division by zero")) ;
70 theta_m = atan2(si*cam.py, co*cam.px) ;
71 rho_m = (rho_p - cam.u0*co-cam.v0*si)/sqrt(d) ;
86 for (
unsigned int k=0; k<order; k++)
88 for (
unsigned int p=0 ; p<order; p++)
89 for (
unsigned int q=0; q<order; q++)
93 for(
unsigned int r=0; r<=p; r++)
94 for(
unsigned int t=0; t<=q; t++)
99 * pow(xc, (
int)(p-r)) * pow(yc, (
int)(q-t))
100 * moment_pixel[r][t];
107 for (
unsigned int k=0; k<order; k++)
108 for (
unsigned int p=0 ; p<order; p++)
109 for (
unsigned int q=0; q<order; q++)
112 m[p][q] *= pow(cam.inv_px,(
int)(1+p)) * pow(cam.inv_py,(
int)(1+q));
115 for (
unsigned int k=0; k<order; k++)
116 for (
unsigned int p=0 ; p<order; p++)
117 for (
unsigned int q=0; q<order; q++)
120 moment_meter[p][q] = m[p][q];
Definition of the vpMatrix class.
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)