Optris PI640 Infrared Camera
The thermal imager Optris PI 640i has an optical resolution of 640x480 pixels.
The thermal imager has the following technical details:
- Temperature range: -20 °C to 900 °C (-4 °F to 1652 °F)
- Frame rate: 32 Hz / 125 Hz @ 640 x 120 pixels
- Different optics
- USB connection
- Software Development Kits (SDK) - Direct SDK with C++ interface for Windows and Linux
Direct SDK
The direct SDK provdied by Evocortex GmbH can be downloaded free of charge at https://www.evocortex.org/downloads.
The direct SDK makes it possible to read out the thermal imager without needing the PIX Connect software. Important Note: The software must be closed when accessing the camera via the direct SDK, as the software blocks the communication port.
Here is an overview of some functions provided by the direct SDK documentation :
- usb_init(xml_config): Initializes IRImager via USB with provided XML configuration.
- terminate(): Disconnects the camera connected via USB or TCP.
- get_thermal_image_size(): Retrieves the width and height of the thermal image.
- get_palette_image_size(): Retrieves the width and height of the palette image.
- get_thermal_image(width, height): Retrieves the thermal image data as a numpy array.
- get_palette_image(width, height): Retrieves the palette (RGB) image data as a numpy array.
- get_thermal_palette_image(width, height): Retrieves both thermal and palette images as numpy arrays.
- set_palette(colouringPalette): Sets the palette format using a palette ID.
- set_palette_scale(paletteScalingMethod): Sets the palette scaling method.
- set_palette_range(paletteRangeMin, paletteRangeMax): Sets the manual palette scaling temperature range.
- set_temperature_range(min, max): Sets the temperature range for the camera.
Python Library
A python Library is available on GitHub - PyOptris, which implements the functions in a python library.
A minimal working example is given in the following, which allows the access to the camera and displays the frames.
Dependencies
The python library has some dependencies that need to be installed first:
Extracting Temperature Values
The python Library provides two functions to grab frames from the camera:
- get_palette_image(width, height): Retrieves the palette (RGB) image data as a numpy array.
- get_thermal_image(width, height): Retrieves the thermal image data as a numpy array.
The palette image is the false color image as also seen in the PIX Connect software. The thermal image has the temperature data stored for each pixel which can be converted to temperature values (°C) as follows:
Known Issues
According to the GitHub page this python package leaks memory and can be unstable. It seems that get_thermal_palette_image(width, height), which retrieves both thermal and palette images as numpy arrays is not working as it restarts the python shell.