35 #include "Base/Common/W32Compat.hh"
38 #include <Image/Camera.hh>
39 #include <Base/Image/ImageConvert.hh>
40 #include <Base/Image/ImageIO.hh>
41 #include <VideoSource/VideoSource_DCAM_XB3.hh>
48 #include <Base/Debug/TimeMeasure.hh>
54 #define PACKAGESIZE 3840
56 #define NO_OF_FRAMES 20
58 int main(
int argc,
char *argv[])
73 cam->
SetFormat7(3, PACKAGESIZE, DC1394_COLOR_CODING_RGB8);
79 cerr<<
" Can not open camera on bus "<<res<<endl;
87 cout <<
"Grabbing..." << endl;
101 for (
unsigned int frame=0; frame < NO_OF_FRAMES; frame++) {
137 stringstream filename_left,filename_center,filename_right;
138 filename_left <<
"xb3_left_" << frame <<
".mip";
139 filename_center <<
"xb3_center_" << frame <<
".mip";
140 filename_right <<
"xb3_right_" << frame <<
".mip";
162 cout <<
"Write finished, closing cameras"<<endl;
virtual void SetSize(int w, int h, int bytesperpixel=1)
Set image size and number of bytes per pixel (e.g.
virtual int InitImage(BIAS::ImageBase &Image)
int SetLeftTop(unsigned int left, unsigned int top)
set the topleft corner for partitial scan
bool IsEmpty() const
check if ImageData_ points to allocated image buffer or not
void SetColorModel(EColorModel Model)
int OpenDevice()
Opens a dc1394 device.
PGR XB3 in format 7 mode 3 delivers an image that consists of 3 channels with 8bbp (overal 24bpp)...
virtual int SetColorModel(BIAS::ImageBase::EColorModel mode)
Select colormodel to use.
Bayer_GBRG, 1 channel RGB image Bayer tile.
int SetFormat7(int mode, int bpp, dc1394color_coding_t colorCoding=DC1394_COLOR_CODING_MONO8)
this a special function to by-pass all automatic initializations and Use only in conjuction with SetS...
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 Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
VideoSource PtGrey Bublebee XB3.
int CloseDevice()
closes a camera device and cleans up
(8bit) unsigned char image storage type
int PostGrab()
stops iso transmission of a camera.
int PreGrab()
initializes the iso transmission of a camera.
int GrabSingle(BIAS::Camera< unsigned char > &allImages, BIAS::Camera< unsigned char > &imageLeft, BIAS::Camera< unsigned char > &imageMiddle, BIAS::Camera< unsigned char > &imageRight)
Grab single images as bayer pattern GBRG.