35 #ifndef UEYE_CAMERA_H_ 36 #define UEYE_CAMERA_H_ 41 #include <boost/function.hpp> 42 #include <boost/thread.hpp> 51 std::runtime_error(msg), error_code(code)
60 YUV = IS_CM_UYVY_PACKED,
98 static bool checkVersion(
int &major,
int &minor,
int &build,
const char *&expected);
99 int getNumberOfCameras()
const;
100 unsigned int getSerialNumberList(std::vector<unsigned int>& serial, std::vector<unsigned int>& dev_id);
101 bool openCameraCamId(
unsigned int id);
102 bool openCameraDevId(
unsigned int id);
103 bool openCameraSerNo(
unsigned int serial_number);
105 static const char* colorModeToString(
uEyeColor mode);
112 int getWidth()
const {
return cam_info_.nMaxWidth / zoom_; }
113 int getHeight()
const {
return cam_info_.nMaxHeight / zoom_; }
117 double getExposure();
122 unsigned int getHardwareGain();
128 void setAutoExposure(
bool *enable);
129 void setExposure(
double *time_ms);
130 void setHardwareGamma(
bool *enable);
131 void setZoom(
int *zoom);
132 void setPixelClock(
int *MHz);
133 void setFrameRate(
double *rate);
134 void setGainBoost(
bool *enable);
135 void setAutoGain(
bool *enable);
136 void setHardwareGain(
int *gain);
138 void setFlashWithGlobalParams(
FlashMode mode);
139 void setFlash(
FlashMode mode,
int delay_usec,
unsigned int duration_usec);
141 void setTriggerDelay(
int delay_usec);
146 void startVideoCapture(CamCaptureCB);
147 void stopVideoCapture();
153 INT err2 = IS_SUCCESS;
155 if (err != IS_SUCCESS) {
157 is_GetError(cam_, &err2, &msg);
158 if (err2 != IS_SUCCESS) {
166 void initPrivateVariables();
167 int getSubsampleParam(
int *scale);
168 int getBinningParam(
int *scale);
169 void flashUpdateGlobalParams();
173 void initMemoryPool(
int size);
174 void destroyMemoryPool();
175 void captureThread(CamCaptureCB callback);
176 void restartVideoCapture();
boost::function< void(const char *, size_t)> CamCaptureCB
std::vector< char * > img_mem_
volatile bool stop_capture_
unsigned int getCameraSerialNo() const
bool flash_global_params_
const char * getCameraName() const
bool getGainBoost() const
bool getAutoExposure() const
uEyeException(int code, const char *msg)
std::vector< int > img_mem_id_
int getPixelClock() const
uEyeColor getColorMode() const
bool getHardwareGamma() const
void checkError(INT err) const
unsigned int serial_number_
CamCaptureCB stream_callback_