### Install OpenCV on Linux Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Command to install python3-opencv on Linux using apt. ```bash sudo apt install python3-opencv ``` -------------------------------- ### C# Project Setup Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Instructions for setting up C# projects by copying wrapper classes. ```text * `\bindings\csharp\classes` on Windows and in * `/usr/share/otcsdk/csharp/classes` on Linux ``` -------------------------------- ### Install .NET SDK and runtime on Linux Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Command to install the .NET SDK LTS version 8.0 and its corresponding runtime on Linux using apt. ```bash sudo apt install dotnet-sdk-8.0 dotnet8 ``` -------------------------------- ### Install Python 3 and NumPy on Linux Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Command to install Python 3 and NumPy on Linux using apt. ```bash sudo apt install python3 python3-numpy ``` -------------------------------- ### Install OpenCV on Windows Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Command to install opencv-python on Windows using pip. ```bash pip.exe install opencv-python ``` -------------------------------- ### Install NumPy on Windows Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Command to install NumPy on Windows using pip. ```bash pip.exe install numpy ``` -------------------------------- ### Connection Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of connection settings within a configuration file. ```xml usb 192.168.0.101 50101 true 10 ``` -------------------------------- ### Connection Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/basic-usage.html Example of a connection configuration block in XML format. ```xml usb 192.168.0.101 50101 true 10 ``` -------------------------------- ### Buffer Queue Size Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of setting the buffer queue size. ```xml 5 ``` -------------------------------- ### Video Format Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/basic-usage.html An example of how to specify video format parameters. ```xml 382 288 27 ``` -------------------------------- ### C# Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of how to set up a custom log callback in C# to receive SDK log messages and suppress default output. ```csharp using Optris.OtcSDK; Sdk.init(Verbosity.Debug, Verbosity.Debug, "MyApp"); Sdk.setLogCallback((level, message) => { Console.WriteLine($"[SDK] {message}"); }, exclusive: true); ``` -------------------------------- ### Processing Outputs Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example configuration for processing outputs. ```xml false true true 10 ``` -------------------------------- ### Linux Installation Command Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/installation.html Command to install the Optris Thermal Camera SDK package on Ubuntu LTS. ```bash sudo apt install ./otcsdk--ubuntu--.deb ``` -------------------------------- ### C++ Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of how to set up a custom log callback in C++ to receive SDK log messages and suppress default output. ```cpp #include "[otcsdk/Sdk.h](Sdk_8h.html)" #include void myLogHandler(int verbosityLevel, const char* message) { const char* labels[] = {"ERROR", "WARN", "INFO", "DEBUG", "TRACE"}; std::cout << "[SDK " << labels[verbosityLevel] << "] " << message << std::endl; } int main() { using namespace [optris](namespaceoptris.html); [Sdk::init](classoptris_1_1Sdk.html#a0465394a0e83cbdd796ef9b313e2bea0)([Verbosity::Debug](namespaceoptris.html#a4965aa8dec3ddb7f234d001077702588aa603905470e2a5b8c13e96b579ef0dba), [Verbosity::Off](namespaceoptris.html#a4965aa8dec3ddb7f234d001077702588ad15305d7a4e34e02489c74a5ef542f36)); // Route all SDK log messages through myLogHandler; suppress file and screen output. [Sdk::setLogCallback](classoptris_1_1Sdk.html#a3ab0fa9b07954819a3586f38e9634554)(myLogHandler, true); // ... use the SDK ... // Remove the callback before shutdown. [Sdk::setLogCallback](classoptris_1_1Sdk.html#a3ab0fa9b07954819a3586f38e9634554)(nullptr); return 0; } ``` -------------------------------- ### Python Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of how to set up a custom log callback in Python to receive SDK log messages and suppress default output. ```python from optris import Sdk, Verbosity Sdk.init(Verbosity.Debug, Verbosity.Off) def on_log(level, message): labels = {0: "ERROR", 1: "WARN", 2: "INFO", 3: "DEBUG", 4: "TRACE"} print(f"[SDK {labels.get(level, '?')}] {message}") Sdk.setLogCallback(on_log, exclusive=True) ``` -------------------------------- ### Channel Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An example of how to configure a channel, including device index, pin index, mode, slope, trigger, and uncommitted value. ```xml 0 0 off 1. 0. 5. true Temperature Celsius ``` -------------------------------- ### Process Interface (PIF) Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An example of how to configure the Process Interface (PIF), including device type, count, and channels for analog inputs, digital inputs, analog outputs, and digital outputs. It also shows the fail-safe channel configuration. ```xml stackable 3 0 0 ... ... 0 0 ... ... 0 0 ... ... 0 0 ... ... off ``` -------------------------------- ### Alarm Channel Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An XML example showing the structure for defining an alarm channel, including input source, alarm ranges, and PIF output configurations. ```xml internal_temperature 0 mean 0 0 true true 20. 40. 25. 40. false ... ... ``` -------------------------------- ### Fail Safe Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An XML example demonstrating the configuration of the fail-safe mechanism, including flag timeouts and processing chain timeouts. ```xml true 0 true ``` -------------------------------- ### PIF Output Channel Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An XML example specifying an individual PIF output channel for an alarm. ```xml 0 0 ``` -------------------------------- ### Digital Output Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of configuring a digital output channel with a specific mode and output settings. ```xml 0 0 off true ``` -------------------------------- ### Analog Output Channel Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html An example of how to configure an analog output channel, specifying its device, pin, mode, output mode, slope, and field settings. ```xml 0 0 off 0-10v 1. 0. 0 mean 10. 10. 0. ``` -------------------------------- ### Get Version Info Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1Sdk.html Returns an object containing version and build information about the SDK. ```cpp static OTC_SDK_API VersionInfo getVersionInfo() ``` -------------------------------- ### C++ Example: Creating and Applying Analog Output Configuration Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/pif.html Demonstrates how to create a configuration object for an analog output channel to output a frame synchronization signal and then apply it. ```cpp auto aoConfig = PifAoConfig::createFrameSync(0, 1, PifAoOutputMode::_0_10V, 7.5); // To apply this configuration you can either // call `setAoConfig(aoConfig)` from the `ProcessInterface` to adjust a single channel configuration or // add it to an instance of the `PifConfig` class PifConfig pifConfig; ... pifConfig.analogOutputs.push_back(aoConfig); // and call `setConfig(pifConfig)` of the `ProcessInterface` to set the overall PIF configuration. ``` -------------------------------- ### Visual Studio Project Settings (Static Linking) Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Configuration for Visual Studio C++ projects to link statically against the OTC SDK. ```text * Input page of the `Linker` category * Add to the `Additional Dependency`: * Release builds: * `otcsdk_static.lib` * `ds_stream_base.lib` * `SoSCorrectionLib.lib` * `Urlmon.lib` * `Setupapi.lib` * `winmm.lib` * `legacy_stdio_definitions.lib` * Debug builds: * `otcsdk_staticd.lib` * `ds_stream_based.lib` * `SoSCorrectionLibd.lib` * `Urlmon.lib` * `Setupapi.lib` * `winmm.lib` * `legacy_stdio_definitions.lib` * Preprocessor page of the `C/C++` category * Add `OTC_SDK_STATIC` to the `Preprocessor Definitions`. ``` -------------------------------- ### Visual Studio Project Settings (Dynamic Linking) Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Configuration for Visual Studio C++ projects to link dynamically against the OTC SDK. ```text * General page * Set the `C++ Language Standard` to `ISO C++17 Standard (/std:c++17)`. * VC++ Directories page * Add the path `$(OTC_SDK_DIR)\include` to the `Include Directories`. * Add the path `$(OTC_SDK_DIR)\lib` to the `Library Directories`. * Input page of the `Linker` category * Add to the `Additional Dependencies`: * `otcsdk.lib` for release builds. * `otcsdkd.lib` for debug builds. ``` -------------------------------- ### Example Classes Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/graph_legend.html This section shows example classes and their inheritance relationships, which are then visualized in a graph. ```C++ /*\n * Invisible class because of truncation \n */ class Invisible { }; /*\n * Truncated class, inheritance relation is hidden \n */ class Truncated : public Invisible { }; /* Class not documented with doxygen comments */ class Undocumented { }; /*\n * Class that is inherited using public inheritance \n */ class PublicBase : public Truncated { }; /*\n * A template class \n */ template class Templ { }; /*\n * Class that is inherited using protected inheritance \n */ class ProtectedBase { }; /*\n * Class that is inherited using private inheritance \n */ class PrivateBase { }; /*\n * Class that is used by the Inherited class \n */ class Used { }; /*\n * Super class that inherits a number of other classes \n */ class Inherited : public PublicBase, protected ProtectedBase, private PrivateBase, public Undocumented, public Templ { private: Used *m_usedClass; }; ``` -------------------------------- ### OTC_SDK_API Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/Api_8h.html Only needed when working with Windows DLLs. ```c #define OTC_SDK_API ``` -------------------------------- ### SDK Initialization with Logging Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/color-palettes.html Example of initializing the SDK with specified logging verbosity levels for screen and file output. Palettes are loaded automatically upon successful initialization. ```C++ #include int main() { // Initialize the SDK with Info verbosity for screen logging and Off for file logging. // Palettes are loaded automatically during this process. optris::Sdk::init(optris::Verbosity::Info, optris::Verbosity::Off); // Palettes are now available for use. // ... rest of your application code ... return 0; } ``` -------------------------------- ### CMakeLists.txt Configuration Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html Adds the OTC SDK to a CMake project and links it to a target. Demonstrates both shared and static linking. ```cmake find_package(otcsdk REQUIRED) target_link_libraries( myTarget PRIVATE otcsdk::otcsdk ) ``` ```cmake find_package(otcsdk REQUIRED) target_link_libraries( myTarget PRIVATE otcsdk::otcsdk_static ) ``` -------------------------------- ### Serial Number Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of how a serial number might be represented in a configuration file. ```xml 1234567 ``` -------------------------------- ### Fail Safe Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example of configuring a fail safe channel, with the mode set to 'off'. ```xml off ``` -------------------------------- ### OTC_SDK_C_CALL Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/Api_8h.html Only needed when working with Windows DLLs. ```c #define OTC_SDK_C_CALL ``` -------------------------------- ### Measurement Fields Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example structure for defining measurement fields within the configuration file. ```xml ... ... ``` -------------------------------- ### Initialize SDK Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1Sdk.html Initializes the SDK with specified logging options and custom directories. ```cpp static OTC_SDK_API void init(Verbosity logScreen, Verbosity logFile, std::string logFilenamePrefix="", std::string customDataDirectory="") ``` -------------------------------- ### Namespaces Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/TemperaturePrecision_8h.html Main SDK namespace. ```c++ namespace optris ``` -------------------------------- ### OTC_SDK_EXTERN Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/Api_8h.html Only needed when working with Windows DLLs. ```c #define OTC_SDK_EXTERN ``` -------------------------------- ### Digital Input Configuration Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Example configuration for a digital input channel, setting it to 'off' mode with low active trigger. ```xml 0 0 off true ``` -------------------------------- ### Individual Field Definition Example Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/important-files.html Detailed example of a single measurement field definition, including name, shape, position, dimensions, and radiation properties. ```xml PIF rectangle 35 55 40 40 40 40 ... false 1. ``` -------------------------------- ### Getting the Currently Active Operation Mode Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/operation-modes.html Retrieves the currently active operation mode and provides a method to get its index within the available modes container. ```cpp IRImager::getActiveOperationMode() OperationMode::getIndex() ``` -------------------------------- ### loadPalettes (no directory) Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/Sdk_8h_source.html Loads palettes. ```C++ static void loadPalettes(); ``` -------------------------------- ### Command Line Options for Finding Devices Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/basic-usage.html This snippet shows the command line options for the device finding tool, including options to quit, monitor connection events, or prompt the user. ```bash otc_find_devices -e otc_find_devices -m otc_find_devices ``` -------------------------------- ### Get Value Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1UncommittedValueStatus.html Returns the uncommitted value. ```cpp float getValue () const noexcept ``` -------------------------------- ### init function Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/Sdk_8h_source.html Initializes the SDK with specified verbosity levels for logging and optional custom data directory. ```C++ static OTC_SDK_API void init(Verbosity logScreen, Verbosity logFile, std::string logFilenamePrefix="", std::string customDataDirectory=""); ``` -------------------------------- ### Get Unit Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1UncommittedValueStatus.html Returns the unit of the uncommitted value. ```cpp const std::string & getUnit () const noexcept ``` -------------------------------- ### Checking SDK Version Information Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/basic-usage.html This snippet shows how to check the basic version and build information about the SDK on different operating systems. ```bash otc_version.exe # Windows otc_version # Linux ``` -------------------------------- ### Python 3 Import Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/start-developing.html How to import the OTC SDK module in Python 3. ```python import optris.otcsdk as otc ``` -------------------------------- ### Get Name Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1UncommittedValueStatus.html Returns the name of the uncommitted value. ```cpp const std::string & getName () const noexcept ``` -------------------------------- ### Get State Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1AlarmChannelStatus.html Returns the state of the alarm channel. ```cpp AlarmState getState () const noexcept ``` -------------------------------- ### create() Method Implementation Details Source: https://github.com/optris/otcsdk_downloads/blob/main/doc/html/classoptris_1_1IRImagerCreator.html Detailed signature and explanation of the create() method. ```cpp virtual std::shared_ptr< IRImager > optris::IRImagerCreator::create ( ) pure virtual ```