1 #include <visp/vpDisplayX.h> 3 #include <visp/vpImage.h> 6 int main(
int argc,
const char** argv)
9 bool opt_use_camera_info =
false;
10 for (
int i=0; i<argc; i++) {
11 if (std::string(argv[i]) ==
"--use-camera-info")
12 opt_use_camera_info =
true;
13 else if (std::string(argv[i]) ==
"--help") {
14 std::cout <<
"Usage: " << argv[0]
15 <<
" [--use-camera-info] [--help]" 20 std::cout <<
"Use camera info: " << ((opt_use_camera_info ==
true) ?
"yes" :
"no") << std::endl;
32 if (opt_use_camera_info) {
41 std::cout <<
"Image size: " << I.getWidth() <<
" " << I.getHeight() << std::endl;
46 std::cout <<
"No image viewer is available..." << std::endl;
53 vpDisplay::display(I);
54 vpDisplay::displayText(I, 20, 20,
"A click to quit...", vpColor::red);
56 if (vpDisplay::getClick(I,
false))
60 catch(vpException e) {
61 std::cout <<
"Catch an exception: " << e << std::endl;
Class for cameras video capture for ROS cameras.
void setRectify(bool rectify)
void setCameraInfoTopic(std::string topic_name)
void open(int argc, char **argv)
class for Camera video capture for ROS middleware.
int main(int argc, const char **argv)
void setImageTopic(std::string topic_name)
void acquire(vpImage< unsigned char > &I)