48 #ifndef UEYE_CAM_DRIVER_HPP_ 49 #define UEYE_CAM_DRIVER_HPP_ 62 #define CAP(val, min, max) \ 65 } else if (val > max) { \ 69 #define IS_SUBSAMPLING_2X (IS_SUBSAMPLING_2X_VERTICAL | IS_SUBSAMPLING_2X_HORIZONTAL) 70 #define IS_SUBSAMPLING_4X (IS_SUBSAMPLING_4X_VERTICAL | IS_SUBSAMPLING_4X_HORIZONTAL) 71 #define IS_SUBSAMPLING_8X (IS_SUBSAMPLING_8X_VERTICAL | IS_SUBSAMPLING_8X_HORIZONTAL) 72 #define IS_SUBSAMPLING_16X (IS_SUBSAMPLING_16X_VERTICAL | IS_SUBSAMPLING_16X_HORIZONTAL) 74 #define IS_BINNING_2X (IS_BINNING_2X_VERTICAL | IS_BINNING_2X_HORIZONTAL) 75 #define IS_BINNING_4X (IS_BINNING_4X_VERTICAL | IS_BINNING_4X_HORIZONTAL) 76 #define IS_BINNING_8X (IS_BINNING_8X_VERTICAL | IS_BINNING_8X_HORIZONTAL) 77 #define IS_BINNING_16X (IS_BINNING_16X_VERTICAL | IS_BINNING_16X_HORIZONTAL) 91 UEyeCamDriver(
int cam_ID = ANY_CAMERA, std::string cam_name =
"camera");
122 INT
loadCamConfig(std::string filename,
bool ignore_load_failure =
true);
137 INT
setColorMode(std::string& mode,
bool reallocate_buffer =
true);
157 INT
setResolution(INT& image_width, INT& image_height, INT& image_left,
158 INT& image_top,
bool reallocate_buffer =
true);
182 INT
setBinning(
int& rate,
bool reallocate_buffer =
true);
213 INT
setGain(
bool& auto_gain, INT& master_gain_prc, INT& red_gain_prc,
214 INT& green_gain_prc, INT& blue_gain_prc,
bool& gain_boost);
239 INT
setExposure(
bool& auto_exposure,
double& auto_exposure_reference,
double& exposure_ms);
252 INT
setWhiteBalance(
bool& auto_white_balance, INT& red_offset, INT& blue_offset);
268 INT
setFrameRate(
bool& auto_frame_rate,
double& frame_rate_hz);
300 INT
setGpioMode(
const INT& gpio, INT& mode,
double& pwm_freq,
double& pwm_duty_cycle);
382 (is_SetExternalTrigger(
cam_handle_, IS_GET_EXTERNALTRIGGER) == IS_SET_TRIGGER_OFF) &&
383 (is_CaptureVideo(
cam_handle_, IS_GET_LIVE) == TRUE));
388 (is_SetExternalTrigger(
cam_handle_, IS_GET_EXTERNALTRIGGER) == IS_SET_TRIGGER_HI_LO) &&
389 (is_CaptureVideo(
cam_handle_, IS_GET_LIVE) == TRUE));
394 (is_CaptureVideo(
cam_handle_, IS_GET_LIVE) == TRUE));
400 const static char*
err2str(INT error);
432 const static std::function<void*(void*, void*, size_t)>
getUnpackCopyFunc(INT color_mode);
433 static void*
unpackRGB10(
void* dst,
void* src,
size_t num);
434 static void*
unpack10u(
void* dst,
void* src,
size_t num);
435 static void*
unpack12u(
void* dst,
void* src,
size_t num);
467 virtual INT
syncCamConfig(std::string dft_mode_str =
"mono8");
virtual INT connectCam(int new_cam_ID=-1)
static void * unpackRGB10(void *dst, void *src, size_t num)
const char * processNextFrame(UINT timeout_ms)
INT setExposure(bool &auto_exposure, double &auto_exposure_reference, double &exposure_ms)
static const std::string colormode2name(INT mode)
static const std::function< void *(void *, void *, size_t)> getUnpackCopyFunc(INT color_mode)
INT setMirrorLeftRight(bool flip_vertical)
virtual void handleTimeout()
static constexpr int ANY_CAMERA
INT setFlashParams(INT &delay_us, UINT &duration_us)
bool getTimestamp(UEYETIME *timestamp)
SENSORINFO cam_sensor_info_
INT setGpioMode(const INT &gpio, INT &mode, double &pwm_freq, double &pwm_duty_cycle)
INT setWhiteBalance(bool &auto_white_balance, INT &red_offset, INT &blue_offset)
bool extTriggerModeActive()
INT setColorMode(std::string &mode, bool reallocate_buffer=true)
INT setMirrorUpsideDown(bool flip_horizontal)
static bool isSupportedColorMode(INT mode)
INT setSensorScaling(double &rate, bool reallocate_buffer=true)
INT setPixelClockRate(INT &clock_rate_mhz)
static INT name2colormode(const std::string &name)
static const char * err2str(INT error)
unsigned int cam_subsampling_rate_
INT setSubsampling(int &rate, bool reallocate_buffer=true)
double cam_sensor_scaling_rate_
INT setResolution(INT &image_width, INT &image_height, INT &image_left, INT &image_top, bool reallocate_buffer=true)
static const char * colormode2str(INT mode)
virtual INT syncCamConfig(std::string dft_mode_str="mono8")
static const std::string colormode2img_enc(INT mode)
virtual INT disconnectCam()
INT setBinning(int &rate, bool reallocate_buffer=true)
INT setFrameRate(bool &auto_frame_rate, double &frame_rate_hz)
unsigned int cam_binning_rate_
UEyeCamDriver(int cam_ID=ANY_CAMERA, std::string cam_name="camera")
static INT colormode2bpp(INT mode)
static void * unpack10u(void *dst, void *src, size_t num)
unsigned int cam_buffer_size_
static void * unpack12u(void *dst, void *src, size_t num)
static const std::map< std::string, INT > COLOR_DICTIONARY
INT reallocateCamBuffer()
bool getClockTick(uint64_t *tick)
INT setSoftwareGamma(INT &software_gamma)
INT loadCamConfig(std::string filename, bool ignore_load_failure=true)
INT setGain(bool &auto_gain, INT &master_gain_prc, INT &red_gain_prc, INT &green_gain_prc, INT &blue_gain_prc, bool &gain_boost)