YARP
Yet Another Robot Platform
FrameGrabberInterfaces.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_FRAMEGRABBERINTERFACES_H
11 #define YARP_FRAMEGRABBERINTERFACES_H
12 
13 #include <string>
14 
15 #include <yarp/os/Vocab.h>
16 #include <yarp/dev/api.h>
17 #include <yarp/sig/Image.h>
18 #include <yarp/sig/Vector.h>
19 
23 typedef enum {
26  BUS_USB
28 
29 typedef enum {
32  MODE_AUTO
34 
35 typedef struct {
37  std::string deviceDescription;
39 
40 /*
41  * Vocab for interfaces
42  */
45 
46 /*
47  * Generic capabilities defines
48  */
49 
60 
61 // General usage vocabs
75 
76 
77 typedef enum {
78  YARP_CROP_RECT = 0, // Rectangular region of interest style, requires the two corner as a parameter
79  YARP_CROP_LIST // Unordered list of points, the returned image will be a nx1 image with n the
80  // number of points required by user (size of input vector), with the corresponding
81  // pixel color.
83 
84 typedef enum {
109  YARP_FEATURE_NUMBER_OF // this has to be the last one
111 
112 /*
113  * For usage with IFrameGrabberControlsDC1394 interface
114  */
115 
128 
129 // masks
130 constexpr yarp::conf::vocab32_t VOCAB_DRGETMSK = yarp::os::createVocab('D','R','2','m'); // 12
131 constexpr yarp::conf::vocab32_t VOCAB_DRGETVMD = yarp::os::createVocab('D','R','2','n'); // 13
132 constexpr yarp::conf::vocab32_t VOCAB_DRSETVMD = yarp::os::createVocab('D','R','2','o'); // 14
133 constexpr yarp::conf::vocab32_t VOCAB_DRGETFPM = yarp::os::createVocab('D','R','2','p'); // 15
134 constexpr yarp::conf::vocab32_t VOCAB_DRGETFPS = yarp::os::createVocab('D','R','2','q'); // 16
135 constexpr yarp::conf::vocab32_t VOCAB_DRSETFPS = yarp::os::createVocab('D','R','2','r'); // 17
136 constexpr yarp::conf::vocab32_t VOCAB_DRGETISO = yarp::os::createVocab('D','R','2','s'); // 18
137 constexpr yarp::conf::vocab32_t VOCAB_DRSETISO = yarp::os::createVocab('D','R','2','t'); // 19
138 constexpr yarp::conf::vocab32_t VOCAB_DRGETCCM = yarp::os::createVocab('D','R','2','u'); // 20
139 constexpr yarp::conf::vocab32_t VOCAB_DRGETCOD = yarp::os::createVocab('D','R','2','v'); // 21
140 constexpr yarp::conf::vocab32_t VOCAB_DRSETCOD = yarp::os::createVocab('D','R','2','w'); // 22
141 constexpr yarp::conf::vocab32_t VOCAB_DRSETWHB = yarp::os::createVocab('D','R','2','x'); // 23
142 constexpr yarp::conf::vocab32_t VOCAB_DRGETWHB = yarp::os::createVocab('D','R','2','y'); // 24
143 constexpr yarp::conf::vocab32_t VOCAB_DRGETF7M = yarp::os::createVocab('D','R','2','z'); // 25
144 constexpr yarp::conf::vocab32_t VOCAB_DRGETWF7 = yarp::os::createVocab('D','R','2','A'); // 26
145 constexpr yarp::conf::vocab32_t VOCAB_DRSETWF7 = yarp::os::createVocab('D','R','2','B'); // 27
146 constexpr yarp::conf::vocab32_t VOCAB_DRSETOPM = yarp::os::createVocab('D','R','2','C'); // 28
147 constexpr yarp::conf::vocab32_t VOCAB_DRGETOPM = yarp::os::createVocab('D','R','2','D'); // 29
148 constexpr yarp::conf::vocab32_t VOCAB_DRSETTXM = yarp::os::createVocab('D','R','2','E'); // 30
149 constexpr yarp::conf::vocab32_t VOCAB_DRGETTXM = yarp::os::createVocab('D','R','2','F'); // 31
150 
151 
152 constexpr yarp::conf::vocab32_t VOCAB_DRSETBCS = yarp::os::createVocab('D','R','2','I'); // 34
153 constexpr yarp::conf::vocab32_t VOCAB_DRSETDEF = yarp::os::createVocab('D','R','2','J'); // 35
154 constexpr yarp::conf::vocab32_t VOCAB_DRSETRST = yarp::os::createVocab('D','R','2','K'); // 36
155 constexpr yarp::conf::vocab32_t VOCAB_DRSETPWR = yarp::os::createVocab('D','R','2','L'); // 37
156 constexpr yarp::conf::vocab32_t VOCAB_DRSETCAP = yarp::os::createVocab('D','R','2','M'); // 38
157 constexpr yarp::conf::vocab32_t VOCAB_DRSETBPP = yarp::os::createVocab('D','R','2','N'); // 39
158 constexpr yarp::conf::vocab32_t VOCAB_DRGETBPP = yarp::os::createVocab('D','R','2','O'); // 40
159 
160 namespace yarp{
161 namespace dev {
162 
169 {
170 public:
171  virtual ~IFrameGrabber(){}
172 
182  virtual bool getRawBuffer(unsigned char *buffer)=0;
183 
189  virtual int getRawBufferSize()=0;
190 
195  virtual int height() const =0;
196 
201  virtual int width() const =0;
202 };
203 
210 {
211 public:
212  virtual ~IFrameGrabberRgb(){}
220  virtual bool getRgbBuffer(unsigned char *buffer)=0;
221 
226  virtual int height() const =0;
227 
232  virtual int width() const =0;
233 };
234 
241 {
242 public:
247 
256 
272  virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf<std::pair<int, int> > vertices, yarp::sig::ImageOf<yarp::sig::PixelRgb>& image) { return false; };
273 
278  virtual int height() const =0;
279 
284  virtual int width() const =0;
285 };
286 
293 {
294 public:
306 
322  virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf<std::pair<int, int> > vertices, yarp::sig::ImageOf<yarp::sig::PixelMono>& image) { return false; };
323 
328  virtual int height() const =0;
329 
334  virtual int width() const =0;
335 };
336 
343 {
344 public:
348  virtual ~IFrameWriterImage(){}
349 
357 };
358 
365 {
366 public:
371 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
372 // set
378  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_BRIGHTNESS, v) instead")
379  virtual bool setBrightness(double v) { return false; }
385  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_EXPOSURE, v) instead")
386  virtual bool setExposure(double v) { return false; }
392  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_SHARPNESS, v) instead")
393  virtual bool setSharpness(double v) { return false; }
400  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_WHITE_BALANCE, blue, red) instead")
401  virtual bool setWhiteBalance(double blue, double red) { return false; }
407  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_HUE, v) instead")
408  virtual bool setHue(double v) { return false; }
414  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_SATURATION, v) instead")
415  virtual bool setSaturation(double v) { return false; }
421  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_GAMMA, v) instead")
422  virtual bool setGamma(double v) { return false; }
428  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_SHUTTER, v) instead")
429  virtual bool setShutter(double v) { return false; }
435  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_GAIN, v) instead")
436  virtual bool setGain(double v) { return false; }
442  YARP_DEPRECATED_MSG("Use setFeature(YARP_FEATURE_IRIS, v) instead")
443  virtual bool setIris(double v) { return false; }
444 
445 // get
450  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_BRIGHTNESS, v) instead")
451  virtual double getBrightness() { return -1.0; }
456  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_EXPOSURE, v) instead")
457  virtual double getExposure() { return -1.0; }
462  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_SHARPNESS, v) instead")
463  virtual double getSharpness() { return -1.0; }
470  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_WHITE_BALANCE, blue, red) instead")
471  virtual bool getWhiteBalance(double &blue, double &red) { return false; }
476  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_HUE, v) instead")
477  virtual double getHue() { return -1.0; }
482  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_SATURATION, v) instead")
483  virtual double getSaturation() { return -1.0; }
488  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_GAMMA, v) instead")
489  virtual double getGamma() { return -1.0; }
494  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_SHUTTER, v) instead")
495  virtual double getShutter() { return -1.0; }
500  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_GAIN, v) instead")
501  virtual double getGain() { return -1.0; }
506  YARP_DEPRECATED_MSG("Use getFeature(YARP_FEATURE_IRIS, v) instead")
507  virtual double getIris() { return -1.0; }
508 #endif
509 
511  {
512  switch (vocab) {
513  case VOCAB_BRIGHTNESS:
515  case VOCAB_EXPOSURE:
516  return YARP_FEATURE_EXPOSURE;
517  case VOCAB_SHARPNESS:
518  return YARP_FEATURE_SHARPNESS;
519  case VOCAB_WHITE:
521  case VOCAB_HUE:
522  return YARP_FEATURE_HUE;
523  case VOCAB_SATURATION:
525  case VOCAB_GAMMA:
526  return YARP_FEATURE_GAMMA;
527  case VOCAB_SHUTTER:
528  return YARP_FEATURE_SHUTTER;
529  case VOCAB_GAIN:
530  return YARP_FEATURE_GAIN;
531  case VOCAB_IRIS:
532  return YARP_FEATURE_IRIS;
533  default:
534  return YARP_FEATURE_INVALID;
535  }
536 
537  }
538 
540  {
541  switch (_enum) {
543  return VOCAB_BRIGHTNESS;
545  return VOCAB_EXPOSURE;
547  return VOCAB_SHARPNESS;
549  return VOCAB_WHITE;
550  case YARP_FEATURE_HUE:
551  return VOCAB_HUE;
553  return VOCAB_SATURATION;
554  case YARP_FEATURE_GAMMA:
555  return VOCAB_GAMMA;
557  return VOCAB_SHUTTER;
558  case YARP_FEATURE_GAIN:
559  return VOCAB_GAIN;
560  case YARP_FEATURE_IRIS:
561  return VOCAB_IRIS;
562  default:
563  return -1;
564  }
565 
566  }
567 
568  std::string busType2String(BusType type)
569  {
570  switch (type) {
571  case BUS_FIREWIRE:
572  return "FireWire";
573  break;
574 
575  case BUS_USB:
576  return "USB";
577  break;
578 
579  default:
580  return "bus type undefined";
581  break;
582  }
583  }
584 
585  inline FeatureMode toFeatureMode(bool _auto)
586  {
587  return _auto ? MODE_AUTO : MODE_MANUAL;
588  }
595  virtual bool getCameraDescription(CameraDescriptor *camera)=0;
596 
603  virtual bool hasFeature(int feature, bool *hasFeature)=0;
604 
611  virtual bool setFeature(int feature, double value)=0;
612 
619  virtual bool getFeature(int feature, double *value)=0;
620 
629  virtual bool setFeature(int feature, double value1, double value2)=0;
630 
638  virtual bool getFeature(int feature, double *value1, double *value2)=0;
639 
646  virtual bool hasOnOff(int feature, bool *HasOnOff)=0;
647 
654  virtual bool setActive(int feature, bool onoff)=0;
655 
662  virtual bool getActive(int feature, bool *isActive)=0;
663 
670  virtual bool hasAuto(int feature, bool *hasAuto)=0;
671 
678  virtual bool hasManual(int feature, bool *hasManual)=0;
679 
686  virtual bool hasOnePush(int feature, bool *hasOnePush)=0;
687 
694  virtual bool setMode(int feature, FeatureMode mode)=0;
695 
702  virtual bool getMode(int feature, FeatureMode *mode)=0;
703 
710  virtual bool setOnePush(int feature)=0;
711 };
712 
714 {
715 public:
717 
718  // 12 13 14
719  virtual unsigned int getVideoModeMaskDC1394()=0;//{ return 0xFFFFFFFF; }
720  virtual unsigned int getVideoModeDC1394()=0;//{ return 0; }
721  virtual bool setVideoModeDC1394(int video_mode)=0;//{ return true; }
722 
723  // 15 16 17
724  virtual unsigned int getFPSMaskDC1394()=0;//{ return 0xFFFFFFFF; }
725  virtual unsigned int getFPSDC1394()=0;//{ return 0; }
726  virtual bool setFPSDC1394(int fps)=0;//{ return true; }
727 
728  // 18 19
729  virtual unsigned int getISOSpeedDC1394()=0;//{ return 0; }
730  virtual bool setISOSpeedDC1394(int speed)=0;//{ return true; }
731 
732  // 20 21 22
733  virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)=0;//{ return 0xFFFFFFFF; }
734  virtual unsigned int getColorCodingDC1394()=0;//{ return 0; }
735  virtual bool setColorCodingDC1394(int coding)=0;//{ return true; }
736  /*{
737  b=r=0.5;
738  return true;
739  }*/
740 
741  // 25 26 27
742  virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim,unsigned int &ydim,unsigned int &xstep,unsigned int &ystep,unsigned int &xoffstep,unsigned int &yoffstep)=0;
743  /*{
744  xdim=324; ydim=244; xstep=2; ystep=2;
745  return true;
746  }*/
747  virtual bool getFormat7WindowDC1394(unsigned int &xdim,unsigned int &ydim,int &x0,int &y0)=0;
748  /*{
749  xdim=324; ydim=244;
750  return true;
751  }*/
752  virtual bool setFormat7WindowDC1394(unsigned int xdim,unsigned int ydim,int x0,int y0)=0;//{ return true; }
753 
754  // 28
755  virtual bool setOperationModeDC1394(bool b1394b)=0;//{ return true; }
756  // 29
757  virtual bool getOperationModeDC1394()=0;//{ return true; }
758  // 30
759  virtual bool setTransmissionDC1394(bool bTxON)=0;//{ return true; }
760  // 31
761  virtual bool getTransmissionDC1394()=0;//{ return true; }
762  // 32
763  //virtual bool setBayerDC1394(bool bON)=0;//{ return true; }
764  // 33
765  //virtual bool getBayerDC1394()=0;//{ return true; }
766 
767  // 34 35 36 37
768  virtual bool setBroadcastDC1394(bool onoff)=0;//{ return true; }
769  virtual bool setDefaultsDC1394()=0;//{ return true; }
770  virtual bool setResetDC1394()=0;//{ return true; }
771  virtual bool setPowerDC1394(bool onoff)=0;//{ return true; }
772 
773  // 38
774  virtual bool setCaptureDC1394(bool bON)=0;//{ return true; }
775 
776  // 39
777  virtual unsigned int getBytesPerPacketDC1394()=0;//{ return 0; }
778 
779  // 40
780  virtual bool setBytesPerPacketDC1394(unsigned int bpp)=0;//{ return true; }
781 };
782 
783 } // namespace dev
784 } // namespace yarp
785 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
787 #endif
788 
789 #endif // YARP_FRAMEGRABBERINTERFACES_H
CameraDescriptor
Definition: FrameGrabberInterfaces.h:35
CameraDescriptor::busType
BusType busType
Definition: FrameGrabberInterfaces.h:36
VOCAB_DRSETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRSETCOD
Definition: FrameGrabberInterfaces.h:140
VOCAB_DRSETISO
constexpr yarp::conf::vocab32_t VOCAB_DRSETISO
Definition: FrameGrabberInterfaces.h:137
YARP_CROP_LIST
@ YARP_CROP_LIST
Definition: FrameGrabberInterfaces.h:79
MODE_UNKNOWN
@ MODE_UNKNOWN
Definition: FrameGrabberInterfaces.h:30
yarp::dev::IFrameGrabberImageRaw::getImage
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelMono > &image)=0
Get a raw image from the frame grabber.
yarp::dev::IFrameGrabberControls::setFeature
virtual bool setFeature(int feature, double value1, double value2)=0
Set the requested feature to a value using 2 params (like white balance)
yarp::dev::IFrameGrabberImageRaw
Read a YARP-format image from a device.
Definition: FrameGrabberInterfaces.h:293
YARP_FEATURE_NUMBER_OF
@ YARP_FEATURE_NUMBER_OF
Definition: FrameGrabberInterfaces.h:109
VOCAB_GAMMA
constexpr yarp::conf::vocab32_t VOCAB_GAMMA
Definition: FrameGrabberInterfaces.h:56
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
VOCAB_DRSETMOD
constexpr yarp::conf::vocab32_t VOCAB_DRSETMOD
Definition: FrameGrabberInterfaces.h:125
VOCAB_DRGETISO
constexpr yarp::conf::vocab32_t VOCAB_DRGETISO
Definition: FrameGrabberInterfaces.h:136
yarp::dev::IFrameGrabberControls::getActive
virtual bool getActive(int feature, bool *isActive)=0
Get the current status of the feature, on or off.
YARP_FEATURE_SATURATION
@ YARP_FEATURE_SATURATION
Definition: FrameGrabberInterfaces.h:91
VOCAB_DRSETPWR
constexpr yarp::conf::vocab32_t VOCAB_DRSETPWR
Definition: FrameGrabberInterfaces.h:155
VOCAB_DRGETACT
constexpr yarp::conf::vocab32_t VOCAB_DRGETACT
Definition: FrameGrabberInterfaces.h:121
YARP_FEATURE_INVALID
@ YARP_FEATURE_INVALID
Definition: FrameGrabberInterfaces.h:85
Vector.h
contains the definition of a Vector type
VOCAB_CAMERA_DESCRIPTION
constexpr yarp::conf::vocab32_t VOCAB_CAMERA_DESCRIPTION
Definition: FrameGrabberInterfaces.h:65
VOCAB_DRGETCCM
constexpr yarp::conf::vocab32_t VOCAB_DRGETCCM
Definition: FrameGrabberInterfaces.h:138
YARP_FEATURE_MIRROR
@ YARP_FEATURE_MIRROR
Definition: FrameGrabberInterfaces.h:108
VOCAB_FRAMEGRABBER_IMAGE
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
Definition: FrameGrabberInterfaces.h:43
yarp::dev::IFrameGrabberControls::featureVOCABEnum
cameraFeature_id_t featureVOCABEnum(int vocab)
Definition: FrameGrabberInterfaces.h:510
YARP_FEATURE_CAPTURE_QUALITY
@ YARP_FEATURE_CAPTURE_QUALITY
Definition: FrameGrabberInterfaces.h:107
VOCAB_DRGETVAL
constexpr yarp::conf::vocab32_t VOCAB_DRGETVAL
Definition: FrameGrabberInterfaces.h:118
VOCAB_FRAMEGRABBER_CONTROL
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
Definition: FrameGrabberInterfaces.h:63
VOCAB_DRSETBPP
constexpr yarp::conf::vocab32_t VOCAB_DRSETBPP
Definition: FrameGrabberInterfaces.h:157
yarp::dev::IFrameGrabberControls::hasFeature
virtual bool hasFeature(int feature, bool *hasFeature)=0
Check if camera has the requested feature (saturation, brightness ...
yarp::dev::IFrameGrabberControlsDC1394::setFormat7WindowDC1394
virtual bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)=0
yarp::dev::IFrameGrabberControlsDC1394::setBroadcastDC1394
virtual bool setBroadcastDC1394(bool onoff)=0
yarp::dev::IFrameGrabberControls::getCameraDescription
virtual bool getCameraDescription(CameraDescriptor *camera)=0
Get a basic description of the camera hw.
yarp::dev::IFrameGrabberControlsDC1394::setCaptureDC1394
virtual bool setCaptureDC1394(bool bON)=0
VOCAB_BRIGHTNESS
constexpr yarp::conf::vocab32_t VOCAB_BRIGHTNESS
Definition: FrameGrabberInterfaces.h:50
yarp::dev::IFrameGrabberControls::busType2String
std::string busType2String(BusType type)
Definition: FrameGrabberInterfaces.h:568
yarp::dev::IFrameGrabberControls::featureEnum2Vocab
int featureEnum2Vocab(cameraFeature_id_t _enum)
Definition: FrameGrabberInterfaces.h:539
yarp::dev::IFrameGrabber
Common interface to a FrameGrabber.
Definition: FrameGrabberInterfaces.h:169
yarp::dev::IFrameGrabberControlsDC1394::setFPSDC1394
virtual bool setFPSDC1394(int fps)=0
yarp::dev::IFrameWriterImage::~IFrameWriterImage
virtual ~IFrameWriterImage()
Destructor.
Definition: FrameGrabberInterfaces.h:348
VOCAB_DRSETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRSETTXM
Definition: FrameGrabberInterfaces.h:148
VOCAB_DRGETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETOPM
Definition: FrameGrabberInterfaces.h:147
VOCAB_DRGETVMD
constexpr yarp::conf::vocab32_t VOCAB_DRGETVMD
Definition: FrameGrabberInterfaces.h:131
VOCAB_FEATURE2
constexpr yarp::conf::vocab32_t VOCAB_FEATURE2
Definition: FrameGrabberInterfaces.h:68
yarp::dev::IFrameGrabberControlsDC1394::getOperationModeDC1394
virtual bool getOperationModeDC1394()=0
YARP_FEATURE_IRIS
@ YARP_FEATURE_IRIS
Definition: FrameGrabberInterfaces.h:95
VOCAB_FRAMEGRABBER_IMAGERAW
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGERAW
Definition: FrameGrabberInterfaces.h:44
VOCAB_DRSETVMD
constexpr yarp::conf::vocab32_t VOCAB_DRSETVMD
Definition: FrameGrabberInterfaces.h:132
MODE_AUTO
@ MODE_AUTO
Definition: FrameGrabberInterfaces.h:32
VOCAB_ONOFF
constexpr yarp::conf::vocab32_t VOCAB_ONOFF
Definition: FrameGrabberInterfaces.h:69
VOCAB_ACTIVE
constexpr yarp::conf::vocab32_t VOCAB_ACTIVE
Definition: FrameGrabberInterfaces.h:73
VOCAB_DRSETCAP
constexpr yarp::conf::vocab32_t VOCAB_DRSETCAP
Definition: FrameGrabberInterfaces.h:156
YARP_FEATURE_TRIGGER
@ YARP_FEATURE_TRIGGER
Definition: FrameGrabberInterfaces.h:98
yarp::dev::IFrameGrabberControls::getFeature
virtual bool getFeature(int feature, double *value1, double *value2)=0
Get the current value for the requested feature.
yarp::dev::IFrameGrabberControlsDC1394::setTransmissionDC1394
virtual bool setTransmissionDC1394(bool bTxON)=0
YARP_FEATURE_WHITE_SHADING
@ YARP_FEATURE_WHITE_SHADING
Definition: FrameGrabberInterfaces.h:100
yarp::dev::IFrameGrabberControlsDC1394::getFPSMaskDC1394
virtual unsigned int getFPSMaskDC1394()=0
YARP_CROP_RECT
@ YARP_CROP_RECT
Definition: FrameGrabberInterfaces.h:78
CameraDescriptor::deviceDescription
std::string deviceDescription
Definition: FrameGrabberInterfaces.h:37
VOCAB_SHARPNESS
constexpr yarp::conf::vocab32_t VOCAB_SHARPNESS
Definition: FrameGrabberInterfaces.h:52
yarp::dev::IFrameGrabberControlsDC1394::setISOSpeedDC1394
virtual bool setISOSpeedDC1394(int speed)=0
yarp::dev::IFrameGrabberControlsDC1394::setVideoModeDC1394
virtual bool setVideoModeDC1394(int video_mode)=0
yarp::dev::IFrameGrabberControls::setFeature
virtual bool setFeature(int feature, double value)=0
Set the requested feature to a value (saturation, brightness ...
VOCAB_DRGETFPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPM
Definition: FrameGrabberInterfaces.h:133
yarp::dev::IFrameGrabberImageRaw::getImageCrop
virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelMono > &image)
Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is ...
Definition: FrameGrabberInterfaces.h:322
YARP_FEATURE_PAN
@ YARP_FEATURE_PAN
Definition: FrameGrabberInterfaces.h:103
yarp::dev::IFrameGrabberControlsDC1394::getColorCodingDC1394
virtual unsigned int getColorCodingDC1394()=0
yarp::dev::IFrameGrabber::getRawBufferSize
virtual int getRawBufferSize()=0
Get the size of the card's internal buffer, the user should use this method to allocate the storage t...
yarp::sig::ImageOf< yarp::sig::PixelRgb >
YARP_FEATURE_WHITE_BALANCE
@ YARP_FEATURE_WHITE_BALANCE
Definition: FrameGrabberInterfaces.h:89
VOCAB_HAS
constexpr yarp::conf::vocab32_t VOCAB_HAS
Definition: FrameGrabberInterfaces.h:66
yarp::sig::VectorOf
Provides:
Definition: Vector.h:122
yarp::dev::IFrameGrabberRgb::~IFrameGrabberRgb
virtual ~IFrameGrabberRgb()
Definition: FrameGrabberInterfaces.h:212
yarp::dev::IFrameWriterImage
Read a YARP-format image to a device.
Definition: FrameGrabberInterfaces.h:343
yarp::dev::IFrameGrabberControls::toFeatureMode
FeatureMode toFeatureMode(bool _auto)
Definition: FrameGrabberInterfaces.h:585
VOCAB_DRGETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRGETWF7
Definition: FrameGrabberInterfaces.h:144
yarp::dev::IFrameGrabberRgb::getRgbBuffer
virtual bool getRgbBuffer(unsigned char *buffer)=0
Get a rgb buffer from the frame grabber, if required demosaicking/color reconstruction is applied.
YARP_FEATURE_FOCUS
@ YARP_FEATURE_FOCUS
Definition: FrameGrabberInterfaces.h:96
VOCAB_ONEPUSH
constexpr yarp::conf::vocab32_t VOCAB_ONEPUSH
Definition: FrameGrabberInterfaces.h:72
VOCAB_WHITE
constexpr yarp::conf::vocab32_t VOCAB_WHITE
Definition: FrameGrabberInterfaces.h:53
BusType
BusType
Definition: FrameGrabberInterfaces.h:23
VOCAB_DRHASONP
constexpr yarp::conf::vocab32_t VOCAB_DRHASONP
Definition: FrameGrabberInterfaces.h:124
VOCAB_DRGETWHB
constexpr yarp::conf::vocab32_t VOCAB_DRGETWHB
Definition: FrameGrabberInterfaces.h:142
yarp::dev::IFrameGrabberControlsDC1394::getVideoModeDC1394
virtual unsigned int getVideoModeDC1394()=0
yarp::dev::IFrameGrabberControlsDC1394::getBytesPerPacketDC1394
virtual unsigned int getBytesPerPacketDC1394()=0
yarp::dev::IFrameGrabberControlsDC1394::setColorCodingDC1394
virtual bool setColorCodingDC1394(int coding)=0
yarp::dev::IFrameGrabberRgb::width
virtual int width() const =0
Return the width of each frame.
yarp::dev::IFrameGrabberControlsDC1394::setOperationModeDC1394
virtual bool setOperationModeDC1394(bool b1394b)=0
yarp::dev::IFrameGrabberControls::setMode
virtual bool setMode(int feature, FeatureMode mode)=0
Set the requested mode for the feature.
yarp::dev::IFrameGrabberImage
Read a YARP-format image from a device.
Definition: FrameGrabberInterfaces.h:241
VOCAB_SATURATION
constexpr yarp::conf::vocab32_t VOCAB_SATURATION
Definition: FrameGrabberInterfaces.h:55
yarp::dev::IFrameGrabberImage::getImage
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)=0
Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.
yarp::dev::IFrameWriterImage::putImage
virtual bool putImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)=0
Write an image to the device.
yarp::dev::IFrameGrabberControls::hasManual
virtual bool hasManual(int feature, bool *hasManual)=0
Check if the requested feature has the 'manual' mode.
YARP_FEATURE_HUE
@ YARP_FEATURE_HUE
Definition: FrameGrabberInterfaces.h:90
VOCAB_IRIS
constexpr yarp::conf::vocab32_t VOCAB_IRIS
Definition: FrameGrabberInterfaces.h:59
yarp::dev::IFrameGrabber::height
virtual int height() const =0
Return the height of each frame.
VOCAB_DRGETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRGETCOD
Definition: FrameGrabberInterfaces.h:139
VOCAB_SHUTTER
constexpr yarp::conf::vocab32_t VOCAB_SHUTTER
Definition: FrameGrabberInterfaces.h:57
YARP_FEATURE_GAIN
@ YARP_FEATURE_GAIN
Definition: FrameGrabberInterfaces.h:94
yarp::dev::IFrameGrabberControls::getFeature
virtual bool getFeature(int feature, double *value)=0
Get the current value for the requested feature.
YARP_FEATURE_ZOOM
@ YARP_FEATURE_ZOOM
Definition: FrameGrabberInterfaces.h:102
VOCAB_EXPOSURE
constexpr yarp::conf::vocab32_t VOCAB_EXPOSURE
Definition: FrameGrabberInterfaces.h:51
VOCAB_DRSETFPS
constexpr yarp::conf::vocab32_t VOCAB_DRSETFPS
Definition: FrameGrabberInterfaces.h:135
buffer
Definition: V4L_camera.h:75
yarp::dev::IFrameGrabberControlsDC1394::getFPSDC1394
virtual unsigned int getFPSDC1394()=0
VOCAB_DRHASAUT
constexpr yarp::conf::vocab32_t VOCAB_DRHASAUT
Definition: FrameGrabberInterfaces.h:123
yarp::dev::IFrameGrabberImageRaw::width
virtual int width() const =0
Return the width of each frame.
VOCAB_DRGETFPS
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPS
Definition: FrameGrabberInterfaces.h:134
yarp::dev::IFrameGrabber::getRawBuffer
virtual bool getRawBuffer(unsigned char *buffer)=0
Get the raw buffer from the frame grabber.
VOCAB_DRSETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRSETOPM
Definition: FrameGrabberInterfaces.h:146
yarp::dev::IFrameGrabberControls::hasAuto
virtual bool hasAuto(int feature, bool *hasAuto)=0
Check if the requested feature has the 'auto' mode.
yarp::dev::IFrameGrabberImage::getImageCrop
virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is ...
Definition: FrameGrabberInterfaces.h:272
yarp::dev::IFrameGrabberControlsDC1394::getTransmissionDC1394
virtual bool getTransmissionDC1394()=0
yarp::dev::IFrameGrabberImageRaw::height
virtual int height() const =0
Return the height of each frame.
cameraFeature_id_t
cameraFeature_id_t
Definition: FrameGrabberInterfaces.h:84
yarp::dev::IFrameGrabberControlsDC1394::getISOSpeedDC1394
virtual unsigned int getISOSpeedDC1394()=0
VOCAB_DRSETVAL
constexpr yarp::conf::vocab32_t VOCAB_DRSETVAL
Definition: FrameGrabberInterfaces.h:117
yarp::dev::IFrameGrabberControls
Control interface for frame grabber devices.
Definition: FrameGrabberInterfaces.h:365
YARP_FEATURE_OPTICAL_FILTER
@ YARP_FEATURE_OPTICAL_FILTER
Definition: FrameGrabberInterfaces.h:105
VOCAB_DRGETMSK
constexpr yarp::conf::vocab32_t VOCAB_DRGETMSK
Definition: FrameGrabberInterfaces.h:130
cropType_id_t
cropType_id_t
Definition: FrameGrabberInterfaces.h:77
VOCAB_DRGETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRGETTXM
Definition: FrameGrabberInterfaces.h:149
yarp::dev::IFrameGrabberControlsDC1394::getVideoModeMaskDC1394
virtual unsigned int getVideoModeMaskDC1394()=0
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
VOCAB_MANUAL
constexpr yarp::conf::vocab32_t VOCAB_MANUAL
Definition: FrameGrabberInterfaces.h:71
YARP_FEATURE_TILT
@ YARP_FEATURE_TILT
Definition: FrameGrabberInterfaces.h:104
VOCAB_DRGETMOD
constexpr yarp::conf::vocab32_t VOCAB_DRGETMOD
Definition: FrameGrabberInterfaces.h:126
yarp::dev::IFrameGrabberRgb::height
virtual int height() const =0
Return the height of each frame.
BUS_UNKNOWN
@ BUS_UNKNOWN
Definition: FrameGrabberInterfaces.h:24
YARP_FEATURE_SHUTTER
@ YARP_FEATURE_SHUTTER
Definition: FrameGrabberInterfaces.h:93
yarp::dev::IFrameGrabberControls::getMode
virtual bool getMode(int feature, FeatureMode *mode)=0
Get the current mode for the feature.
Image.h
VOCAB_DRGETF7M
constexpr yarp::conf::vocab32_t VOCAB_DRGETF7M
Definition: FrameGrabberInterfaces.h:143
YARP_FEATURE_BRIGHTNESS
@ YARP_FEATURE_BRIGHTNESS
Definition: FrameGrabberInterfaces.h:86
VOCAB_DRSETDEF
constexpr yarp::conf::vocab32_t VOCAB_DRSETDEF
Definition: FrameGrabberInterfaces.h:153
MODE_MANUAL
@ MODE_MANUAL
Definition: FrameGrabberInterfaces.h:31
VOCAB_AUTO
constexpr yarp::conf::vocab32_t VOCAB_AUTO
Definition: FrameGrabberInterfaces.h:70
YARP_FEATURE_GAMMA
@ YARP_FEATURE_GAMMA
Definition: FrameGrabberInterfaces.h:92
VOCAB_DRSETBCS
constexpr yarp::conf::vocab32_t VOCAB_DRSETBCS
Definition: FrameGrabberInterfaces.h:152
VOCAB_DRHASFEA
constexpr yarp::conf::vocab32_t VOCAB_DRHASFEA
Definition: FrameGrabberInterfaces.h:116
YARP_DEPRECATED_MSG
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2883
VOCAB_CROP
constexpr yarp::conf::vocab32_t VOCAB_CROP
Definition: FrameGrabberInterfaces.h:62
FeatureMode
FeatureMode
Definition: FrameGrabberInterfaces.h:29
yarp::dev::IFrameGrabberControlsDC1394::setResetDC1394
virtual bool setResetDC1394()=0
yarp::dev::IFrameGrabberControlsDC1394::~IFrameGrabberControlsDC1394
virtual ~IFrameGrabberControlsDC1394()
Definition: FrameGrabberInterfaces.h:716
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
VOCAB_MODE
constexpr yarp::conf::vocab32_t VOCAB_MODE
Definition: FrameGrabberInterfaces.h:74
yarp::dev::IFrameGrabberControlsDC1394::getFormat7WindowDC1394
virtual bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)=0
VOCAB_DRGETBPP
constexpr yarp::conf::vocab32_t VOCAB_DRGETBPP
Definition: FrameGrabberInterfaces.h:158
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
VOCAB_DRHASMAN
constexpr yarp::conf::vocab32_t VOCAB_DRHASMAN
Definition: FrameGrabberInterfaces.h:122
yarp::dev::IFrameGrabberControlsDC1394::getFormat7MaxWindowDC1394
virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)=0
Vocab.h
yarp::dev::IFrameGrabber::~IFrameGrabber
virtual ~IFrameGrabber()
Definition: FrameGrabberInterfaces.h:171
YARP_FEATURE_TRIGGER_DELAY
@ YARP_FEATURE_TRIGGER_DELAY
Definition: FrameGrabberInterfaces.h:99
VOCAB_DRSETWHB
constexpr yarp::conf::vocab32_t VOCAB_DRSETWHB
Definition: FrameGrabberInterfaces.h:141
yarp::dev::IFrameGrabberControlsDC1394::setDefaultsDC1394
virtual bool setDefaultsDC1394()=0
yarp::dev::IFrameGrabberControlsDC1394::setBytesPerPacketDC1394
virtual bool setBytesPerPacketDC1394(unsigned int bpp)=0
yarp::dev::IFrameGrabberControls::hasOnePush
virtual bool hasOnePush(int feature, bool *hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
yarp::dev::IFrameGrabberImage::height
virtual int height() const =0
Return the height of each frame.
yarp::dev::IFrameGrabberControlsDC1394
Definition: FrameGrabberInterfaces.h:714
yarp::dev::IFrameGrabberControlsDC1394::setPowerDC1394
virtual bool setPowerDC1394(bool onoff)=0
BUS_FIREWIRE
@ BUS_FIREWIRE
Definition: FrameGrabberInterfaces.h:25
yarp::dev::IFrameGrabberImageRaw::~IFrameGrabberImageRaw
virtual ~IFrameGrabberImageRaw()
Destructor.
Definition: FrameGrabberInterfaces.h:298
yarp::dev::IFrameGrabberImage::~IFrameGrabberImage
virtual ~IFrameGrabberImage()
Destructor.
Definition: FrameGrabberInterfaces.h:246
yarp::dev::IFrameGrabberControls::setOnePush
virtual bool setOnePush(int feature)=0
Set the requested feature to a value (saturation, brightness ...
VOCAB_DRHASACT
constexpr yarp::conf::vocab32_t VOCAB_DRHASACT
Definition: FrameGrabberInterfaces.h:119
YARP_FEATURE_EXPOSURE
@ YARP_FEATURE_EXPOSURE
Definition: FrameGrabberInterfaces.h:87
yarp::dev::IFrameGrabberControlsDC1394::getColorCodingMaskDC1394
virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)=0
yarp::dev::IFrameGrabberImage::width
virtual int width() const =0
Return the width of each frame.
VOCAB_DRSETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRSETWF7
Definition: FrameGrabberInterfaces.h:145
YARP_FEATURE_SHARPNESS
@ YARP_FEATURE_SHARPNESS
Definition: FrameGrabberInterfaces.h:88
VOCAB_HUE
constexpr yarp::conf::vocab32_t VOCAB_HUE
Definition: FrameGrabberInterfaces.h:54
yarp::dev::IFrameGrabberControls::~IFrameGrabberControls
virtual ~IFrameGrabberControls()
Destructor.
Definition: FrameGrabberInterfaces.h:370
BUS_USB
@ BUS_USB
Definition: FrameGrabberInterfaces.h:26
YARP_FEATURE_TEMPERATURE
@ YARP_FEATURE_TEMPERATURE
Definition: FrameGrabberInterfaces.h:97
yarp::dev::IFrameGrabber::width
virtual int width() const =0
Return the width of each frame.
VOCAB_FEATURE
constexpr yarp::conf::vocab32_t VOCAB_FEATURE
Definition: FrameGrabberInterfaces.h:67
FrameGrabberControl2.h
define common interfaces to discover remote camera capabilities
api.h
VOCAB_DRSETACT
constexpr yarp::conf::vocab32_t VOCAB_DRSETACT
Definition: FrameGrabberInterfaces.h:120
yarp::dev::IFrameGrabberControls::hasOnOff
virtual bool hasOnOff(int feature, bool *HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
VOCAB_DRSETRST
constexpr yarp::conf::vocab32_t VOCAB_DRSETRST
Definition: FrameGrabberInterfaces.h:154
yarp::dev::IFrameGrabberControls::setActive
virtual bool setActive(int feature, bool onoff)=0
Set the requested feature on or off.
YARP_FEATURE_FRAME_RATE
@ YARP_FEATURE_FRAME_RATE
Definition: FrameGrabberInterfaces.h:101
YARP_FEATURE_CAPTURE_SIZE
@ YARP_FEATURE_CAPTURE_SIZE
Definition: FrameGrabberInterfaces.h:106
VOCAB_FRAMEGRABBER_CONTROL_DC1394
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL_DC1394
Definition: FrameGrabberInterfaces.h:64
VOCAB_DRSETONP
constexpr yarp::conf::vocab32_t VOCAB_DRSETONP
Definition: FrameGrabberInterfaces.h:127
yarp::dev::IFrameGrabberRgb
RGB Interface to a FrameGrabber device.
Definition: FrameGrabberInterfaces.h:210
VOCAB_GAIN
constexpr yarp::conf::vocab32_t VOCAB_GAIN
Definition: FrameGrabberInterfaces.h:58