Acquire images using libdc1394-2.x library.
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpDebug.h>
#include <iostream>
#include <string>
#ifdef ENABLE_VISP_NAMESPACE
#endif
#if defined(VISP_HAVE_DC1394)
#include <visp3/core/vpIoTools.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/sensor/vp1394TwoGrabber.h>
int main()
{
try {
std::cout << "IEEE1394 test in progress..." << std::endl;
std::string username;
std::string outputpath = "/tmp/" + username;
uint64_t guid;
unsigned int ncameras;
for (unsigned int i = 0; i < ncameras; i++) {
std::cout << "Detected camera with GUID 0x" << std::hex << guid << std::endl;
}
if (ncameras > 1) {
std::cout << "Use camera with GUID 0x" << std::hex << guid << std::endl;
}
for (int i = 0; i < 10; i++)
std::string filename = outputpath + "/imagetest1.pgm";
std::cout << "Write image: " << filename << std::endl;
std::cout << "New connection..." << std::endl;
std::cout << "New connection..." << std::endl;
filename = outputpath + "/imagetest2.pgm";
std::cout << "Write image: " << filename << std::endl;
}
catch (...) {
vpCERROR << "Failure: exit" << std::endl;
}
}
#else
int main()
{
vpTRACE("Ieee 1394 grabber capabilities are not available...");
vpTRACE("You should install libdc1394-2 to use this binary.");
}
#endif
Class for firewire ieee1394 video devices using libdc1394-2.x api.
void acquire(vpImage< unsigned char > &I)
void setCamera(uint64_t camera)
void getNumCameras(unsigned int &ncameras) const
void open(vpImage< unsigned char > &I)
static void write(const vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)