3 #include <visp3/core/vpColormap.h>
4 #include <visp3/core/vpConfig.h>
5 #include <visp3/core/vpFont.h>
6 #include <visp3/core/vpImageTools.h>
7 #include <visp3/gui/vpDisplayGDI.h>
8 #include <visp3/gui/vpDisplayOpenCV.h>
9 #include <visp3/gui/vpDisplayX.h>
10 #include <visp3/io/vpImageIo.h>
14 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
15 #ifdef ENABLE_VISP_NAMESPACE
19 std::map<vpColormap::vpColormapType, std::string> colormaps_str = {
44 std::vector<vpColormap::vpColormapType> colormaps = {
66 #if defined(VISP_HAVE_X11)
67 vpDisplayX d(Icolor2, 10, 10,
"Memorial");
68 #elif defined(VISP_HAVE_GDI)
70 #elif defined(HAVE_OPENCV_HIGHGUI)
73 std::cout <<
"No image viewer is available..." << std::endl;
78 for (
size_t i = 0; i < colormaps.size(); i++) {
80 colormap.convert(Irgbf, Icolor);
99 #if defined(VISP_HAVE_X11)
100 vpDisplayX d(Icolor2, 10, 10,
"Monkey");
101 #elif defined(VISP_HAVE_GDI)
103 #elif defined(HAVE_OPENCV_HIGHGUI)
106 std::cout <<
"No image viewer is available..." << std::endl;
111 for (
size_t i = 0; i < colormaps.size(); i++) {
113 colormap.convert(I, Icolor);
132 #if defined(VISP_HAVE_X11)
133 vpDisplayX d(Icolor2, 10, 10,
"Monkey");
134 #elif defined(VISP_HAVE_GDI)
136 #elif defined(HAVE_OPENCV_HIGHGUI)
139 std::cout <<
"No image viewer is available..." << std::endl;
144 for (
size_t i = 0; i < colormaps.size(); i++) {
146 const bool normalise =
true;
147 colormap.convert(I, Icolor, normalise);
159 std::cerr <<
"Catch an exception: " << e << std::endl;
162 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...
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