3 #include <visp3/core/vpColormap.h>
4 #include <visp3/core/vpFont.h>
5 #include <visp3/core/vpImageTools.h>
6 #include <visp3/gui/vpDisplayGDI.h>
7 #include <visp3/gui/vpDisplayOpenCV.h>
8 #include <visp3/gui/vpDisplayX.h>
9 #include <visp3/io/vpImageIo.h>
13 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
15 std::map<vpColormap::vpColormapType, std::string> colormaps_str = {
40 std::vector<vpColormap::vpColormapType> colormaps = {
62 #if defined(VISP_HAVE_X11)
64 #elif defined(VISP_HAVE_GDI)
66 #elif defined(HAVE_OPENCV_HIGHGUI)
69 std::cout <<
"No image viewer is available..." << std::endl;
74 for (
size_t i = 0; i < colormaps.size(); i++) {
76 colormap.convert(Irgbf, Icolor);
95 #if defined(VISP_HAVE_X11)
97 #elif defined(VISP_HAVE_GDI)
99 #elif defined(HAVE_OPENCV_HIGHGUI)
102 std::cout <<
"No image viewer is available..." << std::endl;
107 for (
size_t i = 0; i < colormaps.size(); i++) {
109 colormap.convert(I, Icolor);
128 #if defined(VISP_HAVE_X11)
130 #elif defined(VISP_HAVE_GDI)
132 #elif defined(HAVE_OPENCV_HIGHGUI)
135 std::cout <<
"No image viewer is available..." << std::endl;
140 for (
size_t i = 0; i < colormaps.size(); i++) {
142 const bool normalise =
true;
143 colormap.convert(I, Icolor, normalise);
155 std::cerr <<
"Catch an exception: " << e << std::endl;
158 std::cout <<
"This tutorial should be built with c++11 support" << std::endl;
static const vpColor white
static const vpColor black
Creates a colormap class to be able to recolor an image with different grayscale values into some cor...
@ COLORMAP_TWILIGHT_SHIFTED
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
Font drawing functions for image.
static void read(vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
static void readPFM_HDR(vpImage< float > &I, const std::string &filename)
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.
unsigned int getWidth() const
unsigned int getHeight() const