39#include <visp3/visual_features/vpBasicFeature.h>
40#include <visp3/visual_features/vpFeaturePointPolar.h>
43#include <visp3/core/vpException.h>
44#include <visp3/visual_features/vpFeatureException.h>
47#include <visp3/core/vpDebug.h>
50#include <visp3/core/vpMath.h>
52#include <visp3/core/vpFeatureDisplay.h>
252 if (
flags[i] ==
false) {
255 vpTRACE(
"Warning !!! The interaction matrix is computed but rho "
259 vpTRACE(
"Warning !!! The interaction matrix is computed but theta "
263 vpTRACE(
"Warning !!! The interaction matrix is computed but Z was "
267 vpTRACE(
"Problem during the reading of the variable flags");
278 double c_ = cos(theta);
279 double s_ = sin(theta);
281 double rho2 = rho * rho;
283 if (fabs(rho) < 1e-6) {
285 std::cout <<
"rho = " << rho << std::endl;
292 std::cout <<
"Z = " << Z_ << std::endl;
297 if (fabs(Z_) < 1e-6) {
299 std::cout <<
"Z = " << Z_ << std::endl;
308 Lrho[0][0] = -c_ / Z_;
309 Lrho[0][1] = -s_ / Z_;
310 Lrho[0][2] = rho / Z_;
311 Lrho[0][3] = (1 + rho2) * s_;
312 Lrho[0][4] = -(1 + rho2) * c_;
325 Ltheta[0][0] = s_ / (rho * Z_);
326 Ltheta[0][1] = -c_ / (rho * Z_);
328 Ltheta[0][3] = c_ / rho;
329 Ltheta[0][4] = s_ / rho;
388 erho[0] =
s[0] - s_star[0];
397 double err =
s[1] - s_star[1];
442 std::cout <<
"Point: Z=" <<
get_Z();
444 std::cout <<
" rho=" <<
get_rho();
447 std::cout << std::endl;
460 std::cout <<
"Z = " << Z << std::endl;
465 if (fabs(Z) < 1e-6) {
467 std::cout <<
"Z = " << Z << std::endl;
489 unsigned int thickness)
const
497 x = rho * cos(theta);
498 y = rho * sin(theta);
519 unsigned int thickness)
const
527 x = rho * cos(theta);
528 y = rho * sin(theta);
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
vpColVector s
State of the visual feature.
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
unsigned int dim_s
Dimension of the visual feature.
static const unsigned int FEATURE_LINE[32]
vpBasicFeatureDeallocatorType deallocate
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
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 emitted by the vpBasicFeature class and its derivates.
@ badInitializationError
Wrong feature initialization.
void print(unsigned int select=FEATURE_ALL) const VP_OVERRIDE
vpFeaturePointPolar & buildFrom(const double &rho, const double &theta, const double &Z)
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE
static unsigned int selectTheta()
void set_theta(double theta)
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) VP_OVERRIDE
vpFeaturePointPolar * duplicate() const VP_OVERRIDE
static unsigned int selectRho()
void set_rhoThetaZ(double rho, double theta, double Z)
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
Definition of the vpImage class member functions.
Implementation of a matrix and operations on matrices.
void stack(const vpMatrix &A)