Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpDisplay_rgba.cpp
1 #include <visp3/core/vpDisplay.h>
2 
3 #include "vpDisplay_impl.h"
4 
5 //************************************************************************
6 // Modifications done in this file should be reported in all vpDisplay_*.cpp files
7 // that implement other types (unsigned char, vpRGB, vpRGBa)
8 //************************************************************************
9 
14 {
15  vp_display_close(I);
16 }
17 
26 void
28  const vpColor &color, unsigned int w, unsigned int h, unsigned int thickness )
29 {
30  vp_display_display_arrow(I, ip1, ip2, color, w, h, thickness);
31 }
32 
43 void
44 vpDisplay::displayArrow(const vpImage<vpRGBa> &I, int i1, int j1, int i2, int j2,
45  const vpColor &color, unsigned int w, unsigned int h, unsigned int thickness)
46 {
47  vp_display_display_arrow(I, i1, j1, i2, j2, color, w, h, thickness);
48 }
49 
63 void
65  const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness)
66 {
67  vp_display_display_camera(I, cMo, cam, size, color, thickness);
68 }
69 
83 void
85  const char *string, const vpColor &color )
86 {
87  vp_display_display_char_string(I, ip, string, color);
88 }
89 
103 void
105  const char *string, const vpColor &color)
106 {
107  vp_display_display_char_string(I, i, j, string, color);
108 }
109 
120 void
121 vpDisplay::displayCircle(const vpImage<vpRGBa> &I, const vpImagePoint &center, unsigned int radius,
122  const vpColor &color, bool fill, unsigned int thickness)
123 {
124  vp_display_display_circle(I, center, radius, color, fill, thickness);
125 }
126 
137 void
138 vpDisplay::displayCircle(const vpImage<vpRGBa> &I, int i, int j, unsigned int radius,
139  const vpColor &color, bool fill, unsigned int thickness)
140 {
141  vp_display_display_circle(I, i, j, radius, color, fill, thickness);
142 }
143 
152 void vpDisplay::displayCross(const vpImage<vpRGBa> &I, const vpImagePoint &ip, unsigned int size,
153  const vpColor &color, unsigned int thickness)
154 {
155  vp_display_display_cross(I, ip, size, color, thickness);
156 }
157 
166 void vpDisplay::displayCross(const vpImage<vpRGBa> &I, int i, int j, unsigned int size,
167  const vpColor &color, unsigned int thickness)
168 {
169  vp_display_display_cross(I, i, j, size, color, thickness);
170 }
171 
180  const vpImagePoint &ip2, const vpColor &color, unsigned int thickness )
181 {
182  vp_display_display_dot_line(I, ip1, ip2, color, thickness);
183 }
184 
193 void vpDisplay::displayDotLine(const vpImage<vpRGBa> &I, int i1, int j1, int i2, int j2,
194  const vpColor &color, unsigned int thickness )
195 {
196  vp_display_display_dot_line(I, i1, j1, i2, j2, color, thickness);
197 }
198 
245  const double &coef1, const double &coef2, const double &coef3,
246  bool use_centered_moments, const vpColor &color, unsigned int thickness)
247 {
248  vpDisplay::displayEllipse(I, center, coef1, coef2, coef3, 0., vpMath::rad(360), use_centered_moments, color, thickness);
249 }
250 
301  const double &coef1, const double &coef2, const double &coef3,
302  const double &theta1, const double &theta2, bool use_centered_moments,
303  const vpColor &color, unsigned int thickness)
304 {
305  vp_display_display_ellipse(I, center, coef1, coef2, coef3, theta1, theta2, use_centered_moments, color, thickness);
306 }
307 
322 void
324  const vpCameraParameters &cam, double size, const vpColor &color,
325  unsigned int thickness, vpImagePoint offset)
326 {
327  vp_display_display_frame(I, cMo, cam, size, color, thickness, offset);
328 }
329 
337 void vpDisplay::displayLine(const vpImage<vpRGBa> &I, const vpImagePoint &ip1, const vpImagePoint &ip2,
338  const vpColor &color, unsigned int thickness )
339 {
340  vp_display_display_line(I, ip1, ip2, color, thickness);
341 }
342 
351 void vpDisplay::displayLine(const vpImage<vpRGBa> &I, int i1, int j1, int i2, int j2,
352  const vpColor &color, unsigned int thickness )
353 {
354  vp_display_display_line(I, i1, j1, i2, j2, color, thickness);
355 }
356 
365  const vpColor &color, unsigned int thickness )
366 {
367  vp_display_display_point(I, ip, color, thickness);
368 }
369 
377 void vpDisplay::displayPoint(const vpImage<vpRGBa> &I, int i, int j,
378  const vpColor &color, unsigned int thickness )
379 {
380  vp_display_display_point(I, i, j, color, thickness);
381 
382 }
383 
391 void
392 vpDisplay::displayPolygon(const vpImage<vpRGBa> &I, const std::vector<vpImagePoint> &vip,
393  const vpColor &color, unsigned int thickness)
394 {
395  vp_display_display_polygon(I, vip, color, thickness);
396 }
397 
412 void
414  unsigned int width, unsigned int height,
415  const vpColor &color, bool fill, unsigned int thickness)
416 {
417  vp_display_display_rectangle(I, topLeft, width, height, color, fill, thickness);
418 }
419 
434 void
436  int i, int j, unsigned int width, unsigned int height,
437  const vpColor &color, bool fill, unsigned int thickness)
438 {
439  vp_display_display_rectangle(I, i, j, width, height, color, fill, thickness);
440 }
441 
455 void
457  const vpColor &color, bool fill, unsigned int thickness )
458 {
459  vp_display_display_rectangle(I, rectangle, color, fill, thickness);
460 }
461 
475 void
477  float angle, unsigned int width, unsigned int height,
478  const vpColor &color, unsigned int thickness)
479 {
480  vp_display_display_rectangle(I, center, angle, width, height, color, thickness);
481 }
482 
497 void
499  const vpImagePoint &topLeft, const vpImagePoint &bottomRight,
500  const vpColor &color, bool fill, unsigned int thickness)
501 {
502  vp_display_display_rectangle(I, topLeft, bottomRight, color, fill, thickness);
503 }
504 
518 void
520  unsigned int i, unsigned int j, float angle, unsigned int width, unsigned int height,
521  const vpColor &color, unsigned int thickness)
522 {
523  vp_display_display_rectangle(I, i, j, angle, width, height, color, thickness);
524 }
525 
538 void
540  const std::string &s, const vpColor &color )
541 {
542  vp_display_display_text(I, ip, s, color);
543 }
544 
557 void
559  const std::string &s, const vpColor &color)
560 {
561  vp_display_display_text(I, i, j, s, color);
562 }
563 
594 {
595  vp_display_flush(I);
596 }
597 
607 void vpDisplay::flushROI(const vpImage<vpRGBa> &I, const vpRect &roi)
608 {
609  vp_display_flush_roi(I, roi);
610 }
611 
623 void
625 {
626  vp_display_display(I);
627 }
628 
634 void
636 {
637  vp_display_display_roi(I, roi);
638 }
639 
657 bool vpDisplay::getClick(const vpImage<vpRGBa> &I, bool blocking)
658 {
659  return vp_display_get_click(I, blocking);
660 }
661 
680 bool vpDisplay::getClick(const vpImage<vpRGBa> &I, vpImagePoint &ip, bool blocking)
681 {
682  return vp_display_get_click(I, ip, blocking);
683 }
684 
706  vpMouseButton::vpMouseButtonType& button, bool blocking)
707 {
708  return vp_display_get_click(I, ip, button, blocking);
709 }
710 
729  bool blocking)
730 {
731  vpImagePoint ip;
732  return vpDisplay::getClick(I, ip, button, blocking);
733 }
734 
755 bool
757  vpMouseButton::vpMouseButtonType& button, bool blocking )
758 {
759  return vp_display_get_click_up(I, ip, button, blocking);
760 }
761 
779  vpMouseButton::vpMouseButtonType& button, bool blocking)
780 {
781  vpImagePoint ip;
782  return vpDisplay::getClickUp(I, ip, button, blocking);
783 }
784 
868 bool
870 {
871  return vp_display_get_keyboard_event(I, blocking);
872 }
873 
960 bool
961 vpDisplay::getKeyboardEvent(const vpImage<vpRGBa> &I, std::string &key, bool blocking)
962 {
963  return vp_display_get_keyboard_event(I, key, blocking);
964 }
965 
1052 bool
1053 vpDisplay::getKeyboardEvent(const vpImage<vpRGBa> &I, char *key, bool blocking)
1054 {
1055  return vp_display_get_keyboard_event(I, key, blocking);
1056 }
1057 
1067 bool
1069 {
1070  return vp_display_get_pointer_motion_event(I, ip);
1071 }
1072 
1082 bool
1084 {
1085  return vp_display_get_pointer_position(I, ip);
1086 }
1087 
1097 void
1099 {
1100  vp_display_set_background(I, color);
1101 }
1102 
1116 void
1117 vpDisplay::setFont(const vpImage<vpRGBa> &I, const std::string &fontname)
1118 {
1119  vp_display_set_font(I, fontname);
1120 }
1121 
1129 void
1130 vpDisplay::setTitle(const vpImage<vpRGBa> &I, const std::string &windowtitle)
1131 {
1132  vp_display_set_title(I, windowtitle);
1133 }
1134 
1144 void
1145 vpDisplay::setWindowPosition(const vpImage<vpRGBa> &I, int winx, int winy )
1146 {
1147  vp_display_set_window_position(I, winx, winy);
1148 }
1149 
1159 unsigned int
1161 {
1162  return vp_display_get_down_scaling_factor(I);
1163 }
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 &center, 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.
static void displayPolygon(const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, const vpColor &color, unsigned int thickness=1)
Class to define colors available for display functionnalities.
Definition: vpColor.h:121
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 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)
Definition: vpMath.h:104
static void displayCircle(const vpImage< unsigned char > &I, const vpImagePoint &center, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
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, vpImagePoint offset=vpImagePoint(0, 0))
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void setWindowPosition(const vpImage< unsigned char > &I, int winx, int winy)
unsigned int getDownScalingFactor()
Definition: vpDisplay.h:214
static void setBackground(const vpImage< unsigned char > &I, const vpColor &color)
Defines a rectangle in the plane.
Definition: vpRect.h:82
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 ...
Definition: vpImagePoint.h:88
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
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)
static void displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)