Camera API with a reduced feature set for basic usecases and learning
https://github.com/payload/kamera.git
Camera API with a reduced feature set for basic usecases and learning.
cargo t -- --test-threads=1 --nocaptureuse kamera::Camera;
let camera = Camera::new_default_device();
camera.start();
let Some(frame) = camera.wait_for_frame() else { return }; // always blockingly waiting for next new frame
let (w, h) = frame.size_u32();
frame.data().data_u32() // use this buffer, per default in ARGB format
// for real use cases processing or displaying frames can get more complicated when trying to be most efficient
camera.stop() // or drop it
On a Debian like system (MX Linux for example) I needed to install these system dependencies to build all crates:
sudo apt install build-essentials cmake libfontconfig1-dev clang