Shared.h
Go to the documentation of this file.
1 #ifndef SHARED_H
2 #define SHARED_H
3 
4 #include "CaptureFactory.h"
5 
6 using namespace alvar;
7 
9 {
10  for (int i = 0; i < (int)plugins.size(); ++i) {
11  if (i != 0) {
12  std::cout << ", ";
13  }
14  std::cout << plugins.at(i);
15  }
16 
17  std::cout << std::endl;
18 }
19 
21 {
22  for (int i = 0; i < (int)devices.size(); ++i) {
23  if (selectedDevice == i) {
24  std::cout << "* ";
25  }
26  else {
27  std::cout << " ";
28  }
29 
30  std::cout << i << ": " << devices.at(i).uniqueName();
31 
32  if (devices[i].description().length() > 0) {
33  std::cout << ", " << devices.at(i).description();
34  }
35 
36  std::cout << std::endl;
37  }
38 }
39 
41 {
42  for (int i = 0; i < (int)devices.size(); ++i) {
43  if (devices.at(i).captureType() == "highgui") {
44  return i;
45  }
46  }
47 
48  return 0;
49 }
50 
51 #endif
Main ALVAR namespace.
Definition: Alvar.h:174
std::vector< CaptureDevice > CaptureDeviceVector
Vector of CaptureDevices.
std::vector< std::string > CapturePluginVector
Vector of strings.
void outputEnumeratedPlugins(CaptureFactory::CapturePluginVector &plugins)
Definition: Shared.h:8
This file implements a capture factory with a plugin interface to allow for different capture backend...
void outputEnumeratedDevices(CaptureFactory::CaptureDeviceVector &devices, int selectedDevice)
Definition: Shared.h:20
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
int defaultDevice(CaptureFactory::CaptureDeviceVector &devices)
Definition: Shared.h:40


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 19:27:24