Wrapper for optris driver and image processing library. More...
#include <PIImager.h>
Public Member Functions | |
| int | acquire (unsigned short *buffer) |
| char * | checkCalibration (unsigned long serial) |
| void | forceFlagEvent () |
| bool | getAutoFlag () |
| int | getEnergyBuffer (unsigned short *buffer) |
| int | getFrame (unsigned char *buffer) |
| float | getFramerate () |
| unsigned int | getHeight () |
| float | getMaxFramerate () |
| int | getMetaData (unsigned char *buffer, int size) |
| unsigned int | getRawBufferSize () |
| unsigned long | getSerial () |
| float | getTempBox () |
| float | getTempChip () |
| int | getTemperatureRangeMax () |
| int | getTemperatureRangeMin () |
| float | getTempFlag () |
| unsigned int | getVisibleHeight () |
| unsigned int | getVisibleWidth () |
| unsigned int | getWidth () |
| bool | hasBispectralTechnology () |
| void | init (const char *v4lPath, unsigned long serial, EnumControlInterface controller, int fov, int tMin, int tMax, float framerate, EnumOutputMode mode, int bispectral) |
| bool | isFlagOpen () |
| bool | isOpen () |
| void | onThermalFrame (unsigned short *buffer) |
| void | onThermalFrameInit (unsigned int width, unsigned int height) |
| void | onVisibleFrame (unsigned char *buffer) |
| void | onVisibleFrameInit (unsigned int width, unsigned int height) |
| PIImager (const char *xmlConfig) | |
| PIImager () | |
| void | process (unsigned char *buffer) |
| int | readControl (unsigned int id, int *value) |
| void | releaseFrame () |
| void | setAutoFlag (bool flag) |
| void | setFrameCallback (fptrOptrisFrame callback) |
| void | setVisibleFrameCallback (fptrOptrisVisibleFrame callback) |
| bool | startStreaming () |
| int | writeControl (unsigned int id, int value) |
| ~PIImager () | |
Private Attributes | |
| bool | _autoFlag |
| int | _bispectral |
| unsigned short * | _buffer |
| unsigned char * | _bufferVisible |
| fptrOptrisFrame | _cbFrame |
| fptrOptrisVisibleFrame | _cbVisibleFrame |
| EnumControlInterface | _controller |
| int | _fov |
| float | _framerate |
| unsigned int | _heightIn |
| unsigned int | _heightOut |
| unsigned int | _heightOutVisible |
| bool | _init |
| bool | _manualFlag |
| float | _maxFramerate |
| int | _outputmode |
| unsigned long | _serial |
| float | _tBox |
| float | _tChip |
| float | _tFlag |
| int | _tMax |
| int | _tMin |
| const char * | _v4lPath |
| unsigned int | _widthIn |
| unsigned int | _widthOut |
| unsigned int | _widthOutVisible |
Wrapper for optris driver and image processing library.
Definition at line 32 of file PIImager.h.
| optris::PIImager::PIImager | ( | const char * | xmlConfig | ) |
Standard constructor
| [in] | path | Path to XML-configuration file |
Standard constructor (Empty -> see comment of init routine)
Destructor
| int optris::PIImager::acquire | ( | unsigned short * | buffer | ) |
Get thermal image (Temperature can be calculated with ((float)val-1000.f)/10.f)
| [out] | Output | buffer (needs to be allocated outside having the size of getWidth()*getHeight()) |
| char* optris::PIImager::checkCalibration | ( | unsigned long | serial | ) |
Check existence of calibration file set
| [in] | serial | Serial number to be checked |
| void optris::PIImager::forceFlagEvent | ( | ) |
Force shutter flag event manually (close/open cycle)
| bool optris::PIImager::getAutoFlag | ( | ) |
Access automatic flag activation state
| int optris::PIImager::getEnergyBuffer | ( | unsigned short * | buffer | ) |
Get energy buffer of previously acquired frame
| [out] | Output | buffer (needs to be allocated outside having the size of getWidth()*getHeight()) |
| int optris::PIImager::getFrame | ( | unsigned char * | buffer | ) |
Get raw image (needs to be processed to obtain thermal data)
| [out] | buffer | Output buffer (needs to be allocated outside having the size of getRawBufferSize()) |
| float optris::PIImager::getFramerate | ( | ) |
Get configured frame rate return frame rate (in frames/second)
| unsigned int optris::PIImager::getHeight | ( | ) |
Get image height of thermal channel
| float optris::PIImager::getMaxFramerate | ( | ) |
Get maximum frame rate of device return frame rate (in frames/second)
| int optris::PIImager::getMetaData | ( | unsigned char * | buffer, |
| int | size | ||
| ) |
Get meta data container of previously acquired frame
| [out] | Output | buffer |
| [in] | size | Size of buffer in bytes |
| unsigned int optris::PIImager::getRawBufferSize | ( | ) |
Get raw image size (includes meta data)
| unsigned long optris::PIImager::getSerial | ( | ) |
Get serial number of device
| float optris::PIImager::getTempBox | ( | ) |
Get temperature of housing
| float optris::PIImager::getTempChip | ( | ) |
Get temperature of chip
Get upper limit of temperature range
Get lower limit of temperature range
| float optris::PIImager::getTempFlag | ( | ) |
Get temperature of shutter flag
| unsigned int optris::PIImager::getVisibleHeight | ( | ) |
Get image height of visible channel (if available)
| unsigned int optris::PIImager::getVisibleWidth | ( | ) |
Get image width of visible channel (if available)
| unsigned int optris::PIImager::getWidth | ( | ) |
Get image width of thermal channel
Check if bispectral technology is available
| void optris::PIImager::init | ( | const char * | v4lPath, |
| unsigned long | serial, | ||
| EnumControlInterface | controller, | ||
| int | fov, | ||
| int | tMin, | ||
| int | tMax, | ||
| float | framerate, | ||
| EnumOutputMode | mode, | ||
| int | bispectral | ||
| ) |
Initializing routine, to be called if empty constructor was chosen to instantiate device
| [in] | v4lPath | video4Linux device path |
| [in] | serial | Serial number (if set to 0, the device is tried to be automatically detected |
| [in] | controller | BaseControlInterface, i.e., HID or UVC |
| [in] | fov | Field of view of optics |
| [in] | tMin | Minimum temperature (cf. valid temperature ranges) |
| [in] | tMax | Maximum temperature (cf. valid temperature ranges) |
| [in] | framerate | Desired framerate (must be less or equal than the camera's framerate) |
| [in] | mode | Streaming output mode, i.e., energy data or temperature data |
| [in] | bispectral | 1, if bispectral technology is available (only PI200/PI230) and should be used, else 0 |
| bool optris::PIImager::isFlagOpen | ( | ) |
Check if shutter flag is open
| bool optris::PIImager::isOpen | ( | ) |
Check for opened device
| void optris::PIImager::onThermalFrame | ( | unsigned short * | buffer | ) |
Internal method not to be used from any application!
| void optris::PIImager::onThermalFrameInit | ( | unsigned int | width, |
| unsigned int | height | ||
| ) |
Internal method not to be used from any application!
| void optris::PIImager::onVisibleFrame | ( | unsigned char * | buffer | ) |
Internal method not to be used from any application!
| void optris::PIImager::onVisibleFrameInit | ( | unsigned int | width, |
| unsigned int | height | ||
| ) |
Internal method not to be used from any application!
| void optris::PIImager::process | ( | unsigned char * | buffer | ) |
Process raw data
| [in] | buffer | Raw data acquired with getFrame() |
| int optris::PIImager::readControl | ( | unsigned int | id, |
| int * | value | ||
| ) |
Internal method to communicate with uvc device
| void optris::PIImager::releaseFrame | ( | ) |
Release frame bound with getFrame of acquire method (needs to be called within the grabbing loop)
| void optris::PIImager::setAutoFlag | ( | bool | flag | ) |
Set automatic flag activation state. Disabling will prevent camera from getting freezed frequently for several frames. But temperature data might deviate too much.
| [in] | flag | Autmatic flag activation state |
| void optris::PIImager::setFrameCallback | ( | fptrOptrisFrame | callback | ) |
Set callback function to be called for new frames
| [in] | callback | Pointer to callback function for thermal channel |
| void optris::PIImager::setVisibleFrameCallback | ( | fptrOptrisVisibleFrame | callback | ) |
Set callback function to be called for new frames
| [in] | callback | Pointer to callback function for visible channel |
| bool optris::PIImager::startStreaming | ( | ) |
Start UVC data streaming
| int optris::PIImager::writeControl | ( | unsigned int | id, |
| int | value | ||
| ) |
Internal method to communicate with uvc device
bool optris::PIImager::_autoFlag [private] |
Definition at line 317 of file PIImager.h.
int optris::PIImager::_bispectral [private] |
Definition at line 327 of file PIImager.h.
unsigned short* optris::PIImager::_buffer [private] |
Definition at line 287 of file PIImager.h.
unsigned char* optris::PIImager::_bufferVisible [private] |
Definition at line 293 of file PIImager.h.
fptrOptrisFrame optris::PIImager::_cbFrame [private] |
Definition at line 295 of file PIImager.h.
Definition at line 297 of file PIImager.h.
Definition at line 315 of file PIImager.h.
int optris::PIImager::_fov [private] |
Definition at line 299 of file PIImager.h.
float optris::PIImager::_framerate [private] |
Definition at line 305 of file PIImager.h.
unsigned int optris::PIImager::_heightIn [private] |
Definition at line 281 of file PIImager.h.
unsigned int optris::PIImager::_heightOut [private] |
Definition at line 285 of file PIImager.h.
unsigned int optris::PIImager::_heightOutVisible [private] |
Definition at line 291 of file PIImager.h.
bool optris::PIImager::_init [private] |
Definition at line 277 of file PIImager.h.
bool optris::PIImager::_manualFlag [private] |
Definition at line 319 of file PIImager.h.
float optris::PIImager::_maxFramerate [private] |
Definition at line 307 of file PIImager.h.
int optris::PIImager::_outputmode [private] |
Definition at line 309 of file PIImager.h.
unsigned long optris::PIImager::_serial [private] |
Definition at line 311 of file PIImager.h.
float optris::PIImager::_tBox [private] |
Definition at line 321 of file PIImager.h.
float optris::PIImager::_tChip [private] |
Definition at line 323 of file PIImager.h.
float optris::PIImager::_tFlag [private] |
Definition at line 325 of file PIImager.h.
int optris::PIImager::_tMax [private] |
Definition at line 303 of file PIImager.h.
int optris::PIImager::_tMin [private] |
Definition at line 301 of file PIImager.h.
const char* optris::PIImager::_v4lPath [private] |
Definition at line 313 of file PIImager.h.
unsigned int optris::PIImager::_widthIn [private] |
Definition at line 279 of file PIImager.h.
unsigned int optris::PIImager::_widthOut [private] |
Definition at line 283 of file PIImager.h.
unsigned int optris::PIImager::_widthOutVisible [private] |
Definition at line 289 of file PIImager.h.