Metadata-Version: 2.4
Name: optris-sdk
Version: 12.0.22
Summary: Python binding for the Optris thermal camera SDK: live temperature frames, measurement regions, alarms and recording.
Author: Optris GmbH & Co. KG
License-Expression: LicenseRef-Optris-Proprietary
Project-URL: Homepage, https://optris.com/software/otc-sdk/
Project-URL: Documentation, https://docs.optris.com/sdks/otc-sdk/
Project-URL: Download, https://docs.optris.com/sdks/otc-sdk/
Project-URL: Company, https://www.optris.com
Keywords: thermal,infrared,camera,optris,radiometry
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Multimedia :: Video :: Capture
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: eula/eula.de.md
License-File: eula/eula.en.md
License-File: eula/general-terms.de.md
License-File: eula/general-terms.en.md
License-File: eula/eula.de.txt
License-File: eula/eula.en.txt
License-File: eula/eula.txt
License-File: eula/general-terms.de.txt
License-File: eula/general-terms.en.txt
License-File: eula/general-terms.txt
License-File: eula/eula.de.pdf
License-File: eula/eula.en.pdf
License-File: eula/general-terms.de.pdf
License-File: eula/general-terms.en.pdf
License-File: eula/eula.properties
Provides-Extra: numpy
Requires-Dist: numpy>=1.20; extra == "numpy"
Dynamic: license-file

# Optris SDK for Python

The Python binding for the Optris thermal camera SDK: live temperature frames, measurement regions, alarms, recording and playback, for the Optris Xi and PI camera lines.

**Documentation:** https://docs.optris.com/sdks/otc-sdk/

The wheel is self-contained. It carries the native SDK library, the FFmpeg libraries it uses for video, the SDK's camera format table, palettes and norm tables, and on Windows the Microsoft Visual C++ runtime. No separate SDK installation is needed.

```bash
pip install optris-sdk
```

```python
import optris_sdk

with optris_sdk.Camera.simulated() as camera:
    camera.start()
    spot = optris_sdk.Region.spot(camera.from_pixels(80, 60))
    spot.set_name("inlet")
    region_id = camera.regions.add(spot)

    shown = 0
    for frame in camera.frames():
        # A real camera's first frames, about 20 s of them, come before
        # its startup calibration has finished: not measurements.
        if not frame.thermal_data_reliable:
            continue
        stats = camera.regions.stats(region_id)
        if stats.valid:
            print(f"{stats.mean_c:.1f} C over {stats.pixel_count} px")
            shown += 1
            if shown == 30:
                break
```

That runs with no hardware. Replace `Camera.simulated()` with `Camera.open()` for the first camera attached, or `Camera.open(serial="21074191")` for a particular one.

## Platforms

| Wheel | Runs on |
|---|---|
| `win_amd64` | 64-bit Windows 10 and 11 |
| `manylinux_2_35_x86_64` | 64-bit Intel and AMD Linux with glibc 2.35 or later: Debian 12 and 13, Ubuntu 22.04 and 24.04 |
| `manylinux_2_35_aarch64` | 64-bit Arm Linux with glibc 2.35 or later, the same distributions |

Python 3.9 or later. The binding is pure Python over `ctypes`, so one wheel serves every Python version on its platform.

**On Windows there is nothing else to install.**

**On Linux, four libraries come from your distribution** rather than from the wheel: libusb-1.0, libudev, zlib and OpenSSL 3. They stay system libraries on purpose, so that OpenSSL receives your distribution's security updates and libusb and libudev match your kernel and udev. libudev, zlib and OpenSSL are present on every supported distribution; libusb is missing from minimal systems and containers:

```bash
sudo apt-get install libusb-1.0-0
```

Without it, `import optris_sdk` stops with an error that names the missing library.

**For a USB camera on Linux, install the udev rules once.** The simulated camera and recordings need nothing more, but without the rules a real camera enumerates read-only and the SDK cannot open it. pip cannot install them, so they are in the package:

```bash
python3 -c "import optris_sdk, os; print(os.path.join(os.path.dirname(optris_sdk.__file__), 'udev'))"
sudo cp <that folder>/*.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
```

## NumPy

Optional. `Frame.to_numpy()` needs it and `Frame.samples()` does not: it returns a `ctypes` array viewing the SDK's own memory. `pip install optris-sdk[numpy]` installs both.

## Which library is loaded

The wheel's own library, from `optris_sdk/lib/`, unless `OPTRIS_SDK_LIBRARY` names a different file. `optris_sdk.library_path` says which file was loaded. If an SDK is also installed on the machine, the wheel still uses its own copy, so a program does not change behaviour when the SDK is installed or removed beside it.

The package checks at import that the library implements the C ABI version it was generated against, and refuses an older one with a message saying which file it found.

## Examples and documentation

The SDK's 27 Python examples, from discovering cameras to recording and replaying, ship with the SDK installation (the `.deb` and the Windows installer). Each one runs against the simulated camera when started with no arguments.

- Product page: https://optris.com/software/otc-sdk/
- The SDK manual, with the downloads for every platform: https://docs.optris.com/sdks/otc-sdk/

## Licence

Proprietary. The Optris End User License Agreement and the General Terms and Conditions of Sale it refers to are installed with the package, in German (the binding version) and English, in the `licenses/eula` folder of the package's `.dist-info` directory. The third-party notices for the libraries the wheel carries, including the LGPL v3 notice for FFmpeg, are in `optris_sdk/licenses/`, and the FFmpeg notice also beside the libraries in `optris_sdk/lib/`.
