#include <visp/vpDisplayX.h>
#include <visp/vpImage.h>
 
int
main( 
int argc, 
const char **argv )
 
{
  try
  {
    bool opt_use_camera_info = false;
    for ( int i = 0; i < argc; i++ )
    {
      if ( std::string( argv[i] ) == "--use-camera-info" )
        opt_use_camera_info = true;
      else if ( std::string( argv[i] ) == "--help" )
      {
        std::cout << "Usage: " << argv[0] << " [--use-camera-info] [--help]" << std::endl;
        return 0;
      }
    }
    std::cout << "Use camera info: " << ( ( opt_use_camera_info == true ) ? "yes" : "no" ) << std::endl;
 
    
    vpImage< vpRGBa > I; 
 
    if ( opt_use_camera_info )
    {
    }
 
    std::cout << "Image size: " << I.getWidth() << " " << I.getHeight() << std::endl;
 
#ifdef VISP_HAVE_X11
#else
    std::cout << "No image viewer is available..." << std::endl;
#endif
 
    while ( 1 )
    {
      vpDisplay::display( I );
      vpDisplay::displayText( I, 20, 20, "A click to quit...", vpColor::red );
      vpDisplay::flush( I );
      if ( vpDisplay::getClick( I, false ) )
        break;
    }
  }
  catch ( vpException e )
  {
    std::cout << "Catch an exception: " << e << std::endl;
  }
}
 
visp_ros
Author(s): Francois Pasteau, Fabien Spindler, Gatien Gaumerais, Alexander Oliva
autogenerated on Wed Mar 2 2022 01:13:29