Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
Example Applications

Contents

Preparations

On Windows the installer copied the source code of the examples to your Documents folder. On Linux you have to manually copy them from the installation directory to a place in your Home folder where you can edit them as you please. Additionally, you should change the ownership of these files as well.

sudo cp -r /usr/share/doc/otcsdk/examples ~
sudo chown -R $USER examples
Note
On Windows you can find the source code of the examples in the <SDK Install Directory>\examples folder as well. Copy it from there, if messed up the examples in the Documents folder too much.

The examples folder contains a directory for each supported programming language. In them you can find the same examples. Only the Simple View example has a slightly different feature set across the different languages.

Please refer to the Toolchains section of the Start Developing chapter to get detailed instructions on how to install all the required tools to compile and run the examples.

Enumeration

This example illustrates how to use the EnumerationManager. The EnumerationManager allows you to detect devices that are currently attached to your computer. The example continuously lists events indicating newly attached or removed devices.

You can quit the program at any time using Ctrl + C.

Enumeration example.
Note
The EnumerationManager can currently only detect devices attached to your computer via USB.

Please refer to its respective README.md for details on how to compile and to start the application.

Minimal

The purpose of this example is to show the minimum amount of code required to get thermal data from a device. To this end, it defines the class SimpleImagerClient which is derived from the IRImagerClient. It is used to observe the IRImager instance that is connected to your device. The SimpleImagerClient does not process the thermal data in any way but just prints out the dimensions of the received thermal frame. Additionally, it outputs the state of the internal shutter flag.

You can quit the program at any time using Ctrl + C.

Minimal example.
Note
The example expects the serial number of the device it should connect to. If none is provided, the SDK will use the EnumerationManager to locate a suitable device on the USB port and connect to it.

Please refer to its respective README.md for details on how to build to start the application.

Simple View

This is the most elaborate example. It illustrates, at least, how to retrieve thermal frames from your device and how to convert them into false color images. Its feature set varies across the supported programming languages with the C++ version being the most comprehensive one. All three of them define an IRImagerClient child class named IRImagerShow that observes an IRImager instance. Received thermal frames are buffered until a rendering loop converts them into false color images using the ImageBuilder class. The C++ version also illustrates how the ImagerBuilder can be used to locate hot and cold spots and how to calculate the mean temperature within a predefined area. Furthermore, it shows how a MeasurementField can be added.

C++ Simple View example.
Note
The cross-hairs denoting the hot and cold spots as well as the one in the center are not displayed, if one of the frame dimensions is to small. The MeasurementField is a square with an edge length of 20 pixels and located slightly inwards from the upper left corner. It will not be added, if the frame dimensions are too small.

The C++ and Python 3 versions expected the serial number of the device to connect to as a command line argument. In this regard they behave like the Minimal example. The C# example offers the menu option Device - Quick Connect instead.

Note
The C# Simple View example is only available on Windows since it uses Windows Forms as basis for its GUI.

Please refer to its respective README.md for details on how to compile and to start the application.