34#include <visp3/core/vpFeatureDisplay.h>
37#include <visp3/core/vpMeterPixelConversion.h>
40#include <visp3/core/vpDisplay.h>
43#include <visp3/core/vpMath.h>
45#include <visp3/core/vpImagePoint.h>
61 const vpColor &color,
unsigned int thickness)
87 double co = cos(thetap);
88 double si = sin(thetap);
95 if (fabs(a) < fabs(b)) {
97 double h = I.getHeight() - 1;
98 ip2.
set_ij(h, (-c - (a * h)) / b);
103 double w = I.getWidth() - 1;
104 ip2.
set_ij((-c - (b * w)) / a, w);
124 const vpColor &color,
unsigned int thickness)
126 displayLine(rho1, theta1, cam, I, color, thickness);
127 displayLine(rho2, theta2, cam, I, color, thickness);
154 const vpColor &color,
unsigned int thickness)
157 double n20_p, n11_p, n02_p;
158 const unsigned int index_0 = 0;
159 const unsigned int index_1 = 1;
160 const unsigned int index_2 = 2;
161 const unsigned int index_3 = 3;
162 const unsigned int index_4 = 4;
164 circle.
p[index_0] = x;
165 circle.
p[index_1] = y;
166 circle.
p[index_2] = n20;
167 circle.
p[index_3] = n11;
168 circle.
p[index_4] = n02;
187 const vpColor &color,
unsigned int thickness)
207 const vpColor &color,
unsigned int thickness)
214 double co = cos(thetap);
215 double si = sin(thetap);
222 if (fabs(a) < fabs(b)) {
224 double h = I.getHeight() - 1;
225 ip2.
set_ij(h, (-c - (a * h)) / b);
230 double w = I.getWidth() - 1;
231 ip2.
set_ij((-c - (b * w)) / a, w);
251 unsigned int thickness)
253 displayLine(rho1, theta1, cam, I, color, thickness);
254 displayLine(rho2, theta2, cam, I, color, thickness);
281 unsigned int thickness)
284 double n20_p, n11_p, n02_p;
285 const unsigned int index_0 = 0;
286 const unsigned int index_1 = 1;
287 const unsigned int index_2 = 2;
288 const unsigned int index_3 = 3;
289 const unsigned int index_4 = 4;
291 circle.
p[index_0] = x;
292 circle.
p[index_1] = y;
293 circle.
p[index_2] = n20;
294 circle.
p[index_3] = n11;
295 circle.
p[index_4] = n02;
Generic class defining intrinsic camera parameters.
Class that defines a 3D circle in the object frame and allows forward projection of a 3D circle in th...
Class to define RGB colors available for display functionalities.
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void displayEllipse(const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &coef1, const double &coef2, const double &coef3, bool use_normalized_centered_moments, const vpColor &color, unsigned int thickness=1, bool display_center=false, bool display_arc=false)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void displayCylinder(double rho1, double theta1, double rho2, double theta2, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
static void displayLine(double rho, double theta, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
static void displayEllipse(double x, double y, double n20, double n11, double n02, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
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 a 2D point in an image. This class is useful for image processing and stores only ...
void set_ij(double ii, double jj)
Definition of the vpImage class member functions.
static void convertLine(const vpCameraParameters &cam, const double &rho_m, const double &theta_m, double &rho_p, double &theta_p)
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
static void convertEllipse(const vpCameraParameters &cam, const vpSphere &sphere, vpImagePoint ¢er_p, double &n20_p, double &n11_p, double &n02_p)