Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
pgrsource.h
1 #pragma once
2 
3 #include "videosource.h"
4 
5 
6 namespace iuprivate {
7  class PGRCameraData;
8 }
9 namespace FlyCapture2 {
10  class Error;
11 }
12 
13 
14 namespace iu {
15 
25 class PGRSource : public VideoSource
26 {
27 public:
33  PGRSource(unsigned int camId=0, bool gray=true);
34  virtual ~PGRSource();
35 
42  cv::Mat getImage();
43 
48  unsigned int getWidth() { return width_; }
49 
54  unsigned int getHeight() { return height_; }
55 
60  unsigned int getCurrentFrameNr() { return frameNr_; }
61 
62 
63 private:
64  bool init(unsigned int camId);
65  bool connectToCamera(unsigned int camId);
66  bool startCapture();
67  void grab();
68  void printError(FlyCapture2::Error* error);
69 
70  iuprivate::PGRCameraData* data_;
71  bool gray_;
72 };
73  // end of videoIO
75 
76 
77 } // namespace
78 
79 
The VideoSource class is the abstract base class for video input.
Definition: videosource.h:17
unsigned int getCurrentFrameNr()
get frame index. Upon camera initilaization, the counter is set to 0
Definition: pgrsource.h:60
unsigned int getHeight()
get image height
Definition: pgrsource.h:54
PGRSource(unsigned int camId=0, bool gray=true)
PGRSource constructor. Initialize the camera camId.
unsigned int getWidth()
get image width
Definition: pgrsource.h:48
cv::Mat getImage()
grab a new image from the camera. If a new image is not available, block until there is one...
The PGRSource class reads from PointGrey Firewire cameras.
Definition: pgrsource.h:25