18 #ifndef __FIREWIRE_CAMERA_DR2_H__
19 #define __FIREWIRE_CAMERA_DR2_H__
24 #include <dc1394/dc1394.h>
25 #include <yarp/os/Time.h>
26 #include <yarp/os/Stamp.h>
27 #include <yarp/os/Log.h>
28 #include <yarp/os/LogStream.h>
29 #include <yarp/os/Value.h>
30 #include <yarp/dev/IVisualParams.h>
31 #include <yarp/dev/IFrameGrabberControlsDC1394.h>
32 #include <yarp/dev/IFrameGrabberControls.h>
34 #define NUM_DMA_BUFFERS 4
39 #define DR_RGB_320x240 1
40 #define DR_RGB_640x480 2
41 #define DR_BAYER_640x480 3
42 #define DR_BAYER16_640x480 4
43 #define DR_YUV_640x480 5
46 #define DR_RGB_512x384 6
47 #define DR_RGB_800x600 7
48 #define DR_YUV_800x600 8
49 #define DR_RGB_1024x768 9
50 #define DR_YUV_1024x768 10
51 #define DR_BAYER_1024x768 11
54 public yarp::dev::IRgbVisualParams
70 bool Create(yarp::os::Searchable& config);
74 bool CaptureImage(yarp::sig::ImageOf<yarp::sig::PixelRgb>& image);
76 bool CaptureImage(yarp::sig::ImageOf<yarp::sig::PixelMono>& image);
83 bool SetF7(
int newVideoMode,
int newXdim,
int newYdim,
int newColorCoding,
int newSpeed,
int x0,
int y0);
85 bool Capture(yarp::sig::ImageOf<yarp::sig::PixelRgb>* pImage,
unsigned char *pBuffer=0,
bool bRaw=
false);
86 bool Capture(yarp::sig::ImageOf<yarp::sig::PixelMono>* pImage);
129 inline uint32_t
NormToValue(
double& dVal,
int feature);
130 inline double ValueToNorm(uint32_t iVal,
int feature);
136 int checkInt(yarp::os::Searchable& config,
const char* key);
138 double checkDouble(yarp::os::Searchable& config,
const char* key);
140 int maxFPS(dc1394video_mode_t mode,dc1394color_coding_t pixelFormat);
238 virtual bool getFormat7MaxWindowDC1394(
unsigned int &xdim,
unsigned int &ydim,
unsigned int &xstep,
unsigned int &ystep,
unsigned int &xoffstep,
unsigned int &yoffstep);
296 virtual bool setHue(
double v);
300 virtual bool setGain(
double v);
301 virtual bool setIris(
double v);
virtual bool setResetDC1394()
virtual bool setModeDC1394(int feature, bool auto_onoff)
virtual bool setTransmissionDC1394(bool bTxON)
virtual unsigned int getISOSpeedDC1394()
bool Capture(yarp::sig::ImageOf< yarp::sig::PixelRgb > *pImage, unsigned char *pBuffer=0, bool bRaw=false)
bool CaptureRaw(unsigned char *pBuffer)
virtual unsigned int getFPSDC1394()
virtual double getSharpness()
virtual unsigned int getColorCodingDC1394()
bool SetVideoMode(dc1394video_mode_t videoMode)
uint32_t m_iMax[DC1394_FEATURE_NUM]
dc1394video_frame_t m_ConvFrame_tmp
double checkDouble(yarp::os::Searchable &config, const char *key)
virtual bool setDefaultsDC1394()
bool mUseHardwareTimestamp
virtual ~CFWCamera_DR2_2()
virtual bool getTransmissionDC1394()
virtual int getRgbHeight()
const yarp::os::Stamp & getLastInputStamp()
uint32_t NormToValue(double &dVal, int feature)
dc1394video_frame_t m_ConvFrame
virtual bool hasFeatureDC1394(int feature)
CFWCamera_DR2_2(bool raw)
dc1394camera_t * m_pCamera
virtual bool getWhiteBalanceDC1394(double &b, double &r)
bool SetF7(int newVideoMode, int newXdim, int newYdim, int newColorCoding, int newSpeed, int x0, int y0)
virtual double getBrightness()
virtual unsigned int getVideoModeMaskDC1394()
virtual bool setPowerDC1394(bool onoff)
virtual bool setHue(double v)
virtual bool setShutter(double v)
virtual unsigned int getBytesPerPacketDC1394()
virtual bool setWhiteBalanceDC1394(double b, double r)
virtual unsigned int getVideoModeDC1394()
virtual bool setCaptureDC1394(bool bON)
virtual bool setBrightness(double v)
bool manage(dc1394error_t error)
bool CaptureImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
unsigned int m_ShutterSaveValue
virtual bool setFeatureDC1394(int feature, double value)
virtual bool getWhiteBalance(double &blue, double &red)
yarp::os::Property intrinsic
virtual bool hasOnePushDC1394(int feature)
double ValueToNorm(uint32_t iVal, int feature)
virtual bool setRgbFOV(double horizontalFov, double verticalFov)
virtual bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)
virtual bool setOperationModeDC1394(bool b1394b)
unsigned int m_GainSaveValue
virtual bool setBytesPerPacketDC1394(unsigned int bpp)
virtual unsigned int getFPSMaskDC1394()
virtual bool setRgbMirroring(bool mirror)
virtual bool getOperationModeDC1394()
virtual bool hasAutoDC1394(int feature)
dc1394feature_mode_t m_ShutterSaveModeAuto
virtual bool getRgbFOV(double &horizontalFov, double &verticalFov)
virtual bool setBroadcastDC1394(bool onoff)
virtual bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations)
dc1394feature_mode_t m_GainSaveModeAuto
virtual bool getRgbResolution(int &width, int &height)
double bytesPerPixel(dc1394color_coding_t pixelFormat)
virtual bool setExposure(double v)
virtual bool setRgbResolution(int width, int height)
dc1394video_frame_t * m_pFramePoll
virtual bool setSharpness(double v)
uint32_t m_iMin[DC1394_FEATURE_NUM]
int checkInt(yarp::os::Searchable &config, const char *key)
virtual double getExposure()
virtual bool hasManualDC1394(int feature)
virtual double getGamma()
virtual int getRgbWidth()
virtual double getFeatureDC1394(int feature)
virtual unsigned int getActualColorCodingMaskDC1394()
virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)
dc1394video_frame_t * m_pFrame
bool CaptureRgb(unsigned char *pBuffer)
dc1394camera_list_t * m_pCameraList
virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic)
virtual bool setGamma(double v)
virtual bool setActiveDC1394(int feature, bool onoff)
virtual bool setIris(double v)
virtual bool setFPSDC1394(int fps)
virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)
virtual bool hasOnOffDC1394(int feature)
virtual bool getActiveDC1394(int feature)
virtual bool setISOSpeedDC1394(int speed)
virtual bool setColorCodingDC1394(int coding)
virtual bool getModeDC1394(int feature)
virtual double getShutter()
virtual bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)
virtual bool setWhiteBalance(double blue, double red)
virtual bool getRgbMirroring(bool &mirror)
virtual bool setVideoModeDC1394(int video_mode)
int maxFPS(dc1394video_mode_t mode, dc1394color_coding_t pixelFormat)
virtual double getSaturation()
virtual bool setOnePushDC1394(int feature)
unsigned int m_RawBufferSize
dc1394_t * m_dc1394_handle
virtual bool setSaturation(double v)
bool Create(yarp::os::Searchable &config)
virtual bool setGain(double v)