15 #include <visiontransfer/deviceenumeration.h> 16 #include <visiontransfer/asynctransfer.h> 17 #include <visiontransfer/imageset.h> 24 #define snprintf _snprintf_s 34 if(devices.size() == 0) {
35 std::cout <<
"No devices discovered!" << std::endl;
40 std::cout <<
"Discovered devices:" << std::endl;
41 for(
unsigned int i = 0; i< devices.size(); i++) {
42 std::cout << devices[i].toString() << std::endl;
44 std::cout << std::endl;
51 for(
int i=0; i<100; i++) {
52 std::cout <<
"Receiving image set " << i << std::endl;
56 while(!asyncTransfer.collectReceivedImageSet(imageSet,
62 for(
int imageNumber = 0; imageNumber <= imageSet.
getNumberOfImages(); imageNumber++) {
65 snprintf(fileName,
sizeof(fileName),
"image%03d_%d.pgm", i,
DeviceList discoverDevices()
Discovers new devices and returns the list of all devices that have been found.
void writePgmFile(int imageNumber, const char *fileName) const
Writes one image of the set to a PGM or PPM file.
int getNumberOfImages() const
Returns the number of images in this set.
A set of one to three images, but usually two (the left camera image and the disparity map)...
Class for asynchronous transfer of image sets.
Allows for the discovery of devices in the network.