Giter Club home page Giter Club logo

camera_examples's People

Contributors

manzelmi-thorlabs avatar trumanmetz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jr-peterzon

camera_examples's Issues

Build examples for Linux with Makefile or CMake

Hi there,

After days of fiddling with the SDK i finally managed to get images from the Thorlabs zelux CS165MU under Win11.
Unfortunately the example code only gives a pointer to the image but not how the data is organized. (RGB? width? height? etc.)

The Linux version of the SDK however won't get far and will cause a segfault. Apart from the curiously creative dlopen solution (why not just link the executable with the libraries??) it looks pretty straight forward C code.

In general linking with shared libraries is as simple as adding -l<library> to gcc. Using dlopen however will add an enormous amount of complexity (see the ..._load.c source files) that mimics the same behavior but skips the initialization of the library. It also hides any other issues that may arise by simply using pointers that may or may not be correctly configured. Dynamic linking actually makes the code simpler and possibly faster. Let the compiler do the heavy lifting, it's built for that.

Under Linux it is general practice to have some sort of build environment that is widely supported like Make or CMake.
The latter allowing for easy checks of where to find related libraries and such.

I hope to see some Linux examples in this repository that can be used to reproduce a working camera image capture.

best regards,
Jan Rinze.

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.