| Crates.io | pylon |
| lib.rs | pylon |
| version | 0.3.6 |
| created_at | 2019-04-03 13:05:09.123181+00 |
| updated_at | 2024-12-16 15:57:09.277247+00 |
| description | Highlevel API for Basler Pylon cameras |
| homepage | |
| repository | https://gitlab.com/hirschenberger/pylon |
| max_upload_size | |
| id | 125636 |
| size | 64,434 |
This is a highlevel API on top of the pylon-cxx crate which is a Rust-binding around the official Basler Pylon-SDK.
Typestate-pattern based camera objects to avoid common mistakes that lead to runtime errors like opening an already open camera or start grabbing on a already grabbing camera.
Async stream combinators for Linescan-cameras.
Support for the Sequencer feature to quickly grab consecutive frames with different acquisition paramters.
use std::time::Duration;
use pylon::{ClosedCamera, Pylon, LineCameraExt, GrabStatus, PylonError};
let pylon = Pylon::new();
let cam = ClosedCamera::new(&pylon)?;
let mut cam = cam.open()?; // this is a OpenCamera struct now.
// we use time futures here but it can ba any kind of future (IO-Cards, network-sockets...)
let start = tokio::time::sleep(Duration::from_secs(1));
let end = tokio::time::sleep(Duration::from_secs(2));
assert!(matches!(
cam.join_from_until(start, end, Some(1024*1024*100)).await?,
GrabStatus::Success(_)
));
Copyright 2024, Falco Hirschenberger falco.hirschenberger@gmail.com