#include <map>
#include <visp3/core/vpColormap.h>
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpFont.h>
#include <visp3/core/vpImageTools.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/io/vpImageIo.h>
int main()
{
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
#ifdef ENABLE_VISP_NAMESPACE
#endif
try {
std::map<vpColormap::vpColormapType, std::string> colormaps_str = {
};
std::vector<vpColormap::vpColormapType> colormaps = {
};
{
#if defined(VISP_HAVE_X11)
vpDisplayX d(Icolor2, 10, 10, "Memorial");
#elif defined(VISP_HAVE_GDI)
#elif defined(HAVE_OPENCV_HIGHGUI)
#else
std::cout << "No image viewer is available..." << std::endl;
return EXIT_SUCCESS;
#endif
for (size_t i = 0; i < colormaps.size(); i++) {
}
}
{
#if defined(VISP_HAVE_X11)
vpDisplayX d(Icolor2, 10, 10, "Monkey");
#elif defined(VISP_HAVE_GDI)
#elif defined(HAVE_OPENCV_HIGHGUI)
#else
std::cout << "No image viewer is available..." << std::endl;
return EXIT_SUCCESS;
#endif
for (size_t i = 0; i < colormaps.size(); i++) {
}
}
{
#if defined(VISP_HAVE_X11)
vpDisplayX d(Icolor2, 10, 10, "Monkey");
#elif defined(VISP_HAVE_GDI)
#elif defined(HAVE_OPENCV_HIGHGUI)
#else
std::cout << "No image viewer is available..." << std::endl;
return EXIT_SUCCESS;
#endif
for (size_t i = 0; i < colormaps.size(); i++) {
const bool normalise = true;
colormap.
convert(I, Icolor, normalise);
}
}
}
std::cerr << "Catch an exception: " << e << std::endl;
}
#else
std::cout << "This tutorial should be built with c++11 support" << std::endl;
#endif
return EXIT_SUCCESS;
}
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
void convert(const vpImage< unsigned char > &I, vpImage< vpRGBa > &Icolor, bool normalize=false)
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.
bool drawText(vpImage< unsigned char > &I, const std::string &text, const vpImagePoint &position, unsigned char color) const
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