#include <visp3/core/vpConfig.h>
#include <visp3/gui/vpDisplayFactory.h>
#include <visp3/core/vpImageCircle.h>
#include <visp3/core/vpImageDraw.h>
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
#endif
try {
{
#if defined(VISP_HAVE_DISPLAY)
#else
std::cout << "No gui available to display gray level image..." << std::endl;
#endif
std::cout << "Result of displaying a red circle on a gray level image overlay..." << std::endl;
std::cout << "A click to continue..." << std::endl;
std::cout << "Result of displaying a circle by modifying a gray level image..." << std::endl;
std::cout << "A click to continue..." << std::endl;
#if defined(VISP_HAVE_DISPLAY)
if (d) {
delete d;
}
#endif
}
{
#if defined(VISP_HAVE_DISPLAY)
#else
std::cout << "No gui available to display color image..." << std::endl;
#endif
std::cout << "Result of displaying a blue circle on a modified color image..." << std::endl;
std::cout << "A click to continue..." << std::endl;
#if defined(VISP_HAVE_DISPLAY)
if (d) {
delete d;
}
#endif
}
}
std::cout <<
"Catch an exception: " << e.
getMessage() << std::endl;
}
std::cout << std::endl;
}
Class to define RGB colors available for display functionalities.
static const vpColor blue
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 void display(const vpImage< unsigned char > &I)
static void setTitle(const vpImage< unsigned char > &I, const std::string &windowtitle)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
const char * getMessage() const
Class that defines a 2D circle in an image.
static void drawCircle(vpImage< unsigned char > &I, const vpImageCircle &circle, unsigned char color, unsigned int thickness=1)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
unsigned int getHeight() const
vpDisplay * allocateDisplay()
Return a newly allocated vpDisplay specialization if a GUI library is available or nullptr otherwise.