Crates.io | pylon-cxx |
lib.rs | pylon-cxx |
version | 0.4.2 |
source | src |
created_at | 2021-04-04 15:59:24.52026 |
updated_at | 2024-11-18 09:18:01.108228 |
description | Rust wrapper of the Pylon libraries for Basler cameras |
homepage | |
repository | https://github.com/strawlab/pylon-cxx |
max_upload_size | |
id | 378847 |
size | 101,952 |
Rust wrapper of the Pylon libraries for Basler cameras using CXX.
Windows, linux, and macOS are all tested.
Enable async stream support using tokio with the cargo feature stream
. This
feature is currently not compatible with Windows (help wanted).
This crate expects to find the Pylon developer kit at the usual install
location. Build with normal rust commands. For example, to run the grab
example:
cargo run --example grab
On macOS, building should work, but it is required update your environment variables to run the produced binaries:
export DYLD_LIBRARY_PATH="/Library/Frameworks/pylon.framework/Versions/A/Libraries/"
I have seen articles like https://jorgen.tjer.no/post/2014/05/20/dt-rpath-ld-and-at-rpath-dyld/ which suggest a way to avoid this issue.
See Basler's documentation. This can simulate different frame rates, failures, etc.
# on bash (e.g. linux)
export PYLON_CAMEMU=2
# in Windows Powershell
$Env:PYLON_CAMEMU=2
Anyone who interacts with this software in any space, including but not limited to this GitHub repository, must follow our code of conduct.
This crate is Copyright (C) 2020 Andrew Straw strawman@astraw.com.
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. This file may not be copied, modified, or distributed except according to those terms.
Note that this license only covers this Rust crate. The underlying Pylon library has different license terms.