44 #include <visp3/visual_features/vpBasicFeature.h> 45 #include <visp3/visual_features/vpFeaturePointPolar.h> 48 #include <visp3/core/vpException.h> 49 #include <visp3/visual_features/vpFeatureException.h> 52 #include <visp3/core/vpDebug.h> 55 #include <visp3/core/vpMath.h> 57 #include <visp3/core/vpFeatureDisplay.h> 256 if (
flags[i] ==
false) {
259 vpTRACE(
"Warning !!! The interaction matrix is computed but rho " 263 vpTRACE(
"Warning !!! The interaction matrix is computed but theta " 267 vpTRACE(
"Warning !!! The interaction matrix is computed but Z was " 271 vpTRACE(
"Problem during the reading of the variable flags");
282 double c_ = cos(theta);
283 double s_ = sin(theta);
285 double rho2 = rho * rho;
287 if (fabs(rho) < 1e-6) {
289 std::cout <<
"rho = " << rho << std::endl;
296 std::cout <<
"Z = " << Z_ << std::endl;
301 if (fabs(Z_) < 1e-6) {
303 std::cout <<
"Z = " << Z_ << std::endl;
312 Lrho[0][0] = -c_ / Z_;
313 Lrho[0][1] = -s_ / Z_;
314 Lrho[0][2] = rho / Z_;
315 Lrho[0][3] = (1 + rho2) * s_;
316 Lrho[0][4] = -(1 + rho2) * c_;
329 Ltheta[0][0] = s_ / (rho * Z_);
330 Ltheta[0][1] = -c_ / (rho * Z_);
332 Ltheta[0][3] = c_ / rho;
333 Ltheta[0][4] = s_ / rho;
392 erho[0] =
s[0] - s_star[0];
401 double err =
s[1] - s_star[1];
445 std::cout <<
"Point: Z=" <<
get_Z();
447 std::cout <<
" rho=" <<
get_rho();
450 std::cout << std::endl;
480 std::cout <<
"Z = " << Z << std::endl;
485 if (fabs(Z) < 1e-6) {
487 std::cout <<
"Z = " << Z << std::endl;
507 unsigned int thickness)
const 515 x = rho * cos(theta);
516 y = rho * sin(theta);
536 unsigned int thickness)
const 544 x = rho * cos(theta);
545 y = rho * sin(theta);
Implementation of a matrix and operations on matrices.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
void buildFrom(double rho, double theta, double Z)
vpFeaturePointPolar * duplicate() const
Class to define RGB colors available for display functionnalities.
void stack(const vpMatrix &A)
unsigned int dim_s
Dimension of the visual feature.
Class that defines 2D image point visual feature with polar coordinates described in ...
static unsigned int selectTheta()
static void displayPoint(double x, double y, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
class that defines what is a visual feature
static unsigned int selectRho()
Error that can be emited by the vpBasicFeature class and its derivates.
Generic class defining intrinsic camera parameters.
void print(unsigned int select=FEATURE_ALL) const
void set_rhoThetaZ(double rho, double theta, double Z)
static const unsigned int FEATURE_LINE[32]
void resize(unsigned int i, bool flagNullify=true)
vpBasicFeatureDeallocatorType deallocate
vpMatrix interaction(unsigned int select=FEATURE_ALL)
Implementation of column vector and the associated operations.
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL)
void set_theta(double theta)
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
vpColVector s
State of the visual feature.