33 #include <Base/Debug/TimeMeasure.hh>
34 #include <Base/Image/ImageConvert.hh>
35 #include <Base/Image/ImageIO.hh>
36 #include <Image/Camera.hh>
37 #include <VideoSource/VideoSource_DCAM.hh>
42 int main(
int argc,
char *argv[])
55 dc1394video_mode_t mode = DC1394_VIDEO_MODE_800x600_MONO8;
61 cerr <<
"Failed to open camera (error code " << res <<
")" << endl;
69 for (
int i = 0; i < num; i++)
71 cout <<
"Attempting to grab image..." << flush;
73 cout <<
" done!" << endl << flush;
76 sprintf(filename,
"image-%05d.mip", i);
80 cout <<
"Closing camera..." << flush;
84 cout <<
" done!" << endl << flush;
virtual int InitImage(BIAS::ImageBase &Image)
int GrabSingle(BIAS::Camera< unsigned char > &image)
Select the port (bus-id) to use, only valid before OpenDevice()
void SetModeAndFramerate(dc1394video_mode_t mode, float framerate)
This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) cameras following the DCa...
int OpenDevice()
Opens a dc1394 device.
void SetDebugLevel(const long int lv)
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
void SetFirewireB(bool on)
int CloseDevice()
closes a camera device and cleans up
int PostGrab()
stops iso transmission of a camera.
int PreGrab()
initializes the iso transmission of a camera.