1 #include <visp/vpDisplayD3D.h>
4 #include <visp/vpDisplayGDI.h>
5 #include <visp/vpDisplayGTK.h>
6 #include <visp/vpDisplayX.h>
7 #include <visp/vpDisplayOpenCV.h>
10 #include <visp/vpImageIo.h>
13 int main(
int argc,
char** argv)
16 printf(
"Usage: %s <image name.[pgm,ppm,jpeg,png,tiff,bmp,ras,jp2]>\n", argv[0] );
29 std::cout <<
"Cannot read image \"" << argv[1] <<
"\"" << std::endl;
36 #if defined(VISP_HAVE_X11)
38 #elif defined(VISP_HAVE_OPENCV)
40 #elif defined(VISP_HAVE_GTK)
42 #elif defined(VISP_HAVE_GDI)
44 #elif defined(VISP_HAVE_D3D9)
47 std::cout <<
"No image viewer is available..." << std::endl;
57 std::cout <<
"A click to quit..." << std::endl;
63 std::cout <<
"Catch an exception: " << e << std::endl;
Display for windows using GDI (available on any windows 32 platform).
Define the X11 console to display images.
error that can be emited by ViSP classes.
static void flush(const vpImage< unsigned char > &I)
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the opencv library.
virtual void setTitle(const char *title)=0
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
virtual bool getClick(bool blocking=true)=0
static void read(vpImage< unsigned char > &I, const char *filename)