Giter Site home page Giter Site logo

pyoptris's Introduction

PyOptris

Python bindings for the Optris PI thermal imaging cameras.

How to Use

Ensure that the SDK is extracted to C:\lib\irDirectSDK. Then to build run

python setup.pt build_ext --inplace

Then to use the library

import pyoptris
import cv2

pyoptris.usb_init('generic.xml')
# or
pyoptris.tcp_init('localhost', 1337)

while(True):
    frame = pyoptris.get_palette_image()
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

pyoptris.terminate()
cv2.destroyAllWindows()

Limitations and Issues

  • This library leaks memory. I haven't gotten so far as to work this part out but it will come soon.
  • Can only talk to one camera at the moment, need to bind to the C++ library rather than the C direct_binding functions.
  • Lots of hacked together programming at this stage, so there is limited error checking, no guarantee of best practices etc.

Notes

This has been tested on Windows 10 with Miniconda 4.7.11, Python 3.7.4 64bit, Build Tools for Visual Studio 2019, and with an Optris PI 450 camera.

I am very new to working with the Python C API so there are likely lots of issues with the code, I was only coding with this for a short time to test a camera from a supplier. I am also new to writing Python extensions, especially using setuptools, so this may also be incomplete.

I welcome any suggestions, pull requests, discussion, etc.

Links

pyoptris's People

Contributors

piratecarrot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyoptris's Issues

Cannot install the package

Hi,

I'm getting an error trying to install the pyoptris package, by running "python setup.py build_ext --inplace" at the terminal:

running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
copying build\lib.win-amd64-3.7\pyoptris.cp37-win_amd64.pyd ->

I would appreciate your assistance in that matter very much, thank you.

(Using similar environment to your's: win10, PyCharm + Anaconda, Optris PI450 with directSDK version 7.2)

sudden shifted temperature

Thanks for the nice codecs. May I know the details on memory leaking stated in your readme file? Also, the temperature reading shifted up suddenly after a random duration, and did not shift down to normal. Is it related to the memory leaking? My camera is pi 400, thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.