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);
class that defines what is a visual feature
vpColVector s
State of the visual feature.
static const unsigned int FEATURE_LINE[32]
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
unsigned int dim_s
Dimension of the visual feature.
vpBasicFeatureDeallocatorType deallocate
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionnalities.
static void displayPoint(double x, double y, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
Error that can be emited by the vpBasicFeature class and its derivates.
Class that defines 2D image point visual feature with polar coordinates described in .
void buildFrom(double rho, double theta, double Z)
static unsigned int selectTheta()
void set_theta(double theta)
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
vpMatrix interaction(unsigned int select=FEATURE_ALL)
static unsigned int selectRho()
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL)
void set_rhoThetaZ(double rho, double theta, double Z)
vpFeaturePointPolar * duplicate() const
void print(unsigned int select=FEATURE_ALL) const
Implementation of a matrix and operations on matrices.
void stack(const vpMatrix &A)