#basler #camera #bindings #pylon #image

sys pylon-cxx

Rust wrapper of the Pylon libraries for Basler cameras

10 releases

new 0.3.1 Nov 30, 2021
0.3.0 Nov 24, 2021
0.2.2 Nov 22, 2021
0.2.0 Oct 17, 2021
0.1.1 Apr 4, 2021

#65 in Images

Download history 298/week @ 2021-08-10 133/week @ 2021-08-17 170/week @ 2021-08-24 235/week @ 2021-08-31 318/week @ 2021-09-07 344/week @ 2021-09-14 117/week @ 2021-09-21 224/week @ 2021-09-28 540/week @ 2021-10-05 314/week @ 2021-10-12 378/week @ 2021-10-19 331/week @ 2021-10-26 469/week @ 2021-11-02 239/week @ 2021-11-09 302/week @ 2021-11-16 444/week @ 2021-11-23

1,467 downloads per month

MIT/Apache

50KB
1K SLoC

Rust 789 SLoC // 0.0% comments C++ 323 SLoC // 0.1% comments

pylon-cxx-rs

Crates.io

Rust wrapper of the Pylon libraries for Basler cameras using CXX.

Platform support

Windows, linux, and macOS are all tested.

Building

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

On macOS, check this: https://github.com/basler/pypylon/issues/6#issuecomment-403090732 In other words, do this:

export LD_LIBRARY_PATH=/Library/Frameworks/pylon.framework/Libraries

Camera emulation

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

Code of conduct

Anyone who interacts with this software in any space, including but not limited to this GitHub repository, must follow our code of conduct.

License

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.

Dependencies

~0.8–1.4MB
~32K SLoC

a