Example for using the videosource dcam and writing direct to disk ,ImageConvert
- Author
- MIP
#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <Base/Debug/TimeMeasure.hh>
#ifdef WIN32
# include <windows.h>
#else
# include <unistd.h>
# include <getopt.h>
#endif
using namespace BIAS;
using namespace std;
#define StorageType unsigned char
int main(int , char** )
{
int res = -1;
unsigned int loopcount = 100;
cout <<"Warning: Improper use can freeze your system and especially your filesystem "<<endl;
if (res <0) {
cerr<<" Can not open camera. res="<<res<<endl;
exit(1);
}
for (unsigned int i=0;i<loopcount; i++) {
cout <<"Grabing image "<<i;
cout <<
" UID: "<<img.
GetUID()<<endl;
}
float fps = float(loopcount / (t1.
GetRealTime()/1000000.0));
cout <<"FPS: "<<fps<<endl;
return 0;
}