15 #include <visiontransfer/deviceenumeration.h> 16 #include <visiontransfer/imagetransfer.h> 17 #include <visiontransfer/imageset.h> 24 #define snprintf _snprintf_s 32 DeviceEnumeration::DeviceList devices =
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 imgNum=0; imgNum<100; imgNum++) {
52 std::cout <<
"Receiving image set " << imgNum << std::endl;
56 while(!imageTransfer.receiveImageSet(imageSet)) {
64 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.
Class for synchronous transfer of image sets.
A set of one to three images, but usually two (the left camera image and the disparity map)...
Allows for the discovery of devices in the network.