34 #ifndef _vpDisplayOpenCV_h_
35 #define _vpDisplayOpenCV_h_
37 #include <visp3/core/vpConfig.h>
39 #if defined(HAVE_OPENCV_HIGHGUI)
43 #include <visp3/core/vpDisplay.h>
44 #include <visp3/core/vpImage.h>
45 #include <visp3/core/vpImageConvert.h>
47 #include <opencv2/core/core.hpp>
48 #include <opencv2/highgui/highgui.hpp>
138 cv::Mat m_background;
143 static std::vector<std::string> m_listTitles;
144 static unsigned int m_nbWindows;
202 unsigned int getScreenHeight() vp_override;
203 void getScreenSize(
unsigned int &width,
unsigned int &height) vp_override;
204 unsigned int getScreenWidth() vp_override;
206 void init(
vpImage<unsigned char> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"") vp_override;
207 void init(
vpImage<vpRGBa> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"") vp_override;
208 void init(
unsigned int width,
unsigned int height,
int winx = -1,
int winy = -1,
const std::string &title =
"") vp_override;
211 void setFont(
const std::string &font) vp_override;
212 void setTitle(
const std::string &title) vp_override;
217 void closeDisplay() vp_override;
220 unsigned int w = 4,
unsigned int h = 2,
unsigned int thickness = 1) vp_override;
223 unsigned int thickness = 1) vp_override;
226 unsigned int thickness = 1) vp_override;
230 void displayImage(
const unsigned char *I);
233 unsigned int height) vp_override;
240 bool fill =
false,
unsigned int thickness = 1) vp_override;
242 bool fill =
false,
unsigned int thickness = 1) vp_override;
247 void flushDisplay() vp_override;
248 void flushDisplayROI(
const vpImagePoint &iP,
unsigned int width,
unsigned int height) vp_override;
250 bool getClick(
bool blocking =
true) vp_override;
260 static void on_mouse(
int event,
int x,
int y,
int flags,
void *param);
262 void overlay(std::function<
void(cv::Mat &)> overlay_function,
double opacity);
Class to define RGB colors available for display functionalities.
static const vpColor white
static const vpColor green
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Class that defines generic functionalities for display.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void displayCircle(const vpImage< unsigned char > &I, const vpImageCircle &circle, const vpColor &color, bool fill=false, unsigned int thickness=1)
static bool getKeyboardEvent(const vpImage< unsigned char > &I, bool blocking=true)
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 getImage(const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
static bool getClickUp(const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void setTitle(const vpImage< unsigned char > &I, const std::string &windowtitle)
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 displayPoint(const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
static void setFont(const vpImage< unsigned char > &I, const std::string &font)
static void displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
static bool getPointerPosition(const vpImage< unsigned char > &I, vpImagePoint &ip)
static bool getPointerMotionEvent(const vpImage< unsigned char > &I, vpImagePoint &ip)
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 void setWindowPosition(const vpImage< unsigned char > &I, int winx, int winy)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Defines a rectangle in the plane.