libirimager
IR Imager Direct-SDK
Migration Guide

API Changes for IR Imager Direct SDK From Version 6.0.* to Version 7.0.0

  • IRImagerClient.h
    • virtual void onThermalFrameEvent(unsigned short* thermal, unsigned short* energy, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void* arg)
      -> virtual void onThermalFrameEvent(unsigned short* thermal, unsigned short* energy, unsigned int w, unsigned int h, IRFrameMetadata meta,const IRArray<IREventData>& events, void* arg)
    • virtual void onVisibleFrameEvent(unsigned char* data, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void* arg)
      -> virtual void onVisibleFrameEvent(unsigned char* data, unsigned int w, unsigned int h, IRFrameMetadata meta, const IRArray<IREventData>& events, void* arg)
  • IRImager.h
    • setThermalFrameEventCallback:
      • typedef void(__CALLCONV * fptrIRThermalSnapshot)(unsigned short* thermal, unsigned short* energy, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void* arg)
        -> typedef void(__CALLCONV * fptrIRThermalSnapshot)(unsigned short* thermal, unsigned short* energy, unsigned int w, unsigned int h, IRFrameMetadata meta, const IRArray<IREventData>& events, void* arg)
    • setVisibleFrameEventCallback:
      • typedef void(__CALLCONV * fptrIRVisibleSnapshot)(unsigned char* data, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void* arg)
        -> typedef void(__CALLCONV * fptrIRVisibleSnapshot)(unsigned char* data, unsigned int w, unsigned int h, IRFrameMetadata meta, const IRArray<IREventData>& events, void* arg)

API Changes for IR Imager Direct SDK From Version 5.0.0 to Version 6.0.0

Only on Windows:

  • IRDeviceDS –> IRDevice
  • IRDeviceDS* dev = IRDeviceDS::createInstance(...) –> IRDevice* dev = IRDevice::IRCreateDevice(params);
  • Polling evo::IRDeviceError result = dev->getFrame() is now necessary for receiving new frames (see examples)

API Changes for IR Imager Direct SDK From Version 4.1.1 to Version 5.0.0

  • Callback onVisibleFrameEvent: Add std::vector<IREventData> events –> onVisibleFrameEvent(unsigned char *data, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void *arg)
  • Callback onThermalFrameEvent: Add std::vector<IREventData> events –> onThermalFrameEvent(unsigned short *thermal, unsigned short *energy, unsigned int w, unsigned int h, IRFrameMetadata meta, std::vector<IREventData> events, void *arg)
  • Replace unsupported XML-Config values through following code
    • <pif_in_mode>0</pif_in_mode> <!– 0=Image capture (default)–>

      //Get initialized pif config
      IRPifConfig pifConfig = imager.getPifConfig();
      if(pifConfig.ChannelsDI.size() > 0)
      {
        pifConfig.ChannelsDI[0].Mode = IRChannelInputMode::SnapshotOnEdge; //Trigger only on change
        pifConfig.ChannelsDI[0].IsLowActive = true; //Trigger on false
      }
      //Set pif config for apply new configuration
      imager.setPifConfig(pifConfig);


    • <pif_in_mode>1</pif_in_mode> <!– 1=Flag control –>

      //Get initialized pif config
      IRPifConfig pifConfig = imager.getPifConfig();
      if(pifConfig.ChannelsDI.size() > 0)
      {
        pifConfig.ChannelsDI[0].IsLowActive = true; //Invert, to close flag on true
        pifConfig.FlagOpenInputChannel = pifConfig.ChannelsDI[0]; //Set which channel controls flag
      }
      //Set pif config for apply new configuration
      imager.setPifConfig(pifConfig);


    • <pif_out_mode>1</pif_out_mode> <!– 0=Off (default), 1=Frame sync signal -—>
      <pif_out_voltage>5000</pif_out_voltage> <!– PIF out voltage in mV –>


      //Get initialized pif config
      IRPifConfig pifConfig = imager.getPifConfig();
      if(pifConfig.ChannelsAO.size() > 0)
      {
        pifConfig.ChannelsAO[0].AnalogMode = IRChannelAnalogOutputMode::Range_0V_10V; //set to voltage output, not all pif devices support this!
        pifConfig.FrameSyncOutput.Channel = pifConfig.ChannelsAO[0]; //Set channel for FrameSync output
        pifConfig.FrameSyncOutput.AnalogValue = 5; //set output voltage to 5V
      }
      //Set pif config for apply new configuration
      imager.setPifConfig(pifConfig);


API Changes for IR Imager Direct SDK From Version 3.0.2 to Version 4.0.0

  • need libusb-1.0
  • imager.getRawBufferSize() –> dev->getRawBufferSize()
  • IRDeviceUVC –> IRDevice
  • IRDeviceUVC* dev = IRDeviceUVC::createInstance(...) –> IRDevice* dev = IRDevice::IRCreateDevice(params);
  • IRDeviceFile –> not supported anymore

API Changes for IR Imager Direct SDK From Version 2.1.1 (and 2.0.9) to Version 3.0.0

New Parameter (useHID) in imager init/reconnect function:
2.1.1: imager.init(&params, dev->getFrequency(), dev->getWidth(), dev->getHeight());
2.1.1: imager->reconnect(&params, dev->getFrequency(), dev->getWidth(), dev->getHeight());

3.0.0: imager.init(&params, dev->getFrequency(), dev->getWidth(), dev->getHeight(), dev->controlledViaHID());
3.0.0: imager->reconnect(&params, dev->getFrequency(), dev->getWidth(), dev->getHeight(), dev->controlledViaHID());

Need c++11 to build oop example:
2.1.1: oop/CMakeLists.txt: SET(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0")
3.0.0: oop/CMakeLists.txt: SET(CMAKE_CXX_FLAGS "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0")

Need to implement pure virtual method void IRImagerClient::onProcessExit(void* arg) for IRImagerHandler.

New parameter for onThermalFrameEvent callback (energy values array):
2.1.1: void onThermalFrameEvent(unsigned short* thermal, unsigned int w, unsigned int h, IRFrameMetadata meta, void* arg)
3.0.0: void onThermalFrameEvent(unsigned short* thermal, unsigned short* energy, unsigned int w, unsigned int h, IRFrameMetadata meta, void* arg)

Serialize Function moves from imager to iBuilder:
2.1.1: _imager->serialize(file.c_str(), (char*)ppm, size); 3.0.0: _iBuilder.serializePPM(file.c_str(), ppm, _iBuilder.getStride(), height);

Calling convention directbinding: 2.1.1: stdcall 3.0.0: cdecl