34 #ifndef VP_DISPLAY_OPENCV_H
35 #define VP_DISPLAY_OPENCV_H
37 #include <visp3/core/vpConfig.h>
38 #include <visp3/core/vpDisplay.h>
40 #if defined(HAVE_OPENCV_HIGHGUI)
44 #include <visp3/core/vpImage.h>
45 #include <visp3/core/vpImageConvert.h>
47 #include <opencv2/core/core.hpp>
48 #include <opencv2/highgui/highgui.hpp>
144 cv::Mat m_background;
149 static std::vector<std::string> m_listTitles;
150 static unsigned int m_nbWindows;
208 unsigned int getScreenHeight() VP_OVERRIDE;
209 void getScreenSize(
unsigned int &width,
unsigned int &height) VP_OVERRIDE;
210 unsigned int getScreenWidth() VP_OVERRIDE;
212 void init(
vpImage<unsigned char> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"") VP_OVERRIDE;
213 void init(
vpImage<vpRGBa> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"") VP_OVERRIDE;
214 void init(
unsigned int width,
unsigned int height,
int winx = -1,
int winy = -1,
const std::string &title =
"") VP_OVERRIDE;
217 void setFont(
const std::string &font) VP_OVERRIDE;
218 void setTitle(
const std::string &title) VP_OVERRIDE;
223 void closeDisplay() VP_OVERRIDE;
226 unsigned int w = 4,
unsigned int h = 2,
unsigned int thickness = 1) VP_OVERRIDE;
229 unsigned int thickness = 1) VP_OVERRIDE;
232 unsigned int thickness = 1) VP_OVERRIDE;
236 void displayImage(
const unsigned char *I);
239 unsigned int height) VP_OVERRIDE;
246 bool fill =
false,
unsigned int thickness = 1) VP_OVERRIDE;
248 bool fill =
false,
unsigned int thickness = 1) VP_OVERRIDE;
253 void flushDisplay() VP_OVERRIDE;
254 void flushDisplayROI(
const vpImagePoint &iP,
unsigned int width,
unsigned int height) VP_OVERRIDE;
256 bool getClick(
bool blocking =
true) VP_OVERRIDE;
266 static void on_mouse(
int event,
int x,
int y,
int flags,
void *param);
268 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.