52 #include <visp/vpConfig.h>
53 #include <visp/vpDebug.h>
58 #if defined(VISP_HAVE_DC1394_2)
60 #include <visp/vp1394TwoGrabber.h>
61 #include <visp/vpImageIo.h>
62 #include <visp/vpIoTools.h>
73 std::cout <<
"IEEE1394 test in progress..." << std::endl;
78 std::string outputpath =
"/tmp/" + username;
89 unsigned int ncameras;
91 for (
unsigned int i=0; i < ncameras; i++) {
94 std::cout <<
"Detected camera with GUID 0x"
95 << std::hex << guid << std::endl;
101 std::cout <<
"Use camera with GUID 0x" << std::hex << guid << std::endl;
106 for (
int i=0;i<10;i++) g.
acquire(I);
108 std::string filename = outputpath +
"/imagetest1.pgm";
109 std::cout <<
"Write image: " << filename << std::endl;
112 std::cout <<
"New connection..."<< std::endl;
116 std::cout <<
"New connection..."<< std::endl;
121 filename = outputpath +
"/imagetest2.pgm";
122 std::cout <<
"Write image: " << filename << std::endl;
126 vpCERROR <<
"Failure: exit" << std::endl;
133 vpTRACE(
"Ieee 1394 grabber capabilities are not available...\n"
134 "You should install libdc1394-2 to use this binary.") ;
static void write(const vpImage< unsigned char > &I, const char *filename)
void getNumCameras(unsigned int &ncameras) const
void acquire(vpImage< unsigned char > &I)
void open(vpImage< unsigned char > &I)
void setCamera(uint64_t camera)
Class for firewire ieee1394 video devices using libdc1394-2.x api.