38 #include <Utils/Param.hh>
40 #include <VideoSource/VideoShMFeeder.hh>
41 #include <VideoSource/VideoSource_MDcam.hh>
49 void termhandler(
int )
51 cout <<
"caught Ctrl-C, exiting gfracefully"<<endl;
56 int main(
int argc,
char *argv[])
70 vector<string> ShmNames;
74 vector<VideoShMFeeder *> ShmFeeder;
79 "Configuration file (default: cameras.conf",
82 "Prefix to address Shm, Camid is added",
85 "Only scan the bus number N and write camerafile",-1);
94 ofstream ofs(camfile->c_str());
96 perror(camfile->c_str());
109 cout <<
"Number of cams: " << numcams << endl;
110 if (numcams <0) exit(0);
113 for (
int i=0; i<numcams; i++) {
117 ShmNames.push_back(oss.str());
119 cout <<
"Using: "<<ShmNames[i]<<endl;
122 ShmFeeder.push_back(s);
129 signal(3,termhandler);
131 cout <<
"Press Ctrl-\\ to exit"<<endl;
140 for (
int i=0; i<numcams; i++) {
141 ShmFeeder[i]->ProcessImage(&(GrabImage[i]));
143 cout <<framecount++<<endl;
149 for (
unsigned int i=0;i<ShmFeeder.size(); i++)
virtual int InitImage(BIAS::ImageBase &Image)
int GrabSingle(BIAS::Camera< unsigned char > *Image)
Call GrabSingle() with a prepared array of images to be filled.
void DisableDestructorWarning()
Uses this just before end of your program to avoid error from destructor.
int ScanBus(std::ofstream &ofs)
int ParseCommandLine(int &argc, char *argv[])
scan command line arguments for valid parameters
VideoSource_MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster.
void SetDebugLevel(const long int lv)
This class Param provides generic support for parameters.
int InitCameras(const std::string filename)
int * AddParamInt(const std::string &name, const std::string &help, int deflt=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), char cmdshort=0, int Group=GRP_NOSHOW)
For all adding routines:
VideoSource_DCAM * GetCamera(int n)
std::string * AddParamString(const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW)
void SetDebugLevelDcam(int d)
class to save Images to a Sharerd memory