39 #include <visp3/core/vpDisplay.h> 41 #include "vpDisplay_impl.h" 62 const vpColor &color,
unsigned int w,
unsigned int h,
unsigned int thickness)
64 vp_display_display_arrow(I, ip1, ip2, color, w, h, thickness);
78 unsigned int w,
unsigned int h,
unsigned int thickness)
80 vp_display_display_arrow(I, i1, j1, i2, j2, color, w, h, thickness);
97 double size,
const vpColor &color,
unsigned int thickness)
99 vp_display_display_camera(I, cMo, cam, size, color, thickness);
118 vp_display_display_char_string(I, ip,
string, color);
136 vp_display_display_char_string(I, i, j,
string, color);
150 const vpColor &color,
bool fill,
unsigned int thickness)
152 vp_display_display_circle(I, center, radius, color, fill, thickness);
166 bool fill,
unsigned int thickness)
168 vp_display_display_circle(I, i, j, radius, color, fill, thickness);
180 unsigned int thickness)
182 vp_display_display_cross(I, ip, size, color, thickness);
194 unsigned int thickness)
196 vp_display_display_cross(I, i, j, size, color, thickness);
207 const vpColor &color,
unsigned int thickness)
209 vp_display_display_dot_line(I, ip1, ip2, color, thickness);
221 unsigned int thickness)
223 vp_display_display_dot_line(I, i1, j1, i2, j2, color, thickness);
236 const vpColor &color,
unsigned int thickness)
241 for (
size_t i = 0; i < ips.size() - 1; i++)
242 vp_display_display_dot_line(I, ips[i], ips[i + 1], color, thickness);
245 vp_display_display_dot_line(I, ips.front(), ips.back(), color, thickness);
299 const double &coef2,
const double &coef3,
bool use_centered_moments,
300 const vpColor &color,
unsigned int thickness)
363 const double &coef2,
const double &coef3,
const double &theta1,
const double &theta2,
364 bool use_centered_moments,
const vpColor &color,
unsigned int thickness)
366 vp_display_display_ellipse(I, center, coef1, coef2, coef3, theta1, theta2, use_centered_moments, color, thickness);
387 vp_display_display_frame(I, cMo, cam, size, color, thickness, offset);
400 const vpColor &color,
unsigned int thickness,
bool segment)
402 displayLine(I, static_cast<int>(ip1.
get_i()), static_cast<int>(ip1.
get_j()), static_cast<int>(ip2.
get_i()), static_cast<int>(ip2.
get_j()), color, thickness, segment);
416 unsigned int thickness,
bool segment)
419 vp_display_display_line(I, i1, j1, i2, j2, color, thickness);
423 double delta_j =
static_cast<double>(j2) - static_cast<double>(j1);
424 double delta_i =
static_cast<double>(i2) - static_cast<double>(i1);
426 if (std::fabs(delta_i) <= std::numeric_limits<double>::epsilon()) {
427 vp_display_display_line(I, i1, 0, i1, (I.
getWidth()-1), color, thickness);
430 else if (std::fabs(delta_j) <= std::numeric_limits<double>::epsilon()) {
431 vp_display_display_line(I, 0, j1, (I.
getHeight()-1), j1, color, thickness);
434 double a = delta_i / delta_j;
435 double b =
static_cast<double>(i1) - a * static_cast<double>(j1);
436 std::vector<vpImagePoint> vip;
440 vip.push_back(ip_left);
445 vip.push_back(ip_right);
447 if (vip.size() == 2) {
448 vp_display_display_line(I, vip[0], vip[1], color, thickness);
454 vip.push_back(ip_top);
456 if (vip.size() == 2) {
457 vp_display_display_line(I, vip[0], vip[1], color, thickness);
463 vip.push_back(ip_bottom);
465 if (vip.size() == 2) {
466 vp_display_display_line(I, vip[0], vip[1], color, thickness);
481 const vpColor &color,
unsigned int thickness)
486 for (
size_t i = 0; i < ips.size() - 1; i++)
487 vp_display_display_line(I, ips[i], ips[i + 1], color, thickness);
490 vp_display_display_line(I, ips.front(), ips.back(), color, thickness);
501 unsigned int thickness)
503 vp_display_display_point(I, ip, color, thickness);
515 vp_display_display_point(I, i, j, color, thickness);
527 unsigned int thickness,
bool closed)
529 vp_display_display_polygon(I, vip, color, thickness, closed);
547 unsigned int height,
const vpColor &color,
bool fill,
unsigned int thickness)
549 vp_display_display_rectangle(I, topLeft, width, height, color, fill, thickness);
567 const vpColor &color,
bool fill,
unsigned int thickness)
569 vp_display_display_rectangle(I, i, j, width, height, color, fill, thickness);
586 unsigned int thickness)
588 vp_display_display_rectangle(I, rectangle, color, fill, thickness);
605 unsigned int height,
const vpColor &color,
unsigned int thickness)
607 vp_display_display_rectangle(I, center, angle, width, height, color, thickness);
625 const vpColor &color,
bool fill,
unsigned int thickness)
627 vp_display_display_rectangle(I, topLeft, bottomRight, color, fill, thickness);
644 unsigned int width,
unsigned int height,
const vpColor &color,
unsigned int thickness)
646 vp_display_display_rectangle(I, i, j, angle, width, height, color, thickness);
664 vp_display_display_text(I, ip, s, color);
681 vp_display_display_text(I, i, j, s, color);
784 return vp_display_get_click(I, ip, blocking);
810 return vp_display_get_click(I, ip, button, blocking);
858 return vp_display_get_click_up(I, ip, button, blocking);
967 return vp_display_get_keyboard_event(I, blocking);
1058 return vp_display_get_keyboard_event(I, key, blocking);
1149 return vp_display_get_keyboard_event(I, key, blocking);
1163 return vp_display_get_pointer_motion_event(I, ip);
1177 return vp_display_get_pointer_position(I, ip);
1215 vp_display_set_title(I, windowtitle);
1230 vp_display_set_window_position(I, winx, winy);
static void displayCamera(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness)
static void displayEllipse(const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &coef1, const double &coef2, const double &coef3, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
static bool getPointerPosition(const vpImage< unsigned char > &I, vpImagePoint &ip)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void close(vpImage< unsigned char > &I)
static bool getPointerMotionEvent(const vpImage< unsigned char > &I, vpImagePoint &ip)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class to define colors available for display functionnalities.
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
static bool getClickUp(const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
static void displayPoint(const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
static void flush(const vpImage< unsigned char > &I)
static void setFont(const vpImage< unsigned char > &I, const std::string &font)
static void displayPolygon(const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, const vpColor &color, unsigned int thickness=1, bool closed=true)
static void displayArrow(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
static void display(const vpImage< unsigned char > &I)
Generic class defining intrinsic camera parameters.
static void displayRectangle(const vpImage< unsigned char > &I, const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
static double rad(double deg)
static void displayCircle(const vpImage< unsigned char > &I, const vpImagePoint ¢er, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
unsigned int getHeight() const
static void setWindowPosition(const vpImage< unsigned char > &I, int winx, int winy)
static void displayFrame(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0))
unsigned int getDownScalingFactor()
static void setBackground(const vpImage< unsigned char > &I, const vpColor &color)
Defines a rectangle in the plane.
static void flushROI(const vpImage< unsigned char > &I, const vpRect &roi)
static void displayROI(const vpImage< unsigned char > &I, const vpRect &roi)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static bool getKeyboardEvent(const vpImage< unsigned char > &I, bool blocking=true)
static void displayCharString(const vpImage< unsigned char > &I, const vpImagePoint &ip, const char *string, const vpColor &color)
static void setTitle(const vpImage< unsigned char > &I, const std::string &windowtitle)
unsigned int getWidth() const
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 displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)