36#ifndef _vpDisplayOpenCV_h_
37#define _vpDisplayOpenCV_h_
39#include <visp3/core/vpConfig.h>
41#if defined(HAVE_OPENCV_HIGHGUI)
43#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
47#include <visp3/core/vpDisplay.h>
48#include <visp3/core/vpImage.h>
49#include <visp3/core/vpImageConvert.h>
51#include <opencv2/core/core.hpp>
52#include <opencv2/highgui/highgui.hpp>
144 cv::Mat m_background;
149 static std::vector<std::string> m_listTitles;
150 static unsigned int m_nbWindows;
214 unsigned int getScreenHeight();
215 void getScreenSize(
unsigned int &width,
unsigned int &height);
216 unsigned int getScreenWidth();
219 void init(
vpImage<vpRGBa> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"");
220 void init(
unsigned int width,
unsigned int height,
int winx = -1,
int winy = -1,
const std::string &title =
"");
223 void setFont(
const std::string &font);
224 void setTitle(
const std::string &title);
232 unsigned int w = 4,
unsigned int h = 2,
unsigned int thickness = 1);
237 unsigned int thickness = 1);
240 unsigned int thickness = 1);
244 void displayImage(
const unsigned char *I);
247 unsigned int height);
254 bool fill =
false,
unsigned int thickness = 1);
256 bool fill =
false,
unsigned int thickness = 1);
260 void flushDisplayROI(
const vpImagePoint &iP,
unsigned int width,
unsigned int height);
262 bool getClick(
bool blocking =
true);
272 static void on_mouse(
int event,
int x,
int y,
int flags,
void *param);
274#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
275 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 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 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)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition of the vpImage class member functions.
Defines a rectangle in the plane.