#include <visp3/core/vpImage.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/sensor/vpV4l2Grabber.h>
int main(int argc, const char *argv[])
{
#ifdef VISP_HAVE_V4L2
try {
unsigned int opt_device = 0;
unsigned int opt_scale = 2;
for (int i = 0; i < argc; i++) {
if (std::string(argv[i]) == "--device")
opt_device = (unsigned int)atoi(argv[i + 1]);
else if (std::string(argv[i]) == "--scale")
opt_scale = (unsigned int)atoi(argv[i + 1]);
else if (std::string(argv[i]) == "--help") {
std::cout << "Usage: " << argv[0]
<< " [--device <camera device>] [--scale <subsampling "
"factor>] [--help]"
<< std::endl;
return 0;
}
}
std::ostringstream device;
device << "/dev/video" << opt_device;
#ifdef VISP_HAVE_X11
#else
std::cout << "No image viewer is available..." << std::endl;
#endif
while (1) {
break;
}
std::cout << "Catch an exception: " << e << std::endl;
}
#else
(void)argc;
(void)argv;
#endif
}