16 #ifndef __FIREWIRE_CAMERA_DR2_H__
17 #define __FIREWIRE_CAMERA_DR2_H__
22 #include <Flycapture2.h>
23 #include <yarp/os/Time.h>
24 #include <yarp/os/Stamp.h>
27 #define DR_RGB_HALF_RES 1
28 #define DR_RGB_FULL_RES 2
29 #define DR_BAYER_FULL_RES 3
31 #define NUM_DMA_BUFFERS 8
54 bool SetF7(
int mode,
int xdim,
int ydim,
int pixel_format,
int speed,
int x0,
int y0);
56 bool Create(yarp::os::Searchable& config);
80 bool Capture(yarp::sig::ImageOf<yarp::sig::PixelRgb>* pImage,
unsigned char *pBuffer=0,
bool bRaw=
false);
81 bool Capture(yarp::sig::ImageOf<yarp::sig::PixelMono>* pImage);
112 unsigned int m_iMin[FlyCapture2::UNSPECIFIED_PROPERTY_TYPE],
m_iMax[FlyCapture2::UNSPECIFIED_PROPERTY_TYPE];
121 inline double ValueToNorm(
unsigned int iVal,
int feature);
123 int maxFPS(FlyCapture2::Mode mode,FlyCapture2::PixelFormat pixelFormat);
128 if (
error.GetType()!=FlyCapture2::PGRERROR_OK)
130 yError(
"%s\n",
error.GetDescription());
141 int checkInt(yarp::os::Searchable& config,
const char* key)
143 if (config.check(key))
145 return config.find(key).asInt32();
153 if (config.check(key))
155 return config.find(key).asFloat64();
252 virtual bool getFormat7MaxWindowDC1394(
unsigned int &xdim,
unsigned int &ydim,
unsigned int &xstep,
unsigned int &ystep,
unsigned int &xoffstep,
unsigned int &yoffstep);
bool Capture(yarp::sig::ImageOf< yarp::sig::PixelRgb > *pImage, unsigned char *pBuffer=0, bool bRaw=false)
virtual unsigned int getBytesPerPacketDC1394()
bool CaptureRaw(unsigned char *pBuffer)
virtual bool setPowerDC1394(bool onoff)
virtual bool setWhiteBalance(double blue, double red)
virtual bool hasAutoDC1394(int feature)
virtual double getExposure()
virtual bool hasOnePushDC1394(int feature)
virtual bool getOperationModeDC1394()
virtual bool getTransmissionDC1394()
bool SetF7(int mode, int xdim, int ydim, int pixel_format, int speed, int x0, int y0)
virtual bool setSharpness(double v)
virtual unsigned int getColorCodingDC1394()
bool Capture(yarp::sig::ImageOf< yarp::sig::PixelMono > *pImage)
virtual bool setCaptureDC1394(bool bON)
bool SetVideoMode(dc1394video_mode_t videoMode)
uint32_t m_iMax[DC1394_FEATURE_NUM]
FlyCapture2::BusManager * m_pBusManager
virtual unsigned int getActualColorCodingMaskDC1394()
virtual double getFeatureDC1394(int feature)
virtual double getGamma()
double checkDouble(yarp::os::Searchable &config, const char *key)
virtual bool setHue(double v)
virtual bool setSaturation(double v)
virtual bool setOperationModeDC1394(bool b1394b)
virtual bool setActiveDC1394(int feature, bool onoff)
virtual ~CFWCamera_DR2_2()
unsigned int NormToValue(double &dVal, int feature)
CFWCamera_DR2_2(bool raw)
virtual bool setISOSpeedDC1394(int speed)
virtual bool getWhiteBalanceDC1394(double &b, double &r)
bool manage(FlyCapture2::Error &error)
virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)
unsigned int m_F7PacketSize
virtual bool setModeDC1394(int feature, bool auto_onoff)
virtual bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)
unsigned int m_nNumCameras
virtual unsigned int getFPSDC1394()
bool CaptureImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
FlyCapture2::Format7ImageSettings m_F7ImageSettings
virtual bool setExposure(double v)
virtual double getShutter()
double ValueToNorm(uint32_t iVal, int feature)
virtual bool setOnePushDC1394(int feature)
virtual bool setShutter(double v)
virtual bool hasOnOffDC1394(int feature)
virtual double getBrightness()
virtual bool setColorCodingDC1394(int coding)
FlyCapture2::Image * m_pBayer
virtual bool setIris(double v)
virtual bool setResetDC1394()
virtual unsigned int getISOSpeedDC1394()
FlyCapture2::Format7Info m_F7Info
virtual bool setFPSDC1394(int fps)
virtual unsigned int getVideoModeMaskDC1394()
virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)
FlyCapture2::CameraInfo m_CameraInfo
virtual bool setGain(double v)
virtual bool setFeatureDC1394(int feature, double value)
virtual bool getModeDC1394(int feature)
double bytesPerPixel(dc1394color_coding_t pixelFormat)
virtual bool hasManualDC1394(int feature)
uint32_t m_iMin[DC1394_FEATURE_NUM]
int checkInt(yarp::os::Searchable &config, const char *key)
virtual double getSaturation()
virtual bool setGamma(double v)
virtual bool setWhiteBalanceDC1394(double b, double r)
dc1394video_frame_t * m_pFrame
bool CaptureRgb(unsigned char *pBuffer)
virtual bool setBytesPerPacketDC1394(unsigned int bpp)
virtual bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)
virtual unsigned int getVideoModeDC1394()
virtual unsigned int getFPSMaskDC1394()
FlyCapture2::Camera * m_pCamera
virtual bool setBroadcastDC1394(bool onoff)
FlyCapture2::FC2Config m_CamConfig
int maxFPS(dc1394video_mode_t mode, dc1394color_coding_t pixelFormat)
virtual double getSharpness()
virtual bool getWhiteBalance(double &blue, double &red)
const yarp::os::Stamp & getLastInputStamp()
virtual bool setVideoModeDC1394(int video_mode)
virtual bool setDefaultsDC1394()
bool Create(yarp::os::Searchable &config)
virtual bool hasFeatureDC1394(int feature)
virtual bool setTransmissionDC1394(bool bTxON)
bool CaptureImage(yarp::sig::ImageOf< yarp::sig::PixelMono > &image)
virtual bool setBrightness(double v)
virtual bool getActiveDC1394(int feature)