17#include "IRDeviceParams.h"
18#include "IRImagerClient.h"
20#include "irdirectsdk_defs.h"
21#include "IRCommonTypes.h"
22#include "pif_config/IRPifConfig.h"
24#if(_WIN32 & _MSC_VER <= 1700)
25typedef signed char int8_t;
26typedef signed short int16_t;
27typedef signed int int32_t;
28typedef unsigned char uint8_t;
29typedef unsigned short uint16_t;
30typedef unsigned int uint32_t;
31typedef signed long long int64_t;
32typedef unsigned long long uint64_t;
37class BaseControlDevice;
44#define GPSBUFFERSIZE 80
45#define HEADERVERSION 1003
55 uint16_t sizeOfHeader;
56 uint16_t headerVersion;
63 int64_t avgTimePerFrame;
65 uint16_t tempMinRange;
66 uint16_t tempMaxRange;
69 uint16_t gpsStringBufferSize;
70 uint16_t devFrequency;
83typedef void(__CALLCONV *fptrIRThermalFrame)(
unsigned short* data,
unsigned int w,
unsigned int h,
IRFrameMetadata meta,
void* arg);
93typedef void(__CALLCONV *fptrIRVisibleFrame)(
unsigned char* data,
unsigned int w,
unsigned int h,
IRFrameMetadata meta,
void* arg);
118typedef void(__CALLCONV *fptrIRThermalSnapshot)(
unsigned short* thermal,
unsigned short* energy,
unsigned int w,
unsigned int h,
IRFrameMetadata meta,
const IRArray<IREventData>& events,
void* arg);
125typedef void(__CALLCONV *fptrIRFlagState)(EnumFlagState fs,
void* arg);
131typedef void(__CALLCONV *fptrIRProcessEvent)(
void* arg);
164 bool init(
IRDeviceParams* params,
unsigned int frequency,
unsigned int width,
unsigned int height,
bool useHID,
unsigned short hwRev=0,
unsigned short fwRev=0);
175 bool reconnect(
IRDeviceParams* params,
unsigned int frequency,
unsigned int width,
unsigned int height,
bool useHID,
unsigned short hwRev=0,
unsigned short fwRev=0);
391 void process(
unsigned char* buffer,
void* arg=NULL);
487 void onThermalFrameInit(
unsigned int width,
unsigned int height,
unsigned short bitCount,
long long avgTimePerFrame);
711 void initPifConfig();
713 void checkResult(
long result,
const char* functionName)
const;
715 void onAutoSkimOperation(
int operation);
723 unsigned int _widthIn;
725 unsigned int _heightIn;
727 unsigned int _widthOut;
729 unsigned int _heightOut;
731 long long _avgTimePerFrame;
733 unsigned short _bitCount;
735 unsigned short* _buffer;
737 unsigned short* _bufferEnergy;
739 unsigned int _widthOutVisible;
741 unsigned int _heightOutVisible;
743 unsigned char* _bufferVisible;
745 fptrIRThermalFrame _cbThermalFrame;
747 fptrIRVisibleFrame _cbVisibleFrame;
749 fptrIRFlagState _cbFlag;
751 fptrIRThermalSnapshot _cbThermalSnapshot;
753 fptrIRVisibleSnapshot _cbVisibleSnapshot;
755 fptrIRProcessEvent _cbProcessExit;
761 unsigned int _frequency;
771 float _transmissivity;
777 float _timeToManualEvent;
779 BaseControlDevice* _udev;
781 NewFrameBuffer* _srcBuffer;
783 ImageProcessing* _ip;
785 unsigned int _instanceID;
789 EnumFlagState _eFlagstate;
797 EnumFlagState _eFlagstatePrev;
800 enum Value { SetAutoSkimDirect, WaitAutoSkimDirect, StartFlag, WaitAndStartFlag, WaitForFlagFinished, Finished = 100 };
803 InitState::Value _initState;
805 unsigned short _highPrecisionTempOffset;
C-Array wrapper for handle size, copy and memory.
Definition: IRArray.h:23
Interface for specifying object-oriented frame callback methods.
Definition: IRImagerClient.h:30
Wrapper for PI driver and image processing library.
Definition: IRImager.h:141
unsigned short getBitCount() const
Get # of bits used for temperature coding.
void setPifDO(unsigned char channel, bool value)
Set the Pif Digital Output.
void onVisibleFrameInit(unsigned int width, unsigned int height)
Internal method not to be used by any application!
short getTemprangeDecimal() const
Returns the number of decimal places in thermal data.
bool isFlagOpen() const
Check if shutter flag is open.
const IRFrameMetadata & getLastMetadata()
Returns the last meta data.
unsigned short getPifAICount() const
Get the Pif count of analog input's.
void setClient(IRImagerClient *client)
Set client as callback receiver.
bool init(IRDeviceParams *params, unsigned int frequency, unsigned int width, unsigned int height, bool useHID, unsigned short hwRev=0, unsigned short fwRev=0)
Initializing routine, to be called after instantiation.
bool hasBispectralTechnology() const
Check if bispectral technology is available.
bool setFocusmotorPos(float pos)
Set the position of the focusmotor.
void onVisibleFrame(unsigned char *buffer, IRFrameMetadata meta)
Internal method not to be used by any application!
void setThermalFrameEventCallback(fptrIRThermalSnapshot callback)
Set callback function to be called for PIF or software trigger events.
void setThermalFrameCallback(fptrIRThermalFrame callback)
Set callback function to be called for new frames.
float getFocusmotorPos() const
Get the position of the focusmotor.
double getRadialDistortionCorrFact1() const
Get the first radial distortion correction factor (r^2).
unsigned int getHeight() const
Get image height of thermal channel.
Tchar * checkCalibration()
Check existence of calibration file set.
RadialDistortionCorrectionMode getRadialDistortionCorr()
Get the radial distortion correction mode.
void setAutoFlag(bool autoFlag)
Set flag automatic.
void printTrace(const unsigned int pixelID)
Print trace record (needs to be activated before)
unsigned char getPifDeviceCount(bool actual) const
Get the Pif Device Count.
void forceFlagEvent(float time=0.f)
Force shutter flag event manually (close/open cycle)
void setVisibleFrameEventCallback(fptrIRVisibleSnapshot callback)
Set callback function to be called for PIF or software trigger events.
bool getTemperatureTableParameters(double *t1, double *t3, double *tJunct, short *e1, short *e3, short *eJunct, double *lambda, double *lambda2) const
Get temperature table parameters @params[out] t1 Temperature for 1st operating point @params[out] t3 ...
void setTempChipReference(float t)
Set reference input of bolometer heating (limited to +20° - 55°).
RadialDistortionCorrectionMode
Definition: IRImager.h:587
int getMetaData(unsigned char *buffer, int size) const
Get meta data container of previously acquired frame.
static const char *const getVersion()
Get libirimager version.
void setRadiationParameters(float emissivity, float transmissivity, float tAmbient=-999.f)
Set radiation properties, i.e.
float getTempFlag() const
Get temperature of shutter flag.
unsigned int getWidthIn() const
Get width of raw format (from UVC stream)
float getTempChipReference() const
Get reference input of bolometer heating.
unsigned int getVisibleWidth() const
Get image width of visible channel (if available)
void process(unsigned char *buffer, void *arg=NULL)
Process raw data.
void setFlagMinInterval(float seconds)
Set flag min interval.
void setReferenceTemperature(float referenceTemperature, float measuredTemperature, float tAmbient=-999.f)
Set a reference temperature to a known reference source inside the view of the camera to improve came...
void setRadialDistortionCorrFact1(double value)
Set the first (r^2) radial distortion correction factor (Brown's distortion model).
void enableChipHeating(bool enable)
Enable heating of bolometers.
unsigned short getPifDOCount() const
Get the Pif count of digital output's.
void setRadialDistortionCorrFact2(double value)
Set the second (r^4) radial distortion correction factor (Brown's distortion model).
int getEnergyBuffer(unsigned short *buffer) const
Get energy buffer of previously acquired frame.
void setClippedFormatPosition(Point p)
Set the clipped format position.
bool getAutoFlag() const
Get flag automatic.
void onProcessExit()
Internal method not to be used by any application!
void setFlagStateCallback(fptrIRFlagState callback)
Set callback function to be called for changing flag states.
long long getAvgTimePerFrame() const
Get average time per frame.
void setRadialDistortionCorr(RadialDistortionCorrectionMode value)
Set the radial distortion correction mode.
void setProcessExitCallback(fptrIRProcessEvent callback)
Set callback function to be called when the process method has finalized its work.
unsigned int getHeightIn() const
Get height of raw format (from UVC stream)
IRPifConfig getPifConfig() const
Get the Pif Config object.
void onThermalFrameInit(unsigned int width, unsigned int height, unsigned short bitCount, long long avgTimePerFrame)
Internal method not to be used by any application!
void initRawdataHeader(RawdataHeader &header) const
Initialize Rawdata header with camera specific parameters.
bool setTempRange(int tMin, int tMax)
Set temperature range.
unsigned int getVisibleHeight() const
Get image height of visible channel (if available)
unsigned short getPifDICount() const
Get the Pif count of digital input's.
float getHWInterval() const
Get time interval between hardware frames (camera timestamp)
bool isChipHeatingEnabled() const
Get state of bolometers heating.
Point getClippedFormatPosition() const
Get the clipped format position.
IRImager()
Standard constructor.
IRPifType::Value getPifType() const
Returns the current pif type.
float getFlagMinInterval() const
Get flag min interval.
void raiseSnapshotEvent()
Raise a software triggered snapshot event (comparable with PIF event)
ImageProcessing * getImageProcessingChain()
Get pointer to image processing chain.
float getTempChip() const
Get temperature of chip.
float getFlagMaxInterval() const
Get flag max interval.
void setPifAO(unsigned char channel, float value)
Set the Pif Analog Output.
void setPifConfig(IRPifConfig config)
Set the Pif Config.
void setUseMultiThreading(bool useMultiThreading)
Experimental feature: Use multi-threading to accelerate process call.
void setFlagForecast(bool value)
Enable/Disable the flag forecast.
float getMaxFramerate() const
Get maximum frame rate of device return frame rate (in frames/second)
bool getFlagForecast() const
Returns if flag forecast is enabled/disabled.
void setFlagMaxInterval(float seconds)
Set flag max interval.
unsigned short getPifAOCount() const
Get the Pif count of analog output's.
unsigned int getFWRevision() const
Get firmware revision.
unsigned int getHWRevision() const
Get hardware revision.
float getTempBox() const
Get temperature of housing.
bool reconnect(IRDeviceParams *params, unsigned int frequency, unsigned int width, unsigned int height, bool useHID, unsigned short hwRev=0, unsigned short fwRev=0)
Reconnect resets internal variables and calls init method again.
void setVisibleFrameCallback(fptrIRVisibleFrame callback)
Set callback function to be called for new frames.
void onThermalFrame(unsigned short *buffer, IRFrameMetadata meta)
Internal method not to be used by any application!
void onFlagState(unsigned int flagstate)
Internal method not to be used by any application.
void onSnapshotEvent(unsigned short *thermal, unsigned short *energy, unsigned char *rgb, IRFrameMetadata meta, const IRArray< IREventData > &events)
Internal method not to be used by any application!
void activateTrace(bool activate)
Serialize image.
double getRadialDistortionCorrFact2() const
Get the second radial distortion correction factor (r^4).
IRPifConfig setPifType(IRPifType::Value pifType, unsigned char pifDeviceCount)
Currently only for Xi80.
unsigned int getWidth() const
Get image width of thermal channel.
Time measurement class.
Definition: Timer.h:27
Structure containing device parameters.
Definition: IRDeviceParams.h:125
Config for pif.
Definition: IRPifConfig.h:37
Value
Definition: IRDeviceParams.h:61