![]() |
Thermal Camera SDK 10.1.1
SDK for Optris Thermal Cameras
|
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.
<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.
This example illustrates how to use and adjust the EnumerationManager. The EnumerationManager allows you to detect devices that are currently connected to your computer via USB or Ethernet. The example continuously lists events indicating newly attached or removed devices or a changed connection status.
By default the EnumerationManager only uses a detector for USB device. To enumerate Ethernet devices you need to add an Ethernet detector and specify the network in which the SDK should search for devices. This accomplished with the following method of the EnumerationManager (C++):
The network address is provided in CIDR notation: 192.168.0.0/24 is equivalent to 192.168.0.0 with the subnet mask 255.255.255.0. The SDK ignores the host portion of the provided IP address. Adjust the address to your own network configuration to detect your Ethernet devices. As a alternative, the network address can be specified via numeric values:
You can add Ethernet detectors for multiple networks in this way as long as they have different addresses. You can quit the program at any time using Ctrl + C.
Please refer to its respective README.md for details on how to compile and to start the application.
The purpose of this example is to show the minimum amount of code required to get thermal data from a device. To do this, 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 extensively process the thermal data but displays the dimensions of the thermal frame, the frame rate, the temperature of the center pixel in °C and the current state of the internal shutter flag of the device.
You can quit the program at any time using Ctrl + C.
addEthernetDetector() method. For more details refer to the Enumeration example.Please refer to its respective README.md for details on how to build to start the application.
This example is based on the Minimal example but also shows some ways to access and configure the Process Interface (PIF).
The configuration of the PIF is grouped in the configurePif() method. It checks which PIF device is connected and, dependent on the available inputs and outputs, sets these following modes for the first pin of each channel:
| Channel | (DeviceIndex,PinIndex) | Mode |
|---|---|---|
| Analog input (AI) | [0, 0] | Uncommitted Value |
| Analog output (AO) | [0, 0] | Internal Temperature |
| Digital input (DI) | [0, 0] | Flag Control |
| Digital output (DO) | [0, 0] | External Communication |
| Dedicated FailSave (FS) | [0, 0] | On |
The screenshot below shows the output for a Xi410 with three connected "stackable" PIFs:
The following sections explain the settings of each mode in this example in greater detail.
For the analog input, the Uncommitted Value mode was selected for this example. It simulates that a pressure sensor is connected to the input and that its voltage level reflects the current pressure. The unit is set to "Pa" and the offset to 0. With a gain of 0.1 this means that a voltage of 2.16 V translates into 21.6 Pa. Every time the input value changes it will be made available via the onPifUncommittedValue(), which in this example just prints the value.
For the analog output, the Internal Temperature mode was selected for this example. With a gain of 0.1 and a offset of 0, this means that a internal temperature of 34.5 °C would translate into 3.45 V on the pin.
For the digital input, the Flag Control mode was selected for this example. Since the parameter openIfLow is set to true, the flag is open if the input voltage is below 2 V.
For the digital input, the External Communication mode was selected for this example. You can set the output to high or low using the setDoValue() method.
If available, this example turns the dedicated fail safe pin on. The fail safe remains active as long as the camera and the processing chain of the SDK is working correctly. While active the dedicated fail safe pin outputs a voltage level higher than zero and the LED next to the pin lights up. If inactive, the voltage level will be zero and the LED will be off.
An SDK client can interrupt the all-clear fail safe signal with the help of the interruptFailSafe() method of the IRImager interface.
The direct access of the PIF input values is performed in the onThermalFrame() callback via the FrameMetadata object. Since this example is supposed to be as generic as possible, there are some extra checks to determine how many inputs are actually available. The access happens through the getPifXXValue() method, where XX is either Ai or Di.
This example prints the value of each available channel for every received frame.
Like before, this is what the output for a Xi410 with three "stackable" PIF looks like:
In this screenshot: The AI1.1 is actively used and displays the current input voltage. AI1.2 is pulled to ground but still displays 0,1 V. The other pins are left floating (no voltage connected) and display 0.11 V.
Some important notes:
addEthernetDetector() method. For more details refer to the Enumeration example.Please refer to its respective README.md for details on how to compile and to start the application.
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.
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.
addEthernetDetector() method. For more details refer to the Enumeration example.Please refer to its respective README.md for details on how to compile and to start the application.